From: SeungBeom Kim Date: Wed, 23 Oct 2013 04:54:39 +0000 (+0900) Subject: exynos_omx: multi_thread: Add buffer index reset scheme. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eb5bed43351266aba836fe7f15ecdd5e0da43422;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos5.git exynos_omx: multi_thread: Add buffer index reset scheme. Add buffer index reset scheme when the Dynamic Resolution Change with dynamic DPB Change working. Bug: 10916591 Change-Id: I897c81beb2d0c8a83399e0d1e1d5c4658d9bb00c Signed-off-by: SeungBeom Kim --- diff --git a/exynos_omx/openmax/exynos_omx/component/video/dec/h264/Exynos_OMX_H264dec.c b/exynos_omx/openmax/exynos_omx/component/video/dec/h264/Exynos_OMX_H264dec.c index 10d0a1d..b217a1b 100644 --- a/exynos_omx/openmax/exynos_omx/component/video/dec/h264/Exynos_OMX_H264dec.c +++ b/exynos_omx/openmax/exynos_omx/component/video/dec/h264/Exynos_OMX_H264dec.c @@ -461,11 +461,15 @@ OMX_ERRORTYPE H264CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps; pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps; - if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL)) + if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL)) { pInbufOps->Stop(hMFCHandle); - else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL)) + } else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL)) { + EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate; + EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX]; pOutbufOps->Stop(hMFCHandle); - + if (pExynosOutputPort->bufferProcessType == BUFFER_SHARE) + pOutbufOps->Clear_RegisteredBuffer(hMFCHandle); + } ret = OMX_ErrorNone; EXIT: diff --git a/exynos_omx/openmax/exynos_omx/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c b/exynos_omx/openmax/exynos_omx/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c index bae0f2f..389da07 100644 --- a/exynos_omx/openmax/exynos_omx/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c +++ b/exynos_omx/openmax/exynos_omx/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c @@ -565,11 +565,15 @@ OMX_ERRORTYPE Mpeg4CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortInde pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps; pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps; - if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL)) + if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL)) { pInbufOps->Stop(hMFCHandle); - else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL)) + } else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL)) { + EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate; + EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX]; pOutbufOps->Stop(hMFCHandle); - + if (pExynosOutputPort->bufferProcessType == BUFFER_SHARE) + pOutbufOps->Clear_RegisteredBuffer(hMFCHandle); + } ret = OMX_ErrorNone; EXIT: diff --git a/exynos_omx/openmax/exynos_omx/component/video/dec/vp8/Exynos_OMX_Vp8dec.c b/exynos_omx/openmax/exynos_omx/component/video/dec/vp8/Exynos_OMX_Vp8dec.c index e2980bb..f45a689 100644 --- a/exynos_omx/openmax/exynos_omx/component/video/dec/vp8/Exynos_OMX_Vp8dec.c +++ b/exynos_omx/openmax/exynos_omx/component/video/dec/vp8/Exynos_OMX_Vp8dec.c @@ -380,11 +380,15 @@ OMX_ERRORTYPE VP8CodecStop(OMX_COMPONENTTYPE *pOMXComponent, OMX_U32 nPortIndex) pInbufOps = pVp8Dec->hMFCVp8Handle.pInbufOps; pOutbufOps = pVp8Dec->hMFCVp8Handle.pOutbufOps; - if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL)) + if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL)) { pInbufOps->Stop(hMFCHandle); - else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL)) + } else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL)) { + EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate; + EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX]; pOutbufOps->Stop(hMFCHandle); - + if (pExynosOutputPort->bufferProcessType == BUFFER_SHARE) + pOutbufOps->Clear_RegisteredBuffer(hMFCHandle); + } ret = OMX_ErrorNone; EXIT: