From: Yunji Kim Date: Mon, 29 Oct 2012 04:51:10 +0000 (+0900) Subject: osal: Add USE_ANB_OUTBUF_SHARE flag X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8822b6c4005f9ca868243e9298f9eebf7f157c91;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_openmax.git osal: Add USE_ANB_OUTBUF_SHARE flag This patch supports both share & copy mode for output buffer Change-Id: I594b5aeedfdd294029b81e47577b3ff07ecb9112 Signed-off-by: Yunji Kim Signed-off-by: Huisung Kang --- diff --git a/osal/Exynos_OSAL_Android.cpp b/osal/Exynos_OSAL_Android.cpp index c2346f3..224893a 100644 --- a/osal/Exynos_OSAL_Android.cpp +++ b/osal/Exynos_OSAL_Android.cpp @@ -435,16 +435,22 @@ OMX_ERRORTYPE Exynos_OSAL_SetANBParameter( ret = OMX_ErrorBadPortIndex; goto EXIT; } - - /* ANB and DPB Buffer Sharing */ - pExynosPort->bIsANBEnabled = pANBParams->enable; +#ifdef USE_ANB_OUTBUF_SHARE + /* ANB and DPB Buffer Sharing */ if ((portIndex == OUTPUT_PORT_INDEX) && - (pExynosPort->bIsANBEnabled == OMX_TRUE) && ((pExynosPort->bufferProcessType & BUFFER_ANBSHARE) == BUFFER_ANBSHARE)) { 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"); + Exynos_OSAL_Log(EXYNOS_LOG_INFO, "output buffer sharing mode is on"); + } +#else + if ((portIndex == OUTPUT_PORT_INDEX) && + (pExynosPort->bufferProcessType & BUFFER_COPY)) { + pExynosPort->bufferProcessType = BUFFER_COPY; + pExynosPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar; } +#endif + pExynosPort->bIsANBEnabled = pANBParams->enable; } break;