linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: cedrus: h264: Fix check for presence of scaling matrix
@ 2020-10-21 20:33 Jernej Skrabec
  2020-10-22  6:56 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Jernej Skrabec @ 2020-10-21 20:33 UTC (permalink / raw)
  To: mripard, paul.kocialkowski
  Cc: mchehab, wens, ezequiel, hverkuil-cisco, linux-media, devel,
	linux-arm-kernel, linux-kernel

If scaling matrix control is present, VPU should not use default matrix.
Fix that.

Fixes: b3a23db0e2f8 ("media: cedrus: Use H264_SCALING_MATRIX only when required")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
index 28319351e909..781c84a9b1b7 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
@@ -446,7 +446,7 @@ static void cedrus_set_params(struct cedrus_ctx *ctx,
 	reg |= (pps->second_chroma_qp_index_offset & 0x3f) << 16;
 	reg |= (pps->chroma_qp_index_offset & 0x3f) << 8;
 	reg |= (pps->pic_init_qp_minus26 + 26 + slice->slice_qp_delta) & 0x3f;
-	if (pps->flags & V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT)
+	if (!(pps->flags & V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT))
 		reg |= VE_H264_SHS_QP_SCALING_MATRIX_DEFAULT;
 	cedrus_write(dev, VE_H264_SHS_QP, reg);
 
-- 
2.29.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: cedrus: h264: Fix check for presence of scaling matrix
  2020-10-21 20:33 [PATCH] media: cedrus: h264: Fix check for presence of scaling matrix Jernej Skrabec
@ 2020-10-22  6:56 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2020-10-22  6:56 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: paul.kocialkowski, mchehab, wens, ezequiel, hverkuil-cisco,
	linux-media, devel, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

On Wed, Oct 21, 2020 at 10:33:25PM +0200, Jernej Skrabec wrote:
> If scaling matrix control is present, VPU should not use default matrix.
> Fix that.
> 
> Fixes: b3a23db0e2f8 ("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>

Thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-22  6:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 20:33 [PATCH] media: cedrus: h264: Fix check for presence of scaling matrix Jernej Skrabec
2020-10-22  6:56 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).