summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngela Stegmaier <angelabaker@ti.com>2016-11-02 16:43:10 -0500
committerSunita Nadampalli <sunitan@ti.com>2017-01-31 14:21:21 -0500
commitad15e27f09c64d9a60ba402edecd9ad7f974accd (patch)
tree83ac391515e069a18a3b740e0dd6dce9775b2f0e
parentb4a049ee0a47e40f061ee2b08e53aa64f0fee1ca (diff)
downloaddra7xx-ad15e27f09c64d9a60ba402edecd9ad7f974accd.tar.gz
OMX: Set Height to positive value when Using XDM_MEMTYPE_TILEDPAGE
When using XDM_MEMTYPE_TILEDPAGE for memType, Mpeg2 decoder codec will throw a fatal error if tileMem.height is not set to a positive value. Since this is 1D tiled memory, height can be set to 1 since the width is already set to the number of bytes. And since this is a union type, tileMem.width is set when number of bytes is set. Change-Id: Id943c988533c52cd4bbba72484070338975d0a9f Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
-rw-r--r--omx/videodecode/omx_videodec_common/src/omx_video_decoder.c5
1 files changed, 5 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 c3f01db..1979438 100644
--- a/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c
+++ b/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c
@@ -1140,6 +1140,7 @@ OMX_ERRORTYPE OMXVidDec_DataNotify(OMX_HANDLETYPE hComponent)
pInBufDescPtr->descs[0].buf = (XDAS_Int8*)pInBufHeader->pBuffer;
pInBufDescPtr->descs[0].memType = XDM_MEMTYPE_TILEDPAGE;
pInBufDescPtr->descs[0].bufSize.bytes = pInBufHeader->nFilledLen;
+ pInBufDescPtr->descs[0].bufSize.tileMem.height = 1;
}
pOutBufDescPtr->numBufs = 0;
} else if( pVidDecComp->pDecDynParams->decodeHeader == pVidDecComp->nDecoderMode ) {
@@ -1149,6 +1150,7 @@ OMX_ERRORTYPE OMXVidDec_DataNotify(OMX_HANDLETYPE hComponent)
pInBufDescPtr->descs[0].buf = (XDAS_Int8*)(pVidDecComp->sCodecConfig.sBuffer);
pInBufDescPtr->descs[0].memType = XDM_MEMTYPE_TILEDPAGE;
pInBufDescPtr->descs[0].bufSize.bytes = pVidDecComp->sCodecConfig.sBuffer->size;
+ pInBufDescPtr->descs[0].bufSize.tileMem.height = 1;
pOutBufDescPtr->numBufs = 0;
} else if( pInBufHeader != NULL && pVidDecComp->pDecDynParams->decodeHeader == XDM_DECODE_AU ) {
// In case EOS and Number of Input bytes=0. Flush Decoder and exit
@@ -1183,6 +1185,7 @@ OMX_ERRORTYPE OMXVidDec_DataNotify(OMX_HANDLETYPE hComponent)
pInBufDescPtr->descs[0].buf = (XDAS_Int8 *)&(((OMXBase_BufHdrPvtData*)pInBufHeader->pPlatformPrivate)->sMemHdr[0]);
pInBufDescPtr->descs[0].memType = XDM_MEMTYPE_TILEDPAGE;
pInBufDescPtr->descs[0].bufSize.bytes = pInBufHeader->nFilledLen - pInBufHeader->nOffset;
+ pInBufDescPtr->descs[0].bufSize.tileMem.height = 1;
}
/* Initialize Number of Buffers for input and output */
pInBufDescPtr->numBufs = 1;
@@ -1203,6 +1206,7 @@ OMX_ERRORTYPE OMXVidDec_DataNotify(OMX_HANDLETYPE hComponent)
} else*/ {
pOutBufDescPtr->descs[0].bufSize.bytes = pVidDecComp->t2DBufferAllocParams[OMX_VIDDEC_OUTPUT_PORT].nWidth *
pVidDecComp->t2DBufferAllocParams[OMX_VIDDEC_OUTPUT_PORT].nHeight;
+ pOutBufDescPtr->descs[0].bufSize.tileMem.height = 1;
pOutBufDescPtr->descs[0].buf = (XDAS_Int8 *)&(((OMXBase_BufHdrPvtData*)pOutBufHeader->pPlatformPrivate)->sMemHdr[0]);
pOutBufDescPtr->descs[0].memType = XDM_MEMTYPE_TILEDPAGE;
@@ -1212,6 +1216,7 @@ OMX_ERRORTYPE OMXVidDec_DataNotify(OMX_HANDLETYPE hComponent)
pOutBufDescPtr->descs[1].bufSize.bytes = pVidDecComp->t2DBufferAllocParams[OMX_VIDDEC_OUTPUT_PORT].nWidth *
pVidDecComp->t2DBufferAllocParams[OMX_VIDDEC_OUTPUT_PORT].nHeight/2;
+ pOutBufDescPtr->descs[1].bufSize.tileMem.height = 1;
pOutBufDescPtr->descs[1].buf = (XDAS_Int8 *)&(((OMXBase_BufHdrPvtData*)pOutBufHeader->pPlatformPrivate)->sMemHdr[1]);
pOutBufDescPtr->descs[1].memType = XDM_MEMTYPE_TILEDPAGE;
nStride = pVidDecComp->t2DBufferAllocParams[OMX_VIDDEC_OUTPUT_PORT].nWidth;