summaryrefslogtreecommitdiffstats
path: root/sec_mm
diff options
context:
space:
mode:
authorsbcrux.kim <sbcrux.kim@samsung.com>2010-11-02 18:11:46 -0700
committerJames Dong <jdong@google.com>2010-11-02 18:47:17 -0700
commit8affcedc3d3c14c6f28358f2724a4faaf4be0b71 (patch)
tree42d1d8eeb2b0a0f407e3e2cf28cb46f9a3cb4ce2 /sec_mm
parentec8de83301370de5962e1255effaccc8a8974914 (diff)
downloaddevice_samsung_crespo-8affcedc3d3c14c6f28358f2724a4faaf4be0b71.zip
device_samsung_crespo-8affcedc3d3c14c6f28358f2724a4faaf4be0b71.tar.gz
device_samsung_crespo-8affcedc3d3c14c6f28358f2724a4faaf4be0b71.tar.bz2
SEC_OMX Encode Bug Fix
Fixed bug of buffer swap in encoder by changing buffer return position. bug #: 3158459 Change-Id: I98020349a1799316ebba52b5eb9b958a034b9995 Signed-off-by: sbcrux.kim <sbcrux.kim@samsung.com>
Diffstat (limited to 'sec_mm')
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c14
-rw-r--r--sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/SEC_OMX_H264enc.c5
2 files changed, 17 insertions, 2 deletions
diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c
index a6e1a18..c1bd4ef 100644
--- a/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c
+++ b/sec_mm/sec_omx/sec_omx_component/video/enc/SEC_OMX_Venc.c
@@ -794,10 +794,14 @@ OMX_BOOL SEC_Preprocessor_InputData(OMX_COMPONENTTYPE *pOMXComponent)
flagEOF = OMX_FALSE;
}
- if (inputUseBuffer->remainDataLen == 0)
+ if (inputUseBuffer->remainDataLen == 0) {
+#ifdef S5PC110_ENCODE_IN_DATA_BUFFER
+ if(flagEOF == OMX_FALSE)
+#endif
SEC_InputBufferReturn(pOMXComponent);
- else
+ } else {
inputUseBuffer->dataValid = OMX_TRUE;
+ }
}
if (flagEOF == OMX_TRUE) {
@@ -965,6 +969,12 @@ OMX_ERRORTYPE SEC_OMX_BufferProcess(OMX_HANDLETYPE hComponent)
SEC_OSAL_MutexLock(inputUseBuffer->bufferMutex);
SEC_OSAL_MutexLock(outputUseBuffer->bufferMutex);
ret = pSECComponent->sec_mfc_bufferProcess(pOMXComponent, inputData, outputData);
+#ifdef S5PC110_ENCODE_IN_DATA_BUFFER
+ if (inputUseBuffer->remainDataLen == 0)
+ SEC_InputBufferReturn(pOMXComponent);
+ else
+ inputUseBuffer->dataValid = OMX_TRUE;
+#endif
SEC_OSAL_MutexUnlock(outputUseBuffer->bufferMutex);
SEC_OSAL_MutexUnlock(inputUseBuffer->bufferMutex);
diff --git a/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/SEC_OMX_H264enc.c b/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/SEC_OMX_H264enc.c
index a118b90..53c025c 100644
--- a/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/SEC_OMX_H264enc.c
+++ b/sec_mm/sec_omx/sec_omx_component/video/enc/h264enc/SEC_OMX_H264enc.c
@@ -735,6 +735,11 @@ OMX_ERRORTYPE SEC_MFC_H264_Encode(OMX_COMPONENTTYPE *pOMXComponent, SEC_OMX_DATA
goto EXIT;
}
+ if ((pInputData->nFlags & OMX_BUFFERFLAG_ENDOFFRAME) &&
+ (pSECComponent->bUseFlagEOF == OMX_FALSE)) {
+ pSECComponent->bUseFlagEOF = OMX_TRUE;
+ }
+
pSECComponent->timeStamp[pH264Enc->hMFCH264Handle.indexTimestamp] = pInputData->timeStamp;
pSECComponent->nFlags[pH264Enc->hMFCH264Handle.indexTimestamp] = pInputData->nFlags;
SsbSipMfcEncSetConfig(pH264Enc->hMFCH264Handle.hMFCHandle, MFC_ENC_SETCONF_FRAME_TAG, &(pH264Enc->hMFCH264Handle.indexTimestamp));