video_dec: Add crop info update code
authorSeungBeom Kim <sbcrux.kim@samsung.com>
Sun, 29 Mar 2015 15:43:27 +0000 (17:43 +0200)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Tue, 31 Mar 2015 17:19:13 +0000 (17:19 +0000)
This patch resolves the failure of testH264_flushConfigureDrc CTS. OMX
update the Crop information when client call the SetParameter with
OMX_IndexParamPortDefinition.

Backported-from: hardware/samsung_slsi/exynos5

Change-Id: I985f326ae46129a2a48afa7ecf2ab77ce4a67e22
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
component/video/dec/Exynos_OMX_VdecControl.c

index d2b2647fe27235131b453a6431106029cf9616d3..5863ab97f55cf4021dc29189ea34e547024adb84 100644 (file)
@@ -1300,6 +1300,11 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeSetParameter(
         pExynosPort->portDefinition.format.video.nSliceHeight = height;
         pExynosPort->portDefinition.nBufferSize = (size > pExynosPort->portDefinition.nBufferSize) ? size : pExynosPort->portDefinition.nBufferSize;
 
+        pExynosPort->cropRectangle.nTop = 0;
+        pExynosPort->cropRectangle.nLeft = 0;
+        pExynosPort->cropRectangle.nWidth = realWidth;
+        pExynosPort->cropRectangle.nHeight = realHeight;
+
         if (portIndex == INPUT_PORT_INDEX) {
             EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
             pExynosOutputPort->portDefinition.format.video.nFrameWidth = pExynosPort->portDefinition.format.video.nFrameWidth;