From 95ab7ecd2c48ee10875363d0deaefead162974be Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Wed, 23 Nov 2011 18:11:14 -0800 Subject: [PATCH] copybit: Do not do in-place conversion for YV12 Change-Id: I7e53f44baa6e924c6923d4e1d1af9454f51a7357 --- libcopybit/copybit.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libcopybit/copybit.cpp b/libcopybit/copybit.cpp index 9807aef..42378ea 100644 --- a/libcopybit/copybit.cpp +++ b/libcopybit/copybit.cpp @@ -387,9 +387,8 @@ static int stretch_copybit( if(src->format == HAL_PIXEL_FORMAT_YV12) { if(0 == convertYV12toYCrCb420SP(src)){ - //if inplace conversion,just convert and return - if(src->base == dst->base) - return status; + (const_cast(src))->format = + HAL_PIXEL_FORMAT_YCrCb_420_SP; } else{ LOGE("Error copybit conversion from yv12 failed");