From 49d55ed190ecc030e65b5fc44c06de5550ad79d8 Mon Sep 17 00:00:00 2001 From: Fei Jiang Date: Mon, 20 Jan 2014 01:11:25 +0800 Subject: Add the right color format for VP8 decoder on CHT BZ: 161384 The VP8 decoder on CHT uses the GEN hardware, which uses the Y title format. Change-Id: I0b7c4dc3692a8da6a6cadac63cbde424c6b1cd81 Signed-off-by: Fei Jiang --- videocodec/Android.mk | 45 ++++++++++++++++++++++++++++++--------- videocodec/OMXVideoDecoderVP8.cpp | 4 ++++ 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/videocodec/Android.mk b/videocodec/Android.mk index b2f5774..2064dd7 100644 --- a/videocodec/Android.mk +++ b/videocodec/Android.mk @@ -30,7 +30,11 @@ LOCAL_C_INCLUDES := \ $(call include-path-for, frameworks-native)/media/hardware \ $(call include-path-for, frameworks-native)/media/openmax -ifeq ($(TARGET_BOARD_PLATFORM),baytrail) +PLATFORM_USE_GEN_HW := \ + baytrail \ + cherrytrail + +ifneq ($(filter $(TARGET_BOARD_PLATFORM),$(PLATFORM_USE_GEN_HW)),) LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/ufo endif @@ -68,7 +72,8 @@ PLATFORM_SUPPORT_VP8 := \ merrifield \ morganfield \ moorefield \ - baytrail + baytrail \ + cherrytrail ifneq ($(filter $(TARGET_BOARD_PLATFORM),$(PLATFORM_SUPPORT_VP8)),) include $(CLEAR_VARS) @@ -96,10 +101,6 @@ LOCAL_C_INCLUDES := \ $(call include-path-for, frameworks-native)/media/hardware \ $(call include-path-for, frameworks-native)/media/openmax -ifeq ($(TARGET_BOARD_PLATFORM),baytrail) -LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/ufo -endif - LOCAL_SRC_FILES := \ OMXComponentCodecBase.cpp\ OMXVideoDecoderBase.cpp\ @@ -116,10 +117,22 @@ ifeq ($(TARGET_BOARD_PLATFORM),moorefield) LOCAL_CFLAGS += -DVED_TILING endif -ifeq ($(TARGET_BOARD_PLATFORM),baytrail) +PLATFORM_USE_GEN_HW := \ + baytrail \ + cherrytrail + +ifneq ($(filter $(TARGET_BOARD_PLATFORM),$(PLATFORM_USE_GEN_HW)),) +LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/ufo +endif + +ifneq ($(filter $(TARGET_BOARD_PLATFORM),$(PLATFORM_USE_GEN_HW)),) LOCAL_CFLAGS += -DUSE_GEN_HW endif +ifeq ($(TARGET_BOARD_PLATFORM),baytrail) +LOCAL_CFLAGS += -DUSE_X_TILE +endif + include $(BUILD_SHARED_LIBRARY) endif @@ -146,7 +159,11 @@ LOCAL_C_INCLUDES := \ $(call include-path-for, frameworks-native)/media/hardware \ $(call include-path-for, frameworks-native)/media/openmax -ifeq ($(TARGET_BOARD_PLATFORM),baytrail) +PLATFORM_USE_GEN_HW := \ + baytrail \ + cherrytrail + +ifneq ($(filter $(TARGET_BOARD_PLATFORM),$(PLATFORM_USE_GEN_HW)),) LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/ufo endif @@ -198,7 +215,11 @@ LOCAL_C_INCLUDES := \ $(call include-path-for, frameworks-native)/media/hardware \ $(call include-path-for, frameworks-native)/media/openmax -ifeq ($(TARGET_BOARD_PLATFORM),baytrail) +PLATFORM_USE_GEN_HW := \ + baytrail \ + cherrytrail + +ifneq ($(filter $(TARGET_BOARD_PLATFORM),$(PLATFORM_USE_GEN_HW)),) LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/ufo endif @@ -250,7 +271,11 @@ LOCAL_C_INCLUDES := \ $(call include-path-for, frameworks-native)/media/hardware \ $(call include-path-for, frameworks-native)/media/openmax -ifeq ($(TARGET_BOARD_PLATFORM),baytrail) +PLATFORM_USE_GEN_HW := \ + baytrail \ + cherrytrail + +ifneq ($(filter $(TARGET_BOARD_PLATFORM),$(PLATFORM_USE_GEN_HW)),) LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/ufo endif diff --git a/videocodec/OMXVideoDecoderVP8.cpp b/videocodec/OMXVideoDecoderVP8.cpp index 7acbed9..9121866 100644 --- a/videocodec/OMXVideoDecoderVP8.cpp +++ b/videocodec/OMXVideoDecoderVP8.cpp @@ -109,7 +109,11 @@ OMX_ERRORTYPE OMXVideoDecoderVP8::SetParamVideoVp8(OMX_PTR pStructure) { OMX_COLOR_FORMATTYPE OMXVideoDecoderVP8::GetOutputColorFormat(int width, int height) { #ifdef USE_GEN_HW +#ifdef USE_X_TILE return (OMX_COLOR_FORMATTYPE)HAL_PIXEL_FORMAT_NV12_X_TILED_INTEL; +#else + return (OMX_COLOR_FORMATTYPE)OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar_Tiled; +#endif #else return OMXVideoDecoderBase::GetOutputColorFormat(width, height); #endif -- cgit v1.2.3