diff options
author | Steve Kondik <shade@chemlab.org> | 2010-08-25 23:19:23 -0400 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2010-08-25 23:26:03 -0400 |
commit | 1f0716e6a8b122d8a7339d3f1508a4414ff1e751 (patch) | |
tree | 2e46cd6794779ec98e117529b9770e9ad5fc47a5 | |
parent | f51d2954ac1baa0a1e885871bbfdd73ba603e24b (diff) | |
download | frameworks_base-1f0716e6a8b122d8a7339d3f1508a4414ff1e751.zip frameworks_base-1f0716e6a8b122d8a7339d3f1508a4414ff1e751.tar.gz frameworks_base-1f0716e6a8b122d8a7339d3f1508a4414ff1e751.tar.bz2 |
stagefright: Only use stride/slice height for decode on MSM/QSD
Use the old behavior unless on MSM/QSD as some hardware expects it.
See commit f51d2954ac1baa0a1e885871bbfdd73ba603e24b
-rw-r--r-- | media/libstagefright/Android.mk | 7 | ||||
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk index c4b88cc..5fefc87 100644 --- a/media/libstagefright/Android.mk +++ b/media/libstagefright/Android.mk @@ -103,6 +103,13 @@ endif endif +ifeq ($(TARGET_BOARD_PLATFORM),qsd8k) + LOCAL_CFLAGS += -DUSE_QCOM_OMX_FIX +endif +ifeq ($(TARGET_BOARD_PLATFORM),msm7k) + LOCAL_CFLAGS += -DUSE_QCOM_OMX_FIX +endif + ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true) LOCAL_LDLIBS += -lpthread endif diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 6f0654d..40bc2c5 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -2999,10 +2999,16 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) { mOutputFormat->setInt32( kKeyHeight, (video_def->nFrameHeight + 15) & -16); } else { +#ifdef USE_QCOM_OMX_FIX //Update the Stride and Slice Height //Allows creation of Renderer with correct height and width mOutputFormat->setInt32(kKeyWidth, video_def->nStride); mOutputFormat->setInt32(kKeyHeight, video_def->nSliceHeight); +#else + //Some hardware expects the old behavior + mOutputFormat->setInt32(kKeyWidth, video_def->nFrameWidth); + mOutputFormat->setInt32(kKeyHeight, video_def->nFrameHeight); +#endif } mOutputFormat->setInt32(kKeyColorFormat, video_def->eColorFormat); |