diff options
author | gji2 <guoliang.ji@intel.com> | 2013-12-24 21:55:22 +0800 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:03:42 -0700 |
commit | a4315bcc3603ce74c2faeb4b81563dd3396cbd64 (patch) | |
tree | 8b001034dcb53fb049ab8705b5d1f37bd098789d | |
parent | c87a1a8f47c29d4eddf1ea0093c32b8eee04a239 (diff) | |
download | wrs_omxil_core-a4315bcc3603ce74c2faeb4b81563dd3396cbd64.tar.gz |
Fix the middleware encode patch impact on decode module issue.
BZ: 160888
Fix the middleware encode patch impact on decode module issue.
Change-Id: I37d4e6d1bdbece72df768578311d108ec5df7a64
Signed-off-by: gji2 <guoliang.ji@intel.com>
-rw-r--r-- | base/src/componentbase.cpp | 5 | ||||
-rw-r--r-- | base/src/portbase.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/base/src/componentbase.cpp b/base/src/componentbase.cpp index c6639ca..4aa8815 100644 --- a/base/src/componentbase.cpp +++ b/base/src/componentbase.cpp @@ -584,6 +584,11 @@ OMX_ERRORTYPE ComponentBase::CBaseSetParameter( p->format.video.nFrameHeight = mMaxFrameHeight; } + if (working_role != NULL && !strncmp((char*)working_role, "video_encoder", 13)) { + if(p->format.video.eColorFormat == OMX_COLOR_FormatUnused) + p->nBufferSize = p->format.video.nFrameWidth * p->format.video.nFrameHeight *3/2; + } + ret = port->SetPortDefinition(p, false); if (ret != OMX_ErrorNone) { return ret; diff --git a/base/src/portbase.cpp b/base/src/portbase.cpp index 3b44833..d6ca009 100644 --- a/base/src/portbase.cpp +++ b/base/src/portbase.cpp @@ -168,8 +168,6 @@ OMX_U32 PortBase::getFrameBufSize(OMX_COLOR_FORMATTYPE colorFormat, OMX_U32 widt case OMX_COLOR_FormatYUV420Planar: case OMX_COLOR_FormatYUV420SemiPlanar: return (width * height * 3) >> 1; - case OMX_COLOR_FormatUnused: - return (width * height * 3) >> 1; default: LOGV("unsupport color format !"); |