From d3c18d49384879162c21e12157290aacd28c4548 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 22 Jun 2010 22:06:12 -0700 Subject: [PATCH] NV12 tiled needs 8K plane alignment Change-Id: I8f2ca6f058ff9d7dd666871a696428c55dbe6cf1 --- libgralloc-qsd8k/gralloc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libgralloc-qsd8k/gralloc.cpp b/libgralloc-qsd8k/gralloc.cpp index ee477ca..5a0f622 100644 --- a/libgralloc-qsd8k/gralloc.cpp +++ b/libgralloc-qsd8k/gralloc.cpp @@ -380,7 +380,8 @@ static int gralloc_alloc(alloc_device_t* dev, case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED: // NV12 // The chroma plane is subsampled, // but the pitch in bytes is unchanged - size = ALIGN( ALIGN(w, 128) * alignedh, 4096); + // The GPU needs 4K alignment, but the video decoder needs 8K + size = ALIGN( ALIGN(w, 128) * alignedh, 8192); size += ALIGN( ALIGN(w, 128) * ALIGN(h/2, 32), 4096); break;