[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220330065901.q6vodbqpes5hqr4y@basti-XPS-13-9310>
Date: Wed, 30 Mar 2022 08:59:01 +0200
From: Sebastian Fricke <sebastian.fricke@...labora.com>
To: Nicolas Dufresne <nicolas.dufresne@...labora.com>
Cc: Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
kernel@...labora.com, Jonas Karlman <jonas@...boo.se>,
Ezequiel Garcia <ezequiel@...labora.com>,
linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 18/24] media: rkvdec: h264: Fix bit depth wrap in pps
packet
Hey Nicolas,
On 28.03.2022 15:59, Nicolas Dufresne wrote:
>From: Jonas Karlman <jonas@...boo.se>
>
>The luma and chroma bit depth fields in the pps packet is 3 bits wide.
s/is 3 bits wide/are 3 bits wide/
>8 is wrongly added to the bit depth value written to these 3-bit fields.
s/bit depth value/bit depth values/
(as we talk about multiple different values)
>Because only the 3 LSB is written the hardware is configured correctly.
s/Because only the 3 LSB is written the hardware is configured correctly./
Because only the three least significant bits are written, the hardware will be configured correctly./
(original sentence is very hard to read, the sentence could also mean
something like this:
'Because only the three least significant bits, that are written to the hardware, are configured correctly.')
>
>Correct this by not adding 8 to the luma and chroma bit depth value.
>
>Signed-off-by: Jonas Karlman <jonas@...boo.se>
>Reviewed-by: Ezequiel Garcia <ezequiel@...labora.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke@...labora.com>
Greetings,
Sebastian
>---
> drivers/staging/media/rkvdec/rkvdec-h264.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c
>index 847b8957dad3..ec52b195bbd7 100644
>--- a/drivers/staging/media/rkvdec/rkvdec-h264.c
>+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c
>@@ -662,8 +662,8 @@ static void assemble_hw_pps(struct rkvdec_ctx *ctx,
> WRITE_PPS(0xff, PROFILE_IDC);
> WRITE_PPS(1, CONSTRAINT_SET3_FLAG);
> WRITE_PPS(sps->chroma_format_idc, CHROMA_FORMAT_IDC);
>- WRITE_PPS(sps->bit_depth_luma_minus8 + 8, BIT_DEPTH_LUMA);
>- WRITE_PPS(sps->bit_depth_chroma_minus8 + 8, BIT_DEPTH_CHROMA);
>+ WRITE_PPS(sps->bit_depth_luma_minus8, BIT_DEPTH_LUMA);
>+ WRITE_PPS(sps->bit_depth_chroma_minus8, BIT_DEPTH_CHROMA);
> WRITE_PPS(0, QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG);
> WRITE_PPS(sps->log2_max_frame_num_minus4, LOG2_MAX_FRAME_NUM_MINUS4);
> WRITE_PPS(sps->max_num_ref_frames, MAX_NUM_REF_FRAMES);
>--
>2.34.1
>
Powered by blists - more mailing lists