From 30b1033ec4ceb89fab6172c746db93f7f960290e Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Wed, 24 Jan 2024 20:00:04 +0800 Subject: [PATCH] fixup! lavu: add RKMPP hwcontext Enlarge the buffer size a little bit to fix a corner case issue in RGA AFBC 8K cropping and MPP encoder. Signed-off-by: nyanmisaka --- libavutil/hwcontext_rkmpp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_rkmpp.c b/libavutil/hwcontext_rkmpp.c index 092b868d52..18f0f82dd7 100644 --- a/libavutil/hwcontext_rkmpp.c +++ b/libavutil/hwcontext_rkmpp.c @@ -185,8 +185,8 @@ static AVBufferRef *rkmpp_drm_pool_alloc(void *opaque, size_t size) int i; const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(hwfc->sw_format); const int bits_pp = av_get_padded_bits_per_pixel(pixdesc); - const int aligned_w = FFALIGN(hwfc->width * 6 / 5, 64); - const int aligned_h = FFALIGN(hwfc->height * 6 / 5, 64); + const int aligned_w = FFALIGN(hwfc->width * 5 / 4, 64); + const int aligned_h = FFALIGN(hwfc->height * 5 / 4, 64); MppBuffer mpp_buf = NULL; size_t mpp_buf_size = aligned_w * aligned_h * bits_pp / 8;