summaryrefslogtreecommitdiffstats
path: root/sec_mm
diff options
context:
space:
mode:
authorSeungBeom Kim <sbcrux.kim@samsung.com>2011-11-09 10:40:31 +0900
committerJames Dong <jdong@google.com>2011-11-10 01:14:11 -0800
commit3e52aac216d7bb6f274a44d28838efba50bc9ec1 (patch)
tree4e49679e7519b734fcd644ef280d5cbb4db1b2e3 /sec_mm
parente91e13d8b8d0cac4848a06f39575983d0a8762ff (diff)
downloaddevice_samsung_crespo-3e52aac216d7bb6f274a44d28838efba50bc9ec1.zip
device_samsung_crespo-3e52aac216d7bb6f274a44d28838efba50bc9ec1.tar.gz
device_samsung_crespo-3e52aac216d7bb6f274a44d28838efba50bc9ec1.tar.bz2
Fix Empty thumbnails generated while in timelapse recording sometimes
Change-Id: Ia17ed033634c5e8709a04c974553fe426e7d9dcd Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com> related-to-bug: 5566262
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];