Patch "media: rkvdec: h264: Fix bit depth wrap in pps packet" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: rkvdec: h264: Fix bit depth wrap in pps packet

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-rkvdec-h264-fix-bit-depth-wrap-in-pps-packet.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5b67523afe69924695953cbba3e7879fe73305fe
Author: Jonas Karlman <jonas@xxxxxxxxx>
Date:   Fri May 13 22:29:12 2022 +0200

    media: rkvdec: h264: Fix bit depth wrap in pps packet
    
    [ Upstream commit a074aa4760d1dad0bd565c0f66e7250f5f219ab0 ]
    
    The luma and chroma bit depth fields in the pps packet are 3 bits wide.
    8 is wrongly added to the bit depth values written to these 3 bit fields.
    Because only the 3 LSB are written, the hardware was configured
    correctly.
    
    Correct this by not adding 8 to the luma and chroma bit depth value.
    
    Fixes: cd33c830448ba ("media: rkvdec: Add the rkvdec driver")
    Signed-off-by: Jonas Karlman <jonas@xxxxxxxxx>
    Signed-off-by: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>
    Reviewed-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c
index f5d8c6cb740b..22b4bf9e9ef4 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);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux