linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] media: Hantro: Correct G2 init qp field
@ 2022-05-24 11:59 Benjamin Gaignard
  2022-05-27 20:05 ` Nicolas Dufresne
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Gaignard @ 2022-05-24 11:59 UTC (permalink / raw)
  To: ezequiel, p.zabel, mchehab, gregkh
  Cc: linux-media, linux-rockchip, linux-staging, linux-kernel,
	Benjamin Gaignard

Documentation said that g2 init_qp field use bits 24 to 30 of
the 8th register.
Change the field mask to be able to set 7 bits and not only 6 of them.

Conformance test INITQP_B_Main10_Sony_1 decoding is OK with this
patch.

Fixes: cb5dd5a0fa518 ("media: hantro: Introduce G2/HEVC decoder")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
With this patch and the patches needed for 10-bit support
Fluster HEVC score is 137/147

version 2:
- Add Fixes tag

 drivers/staging/media/hantro/hantro_g2_regs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/hantro/hantro_g2_regs.h b/drivers/staging/media/hantro/hantro_g2_regs.h
index 877d663a8181..82606783591a 100644
--- a/drivers/staging/media/hantro/hantro_g2_regs.h
+++ b/drivers/staging/media/hantro/hantro_g2_regs.h
@@ -107,7 +107,7 @@
 
 #define g2_start_code_e		G2_DEC_REG(10, 31, 0x1)
 #define g2_init_qp_old		G2_DEC_REG(10, 25, 0x3f)
-#define g2_init_qp		G2_DEC_REG(10, 24, 0x3f)
+#define g2_init_qp		G2_DEC_REG(10, 24, 0x7f)
 #define g2_num_tile_cols_old	G2_DEC_REG(10, 20, 0x1f)
 #define g2_num_tile_cols	G2_DEC_REG(10, 19, 0x1f)
 #define g2_num_tile_rows_old	G2_DEC_REG(10, 15, 0x1f)
-- 
2.32.0


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

* Re: [PATCH v2] media: Hantro: Correct G2 init qp field
  2022-05-24 11:59 [PATCH v2] media: Hantro: Correct G2 init qp field Benjamin Gaignard
@ 2022-05-27 20:05 ` Nicolas Dufresne
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Dufresne @ 2022-05-27 20:05 UTC (permalink / raw)
  To: Benjamin Gaignard, ezequiel, p.zabel, mchehab, gregkh
  Cc: linux-media, linux-rockchip, linux-staging, linux-kernel

Le mardi 24 mai 2022 à 13:59 +0200, Benjamin Gaignard a écrit :
> Documentation said that g2 init_qp field use bits 24 to 30 of
> the 8th register.
> Change the field mask to be able to set 7 bits and not only 6 of them.
> 
> Conformance test INITQP_B_Main10_Sony_1 decoding is OK with this
> patch.
> 
> Fixes: cb5dd5a0fa518 ("media: hantro: Introduce G2/HEVC decoder")
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
> With this patch and the patches needed for 10-bit support
> Fluster HEVC score is 137/147
> 
> version 2:
> - Add Fixes tag
> 
>  drivers/staging/media/hantro/hantro_g2_regs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/hantro/hantro_g2_regs.h b/drivers/staging/media/hantro/hantro_g2_regs.h
> index 877d663a8181..82606783591a 100644
> --- a/drivers/staging/media/hantro/hantro_g2_regs.h
> +++ b/drivers/staging/media/hantro/hantro_g2_regs.h
> @@ -107,7 +107,7 @@
>  
>  #define g2_start_code_e		G2_DEC_REG(10, 31, 0x1)
>  #define g2_init_qp_old		G2_DEC_REG(10, 25, 0x3f)
> -#define g2_init_qp		G2_DEC_REG(10, 24, 0x3f)
> +#define g2_init_qp		G2_DEC_REG(10, 24, 0x7f)
>  #define g2_num_tile_cols_old	G2_DEC_REG(10, 20, 0x1f)
>  #define g2_num_tile_cols	G2_DEC_REG(10, 19, 0x1f)
>  #define g2_num_tile_rows_old	G2_DEC_REG(10, 15, 0x1f)


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

end of thread, other threads:[~2022-05-27 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24 11:59 [PATCH v2] media: Hantro: Correct G2 init qp field Benjamin Gaignard
2022-05-27 20:05 ` Nicolas Dufresne

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).