summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHashcode <hashcode0f@gmail.com>2013-01-27 02:38:04 -0800
committerHashcode <hashcode0f@gmail.com>2013-01-27 02:38:04 -0800
commit95dc7fae7a3d8ddbd020e588a33d9215e9105c50 (patch)
treee028052d6f80aac9fa29a7e8c4aaafea7258f739
parent6d624daae8e1abc16c87632db6b3759526ee12d4 (diff)
downloadframeworks_av-95dc7fae7a3d8ddbd020e588a33d9215e9105c50.zip
frameworks_av-95dc7fae7a3d8ddbd020e588a33d9215e9105c50.tar.gz
frameworks_av-95dc7fae7a3d8ddbd020e588a33d9215e9105c50.tar.bz2
Video Encoder: Enable Ducati h264 encoder profile change
This patch enables the TI ducati H264 encoder profile via BoardConfig setting: BOARD_USE_TI_DUCATI_H264_PROFILE := true Allows correct video decoding on Motorola OMAP4 / Kindle Fires and other devices using newer DOMX libs. Effectively a cherry-pick of omapzoom commit (with creative board setting name): http://www.omapzoom.org/?p=platform/frameworks/av.git;a=commit;h=e28784d5c68c8699cfd9ebe0231e7132d8b13dad Change-Id: Idc49b00030558a22a9e50e8798e5814ad54fe841 Signed-off-by: Hashcode <hashcode0f@gmail.com>
-rwxr-xr-xmedia/libstagefright/Android.mk4
-rw-r--r--media/libstagefright/OMXCodec.cpp5
2 files changed, 9 insertions, 0 deletions
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index bfc83b0..7939be4 100755
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -160,6 +160,10 @@ LOCAL_C_INCLUDES += \
endif
+ifeq ($(BOARD_USE_TI_DUCATI_H264_PROFILE), true)
+LOCAL_CFLAGS += -DUSE_TI_DUCATI_H264_PROFILE
+endif
+
LOCAL_MODULE:= libstagefright
LOCAL_MODULE_TAGS := optional
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 42b6281..e7ba1cc 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -1336,7 +1336,12 @@ status_t OMXCodec::setupAVCEncoderParameters(const sp<MetaData>& meta) {
h264type.eLevel = static_cast<OMX_VIDEO_AVCLEVELTYPE>(profileLevel.mLevel);
// XXX
+#ifdef USE_TI_DUCATI_H264_PROFILE
+ if ((strncmp(mComponentName, "OMX.TI.DUCATI1", 14) != 0)
+ && (h264type.eProfile != OMX_VIDEO_AVCProfileBaseline)) {
+#else
if (h264type.eProfile != OMX_VIDEO_AVCProfileBaseline) {
+#endif
ALOGW("Use baseline profile instead of %d for AVC recording",
h264type.eProfile);
h264type.eProfile = OMX_VIDEO_AVCProfileBaseline;