Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3dda251 authored by Steve Kondik's avatar Steve Kondik
Browse files

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 f51d2954

Change-Id: Ia8bb11e9ff0a0a959ab3224c74120f46c3785304
parent 08bf4442
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -100,6 +100,16 @@ ifneq ($(TARGET_SIMULATOR),true)
LOCAL_SHARED_LIBRARIES += libdl
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_BOARD_PLATFORM),msm7x30)
        LOCAL_CFLAGS += -DUSE_QCOM_OMX_FIX
endif

ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
        LOCAL_LDLIBS += -lpthread
endif
+6 −0
Original line number Diff line number Diff line
@@ -3599,10 +3599,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);