aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTang, XiaoxiX <xiaoxix.tang@intel.com>2013-12-02 15:33:13 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:02:56 -0700
commit94733f48696cae1d610bf80c3127a464dc82c5f9 (patch)
tree97a7d3f894beb54a7c040e6b9f0f3438c75c59da
parentba72edfc22d5567a208ce814ea5df6cf63b8837f (diff)
downloadandroid_hardware_intel_common_omx-components-94733f48696cae1d610bf80c3127a464dc82c5f9.tar.gz
android_hardware_intel_common_omx-components-94733f48696cae1d610bf80c3127a464dc82c5f9.tar.bz2
android_hardware_intel_common_omx-components-94733f48696cae1d610bf80c3127a464dc82c5f9.zip
omx-component: enable tile format for VXD392 on Baytrail platform
BZ: 141202 Change the eColorFormat's value to HAL_PIXEL_FORMAT_NV12_X_TILED_INTEL and pass the tiling information by the flag mVASurfaceAttrib->flags. Change-Id: Id005eb9c8057ddb9e68a3b468678fa5db8800bc5 Signed-off-by: Tang, XiaoxiX <xiaoxix.tang@intel.com>
-rw-r--r--videocodec/Android.mk33
-rw-r--r--videocodec/OMXVideoDecoderBase.cpp7
-rw-r--r--videocodec/OMXVideoDecoderBase.h4
-rw-r--r--videocodec/OMXVideoDecoderH263.cpp9
-rw-r--r--videocodec/OMXVideoDecoderH263.h1
-rw-r--r--videocodec/OMXVideoDecoderMPEG4.cpp9
-rw-r--r--videocodec/OMXVideoDecoderMPEG4.h1
-rw-r--r--videocodec/OMXVideoDecoderVP8.cpp8
-rw-r--r--videocodec/OMXVideoDecoderVP8.h1
9 files changed, 71 insertions, 2 deletions
diff --git a/videocodec/Android.mk b/videocodec/Android.mk
index e4612b4..9fb0a5f 100644
--- a/videocodec/Android.mk
+++ b/videocodec/Android.mk
@@ -30,6 +30,10 @@ 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\
@@ -87,6 +91,10 @@ 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\
@@ -99,6 +107,10 @@ ifeq ($(TARGET_BOARD_PLATFORM),merrifield)
LOCAL_CFLAGS += -DVED_TILING
endif
+ifeq ($(TARGET_BOARD_PLATFORM),baytrail)
+LOCAL_CFLAGS += -DUSE_GEN_HW
+endif
+
include $(BUILD_SHARED_LIBRARY)
endif
@@ -125,6 +137,10 @@ 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\
@@ -140,6 +156,10 @@ ifeq ($(TARGET_BOARD_PLATFORM),merrifield)
LOCAL_CFLAGS += -DVED_TILING
endif
+ifeq ($(TARGET_BOARD_PLATFORM),baytrail)
+LOCAL_CFLAGS += -DUSE_GEN_HW
+endif
+
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
@@ -165,6 +185,10 @@ 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\
@@ -179,6 +203,11 @@ endif
ifeq ($(TARGET_BOARD_PLATFORM),merrifield)
LOCAL_CFLAGS += -DVED_TILING
endif
+
+ifeq ($(TARGET_BOARD_PLATFORM),baytrail)
+LOCAL_CFLAGS += -DUSE_GEN_HW
+endif
+
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
@@ -204,6 +233,10 @@ 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\
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp
index 0ac5ee5..cfe1026 100644
--- a/videocodec/OMXVideoDecoderBase.cpp
+++ b/videocodec/OMXVideoDecoderBase.cpp
@@ -20,7 +20,6 @@
#include "OMXVideoDecoderBase.h"
#include <va/va_android.h>
-
static const char* VA_RAW_MIME_TYPE = "video/x-raw-va";
static const uint32_t VA_COLOR_FORMAT = 0x7FA00E00;
@@ -444,7 +443,11 @@ OMX_ERRORTYPE OMXVideoDecoderBase::PrepareConfigBuffer(VideoConfigBuffer *p) {
p->graphicBufferColorFormat = mGraphicBufferParam.graphicBufferColorFormat;
p->graphicBufferWidth = mGraphicBufferParam.graphicBufferWidth;
p->graphicBufferHeight = mGraphicBufferParam.graphicBufferHeight;
- if (p->graphicBufferColorFormat == OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar_Tiled)
+ if (p->graphicBufferColorFormat == OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar_Tiled
+#ifdef USE_GEN_HW
+ || p->graphicBufferColorFormat == HAL_PIXEL_FORMAT_NV12_X_TILED_INTEL
+#endif
+ )
p->flag |= USE_TILING_MEMORY;
PortVideo *port = NULL;
diff --git a/videocodec/OMXVideoDecoderBase.h b/videocodec/OMXVideoDecoderBase.h
index b460107..c1afc4a 100644
--- a/videocodec/OMXVideoDecoderBase.h
+++ b/videocodec/OMXVideoDecoderBase.h
@@ -23,6 +23,10 @@
#include "VideoDecoderInterface.h"
#include "VideoDecoderHost.h"
+#ifdef USE_GEN_HW
+#include "graphics.h"
+#endif
+
static const char* VA_VED_RAW_MIME_TYPE = "video/x-raw-vaved";
static const uint32_t VA_VED_COLOR_FORMAT = 0x20;
diff --git a/videocodec/OMXVideoDecoderH263.cpp b/videocodec/OMXVideoDecoderH263.cpp
index 424ab54..7e95125 100644
--- a/videocodec/OMXVideoDecoderH263.cpp
+++ b/videocodec/OMXVideoDecoderH263.cpp
@@ -135,5 +135,14 @@ OMX_ERRORTYPE OMXVideoDecoderH263::SetParamVideoH263ProfileLevel(OMX_PTR pStruct
return OMX_ErrorUnsupportedSetting;
}
+OMX_COLOR_FORMATTYPE OMXVideoDecoderH263::GetOutputColorFormat(int width, int height)
+{
+#ifdef USE_GEN_HW
+ return (OMX_COLOR_FORMATTYPE)HAL_PIXEL_FORMAT_NV12_X_TILED_INTEL;
+#else
+ return OMXVideoDecoderBase::GetOutputColorFormat(width, height);
+#endif
+}
+
DECLARE_OMX_COMPONENT("OMX.Intel.VideoDecoder.H263", "video_decoder.h263", OMXVideoDecoderH263);
diff --git a/videocodec/OMXVideoDecoderH263.h b/videocodec/OMXVideoDecoderH263.h
index 9d5ff12..9dd7a50 100644
--- a/videocodec/OMXVideoDecoderH263.h
+++ b/videocodec/OMXVideoDecoderH263.h
@@ -39,6 +39,7 @@ protected:
virtual OMX_ERRORTYPE PrepareDecodeBuffer(OMX_BUFFERHEADERTYPE *buffer, buffer_retain_t *retain, VideoDecodeBuffer *p);
virtual OMX_ERRORTYPE BuildHandlerList(void);
+ virtual OMX_COLOR_FORMATTYPE GetOutputColorFormat(int width, int height);
DECLARE_HANDLER(OMXVideoDecoderH263, ParamVideoH263);
DECLARE_HANDLER(OMXVideoDecoderH263, ParamVideoH263ProfileLevel);
diff --git a/videocodec/OMXVideoDecoderMPEG4.cpp b/videocodec/OMXVideoDecoderMPEG4.cpp
index b73c0c4..d472577 100644
--- a/videocodec/OMXVideoDecoderMPEG4.cpp
+++ b/videocodec/OMXVideoDecoderMPEG4.cpp
@@ -137,6 +137,15 @@ OMX_ERRORTYPE OMXVideoDecoderMPEG4::SetParamVideoMpeg4ProfileLevel(OMX_PTR pStru
return OMX_ErrorUnsupportedSetting;
}
+OMX_COLOR_FORMATTYPE OMXVideoDecoderMPEG4::GetOutputColorFormat(int width, int height)
+{
+#ifdef USE_GEN_HW
+ return (OMX_COLOR_FORMATTYPE)HAL_PIXEL_FORMAT_NV12_X_TILED_INTEL;
+#else
+ return OMXVideoDecoderBase::GetOutputColorFormat(width, height);
+#endif
+}
+
DECLARE_OMX_COMPONENT("OMX.Intel.VideoDecoder.MPEG4", "video_decoder.mpeg4", OMXVideoDecoderMPEG4);
diff --git a/videocodec/OMXVideoDecoderMPEG4.h b/videocodec/OMXVideoDecoderMPEG4.h
index 5ed4baa..92902da 100644
--- a/videocodec/OMXVideoDecoderMPEG4.h
+++ b/videocodec/OMXVideoDecoderMPEG4.h
@@ -40,6 +40,7 @@ protected:
virtual OMX_ERRORTYPE PrepareDecodeBuffer(OMX_BUFFERHEADERTYPE *buffer, buffer_retain_t *retain, VideoDecodeBuffer *p);
virtual OMX_ERRORTYPE BuildHandlerList(void);
+ virtual OMX_COLOR_FORMATTYPE GetOutputColorFormat(int width, int height);
DECLARE_HANDLER(OMXVideoDecoderMPEG4, ParamVideoMpeg4);
DECLARE_HANDLER(OMXVideoDecoderMPEG4, ParamVideoMpeg4ProfileLevel);
diff --git a/videocodec/OMXVideoDecoderVP8.cpp b/videocodec/OMXVideoDecoderVP8.cpp
index d3d7fcd..7acbed9 100644
--- a/videocodec/OMXVideoDecoderVP8.cpp
+++ b/videocodec/OMXVideoDecoderVP8.cpp
@@ -106,6 +106,14 @@ OMX_ERRORTYPE OMXVideoDecoderVP8::SetParamVideoVp8(OMX_PTR pStructure) {
return OMX_ErrorNone;
}
+OMX_COLOR_FORMATTYPE OMXVideoDecoderVP8::GetOutputColorFormat(int width, int height)
+{
+#ifdef USE_GEN_HW
+ return (OMX_COLOR_FORMATTYPE)HAL_PIXEL_FORMAT_NV12_X_TILED_INTEL;
+#else
+ return OMXVideoDecoderBase::GetOutputColorFormat(width, height);
+#endif
+}
DECLARE_OMX_COMPONENT("OMX.Intel.VideoDecoder.VP8", "video_decoder.vp8", OMXVideoDecoderVP8);
diff --git a/videocodec/OMXVideoDecoderVP8.h b/videocodec/OMXVideoDecoderVP8.h
index 5c59124..962e5a6 100644
--- a/videocodec/OMXVideoDecoderVP8.h
+++ b/videocodec/OMXVideoDecoderVP8.h
@@ -40,6 +40,7 @@ protected:
virtual OMX_ERRORTYPE PrepareDecodeBuffer(OMX_BUFFERHEADERTYPE *buffer, buffer_retain_t *retain, VideoDecodeBuffer *p);
virtual OMX_ERRORTYPE BuildHandlerList(void);
+ virtual OMX_COLOR_FORMATTYPE GetOutputColorFormat(int width, int height);
DECLARE_HANDLER(OMXVideoDecoderVP8, ParamVideoVp8);
private: