mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
media: v4l2-ctrls: Fix H264 SEPARATE_COLOUR_PLANE check
The `separate_colour_plane_flag` element is only present in the SPS if
`chroma_format_idc == 3`, so the corresponding flag should be disabled
whenever that is not the case and not just on profiles where
`chroma_format_idc` is not present.
Fixes: b32e48503d
("media: controls: Validate H264 stateless controls")
Signed-off-by: James Cowgill <james.cowgill@blaize.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
parent
401fb1955f
commit
803b9eabc6
1 changed files with 4 additions and 4 deletions
|
@ -968,12 +968,12 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx,
|
|||
|
||||
p_h264_sps->flags &=
|
||||
~V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS;
|
||||
|
||||
if (p_h264_sps->chroma_format_idc < 3)
|
||||
p_h264_sps->flags &=
|
||||
~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE;
|
||||
}
|
||||
|
||||
if (p_h264_sps->chroma_format_idc < 3)
|
||||
p_h264_sps->flags &=
|
||||
~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE;
|
||||
|
||||
if (p_h264_sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY)
|
||||
p_h264_sps->flags &=
|
||||
~V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD;
|
||||
|
|
Loading…
Add table
Reference in a new issue