Commit b04240a6 authored by Jonas Karlman's avatar Jonas Karlman Committed by Mauro Carvalho Chehab

media: v4l: Fix MPEG-2 slice Intra DC Precision validation

intra_dc_precision is a 2-bit integer [1]
allow use of all valid options, 8 - 11 bits precision

[1] ISO/IEC 13818-2 Table 6-13

Fixes: c27bb30e ("media: v4l: Add definitions for MPEG-2 slice format and metadata")
Signed-off-by: default avatarJonas Karlman <jonas@kwiboo.se>
Acked-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent aa35dc3c
......@@ -1636,7 +1636,8 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx,
switch (p_mpeg2_slice_params->picture.intra_dc_precision) {
case 0: /* 8 bits */
case 1: /* 9 bits */
case 11: /* 11 bits */
case 2: /* 10 bits */
case 3: /* 11 bits */
break;
default:
return -EINVAL;
......
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