From 8822b6c4005f9ca868243e9298f9eebf7f157c91 Mon Sep 17 00:00:00 2001 From: Yunji Kim Date: Mon, 29 Oct 2012 13:51:10 +0900 Subject: [PATCH] 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 --- osal/Exynos_OSAL_Android.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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; -- 2.20.1