LOCAL_CFLAGS += -DUSE_DMA_BUF
endif
+ifeq ($(BOARD_USE_CSC_HW), true)
+LOCAL_CFLAGS += -DUSE_CSC_HW
+endif
+
include $(BUILD_STATIC_LIBRARY)
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
- MEMORY_TYPE eMemoryType = NORMAL_MEMORY;
+ MEMORY_TYPE eMemoryType = SYSTEM_MEMORY;
CODEC_DEC_BUFFER **ppCodecBuffer = NULL;
OMX_U32 nPlaneCnt = 0;
} else {
ppCodecBuffer = &(pVideoDec->pMFCDecOutputBuffer[0]);
nPlaneCnt = MFC_OUTPUT_BUFFER_PLANE;
+#ifdef USE_CSC_HW
+ eMemoryType = NORMAL_MEMORY;
+#endif
}
for (i = 0; i < nBufferCnt; i++) {
OMX_U8 *temp_buffer = NULL;
int temp_buffer_fd = -1;
OMX_U32 i = 0;
- MEMORY_TYPE mem_type;
+ MEMORY_TYPE mem_type = SYSTEM_MEMORY;
FunctionIn();
goto EXIT;
}
- if ((pVideoDec->bDRMPlayerMode == OMX_TRUE) && (nPortIndex == INPUT_PORT_INDEX)) {
+ if ((pVideoDec->bDRMPlayerMode == OMX_TRUE) &&
+ (nPortIndex == INPUT_PORT_INDEX)) {
mem_type = SECURE_MEMORY;
- } else if (pExynosPort->bufferProcessType & BUFFER_SHARE) {
+ } else if ((nPortIndex == OUTPUT_PORT_INDEX) &&
+ (pExynosPort->bufferProcessType & BUFFER_SHARE)) {
mem_type = NORMAL_MEMORY;
- } else {
- mem_type = SYSTEM_MEMORY;
}
+
temp_buffer = Exynos_OSAL_SharedMemory_Alloc(pVideoDec->hSharedMemory, nSizeBytes, mem_type);
if (temp_buffer == NULL) {
ret = OMX_ErrorInsufficientResources;
LOCAL_CFLAGS += -DUSE_GSC_RGB_ENCODER
endif
+ifeq ($(BOARD_USE_CSC_HW), true)
+LOCAL_CFLAGS += -DUSE_CSC_HW
+endif
+
LOCAL_SHARED_LIBRARIES := libcsc
include $(BUILD_STATIC_LIBRARY)
OMX_ERRORTYPE ret = OMX_ErrorNone;
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
- MEMORY_TYPE eMemoryType = NORMAL_MEMORY;
+ MEMORY_TYPE eMemoryType = SYSTEM_MEMORY;
CODEC_ENC_BUFFER **ppCodecBuffer = NULL;
OMX_U32 nPlaneCnt = 0;
} else {
ppCodecBuffer = &(pVideoEnc->pMFCEncOutputBuffer[0]);
nPlaneCnt = MFC_OUTPUT_BUFFER_PLANE;
+#ifdef USE_CSC_HW
+ eMemoryType = NORMAL_MEMORY;
+#endif
}
for (i = 0; i < nBufferCnt; i++) {
OMX_BUFFERHEADERTYPE *pTempBufferHdr = NULL;
OMX_U8 *pTempBuffer = NULL;
int fdTempBuffer = -1;
- MEMORY_TYPE eMemType;
+ MEMORY_TYPE eMemType = SYSTEM_MEMORY;
OMX_U32 i = 0;
FunctionIn();
goto EXIT;
}
- if (pExynosPort->bufferProcessType & BUFFER_SHARE)
+ if ((nPortIndex == INPUT_PORT_INDEX) &&
+ (pExynosPort->bufferProcessType & BUFFER_SHARE)) {
eMemType = NORMAL_MEMORY;
- else
- eMemType = SYSTEM_MEMORY;
+ }
pTempBuffer = Exynos_OSAL_SharedMemory_Alloc(pVideoEnc->hSharedMemory, nSizeBytes, eMemType);
if (pTempBuffer == NULL) {