Commit ed1bc664 authored by Ricardo Ribalda's avatar Ricardo Ribalda Committed by Mauro Carvalho Chehab

[media] media/vivid: Code cleanout

Remove code duplication by merging two cases in a switch.
Signed-off-by: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 18b3b3b8
...@@ -293,6 +293,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc) ...@@ -293,6 +293,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
} }
switch (fourcc) { switch (fourcc) {
case V4L2_PIX_FMT_GREY:
case V4L2_PIX_FMT_RGB332: case V4L2_PIX_FMT_RGB332:
tpg->twopixelsize[0] = 2; tpg->twopixelsize[0] = 2;
break; break;
...@@ -331,9 +332,6 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc) ...@@ -331,9 +332,6 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
case V4L2_PIX_FMT_YUV32: case V4L2_PIX_FMT_YUV32:
tpg->twopixelsize[0] = 2 * 4; tpg->twopixelsize[0] = 2 * 4;
break; break;
case V4L2_PIX_FMT_GREY:
tpg->twopixelsize[0] = 2;
break;
case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21: case V4L2_PIX_FMT_NV21:
case V4L2_PIX_FMT_NV12M: case V4L2_PIX_FMT_NV12M:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment