From c6e4473b99953fb8e41debbfa4893e873fc7f0e8 Mon Sep 17 00:00:00 2001 From: Herman Chen Date: Fri, 4 Sep 2020 09:28:04 +0800 Subject: [PATCH] [legacy]: Fix ver_stride alignment on copy path Change-Id: Ic1d0d6c5c1f20ea915750aae3f3ee88cb740bd7e Signed-off-by: Herman Chen --- mpp/legacy/vpu_api_legacy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mpp/legacy/vpu_api_legacy.cpp b/mpp/legacy/vpu_api_legacy.cpp index 349efb5f..eceebbac 100644 --- a/mpp/legacy/vpu_api_legacy.cpp +++ b/mpp/legacy/vpu_api_legacy.cpp @@ -192,9 +192,10 @@ static int copy_align_raw_buffer_to_dest(RK_U8 *dst, RK_U8 *src, RK_U32 width, RK_U8 *src_buf = src; RK_U32 row = 0; RK_U32 hor_stride = MPP_ALIGN(width, 16); - RK_U32 ver_stride = MPP_ALIGN(height, 16); + RK_U32 ver_stride = MPP_ALIGN(height, 8); RK_U8 *dst_u = dst_buf + hor_stride * ver_stride; RK_U8 *dst_v = dst_u + hor_stride * ver_stride / 4; + switch (fmt) { case MPP_FMT_YUV420SP : { for (row = 0; row < height; row++) {