diff options
author | Benny Wong <Benny.Wong@motorola.com> | 2009-09-18 13:44:24 -0500 |
---|---|---|
committer | James Dong <jdong@google.com> | 2009-09-23 14:54:41 -0700 |
commit | 22c239812ee8fc2e69d7da5f0f3e0df599bc7806 (patch) | |
tree | 0963aeef668421467a4b342c45e1f2e7b4f74d75 /omx | |
parent | e6e2e1c9616d3461a2c698f0d7e96648c74a0e0a (diff) | |
download | omap3-22c239812ee8fc2e69d7da5f0f3e0df599bc7806.tar.gz |
Adjust the width and height of the output buffer to a multiple of 16
because the TI decoder has a requirement that the max dimensions
be multiples of 16
Originally from: https://partner.source.android.com/g/#change,1107
Diffstat (limited to 'omx')
-rw-r--r-- | omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c b/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c index 0645b4e..6d64d4d 100644 --- a/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c +++ b/omx/video/src/openmax_il/video_decode/src/OMX_VideoDec_Utils.c @@ -7139,6 +7139,10 @@ OMX_ERRORTYPE VIDDEC_InitDSP_Mpeg4Dec(VIDDEC_COMPONENT_PRIVATE* pComponentPrivat OMX_U32 nFrameWidth = pComponentPrivate->pOutPortDef->format.video.nFrameWidth; OMX_U32 nFrameHeight = pComponentPrivate->pOutPortDef->format.video.nFrameHeight; + /* nFrameWidth and nFrameHeight needs to be multiples of 16. */ + nFrameWidth = (nFrameWidth + 0x0f) & ~0x0f; + nFrameHeight = (nFrameHeight + 0x0f) & ~0x0f; + if (nFrameWidth * nFrameHeight > 880 * 720) { lcml_dsp->NodeInfo.AllUUIDs[0].uuid = (struct DSP_UUID *)&MP4D720PSOCKET_TI_UUID; @@ -7206,8 +7210,8 @@ OMX_ERRORTYPE VIDDEC_InitDSP_Mpeg4Dec(VIDDEC_COMPONENT_PRIVATE* pComponentPrivat pCreatePhaseArgs->unOutputStreamID = 1; pCreatePhaseArgs->unOutputBufferType = 0; pCreatePhaseArgs->unOutputNumBufsPerStream = (OMX_U16)(pComponentPrivate->pOutPortDef->nBufferCountActual); - pCreatePhaseArgs->ulMaxWidth = (OMX_U16)(pComponentPrivate->pInPortDef->format.video.nFrameWidth); - pCreatePhaseArgs->ulMaxHeight = (OMX_U16)(pComponentPrivate->pInPortDef->format.video.nFrameHeight); + pCreatePhaseArgs->ulMaxWidth = (OMX_U16)(nFrameWidth); + pCreatePhaseArgs->ulMaxHeight = (OMX_U16)(nFrameHeight); if (pComponentPrivate->pOutPortDef->format.video.eColorFormat == VIDDEC_COLORFORMAT422) { pCreatePhaseArgs->ulYUVFormat = MP4VIDDEC_YUVFORMAT_INTERLEAVED422; |