aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuanjun Huang <yuanjun.huang@intel.com>2015-01-29 20:20:28 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-29 20:20:28 +0000
commita19c9a9ad413ce879944bf655a61e7a981f0dcb1 (patch)
tree39920577fd4efb239bd691e955ce7973341448eb
parent95d1da0974f250c7fb7a86c7aa00f6693529bbbb (diff)
parentdd94f000f413fb14aaf4f61a2bb3f944033a38c8 (diff)
downloadandroid_hardware_intel_common_omx-components-a19c9a9ad413ce879944bf655a61e7a981f0dcb1.tar.gz
android_hardware_intel_common_omx-components-a19c9a9ad413ce879944bf655a61e7a981f0dcb1.tar.bz2
android_hardware_intel_common_omx-components-a19c9a9ad413ce879944bf655a61e7a981f0dcb1.zip
am dd94f000: VP8 OMX component - Add flushing the decode pipeline at the beginning, and make VP8 surface height uneccessary force to 32 bit align - keep it as same as original height.
* commit 'dd94f000f413fb14aaf4f61a2bb3f944033a38c8': VP8 OMX component - Add flushing the decode pipeline at the beginning, and make VP8 surface height uneccessary force to 32 bit align - keep it as same as original height.
-rw-r--r--videocodec/OMXVideoDecoderBase.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/videocodec/OMXVideoDecoderBase.cpp b/videocodec/OMXVideoDecoderBase.cpp
index cbbc9ae..6900d5c 100644
--- a/videocodec/OMXVideoDecoderBase.cpp
+++ b/videocodec/OMXVideoDecoderBase.cpp
@@ -634,6 +634,7 @@ OMX_ERRORTYPE OMXVideoDecoderBase::HandleFormatChange(void) {
uint32_t strideCropped = widthCropped;
uint32_t sliceHeightCropped = heightCropped;
int force_realloc = 0;
+ bool isVP8 = false;
#ifdef TARGET_HAS_ISV
LOGI("============== mVppBufferNum = %d\n", mVppBufferNum);
@@ -656,6 +657,10 @@ OMX_ERRORTYPE OMXVideoDecoderBase::HandleFormatChange(void) {
paramPortDefinitionInput.format.video.nFrameHeight,
width, height, widthCropped, heightCropped);
+ if (paramPortDefinitionInput.format.video.eCompressionFormat == OMX_VIDEO_CodingVP8) {
+ isVP8 = true;
+ }
+
if (!force_realloc &&
widthCropped == paramPortDefinitionOutput.format.video.nFrameWidth &&
heightCropped == paramPortDefinitionOutput.format.video.nFrameHeight) {
@@ -684,11 +689,11 @@ OMX_ERRORTYPE OMXVideoDecoderBase::HandleFormatChange(void) {
return OMX_ErrorNone;
}
- if (width > formatInfo->surfaceWidth || height > formatInfo->surfaceHeight) {
+ if (isVP8 || width > formatInfo->surfaceWidth || height > formatInfo->surfaceHeight) {
// update the real decoded resolution to outport instead of display resolution for graphic buffer reallocation
// when the width and height parsed from ES are larger than allocated graphic buffer in outport,
paramPortDefinitionOutput.format.video.nFrameWidth = width;
- paramPortDefinitionOutput.format.video.nFrameHeight = (height + 0x1f) & ~0x1f;
+ paramPortDefinitionOutput.format.video.nFrameHeight = height;
paramPortDefinitionOutput.format.video.eColorFormat = GetOutputColorFormat(
paramPortDefinitionOutput.format.video.nFrameWidth);
paramPortDefinitionOutput.format.video.nStride = stride;
@@ -706,6 +711,9 @@ OMX_ERRORTYPE OMXVideoDecoderBase::HandleFormatChange(void) {
if (mWorkingMode == GRAPHICBUFFER_MODE) {
// Make sure va_destroySurface is called before graphicbuffer is freed in case of port setting changed
mVideoDecoder->freeSurfaceBuffers();
+
+ // Also make sure all the reference frames are flushed
+ ProcessorFlush(INPORT_INDEX);
}
this->ports[OUTPORT_INDEX]->ReportPortSettingsChanged();
return OMX_ErrorNone;