From 018f4b572cb79e93d1a5c311d4d5195bab028769 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 7 Jul 2010 14:54:35 -0700 Subject: [PATCH] Remove the YV16 format. Change-Id: I3f7995ba0cf41bcde995df293bea78bce7d82fc9 --- gpu.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gpu.cpp b/gpu.cpp index 2a2d6d5..bcca1eb 100644 --- a/gpu.cpp +++ b/gpu.cpp @@ -240,14 +240,9 @@ int gpu_context_t::alloc_impl(int w, int h, int format, int usage, case HAL_PIXEL_FORMAT_YV12: alignedw = ALIGN(w, 16); - alignedh = ALIGN(h, 16); - size = alignedw * alignedh; - size += size / 2; - break; - - case HAL_PIXEL_FORMAT_YV16: - alignedh = ALIGN(h, 16); - size = alignedw * alignedh * 2; + alignedh = ALIGN(h, 2); + size = alignedw*alignedh + + (ALIGN(alignedw/2, 16) * (alignedh/2))*2; break; default: