#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <mm_types.h>
#include "Exynos_OMX_Macros.h"
#include "Exynos_OSAL_Event.h"
#include "Exynos_OMX_Vdec.h"
return ALIGN(mbX * mbY, S5P_FIMV_DEC_BUF_ALIGN);
}
-inline void Exynos_UpdateFrameSize(OMX_COMPONENTTYPE *pOMXComponent)
+void Exynos_UpdateFrameSize(OMX_COMPONENTTYPE *pOMXComponent)
{
EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
EXYNOS_OMX_BASEPORT *exynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
if (width && height)
exynosOutputPort->portDefinition.nBufferSize = (width * height * 3) / 2;
break;
-#ifdef SLP_PLATFORM /* nv12t fd */
+#ifdef TIZEN_FEATURE_E3250 /* nv12t fd */
case OMX_SEC_COLOR_FormatNV12T_DmaBuf_Fd:
if (width && height)
- exynosOutputPort->portDefinition.nBufferSize = sizeof(SCMN_IMGB);
+ exynosOutputPort->portDefinition.nBufferSize = sizeof(MMVideoBuffer);
break;
#endif
case OMX_SEC_COLOR_FormatNV12Tiled:
OMX_BOOL Exynos_Check_BufferProcess_State(EXYNOS_OMX_BASECOMPONENT *pExynosComponent, OMX_U32 nPortIndex)
{
OMX_BOOL ret = OMX_FALSE;
-#ifdef SLP_PLATFORM /* check state */
+#ifdef TIZEN_FEATURE_E3250 /* check state */
if (pExynosComponent->currentState != OMX_StateExecuting)
Exynos_OSAL_Log(EXYNOS_LOG_VERVOSE, "not OMX_StateExecuting");
EXYNOS_OMX_DATABUFFER *outputUseBuffer = &exynosOutputPort->way.port2WayDataBuffer.outputDataBuffer;
OMX_U32 copySize = 0;
DECODE_CODEC_EXTRA_BUFFERINFO *pBufferInfo = NULL;
-#ifdef SLP_PLATFORM
- SCMN_IMGB *pSlpOutBuf = NULL;
+#ifdef TIZEN_FEATURE_E3250
+ MMVideoBuffer *pSlpOutBuf = NULL;
#endif
FunctionIn();
imageSize = width * height;
colorFormat = pBufferInfo->ColorFormat;
-#ifdef SLP_PLATFORM
- pSlpOutBuf = (SCMN_IMGB *)pOutputBuf;
- pSlpOutBuf->w[0] = width;
- pSlpOutBuf->w[1] = width;
- pSlpOutBuf->h[0] = height;
- pSlpOutBuf->h[1] = height/2;
- pSlpOutBuf->s[0] = width; /* need to check. stride */
- pSlpOutBuf->s[1] = width;
- pSlpOutBuf->e[0] = height; /* need to check. elevation */
- pSlpOutBuf->e[1] = height/2;
+#ifdef TIZEN_FEATURE_E3250
+ pSlpOutBuf = (MMVideoBuffer *)pOutputBuf;
+ pSlpOutBuf->width[0] = width;
+ pSlpOutBuf->width[1] = width;
+ pSlpOutBuf->height[0] = height;
+ pSlpOutBuf->height[1] = height/2;
+ pSlpOutBuf->stride_width[0] = width; /* need to check. stride */
+ pSlpOutBuf->stride_width[1] = width;
+ pSlpOutBuf->stride_height[0] = height; /* need to check. elevation */
+ pSlpOutBuf->stride_height[1] = height/2;
if (pVideoDec->bDRMPlayerMode == OMX_TRUE) {
- pSlpOutBuf->a[0] = 0;
- pSlpOutBuf->a[1] = 0;
+ pSlpOutBuf->data[0] = 0;
+ pSlpOutBuf->data[1] = 0;
} else {
- pSlpOutBuf->a[0] = dstOutputData->buffer.multiPlaneBuffer.dataBuffer[0];
- pSlpOutBuf->a[1] = dstOutputData->buffer.multiPlaneBuffer.dataBuffer[1];
+ pSlpOutBuf->data[0] = dstOutputData->buffer.multiPlaneBuffer.dataBuffer[0];
+ pSlpOutBuf->data[1] = dstOutputData->buffer.multiPlaneBuffer.dataBuffer[1];
}
- pSlpOutBuf->a[2] = 0; /* omx do not use this plane */
+ pSlpOutBuf->data[2] = 0; /* omx do not use this plane */
- pSlpOutBuf->fd[0] = dstOutputData->buffer.multiPlaneBuffer.fd[0];
- pSlpOutBuf->fd[1] = dstOutputData->buffer.multiPlaneBuffer.fd[1];
- pSlpOutBuf->fd[2] = dstOutputData->buffer.multiPlaneBuffer.fd[2];
+ pSlpOutBuf->handle.dmabuf_fd[0] = dstOutputData->buffer.multiPlaneBuffer.fd[0];
+ pSlpOutBuf->handle.dmabuf_fd[1] = dstOutputData->buffer.multiPlaneBuffer.fd[1];
+ pSlpOutBuf->handle.dmabuf_fd[2] = 0; /* omx do not use this plane */
- pSlpOutBuf->buf_share_method = MEMORY_DMABUF;
- dstOutputData->dataLen = sizeof(SCMN_IMGB);
+ pSlpOutBuf->handle.bo[0] = dstOutputData->buffer.multiPlaneBuffer.tbm_bo[0];
+ pSlpOutBuf->handle.bo[1] = dstOutputData->buffer.multiPlaneBuffer.tbm_bo[1];
+ pSlpOutBuf->handle.bo[2] = NULL;
+
+ //pSlpOutBuf->type = MM_VIDEO_BUFFER_TYPE_DMABUF_FD;
+ dstOutputData->dataLen = sizeof(MMVideoBuffer);
Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "%s: using fd instead of csc", __FUNCTION__);
- Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "fd (%d, %d, %d) received from MFC", pSlpOutBuf->fd[0], pSlpOutBuf->fd[1], pSlpOutBuf->fd[2]);
+ Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "fd (%d, %d, %d) received from MFC", pSlpOutBuf->handle.dmabuf_fd[0], pSlpOutBuf->handle.dmabuf_fd[1],
+ pSlpOutBuf->handle.dmabuf_fd[2]);
ret = OMX_TRUE;
goto EXIT;
#ifdef USE_PB
if (exynosOutputPort->bIsPBEnabled == OMX_TRUE) {
ExynosVideoPlane planes[MAX_BUFFER_PLANE];
- OMX_U32 stride;
+ OMX_U32 stride = 0;
Exynos_OSAL_LockPB(pOutputBuf, width, height, exynosOutputPort->portDefinition.format.video.eColorFormat, &stride, planes);
width = stride;
outputUseBuffer->dataLen = sizeof(void *);
#ifdef USE_PB
if (exynosOutputPort->bIsPBEnabled == OMX_TRUE) {
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
Exynos_OSAL_UnlockPB(pOutputBuf, dstOutputData, exynosOutputPort, exynosInputPort);
#else
Exynos_OSAL_UnlockPB(pOutputBuf, dstOutputData);
if (exynosInputPort->bufferProcessType & BUFFER_SHARE) {
Exynos_Shared_BufferToData(inputUseBuffer, srcInputData, ONE_PLANE);
-#ifndef SLP_PLATFORM
+#ifndef TIZEN_FEATURE_E3250
if (pVideoDec->bDRMPlayerMode == OMX_TRUE) {
OMX_PTR dataBuffer = NULL;
outputUseBuffer->dataValid = OMX_TRUE;
} else {
#ifdef USE_PB
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
if (Exynos_Shared_DataToPlatformBuffer(dstOutputData, outputUseBuffer, exynosOutputPort,exynosInputPort) == OMX_ErrorNone) {
#else
if (Exynos_Shared_DataToPlatformBuffer(dstOutputData, outputUseBuffer, exynosOutputPort) == OMX_ErrorNone) {
outputUseBuffer->timeStamp = dstOutputData->timeStamp;
Exynos_OutputBufferReturn(pOMXComponent);
} else {
-#ifdef SLP_PLATFORM
+#ifdef TIZEN_FEATURE_E3250
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "output buffer is SCMN_IMGB type.");
copySize = outputUseBuffer->allocSize - outputUseBuffer->dataLen;
ret = Exynos_InputBufferGetQueue(pExynosComponent);
inputUseBuffer = &(exynosInputPort->way.port2WayDataBuffer.inputDataBuffer);
- pVideoDec->exynos_process_codecConfigData(pOMXComponent, inputUseBuffer); /* SLP_PLATFORM */
+ pVideoDec->exynos_process_codecConfigData(pOMXComponent, inputUseBuffer); /* TIZEN_FEATURE_E3250 */
// pVideoDec->exynos_process_codecConfigData(pOMXComponent, pSrcInputData);
bCodecConfigured = OMX_TRUE;