linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: hantro: HEVC: Fix tile info buffer value computation
@ 2022-04-27 13:55 Benjamin Gaignard
  2022-04-27 14:22 ` Dan Carpenter
  2022-04-27 14:46 ` Sebastian Fricke
  0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Gaignard @ 2022-04-27 13:55 UTC (permalink / raw)
  To: ezequiel, p.zabel, mchehab, gregkh
  Cc: linux-media, linux-rockchip, linux-staging, linux-kernel, jon,
	aford173, kernel, Benjamin Gaignard

Use pps->column_width_minus1[j] + 1 as value for the tile info buffer
instead of pps->column_width_minus1[j + 1].
The patch fix DBLK_E_VIXS_2, DBLK_F_VIXS_2, DBLK_G_VIXS_2,
SAO_B_MediaTek_5, TILES_A_Cisco_2 and TILES_B_Cisco_1 tests in fluster.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
 drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
index bb512389c1a5..ffeb2fbeefd2 100644
--- a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
+++ b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
@@ -74,7 +74,7 @@ static void prepare_tile_info_buffer(struct hantro_ctx *ctx)
 					no_chroma = 1;
 				for (j = 0, tmp_w = 0; j < num_tile_cols - 1; j++) {
 					tmp_w += pps->column_width_minus1[j] + 1;
-					*p++ = pps->column_width_minus1[j + 1];
+					*p++ = pps->column_width_minus1[j] + 1;
 					*p++ = h;
 					if (i == 0 && h == 1 && ctb_size == 16)
 						no_chroma = 1;
-- 
2.32.0


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

* Re: [PATCH] media: hantro: HEVC: Fix tile info buffer value computation
  2022-04-27 13:55 [PATCH] media: hantro: HEVC: Fix tile info buffer value computation Benjamin Gaignard
@ 2022-04-27 14:22 ` Dan Carpenter
  2022-04-27 17:38   ` Benjamin Gaignard
  2022-04-27 14:46 ` Sebastian Fricke
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2022-04-27 14:22 UTC (permalink / raw)
  To: Benjamin Gaignard
  Cc: ezequiel, p.zabel, mchehab, gregkh, linux-media, linux-rockchip,
	linux-staging, linux-kernel, jon, aford173, kernel

On Wed, Apr 27, 2022 at 03:55:17PM +0200, Benjamin Gaignard wrote:
> Use pps->column_width_minus1[j] + 1 as value for the tile info buffer
> instead of pps->column_width_minus1[j + 1].
> The patch fix DBLK_E_VIXS_2, DBLK_F_VIXS_2, DBLK_G_VIXS_2,
> SAO_B_MediaTek_5, TILES_A_Cisco_2 and TILES_B_Cisco_1 tests in fluster.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>

Fixes: cb5dd5a0fa51 ("media: hantro: Introduce G2/HEVC decoder")

> ---
>  drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
> index bb512389c1a5..ffeb2fbeefd2 100644
> --- a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
> +++ b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
> @@ -74,7 +74,7 @@ static void prepare_tile_info_buffer(struct hantro_ctx *ctx)
>  					no_chroma = 1;
>  				for (j = 0, tmp_w = 0; j < num_tile_cols - 1; j++) {
                                                                        ^^^^
Is this "- 1" still required?  I would have assumed the "- 1" here was
connected with the [j + 1].  What is stored in the last element of the
->column_width_minus1 array?

>  					tmp_w += pps->column_width_minus1[j] + 1;
> -					*p++ = pps->column_width_minus1[j + 1];
                                                                        ^^^^^

> +					*p++ = pps->column_width_minus1[j] + 1;
>  					*p++ = h;
>  					if (i == 0 && h == 1 && ctb_size == 16)
>  						no_chroma = 1;

regards,
dan carpenter

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

* Re: [PATCH] media: hantro: HEVC: Fix tile info buffer value computation
  2022-04-27 13:55 [PATCH] media: hantro: HEVC: Fix tile info buffer value computation Benjamin Gaignard
  2022-04-27 14:22 ` Dan Carpenter
@ 2022-04-27 14:46 ` Sebastian Fricke
  1 sibling, 0 replies; 4+ messages in thread
From: Sebastian Fricke @ 2022-04-27 14:46 UTC (permalink / raw)
  To: Benjamin Gaignard
  Cc: ezequiel, p.zabel, mchehab, gregkh, linux-media, linux-rockchip,
	linux-staging, linux-kernel, jon, aford173, kernel

Hey Benjamin,

On 27.04.2022 15:55, Benjamin Gaignard wrote:
>Use pps->column_width_minus1[j] + 1 as value for the tile info buffer
>instead of pps->column_width_minus1[j + 1].
>The patch fix DBLK_E_VIXS_2, DBLK_F_VIXS_2, DBLK_G_VIXS_2,

s/fix/fixes/

Greetings,
Sebastian

>SAO_B_MediaTek_5, TILES_A_Cisco_2 and TILES_B_Cisco_1 tests in fluster.
>
>Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
>---
> drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
>index bb512389c1a5..ffeb2fbeefd2 100644
>--- a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
>+++ b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
>@@ -74,7 +74,7 @@ static void prepare_tile_info_buffer(struct hantro_ctx *ctx)
> 					no_chroma = 1;
> 				for (j = 0, tmp_w = 0; j < num_tile_cols - 1; j++) {
> 					tmp_w += pps->column_width_minus1[j] + 1;
>-					*p++ = pps->column_width_minus1[j + 1];
>+					*p++ = pps->column_width_minus1[j] + 1;
> 					*p++ = h;
> 					if (i == 0 && h == 1 && ctb_size == 16)
> 						no_chroma = 1;
>-- 
>2.32.0
>

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

* Re: [PATCH] media: hantro: HEVC: Fix tile info buffer value computation
  2022-04-27 14:22 ` Dan Carpenter
@ 2022-04-27 17:38   ` Benjamin Gaignard
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Gaignard @ 2022-04-27 17:38 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: ezequiel, p.zabel, mchehab, gregkh, linux-media, linux-rockchip,
	linux-staging, linux-kernel, jon, aford173, kernel


Le 27/04/2022 à 16:22, Dan Carpenter a écrit :
> On Wed, Apr 27, 2022 at 03:55:17PM +0200, Benjamin Gaignard wrote:
>> Use pps->column_width_minus1[j] + 1 as value for the tile info buffer
>> instead of pps->column_width_minus1[j + 1].
>> The patch fix DBLK_E_VIXS_2, DBLK_F_VIXS_2, DBLK_G_VIXS_2,
>> SAO_B_MediaTek_5, TILES_A_Cisco_2 and TILES_B_Cisco_1 tests in fluster.
>>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> Fixes: cb5dd5a0fa51 ("media: hantro: Introduce G2/HEVC decoder")
>
>> ---
>>   drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
>> index bb512389c1a5..ffeb2fbeefd2 100644
>> --- a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
>> +++ b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
>> @@ -74,7 +74,7 @@ static void prepare_tile_info_buffer(struct hantro_ctx *ctx)
>>   					no_chroma = 1;
>>   				for (j = 0, tmp_w = 0; j < num_tile_cols - 1; j++) {
>                                                                          ^^^^
> Is this "- 1" still required?  I would have assumed the "- 1" here was
> connected with the [j + 1].  What is stored in the last element of the
> ->column_width_minus1 array?

No "- 1" comes from the definition of the field in H.265 which is pps->num_tile_columns_minus1
We add 1 to fill the registers so we need the "- 1" in the loop.
Data ordering isn't documented anywhere so that part is directly inspired by
Hantro/G2 proprietary stack.

Regards,
Benjamin

>
>>   					tmp_w += pps->column_width_minus1[j] + 1;
>> -					*p++ = pps->column_width_minus1[j + 1];
>                                                                          ^^^^^
>
>> +					*p++ = pps->column_width_minus1[j] + 1;
>>   					*p++ = h;
>>   					if (i == 0 && h == 1 && ctb_size == 16)
>>   						no_chroma = 1;
> regards,
> dan carpenter

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

end of thread, other threads:[~2022-04-27 17:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27 13:55 [PATCH] media: hantro: HEVC: Fix tile info buffer value computation Benjamin Gaignard
2022-04-27 14:22 ` Dan Carpenter
2022-04-27 17:38   ` Benjamin Gaignard
2022-04-27 14:46 ` Sebastian Fricke

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