From da0c6f21262c6a2140b5afa598b9278e7503b341 Mon Sep 17 00:00:00 2001 From: Amara Venkata Mastan Manoj Kumar Date: Tue, 21 Aug 2012 16:03:32 -0700 Subject: [PATCH] Overlay: Change MDP format for YV12 buffers Android uses different alignments for YV12 buffers. Hence, introduce a new format (MDP_Y_CR_CB_GH2V2) for such buffers. Change-Id: Id4d58dd77f22c9efb8ece9caa34a8717964bf58d --- liboverlay/overlayUtils.cpp | 2 +- liboverlay/overlayUtils.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/liboverlay/overlayUtils.cpp b/liboverlay/overlayUtils.cpp index 161f05c..44ebd3c 100644 --- a/liboverlay/overlayUtils.cpp +++ b/liboverlay/overlayUtils.cpp @@ -164,7 +164,7 @@ int getMdpFormat(int format) { case HAL_PIXEL_FORMAT_BGRA_8888: return MDP_BGRA_8888; case HAL_PIXEL_FORMAT_YV12: - return MDP_Y_CR_CB_H2V2; + return MDP_Y_CR_CB_GH2V2; case HAL_PIXEL_FORMAT_YCbCr_422_SP: return MDP_Y_CBCR_H2V1; case HAL_PIXEL_FORMAT_YCrCb_420_SP: diff --git a/liboverlay/overlayUtils.h b/liboverlay/overlayUtils.h index 444c3cd..4509a27 100644 --- a/liboverlay/overlayUtils.h +++ b/liboverlay/overlayUtils.h @@ -550,6 +550,7 @@ inline bool isYuv(uint32_t format) { case MDP_Y_CRCB_H2V2_TILE: case MDP_Y_CBCR_H2V2_TILE: case MDP_Y_CR_CB_H2V2: + case MDP_Y_CR_CB_GH2V2: return true; default: return false; @@ -697,6 +698,8 @@ inline int getRotOutFmt(uint32_t format) { return MDP_Y_CBCR_H2V2; case MDP_Y_CB_CR_H2V2: return MDP_Y_CBCR_H2V2; + case MDP_Y_CR_CB_GH2V2: + return MDP_Y_CRCB_H2V2; default: return format; }