From 4b0638777a7088c1a2b55629b4914d282f8b39b7 Mon Sep 17 00:00:00 2001 From: Sushil Chauhan Date: Wed, 11 Apr 2012 20:48:14 -0700 Subject: [PATCH] libcopybit: Fix source stride for software YUV buffer copy. Incorrect source stride setting for software YUV buffer copy causes the software converter used by apps like Video Telephony app to crash. Correct the source stride setting passed to YUV buffer memcpy. CRs-Fixed: 346928 (cherry picked from commit db92bedc081365e447233bbdd6e070e88a5cbc19) Change-Id: I5edf7ff4d38e8b55eece9e856adeeab972e80fa0 --- libcopybit/software_converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcopybit/software_converter.cpp b/libcopybit/software_converter.cpp index e5926fe..60a3600 100644 --- a/libcopybit/software_converter.cpp +++ b/libcopybit/software_converter.cpp @@ -239,7 +239,7 @@ int convert_yuv_android_to_yuv_c2d(private_handle_t *hnd, copyInfo info; info.width = rhs->w; info.height = rhs->h; - info.src_stride = ALIGN(info.width, 16); + info.src_stride = ALIGN(hnd->width, 16); info.dst_stride = ALIGN(info.width, 32); switch(rhs->format) { case HAL_PIXEL_FORMAT_YCbCr_420_SP: