From: SeungBeom Kim Date: Tue, 7 Oct 2014 05:11:04 +0000 (+0900) Subject: exynos_omx: multi_thread: Fix bug for adaptiveDrc tests. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f3be1e3;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos5.git exynos_omx: multi_thread: Fix bug for adaptiveDrc tests. Component Drc scheme has some bug. This patch is bug fix in VP8, MPEG4 and H.263 codec components. Bug: 17769922 Bug: 17769714 Change-Id: Id4924411083ac11a8a81776eef894c0276ed03c2 Signed-off-by: SeungBeom Kim --- 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 2544888..607ad97 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 @@ -2025,7 +2025,10 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX MFC_OUTPUT_BUFFER_PLANE, pDstInputData->bufferHeader); if (codecReturn != VIDEO_ERROR_NONE) { Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s : %d", __FUNCTION__, __LINE__); - ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; + if (codecReturn != VIDEO_ERROR_WRONGBUFFERSIZE) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s : %d", __FUNCTION__, __LINE__); + ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; + } goto EXIT; } Mpeg4CodecStart(pOMXComponent, OUTPUT_PORT_INDEX); @@ -2194,8 +2197,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "timestamp %lld us (%.2f secs), indexTimestamp: %d, nFlags: 0x%x", pDstOutputData->timeStamp, pDstOutputData->timeStamp / 1E6, indexTimestamp, pDstOutputData->nFlags); } - if ((displayStatus == VIDEO_FRAME_STATUS_CHANGE_RESOL) || - (displayStatus == VIDEO_FRAME_STATUS_DECODING_FINISHED) || + if ((displayStatus == VIDEO_FRAME_STATUS_DECODING_FINISHED) || ((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) { Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "displayStatus:%d, nFlags0x%x", displayStatus, pDstOutputData->nFlags); pDstOutputData->remainDataLen = 0; @@ -2523,7 +2525,7 @@ OSCL_EXPORT_REF OMX_ERRORTYPE Exynos_OMX_ComponentInit(OMX_HANDLETYPE hComponent pVideoDec->exynos_codec_getCodecInputPrivateData = &GetCodecInputPrivateData; pVideoDec->exynos_codec_getCodecOutputPrivateData = &GetCodecOutputPrivateData; - pVideoDec->exynos_codec_reconfigAllBuffers = &Mpeg4CodecCheckResolutionChange; + pVideoDec->exynos_codec_reconfigAllBuffers = &Mpeg4CodecReconfigAllBuffers; pVideoDec->hSharedMemory = Exynos_OSAL_SharedMemory_Open(); if (pVideoDec->hSharedMemory == NULL) { 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 667283b..8c934c8 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 @@ -1613,8 +1613,10 @@ OMX_ERRORTYPE Exynos_VP8Dec_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_D (unsigned int *)nAllocLen, (unsigned int *)dataLen, MFC_OUTPUT_BUFFER_PLANE, pDstInputData->bufferHeader); if (codecReturn != VIDEO_ERROR_NONE) { - Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s : %d", __FUNCTION__, __LINE__); - ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; + if (codecReturn != VIDEO_ERROR_WRONGBUFFERSIZE) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s : %d", __FUNCTION__, __LINE__); + ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; + } goto EXIT; } VP8CodecStart(pOMXComponent, OUTPUT_PORT_INDEX); @@ -1786,8 +1788,7 @@ OMX_ERRORTYPE Exynos_VP8Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_ Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "timestamp %lld us (%.2f secs), indexTimestamp: %d, nFlags: 0x%x", pDstOutputData->timeStamp, pDstOutputData->timeStamp / 1E6, indexTimestamp, pDstOutputData->nFlags); } - if ((displayStatus == VIDEO_FRAME_STATUS_CHANGE_RESOL) || - (displayStatus == VIDEO_FRAME_STATUS_DECODING_FINISHED) || + if ((displayStatus == VIDEO_FRAME_STATUS_DECODING_FINISHED) || ((pDstOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) { Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "displayStatus:%d, nFlags0x%x", displayStatus, pDstOutputData->nFlags); pDstOutputData->remainDataLen = 0;