Patch "media: hantro: postproc: Fix motion vector space allocation" has been added to the 5.9-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: hantro: postproc: Fix motion vector space allocation

to the 5.9-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-hantro-postproc-fix-motion-vector-space-alloca.patch
and it can be found in the queue-5.9 subdirectory.

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



commit 9aebeff76e0a745e48775caea058021a6d6c032e
Author: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx>
Date:   Mon Jul 27 19:05:38 2020 +0200

    media: hantro: postproc: Fix motion vector space allocation
    
    [ Upstream commit 669ccf19ed2059b9d517664a2dbbf6bde87e1414 ]
    
    When the post-processor is enabled, the driver allocates
    "shadow buffers" which are used for the decoder core,
    and exposes the post-processed buffers to userspace.
    
    For this reason, extra motion vector space has to
    be allocated on the shadow buffers, which the driver
    wasn't doing. Fix it.
    
    This fix should address artifacts on high profile bitstreams.
    
    Fixes: 8c2d66b036c77 ("media: hantro: Support color conversion via post-processing")
    Signed-off-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx>
    Reviewed-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/media/hantro/hantro_postproc.c
index 44062ffceaea7..6d2a8f2a8f0bb 100644
--- a/drivers/staging/media/hantro/hantro_postproc.c
+++ b/drivers/staging/media/hantro/hantro_postproc.c
@@ -118,7 +118,9 @@ int hantro_postproc_alloc(struct hantro_ctx *ctx)
 	unsigned int num_buffers = cap_queue->num_buffers;
 	unsigned int i, buf_size;
 
-	buf_size = ctx->dst_fmt.plane_fmt[0].sizeimage;
+	buf_size = ctx->dst_fmt.plane_fmt[0].sizeimage +
+		   hantro_h264_mv_size(ctx->dst_fmt.width,
+				       ctx->dst_fmt.height);
 
 	for (i = 0; i < num_buffers; ++i) {
 		struct hantro_aux_buf *priv = &ctx->postproc.dec_q[i];



[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