From: Greg Hackmann Date: Mon, 14 Jan 2013 23:56:05 +0000 (-0800) Subject: omx: use G2D CSC for encoding surface textures X-Git-Tag: cm-10.2-M1^2~24 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=96e4aa13425191365eb04752736fbde9938e7a51;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos5.git omx: use G2D CSC for encoding surface textures Change-Id: I1c7297f35b7740a5a9f0ce040c005135125c15fe Signed-off-by: Greg Hackmann --- diff --git a/exynos_omx/openmax/exynos_omx/component/video/enc/Android.mk b/exynos_omx/openmax/exynos_omx/component/video/enc/Android.mk index 0d3e767..2435e0f 100644 --- a/exynos_omx/openmax/exynos_omx/component/video/enc/Android.mk +++ b/exynos_omx/openmax/exynos_omx/component/video/enc/Android.mk @@ -9,7 +9,7 @@ LOCAL_MODULE := libExynosOMX_Venc LOCAL_ARM_MODE := arm LOCAL_MODULE_TAGS := optional -LOCAL_CFLAGS := -DUSE_CSC_GSCALER -DCSC_GSCALER_IDX=3 +LOCAL_CFLAGS := -DUSE_CSC_G2D LOCAL_C_INCLUDES := $(EXYNOS_OMX_INC)/khronos \ $(EXYNOS_OMX_INC)/exynos \ diff --git a/exynos_omx/openmax/exynos_omx/component/video/enc/Exynos_OMX_Venc.c b/exynos_omx/openmax/exynos_omx/component/video/enc/Exynos_OMX_Venc.c index 8831608..22efe36 100644 --- a/exynos_omx/openmax/exynos_omx/component/video/enc/Exynos_OMX_Venc.c +++ b/exynos_omx/openmax/exynos_omx/component/video/enc/Exynos_OMX_Venc.c @@ -222,7 +222,7 @@ OMX_BOOL Exynos_CSC_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA Exynos_OSAL_LockANBHandle((OMX_U32)ppBuf[0], nFrameWidth, nFrameHeight, OMX_COLOR_FormatAndroidOpaque, planes); -#ifdef USE_CSC_GSCALER +#if defined(USE_CSC_GSCALER) || defined(USE_CSC_G2D) csc_method = CSC_METHOD_HW; #endif pSrcBuf[0] = planes[0].addr; @@ -1150,9 +1150,13 @@ OMX_ERRORTYPE Exynos_OMX_VideoEncodeComponentInit(OMX_IN OMX_HANDLETYPE hCompone goto EXIT; } pVideoEnc->csc_set_format = OMX_FALSE; -#if defined(USE_CSC_GSCALER) +#if defined(USE_CSC_GSCALER) && defined(USE_CSC_G2D) +#error USE_CSC_GSCALER and USE_CSC_G2D are mutually exclusive +#elif defined(USE_CSC_GSCALER) csc_set_hw_property(pVideoEnc->csc_handle, CSC_HW_PROPERTY_FIXED_NODE, CSC_GSCALER_IDX); csc_set_hw_property(pVideoEnc->csc_handle, CSC_HW_PROPERTY_HW_TYPE, CSC_HW_TYPE_GSCALER); +#elif defined(USE_CSC_G2D) + csc_set_hw_property(pVideoEnc->csc_handle, CSC_HW_PROPERTY_HW_TYPE, CSC_HW_TYPE_G2D); #endif pExynosComponent->bMultiThreadProcess = OMX_TRUE;