exynos: vdec: report width/height as stride/slice-height for BUFFER_COPY
authorLajos Molnar <lajos@google.com>
Thu, 5 Feb 2015 18:57:24 +0000 (10:57 -0800)
committerThe Android Automerger <android-build@google.com>
Thu, 5 Feb 2015 23:03:32 +0000 (15:03 -0800)
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.

Bug: 19179288

Change-Id: I2a85f02bf626971ae3fa31bafe5af9ac761d3ca8

exynos_omx/openmax/exynos_omx/component/video/dec/Exynos_OMX_VdecControl.c

index 80c3b633adf5bbcf0f2e1b264047974e3dec865a..7d4b56b1df04d13c4bbe782c2c67043eaea13dde 100644 (file)
@@ -1123,6 +1123,15 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeGetParameter(
                 (OMX_COLOR_FORMATTYPE)Exynos_OSAL_OMX2HalPixelFormat(portDefinition->format.video.eColorFormat);
             Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "portDefinition->format.video.eColorFormat:0x%x", 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