From 8990fa80a4837bcb31a248ea1dd2ab12c80b2d09 Mon Sep 17 00:00:00 2001 From: Sunita Nadampalli Date: Thu, 23 Jun 2016 11:54:07 -0500 Subject: OMX:VideoDecoder: Correct MediaImage parameters This patch is to adjust the MediaImage parameters as per the corrections done for nOffset and nFilledLength for OMX outputbuffer header in the below patch: http://review.omapzoom.org/#/c/37623/ Change-Id: I0e8a755dc07b901b41dfc20b42e8160c37963166 Signed-off-by: Sunita Nadampalli --- omx/videodecode/omx_videodec_common/src/omx_video_decoder.c | 7 +++---- 1 file changed, 3 insertions(+), 4 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 287ac36..26bd038 100644 --- a/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c +++ b/omx/videodecode/omx_videodec_common/src/omx_video_decoder.c @@ -496,8 +496,8 @@ OMX_ERRORTYPE OMXVidDec_GetParameter(OMX_HANDLETYPE hComponent, struct MediaImage *image = &(Colorparams->sMediaImage); memset(image, 0, sizeof(MediaImage)); - image->mWidth = pVidDecComp->tCropDimension.nWidth; - image->mHeight = pVidDecComp->tCropDimension.nHeight; + image->mWidth = pOutputPortDef->format.video.nFrameWidth; + image->mHeight = pOutputPortDef->format.video.nFrameHeight; image->mType = MEDIA_IMAGE_TYPE_YUV; image->mNumPlanes = 3; @@ -514,8 +514,7 @@ OMX_ERRORTYPE OMXVidDec_GetParameter(OMX_HANDLETYPE hComponent, UV offset = (Stride*Height + (Top/2)*Stride + Left )- (Top*Stride + Left) on simplification UV offset = Stride*Height - (Top/2)*Stride */ - image->mPlane[U].mOffset = pOutputPortDef->format.video.nStride * pOutputPortDef->format.video.nFrameHeight - - (pVidDecComp->tCropDimension.nTop*pOutputPortDef->format.video.nStride)/2; + image->mPlane[U].mOffset = pOutputPortDef->format.video.nStride * pOutputPortDef->format.video.nFrameHeight; image->mPlane[U].mColInc = 2; image->mPlane[U].mRowInc = pOutputPortDef->format.video.nStride; image->mPlane[U].mHorizSubsampling = 2; -- cgit v1.2.3