aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Wang <xin1.wang@intel.com>2016-06-02 20:58:08 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-06-02 20:58:08 +0000
commit3d31edba2ec6f42a073a1fc109ba7870dcf7d009 (patch)
tree72dcdba0d169f72f97487b9f298d02e49adfdc9d
parent4dc690fbe8d258d9ed861001ab19c85bbe96b5bf (diff)
parent74cf801785771697945d7ff1ea7d781dd15cc35b (diff)
downloadomx-components-3d31edba2ec6f42a073a1fc109ba7870dcf7d009.tar.gz
Fixed the CTS DecodeAccuracyTest LargerWidth/Height issue. am: 6b2c35f759
am: 74cf801785 * commit '74cf801785771697945d7ff1ea7d781dd15cc35b': Fixed the CTS DecodeAccuracyTest LargerWidth/Height issue. Change-Id: I8e2ef7df808964a9da20db6ffe1f5be946207418
-rw-r--r--videocodec/OMXVideoDecoderVP9Hybrid.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/videocodec/OMXVideoDecoderVP9Hybrid.cpp b/videocodec/OMXVideoDecoderVP9Hybrid.cpp
index 8c346cf..aef9821 100644
--- a/videocodec/OMXVideoDecoderVP9Hybrid.cpp
+++ b/videocodec/OMXVideoDecoderVP9Hybrid.cpp
@@ -209,6 +209,9 @@ bool OMXVideoDecoderVP9Hybrid::isReallocateNeeded(const uint8_t * data,uint32_t
bool ret = true;
if (gralloc_mode) {
ret = mGetFrameResolution(data,data_sz, &width, &height);
+ if (width == 0 || height == 0)
+ return false;
+
if (ret) {
if (mAPMode == METADATA_MODE) {
ret = (width != mDecodedImageWidth)
@@ -292,6 +295,21 @@ OMX_ERRORTYPE OMXVideoDecoderVP9Hybrid::ProcessorProcess(
OMX_ERRORTYPE ret;
OMX_BUFFERHEADERTYPE *inBuffer = *pBuffers[INPORT_INDEX];
OMX_BUFFERHEADERTYPE *outBuffer = *pBuffers[OUTPORT_INDEX];
+
+ if ((mWorkingMode == GRAPHICBUFFER_MODE) && (mAPMode == METADATA_MODE) &&
+ (mLastTimeStamp == 0) && (!mFormatChanged)) {
+ bool mRet = mGetFrameResolution(inBuffer->pBuffer + inBuffer->nOffset, inBuffer->nFilledLen,
+ &mDecodedImageNewWidth,&mDecodedImageNewHeight);
+
+ if (mRet && ((mDecodedImageNewWidth != 0) && (mDecodedImageNewHeight != 0)) &&
+ ((mDecodedImageWidth != 0) && (mDecodedImageHeight != 0)) &&
+ ((mDecodedImageNewWidth != mDecodedImageWidth || mDecodedImageNewHeight != mDecodedImageHeight))) {
+ retains[INPORT_INDEX] = BUFFER_RETAIN_GETAGAIN;
+ HandleFormatChange();
+ return OMX_ErrorNone;
+ }
+ }
+
bool eos = (inBuffer->nFlags & OMX_BUFFERFLAG_EOS)? true:false;
OMX_BOOL isResolutionChange = OMX_FALSE;
bool formatChange = false;