diff options
author | James Dong <jdong@google.com> | 2011-11-11 01:44:27 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-11 01:44:27 -0800 |
commit | cfdf025803c01a937810e53d861e1746486c4b9a (patch) | |
tree | 7a81859c0f4729535f8a5caa90d27c2c78ac6549 | |
parent | 8fe86ce4f5f49d886a4c11e841dde1740a068fe5 (diff) | |
parent | 3e52aac216d7bb6f274a44d28838efba50bc9ec1 (diff) | |
download | device_samsung_crespo-cfdf025803c01a937810e53d861e1746486c4b9a.zip device_samsung_crespo-cfdf025803c01a937810e53d861e1746486c4b9a.tar.gz device_samsung_crespo-cfdf025803c01a937810e53d861e1746486c4b9a.tar.bz2 |
Merge "Fix Empty thumbnails generated while in timelapse recording sometimes" into ics-mr1
-rw-r--r-- | sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/SEC_OMX_H264dec.c | 12 | ||||
-rw-r--r-- | sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c | 16 |
2 files changed, 24 insertions, 4 deletions
diff --git a/sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/SEC_OMX_H264dec.c b/sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/SEC_OMX_H264dec.c index 1c72195..07e1a89 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/SEC_OMX_H264dec.c +++ b/sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/SEC_OMX_H264dec.c @@ -920,7 +920,7 @@ OMX_ERRORTYPE SEC_MFC_H264_Decode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DATA /* Default number in the driver is optimized */ if (pH264Dec->hMFCH264Handle.bThumbnailMode == OMX_TRUE) { - setConfVal = 0; + setConfVal = 1; SsbSipMfcDecSetConfig(pH264Dec->hMFCH264Handle.hMFCHandle, MFC_DEC_SETCONF_DISPLAY_DELAY, &setConfVal); } else { setConfVal = 8; @@ -1091,6 +1091,11 @@ OMX_ERRORTYPE SEC_MFC_H264_Decode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DATA pOutputData->nFlags |= OMX_BUFFERFLAG_EOS; pSECComponent->getAllDelayBuffer = OMX_FALSE; } + if ((pH264Dec->bFirstFrame == OMX_TRUE) && + ((pOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) { + pOutputData->nFlags = (pOutputData->nFlags & (~OMX_BUFFERFLAG_EOS)); + } + outputDataValid = OMX_FALSE; /* ret = OMX_ErrorUndefined; */ @@ -1135,6 +1140,11 @@ OMX_ERRORTYPE SEC_MFC_H264_Decode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DATA pH264Dec->hMFCH264Handle.pMFCStreamPhyBuffer = pH264Dec->MFCDecInputBuffer[pH264Dec->indexInputBuffer].PhyAddr; pSECComponent->processData[INPUT_PORT_INDEX].dataBuffer = pH264Dec->MFCDecInputBuffer[pH264Dec->indexInputBuffer].VirAddr; pSECComponent->processData[INPUT_PORT_INDEX].allocSize = pH264Dec->MFCDecInputBuffer[pH264Dec->indexInputBuffer].bufferSize; + if (((pH264Dec->hMFCH264Handle.bThumbnailMode == OMX_TRUE) || (pSECComponent->bSaveFlagEOS == OMX_TRUE)) && + (pH264Dec->bFirstFrame == OMX_TRUE) && + (outputDataValid == OMX_FALSE)) { + ret = OMX_ErrorInputDataDecodeYet; + } pH264Dec->bFirstFrame = OMX_FALSE; } diff --git a/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c b/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c index cea12c3..052a4c9 100644 --- a/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c +++ b/sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c @@ -1096,7 +1096,7 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4_Decode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DAT SsbSipMfcDecSetConfig(hMFCHandle, MFC_DEC_SETCONF_POST_ENABLE, &configValue); if (pMpeg4Dec->hMFCMpeg4Handle.bThumbnailMode == OMX_TRUE) { - configValue = 0; // the number that you want to delay + configValue = 1; // the number that you want to delay SsbSipMfcDecSetConfig(hMFCHandle, MFC_DEC_SETCONF_DISPLAY_DELAY, &configValue); } @@ -1236,11 +1236,16 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4_Decode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DAT pOutputData->nFlags |= OMX_BUFFERFLAG_EOS; pSECComponent->getAllDelayBuffer = OMX_FALSE; } + if ((pMpeg4Dec->bFirstFrame == OMX_TRUE) && + ((pOutputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) { + pOutputData->nFlags = (pOutputData->nFlags & (~OMX_BUFFERFLAG_EOS)); + } + outputDataValid = OMX_FALSE; /* ret = OMX_ErrorUndefined; */ ret = OMX_ErrorNone; - } + } if (ret == OMX_ErrorInputDataDecodeYet) { pMpeg4Dec->MFCDecInputBuffer[pMpeg4Dec->indexInputBuffer].dataSize = oneFrameSize; @@ -1280,10 +1285,15 @@ OMX_ERRORTYPE SEC_MFC_Mpeg4_Decode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DAT pMpeg4Dec->hMFCMpeg4Handle.pMFCStreamPhyBuffer = pMpeg4Dec->MFCDecInputBuffer[pMpeg4Dec->indexInputBuffer].PhyAddr; pSECComponent->processData[INPUT_PORT_INDEX].dataBuffer = pMpeg4Dec->MFCDecInputBuffer[pMpeg4Dec->indexInputBuffer].VirAddr; pSECComponent->processData[INPUT_PORT_INDEX].allocSize = pMpeg4Dec->MFCDecInputBuffer[pMpeg4Dec->indexInputBuffer].bufferSize; + if (((pMpeg4Dec->hMFCMpeg4Handle.bThumbnailMode == OMX_TRUE) || (pSECComponent->bSaveFlagEOS == OMX_TRUE)) && + (pMpeg4Dec->bFirstFrame == OMX_TRUE) && + (outputDataValid == OMX_FALSE)) { + ret = OMX_ErrorInputDataDecodeYet; + } pMpeg4Dec->bFirstFrame = OMX_FALSE; } - /** Fill Output Buffer **/ + /** Fill Output Buffer **/ if (outputDataValid == OMX_TRUE) { SEC_OMX_BASEPORT *pSECInputPort = &pSECComponent->pSECPort[INPUT_PORT_INDEX]; SEC_OMX_BASEPORT *pSECOutputPort = &pSECComponent->pSECPort[OUTPUT_PORT_INDEX]; |