mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de,
	mchehab@kernel.org, gregkh@linuxfoundation.org,
	linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	jon@nanocrew.net, aford173@gmail.com, kernel@collabora.com
Subject: Re: [PATCH] media: hantro: HEVC: Fix tile info buffer value computation
Date: Wed, 27 Apr 2022 19:38:28 +0200	[thread overview]
Message-ID: <5091e44e-6b44-be2e-f53e-29368009f30d@collabora.com> (raw)
In-Reply-To: <20220427142233.GS2462@kadam>


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

  reply	other threads:[~2022-04-27 17:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 13:55 Benjamin Gaignard
2022-04-27 14:22 ` Dan Carpenter
2022-04-27 17:38   ` Benjamin Gaignard [this message]
2022-04-27 14:46 ` Sebastian Fricke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5091e44e-6b44-be2e-f53e-29368009f30d@collabora.com \
    --to=benjamin.gaignard@collabora.com \
    --cc=aford173@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=gregkh@linuxfoundation.org \
    --cc=jon@nanocrew.net \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®