From 8126b77c3a75905ea8feaae54a814f0751e312c5 Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Fri, 15 Jun 2012 20:53:42 -0700 Subject: [PATCH] gralloc: Update YUV420 SP tiled format to match OMX The value od OMX color format for YUV 420 SP tiled is 0x7FA30C03. Add this format and also remove masking for interlaced videos and S3D which were causing the format to be masked incorrectly Change-Id: I76fe5e6e00a36130b065c5d88a8f52eebcfa162b --- libgralloc/gpu.cpp | 10 +--------- libgralloc/gralloc_priv.h | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/libgralloc/gpu.cpp b/libgralloc/gpu.cpp index 0ec8d73..4f00e4a 100644 --- a/libgralloc/gpu.cpp +++ b/libgralloc/gpu.cpp @@ -176,15 +176,7 @@ void gpu_context_t::getGrallocInformationFromFormat(int inputFormat, *bufferType = BUFFER_TYPE_VIDEO; *colorFormat = inputFormat; - if (inputFormat == HAL_PIXEL_FORMAT_YV12) { - *bufferType = BUFFER_TYPE_VIDEO; - } else if (inputFormat & S3D_FORMAT_MASK) { - // S3D format - *colorFormat = COLOR_FORMAT(inputFormat); - } else if (inputFormat & INTERLACE_MASK) { - // Interlaced - *colorFormat = inputFormat ^ HAL_PIXEL_FORMAT_INTERLACE; - } else if (inputFormat < 0x7) { + if (inputFormat < 0x7) { // RGB formats *colorFormat = inputFormat; *bufferType = BUFFER_TYPE_UI; diff --git a/libgralloc/gralloc_priv.h b/libgralloc/gralloc_priv.h index 846a611..c38ed79 100644 --- a/libgralloc/gralloc_priv.h +++ b/libgralloc/gralloc_priv.h @@ -105,8 +105,8 @@ enum { /*****************************************************************************/ enum { /* OEM specific HAL formats */ - HAL_PIXEL_FORMAT_NV12_ENCODEABLE = 0x102, - HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED = 0x108, + HAL_PIXEL_FORMAT_NV12_ENCODEABLE = 0x102, + HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED = 0x7FA30C03, HAL_PIXEL_FORMAT_YCbCr_420_SP = 0x109, HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO = 0x10A, HAL_PIXEL_FORMAT_YCrCb_422_SP = 0x10B,