diff options
author | Angela Stegmaier <angelabaker@ti.com> | 2018-03-13 17:03:34 -0500 |
---|---|---|
committer | Angela Stegmaier <angelabaker@ti.com> | 2018-03-23 15:08:18 -0600 |
commit | 51c77eb96914f21b6d23fd2f2a7c35fb25c9dfd5 (patch) | |
tree | f277021ca92f934739bf7dd2a372195935bff41b | |
parent | 5f54514b75d6a4c71726c7430cd7241d029dd2a9 (diff) | |
download | dra7xx-51c77eb96914f21b6d23fd2f2a7c35fb25c9dfd5.tar.gz |
OMX: Video Decoder: Update Stride when Updated Alloation Width
Without this vts tests fail. Since we know the required stride at
this point, update the port definition to indicate it.
Change-Id: I79debcf51dc051f8aad53ac105694a0a8d8cd05c
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
-rw-r--r-- | omx/videodecode/omx_videodec_common/src/omx_video_decoder.c | 5 | ||||
-rw-r--r-- | omx/videodecode/omx_videodec_common/src/omx_video_decoder_internal.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c b/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c index d64e7c1..1432087 100644 --- a/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c +++ b/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c @@ -37,6 +37,8 @@ OMX_ERRORTYPE OMX_ComponentInit(OMX_HANDLETYPE hComponent) OMX_COMPONENTTYPE *pHandle = NULL; OMXVidDecComp *pVidDecComp = NULL; OMX_PARAM_PORTDEFINITIONTYPE *pOutputPortDef = NULL; + OMX_U32 outPort = (OMX_U32)OMX_VIDDEC_OUTPUT_PORT; + OMX_CONFIG_RECTTYPE *p2DOutBufAllocParam = NULL; pHandle = (OMX_COMPONENTTYPE *)hComponent; @@ -51,6 +53,9 @@ OMX_ERRORTYPE OMX_ComponentInit(OMX_HANDLETYPE hComponent) OMXVidDec_InitPortDefs(hComponent, pVidDecComp); OMXVidDec_InitPortParams(pVidDecComp); OMXVidDec_Set2DBuffParams(hComponent, pVidDecComp); + pOutputPortDef = &(pVidDecComp->sBase.pPorts[OMX_VIDDEC_OUTPUT_PORT]->sPortDef); + p2DOutBufAllocParam = &(pVidDecComp->t2DBufferAllocParams[outPort]); + pOutputPortDef->format.video.nStride = p2DOutBufAllocParam->nWidth; /* Call Decoder Specific function to set Static Params */ pVidDecComp->fpSet_StaticParams(hComponent, pVidDecComp->pDecStaticParams); diff --git a/omx/videodecode/omx_videodec_common/src/omx_video_decoder_internal.c b/omx/videodecode/omx_videodec_common/src/omx_video_decoder_internal.c index 962acd6..784acbe 100644 --- a/omx/videodecode/omx_videodec_common/src/omx_video_decoder_internal.c +++ b/omx/videodecode/omx_videodec_common/src/omx_video_decoder_internal.c @@ -155,9 +155,14 @@ void OMXVidDec_InitPortParams(OMXVidDecComp *pVidDecComp) void OMXVidDec_InitDecoderParams(OMX_HANDLETYPE hComponent, OMXVidDecComp *pVidDecComp) { + OMX_U32 outPort = (OMX_U32)OMX_VIDDEC_OUTPUT_PORT; + OMX_PARAM_PORTDEFINITIONTYPE *pOutputPortDef = &(pVidDecComp->sBase.pPorts[outPort]->sPortDef); + OMX_CONFIG_RECTTYPE *p2DOutBufAllocParam = &(pVidDecComp->t2DBufferAllocParams[outPort]); + OMXVidDec_InitPortDefs(hComponent, pVidDecComp); OMXVidDec_InitPortParams(pVidDecComp); OMXVidDec_Set2DBuffParams(hComponent, pVidDecComp); + pOutputPortDef->format.video.nStride = p2DOutBufAllocParam->nWidth; /* Call Decoder Specific function to set Static Params */ pVidDecComp->fpSet_StaticParams(hComponent, pVidDecComp->pDecStaticParams); |