diff --git a/libcopybit/copybit_c2d.cpp b/libcopybit/copybit_c2d.cpp index 4697238..1edd773 100644 --- a/libcopybit/copybit_c2d.cpp +++ b/libcopybit/copybit_c2d.cpp @@ -898,20 +898,20 @@ static size_t get_size(const bufferInfo& info) size_t size = 0; int w = info.width; int h = info.height; - int aligned_w = ALIGN(w, 32); + int aligned_w = ALIGN(w, 16); switch(info.format) { case HAL_PIXEL_FORMAT_NV12_ENCODEABLE: { // Chroma for this format is aligned to 2K. size = ALIGN((aligned_w*h), 2048) + - ALIGN(w/2, 32) * h/2 *2; + ALIGN(aligned_w/2, 16) * (h/2) *2; size = ALIGN(size, 4096); } break; case HAL_PIXEL_FORMAT_YCbCr_420_SP: case HAL_PIXEL_FORMAT_YCrCb_420_SP: { - size = aligned_w*h + - ALIGN(w/2, 32) * h/2 *2; + size = aligned_w * h + + ALIGN(aligned_w/2, 16) * (h/2) * 2; size = ALIGN(size, 4096); } break; default: break;