[mpp_frame]: add complex formats and more comments

A few comments for the pixel formats are not correct,
also without the mapping to the common name comparing
to the Gstreamer or V4L2.

Both VPU and RKV supports tile format, so I add a new
type to store those pixel formats with a complex layout.

The VDPU does NOT semi-planarity pixel formats and
other than 8x4 marcoblock size for the tile format.

Change-Id: I9abea54a563eafe6902f5cf5e25e741a809f41b0
Signed-off-by: Randy Li <randy.li@rock-chips.com>
This commit is contained in:
Randy Li
2017-10-11 11:35:48 +08:00
committed by Herman Chen
parent e54fafe8cb
commit c89b4727c7

View File

@@ -145,21 +145,26 @@ typedef enum {
#define MPP_FRAME_FMT_MASK 0x000f0000
#define MPP_FRAME_FMT_YUV 0x00000000
#define MPP_FRAME_FMT_RGB 0x00010000
#define MPP_FRAME_FMT_COMPLEX 0x00020000
/*
*mpp color format define
*/
typedef enum {
MPP_FMT_YUV420SP = MPP_FRAME_FMT_YUV, /* YYYY... UV... */
MPP_FMT_YUV420SP = MPP_FRAME_FMT_YUV, /* YYYY... UV... (NV12) */
/*
* A rockchip specific pixel format, without gap between pixel aganist
* the P010_10LE/P010_10BE
*/
MPP_FMT_YUV420SP_10BIT,
MPP_FMT_YUV422SP, /* YYYY... UVUV... */
MPP_FMT_YUV422SP, /* YYYY... UVUV... (NV24) */
MPP_FMT_YUV422SP_10BIT, ///< Not part of ABI
MPP_FMT_YUV420P, /* YYYY... UUUU... VVVV */
MPP_FMT_YUV420SP_VU, /* YYYY... VUVUVU... */
MPP_FMT_YUV422P, /* YYYY... UUUU... VVVV */
MPP_FMT_YUV422SP_VU, /* YYYY... VUVUVU... */
MPP_FMT_YUV422_YUYV, /* YUYVYUYV... */
MPP_FMT_YUV422_UYVY, /* UYVYUYVY... */
MPP_FMT_YUV420P, /* YYYY... U...V... (I420) */
MPP_FMT_YUV420SP_VU, /* YYYY... VUVUVU... (NV21) */
MPP_FMT_YUV422P, /* YYYY... UU...VV...(422P) */
MPP_FMT_YUV422SP_VU, /* YYYY... VUVUVU... (NV42) */
MPP_FMT_YUV422_YUYV, /* YUYVYUYV... (YUY2) */
MPP_FMT_YUV422_UYVY, /* UYVYUYVY... (UYVY) */
MPP_FMT_YUV400SP, /* YYYY... */
MPP_FMT_YUV440SP, /* YYYY... UVUV... */
MPP_FMT_YUV411SP, /* YYYY... UV... */
@@ -178,7 +183,11 @@ typedef enum {
MPP_FMT_ARGB8888, /* 32-bit RGB */
MPP_FMT_ABGR8888, /* 32-bit RGB */
MPP_FMT_RGB_BUTT,
MPP_FMT_BUTT = MPP_FMT_RGB_BUTT,
/* simliar to I420, but Pixels are grouped in macroblocks of 8x4 size */
MPP_FMT_YUV420_8Z4 = MPP_FRAME_FMT_COMPLEX,
/* The end of the formats have a complex layout */
MPP_FMT_COMPLEX_BUTT,
MPP_FMT_BUTT = MPP_FMT_COMPLEX_BUTT,
} MppFrameFormat;
typedef enum {