summaryrefslogtreecommitdiffstats
path: root/sec_mm
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-11-11 11:48:55 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-11 11:48:55 -0800
commit05e7dceefaf02eb550e4dc4c800ff411243ef120 (patch)
treecf6fae54d151536d3e8b7fdb04b763f9d87e3b7e /sec_mm
parent7ae6488bb29cf67e7ab574e3129c01dfcfcfe56d (diff)
parentcfdf025803c01a937810e53d861e1746486c4b9a (diff)
downloaddevice_samsung_crespo-05e7dceefaf02eb550e4dc4c800ff411243ef120.zip
device_samsung_crespo-05e7dceefaf02eb550e4dc4c800ff411243ef120.tar.gz
device_samsung_crespo-05e7dceefaf02eb550e4dc4c800ff411243ef120.tar.bz2
am cfdf0258: Merge "Fix Empty thumbnails generated while in timelapse recording sometimes" into ics-mr1
* commit 'cfdf025803c01a937810e53d861e1746486c4b9a': Fix Empty thumbnails generated while in timelapse recording sometimes
Diffstat (limited to 'sec_mm')
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/dec/h264dec/SEC_OMX_H264dec.c12
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/dec/mpeg4dec/SEC_OMX_Mpeg4dec.c16
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];