From 55e460f7eec294f08e5510329d504f73c093ad0f Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Wed, 8 Apr 2015 21:25:31 +0200 Subject: [PATCH] vdec: report width/height as stride/slice-height for BUFFER_COPY This is a workaround for bytebuffer mode, as decoder actually uses width and height as stride and slice height for the output buffer. Changing only at getParam as the internal value may be used elsewhere. Backported-from: hardware/samsung_slsi/exynos5 Change-Id: I9360dd5c17cc3f1be206cad65c440cae7d260b5f Signed-off-by: Andreas Schneider --- component/video/dec/Exynos_OMX_VdecControl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/component/video/dec/Exynos_OMX_VdecControl.c b/component/video/dec/Exynos_OMX_VdecControl.c index 5011363..7be4f66 100644 --- a/component/video/dec/Exynos_OMX_VdecControl.c +++ b/component/video/dec/Exynos_OMX_VdecControl.c @@ -1146,6 +1146,15 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeGetParameter( portDefinition->format.video.eColorFormat = (OMX_COLOR_FORMATTYPE)Exynos_OSAL_OMX2HalPixelFormat(portDefinition->format.video.eColorFormat); } + + // WORKAROUND provided by Google engineer + if (portIndex == OUTPUT_PORT_INDEX && + (pExynosPort->bufferProcessType & BUFFER_COPY) == BUFFER_COPY) { + // Decoder actually uses width and height as stride and slice height for buffer copy. + // Changing only at getParam as the internal value may be used elsewhere + portDefinition->format.video.nStride = portDefinition->format.video.nFrameWidth; + portDefinition->format.video.nSliceHeight = portDefinition->format.video.nFrameHeight; + } } break; #endif -- 2.20.1