exynos: vdec: support disabling metadata and native buffer modes
authorLajos Molnar <lajos@google.com>
Sat, 31 Jan 2015 01:44:31 +0000 (17:44 -0800)
committerLajos Molnar <lajos@google.com>
Sat, 31 Jan 2015 01:46:22 +0000 (17:46 -0800)
Bug: 19179288
Change-Id: I57495379be6170fec6e07ea9a1f67ed81aeeadf2

exynos_omx/openmax/exynos_omx/osal/Exynos_OSAL_Android.cpp

index 997b92601fa3662c11734d097d96b3bb9cd3e6a2..b91365b1813639ebe97f5e5b978c821aac46584f 100644 (file)
@@ -696,6 +696,12 @@ OMX_ERRORTYPE Exynos_OSAL_SetANBParameter(
             pExynosPort->bufferProcessType = BUFFER_SHARE;
             pExynosPort->portDefinition.format.video.eColorFormat = (OMX_COLOR_FORMATTYPE)OMX_SEC_COLOR_FormatNV12Tiled;
             Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "OMX_IndexParamEnableAndroidBuffers & bufferProcessType change to BUFFER_SHARE");
+        } else if ((portIndex == OUTPUT_PORT_INDEX) &&
+            (pExynosPort->bStoreMetaData == OMX_FALSE && pExynosPort->bIsANBEnabled == OMX_FALSE) &&
+            pExynosPort->bufferProcessType == BUFFER_SHARE) {
+            pExynosPort->bufferProcessType = (EXYNOS_OMX_BUFFERPROCESS_TYPE)(BUFFER_COPY | BUFFER_ANBSHARE);
+            pExynosPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYUV420Planar;
+            Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "No OMX_IndexParamEnableAndroidBuffers => reset bufferProcessType");
         }
     }
         break;
@@ -789,6 +795,12 @@ OMX_ERRORTYPE Exynos_OSAL_SetANBParameter(
                 pExynosPort->bufferProcessType = BUFFER_SHARE;
                 pExynosPort->portDefinition.format.video.eColorFormat = (OMX_COLOR_FORMATTYPE)OMX_SEC_COLOR_FormatNV12Tiled;
                 Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "OMX_IndexParamStoreMetaDataBuffer & bufferProcessType change to BUFFER_SHARE");
+            } else if ((portIndex == OUTPUT_PORT_INDEX) &&
+                (pExynosPort->bStoreMetaData == OMX_FALSE && pExynosPort->bIsANBEnabled == OMX_FALSE) &&
+                pExynosPort->bufferProcessType == BUFFER_SHARE) {
+                pExynosPort->bufferProcessType = (EXYNOS_OMX_BUFFERPROCESS_TYPE)(BUFFER_COPY | BUFFER_ANBSHARE);
+                pExynosPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYUV420Planar;
+                Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "No OMX_IndexParamStoreMetaDataBuffer => reset bufferProcessType");
             }
 
         }