media: v4l2-tpg-core: Add support for 32-bit packed YUV formats (v2)
Add support for the following formats to tpg: V4L2_PIX_FMT_AYUV32 V4L2_PIX_FMT_XYUV32 V4L2_PIX_FMT_VUYA32 V4L2_PIX_FMT_VUYX32 Changes from v1: Remove the duplicate case value Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
a7fe4ca72b
commit
10a2bc7e63
|
@ -246,6 +246,10 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
|
|||
case V4L2_PIX_FMT_YUV555:
|
||||
case V4L2_PIX_FMT_YUV565:
|
||||
case V4L2_PIX_FMT_YUV32:
|
||||
case V4L2_PIX_FMT_AYUV32:
|
||||
case V4L2_PIX_FMT_XYUV32:
|
||||
case V4L2_PIX_FMT_VUYA32:
|
||||
case V4L2_PIX_FMT_VUYX32:
|
||||
tpg->color_enc = TGP_COLOR_ENC_YCBCR;
|
||||
break;
|
||||
case V4L2_PIX_FMT_YUV420M:
|
||||
|
@ -372,6 +376,10 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
|
|||
case V4L2_PIX_FMT_ARGB32:
|
||||
case V4L2_PIX_FMT_ABGR32:
|
||||
case V4L2_PIX_FMT_YUV32:
|
||||
case V4L2_PIX_FMT_AYUV32:
|
||||
case V4L2_PIX_FMT_XYUV32:
|
||||
case V4L2_PIX_FMT_VUYA32:
|
||||
case V4L2_PIX_FMT_VUYX32:
|
||||
case V4L2_PIX_FMT_HSV32:
|
||||
tpg->twopixelsize[0] = 2 * 4;
|
||||
break;
|
||||
|
@ -1267,10 +1275,12 @@ static void gen_twopix(struct tpg_data *tpg,
|
|||
case V4L2_PIX_FMT_RGB32:
|
||||
case V4L2_PIX_FMT_XRGB32:
|
||||
case V4L2_PIX_FMT_HSV32:
|
||||
case V4L2_PIX_FMT_XYUV32:
|
||||
alpha = 0;
|
||||
/* fall through */
|
||||
case V4L2_PIX_FMT_YUV32:
|
||||
case V4L2_PIX_FMT_ARGB32:
|
||||
case V4L2_PIX_FMT_AYUV32:
|
||||
buf[0][offset] = alpha;
|
||||
buf[0][offset + 1] = r_y_h;
|
||||
buf[0][offset + 2] = g_u_s;
|
||||
|
@ -1278,9 +1288,11 @@ static void gen_twopix(struct tpg_data *tpg,
|
|||
break;
|
||||
case V4L2_PIX_FMT_BGR32:
|
||||
case V4L2_PIX_FMT_XBGR32:
|
||||
case V4L2_PIX_FMT_VUYX32:
|
||||
alpha = 0;
|
||||
/* fall through */
|
||||
case V4L2_PIX_FMT_ABGR32:
|
||||
case V4L2_PIX_FMT_VUYA32:
|
||||
buf[0][offset] = b_v;
|
||||
buf[0][offset + 1] = g_u_s;
|
||||
buf[0][offset + 2] = r_y_h;
|
||||
|
|
Loading…
Reference in New Issue