Skip to content

Commit 9ac924b

Browse files
jernejskmchehab
authored andcommitted
media: cedrus: h264: Fix check for presence of scaling matrix
If scaling matrix control is present, VPU should not use default matrix. Fix that. Fixes: b3a23db ("media: cedrus: Use H264_SCALING_MATRIX only when required") Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1 parent e6fcf46 commit 9ac924b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/staging/media/sunxi/cedrus/cedrus_h264.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ static void cedrus_set_params(struct cedrus_ctx *ctx,
446446
reg |= (pps->second_chroma_qp_index_offset & 0x3f) << 16;
447447
reg |= (pps->chroma_qp_index_offset & 0x3f) << 8;
448448
reg |= (pps->pic_init_qp_minus26 + 26 + slice->slice_qp_delta) & 0x3f;
449-
if (pps->flags & V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT)
449+
if (!(pps->flags & V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT))
450450
reg |= VE_H264_SHS_QP_SCALING_MATRIX_DEFAULT;
451451
cedrus_write(dev, VE_H264_SHS_QP, reg);
452452

0 commit comments

Comments
 (0)