From 00dde4f3f4bd0eff87e71beb808c53cc100df998 Mon Sep 17 00:00:00 2001 From: m00472246 Date: Mon, 26 Feb 2024 10:20:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85nativeWindow=E4=B8=AD?= =?UTF-8?q?=E7=9A=84format=E3=80=81ColorGamut=E3=80=81TransformType=20Sign?= =?UTF-8?q?ed-off-by:=20m00472246=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: m00472246 --- .../graphic_2d/native_buffer/native_buffer.h | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/graphic/graphic_2d/native_buffer/native_buffer.h b/graphic/graphic_2d/native_buffer/native_buffer.h index 4c8f1971ecd..1acf363f9c7 100644 --- a/graphic/graphic_2d/native_buffer/native_buffer.h +++ b/graphic/graphic_2d/native_buffer/native_buffer.h @@ -67,6 +67,21 @@ enum OH_NativeBuffer_Usage { * @version 1.0 */ enum OH_NativeBuffer_Format { + /** + * CLUT8 format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_CLUT8 = 0, + /** + * CLUT1 format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_CLUT1, + /** + * CLUT4 format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_CLUT4, NATIVEBUFFER_PIXEL_FMT_RGB_565 = 3, /// < RGB565 format */ NATIVEBUFFER_PIXEL_FMT_RGBA_5658, /// < RGBA5658 format */ NATIVEBUFFER_PIXEL_FMT_RGBX_4444, /// < RGBX4444 format */ @@ -85,6 +100,81 @@ enum OH_NativeBuffer_Format { NATIVEBUFFER_PIXEL_FMT_BGRA_5551, /// < BGRA5551 format */ NATIVEBUFFER_PIXEL_FMT_BGRX_8888, /// < BGRX8888 format */ NATIVEBUFFER_PIXEL_FMT_BGRA_8888, /// < BGRA8888 format */ + /** + * YUV422 interleaved format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YUV_422_T, + /** + * YCBCR422 semi-plannar format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YCBCR_422_SP, + /** + * YCRCR422 semi-plannar format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YCRCR_422_SP, + /** + * YCBCR420 semi-plannar format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YCBCR_420_SP, + /** + * YCRCR420 semi-plannar format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YCRCR_420_SP, + /** + * YCBCR422 plannar format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YCBCR_422_P, + /** + * YCRCR422 plannar format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YCRCR_422_P, + /** + * YCBCR420 plannar format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YCBCR_420_P, + /** + * YCRCR420 plannar format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YCRCR_420_P, + /** + * YUYV422 packed format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YUYV_422_PKG, + /** + * UYVY422 packed format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_UYVY_422_PKG, + /** + * YVYU422 packed format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_YVYU_422_PKG, + /** + * VYUY422 packed format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_VYUY_422_PKG, + /** + * RGBA_1010102 packed format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_RGBA_1010102, + /** + * vender mask format + * @since 12 + */ + NATIVEBUFFER_PIXEL_FMT_VENDER_MASK = 0X7FFF0000, NATIVEBUFFER_PIXEL_FMT_BUTT = 0X7FFFFFFF /// < Invalid pixel format */ }; @@ -162,6 +252,49 @@ enum OH_NativeBuffer_ColorSpace { OH_COLORSPACE_DISPLAY_BT2020_PQ, }; +/** + * @brief Indicates the transform type of a native buffer. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer + * @since 12 + * @version 1.0 + */ +enum OH_NativeBuffer_TransformType { + NATIVEBUFFER_ROTATE_NONE = 0, /**< No rotation */ + NATIVEBUFFER_ROTATE_90, /**< Rotation by 90 degrees */ + NATIVEBUFFER_ROTATE_180, /**< Rotation by 180 degrees */ + NATIVEBUFFER_ROTATE_270, /**< Rotation by 270 degrees */ + NATIVEBUFFER_FLIP_H, /**< Flip horizontally */ + NATIVEBUFFER_FLIP_V, /**< Flip vertically */ + NATIVEBUFFER_FLIP_H_ROT90, /**< Flip horizontally and rotate 90 degrees */ + NATIVEBUFFER_FLIP_V_ROT90, /**< Flip vertically and rotate 90 degrees */ + NATIVEBUFFER_FLIP_H_ROT180, /**< Flip horizontally and rotate 180 degrees */ + NATIVEBUFFER_FLIP_V_ROT180, /**< Flip vertically and rotate 180 degrees */ + NATIVEBUFFER_FLIP_H_ROT270, /**< Flip horizontally and rotate 270 degrees */ + NATIVEBUFFER_FLIP_V_ROT270, /**< Flip vertically and rotate 270 degrees */ +}; + +/** + * @brief Indicates the color gamut of a native buffer. + * + * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer + * @since 12 + * @version 1.0 + */ +enum OH_NativeBuffer_ColorGamut { + NATIVEBUFFER_COLOR_GAMUT_NATIVE = 0, /**< Native or default */ + NATIVEBUFFER_COLOR_GAMUT_STANDARD_BT601 = 1, /**< Standard BT601 */ + NATIVEBUFFER_COLOR_GAMUT_STANDARD_BT709 = 2, /**< Standard BT709 */ + NATIVEBUFFER_COLOR_GAMUT_DCI_P3 = 3, /**< DCI P3 */ + NATIVEBUFFER_COLOR_GAMUT_SRGB = 4, /**< SRGB */ + NATIVEBUFFER_COLOR_GAMUT_ADOBE_RGB = 5, /**< Adobe RGB */ + NATIVEBUFFER_COLOR_GAMUT_DISPLAY_P3 = 6, /**< Display P3 */ + NATIVEBUFFER_COLOR_GAMUT_BT2020 = 7, /**< BT2020 */ + NATIVEBUFFER_COLOR_GAMUT_BT2100_PQ = 8, /**< BT2100 PQ */ + NATIVEBUFFER_COLOR_GAMUT_BT2100_HLG = 9, /**< BT2100 HLG */ + NATIVEBUFFER_COLOR_GAMUT_DISPLAY_BT2020 = 10, /**< Display BT2020 */ +}; + /** * @brief OH_NativeBuffer config. \n * Used to allocating new OH_NativeBuffer andquery parameters if existing ones. -- Gitee