summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2014-10-03 18:07:50 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-03 18:07:50 +0000
commitb220fe0e40bc3752b62a9576fc824634a16fc3ab (patch)
tree13f0ed8fb1fb063bb91252f8ba52c439283d192c
parentbe9ebd46c1ec366dca5f142a36a71015b048c037 (diff)
parent0f694a12f92a01f95807242320bd65e88c699708 (diff)
downloadframeworks_av-b220fe0e40bc3752b62a9576fc824634a16fc3ab.zip
frameworks_av-b220fe0e40bc3752b62a9576fc824634a16fc3ab.tar.gz
frameworks_av-b220fe0e40bc3752b62a9576fc824634a16fc3ab.tar.bz2
Merge "stagefright: fix fake-stride handling for H263 SW decoder" into lmp-dev
-rw-r--r--media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp5
-rw-r--r--media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp9
2 files changed, 11 insertions, 3 deletions
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
index d98fa80..1f4b6fd 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
@@ -156,7 +156,8 @@ void SoftMPEG4::onQueueFilled(OMX_U32 /* portIndex */) {
(mMode == MODE_MPEG4) ? MPEG4_MODE : H263_MODE;
Bool success = PVInitVideoDecoder(
- mHandle, vol_data, &vol_size, 1, mWidth, mHeight, mode);
+ mHandle, vol_data, &vol_size, 1,
+ outputBufferWidth(), outputBufferHeight(), mode);
if (!success) {
ALOGW("PVInitVideoDecoder failed. Unsupported content?");
@@ -321,7 +322,7 @@ bool SoftMPEG4::handlePortSettingsChange() {
vol_data[0] = NULL;
if (!PVInitVideoDecoder(
- mHandle, vol_data, &vol_size, 1, mWidth, mHeight,
+ mHandle, vol_data, &vol_size, 1, outputBufferWidth(), outputBufferHeight(),
H263_MODE)) {
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
mSignalledError = true;
diff --git a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
index 3d20a79..2f83610 100644
--- a/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
+++ b/media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
@@ -166,8 +166,15 @@ void SoftVideoDecoderOMXComponent::handlePortSettingsChange(
bool sizeChanged = (width != mWidth || height != mHeight);
bool updateCrop = (cropSettingsMode == kCropUnSet);
bool cropChanged = (cropSettingsMode == kCropChanged);
+ bool strideChanged = false;
+ if (fakeStride) {
+ OMX_PARAM_PORTDEFINITIONTYPE *def = &editPortInfo(kOutputPortIndex)->mDef;
+ if (def->format.video.nStride != width || def->format.video.nSliceHeight != height) {
+ strideChanged = true;
+ }
+ }
- if (sizeChanged || cropChanged) {
+ if (sizeChanged || cropChanged || strideChanged) {
mWidth = width;
mHeight = height;