return ret;
}
+void csc_interleave_memcpy_neon(
+ unsigned char *dest,
+ unsigned char *src1,
+ unsigned char *src2,
+ unsigned int src_size);
+
/* source is YUV420P */
static CSC_ERRORCODE conv_sw_src_yuv420p(
CSC_HANDLE *handle)
#endif
default:
ALOGE("%s:: unsupported csc_hw_type, csc use sw", __func__);
- csc_handle->csc_hw_handle == NULL;
+ csc_handle->csc_hw_handle = NULL;
break;
}
}
OMX_COLOR_FORMATTYPE omx_format)
{
unsigned int hal_format;
- switch (omx_format) {
+ switch ((int)omx_format) {
#ifndef TIZEN_FEATURE_E54XX /* build env */ /* useless */
case OMX_COLOR_FormatYCbYCr:
hal_format = HAL_PIXEL_FORMAT_YCbCr_422_I;
va_list ap;
FILE *stream_fd;
char filename[64], name[64];
- long size;
int i = 0;
do {
va_list ap;
FILE *stream_fd;
char filename[64], name[64];
- int i = 0;
+ int size, i = 0;
do {
if (i > VIDEODEV_MAX)
stream_fd = fopen(filename, "r");
if (stream_fd == NULL) {
ALOGE("failed to open sysfs entry for videodev");
+ i++;
continue; /* try next */
}
/* read sysfs entry for device name */
- char *p = fgets(name, sizeof(name), stream_fd);
+ size = (int)fgets(name, sizeof(name), stream_fd);
fclose(stream_fd);
/* check read size */
- if (p == NULL) {
+ if (size == 0) {
ALOGE("failed to read sysfs entry for videodev");
} else {
/* matched */
pFramePacking->frame1_grid_pos_y = OPERATE_BIT(seiGridPos, 0xf, 12);
EXIT:
#endif
+
return ret;
}
}
EXIT:
#endif
+
return ret;
}
ExynosVideoErrorType (*Enable_SliceMode)(void *pHandle);
ExynosVideoErrorType (*Enable_SEIParsing)(void *pHandle);
ExynosVideoErrorType (*Get_FramePackingInfo)(void *pHandle, ExynosVideoFramePacking *pFramepacking);
- ExynosVideoErrorType (*Set_ImmediateDisplay)(void *pHandle);
- ExynosVideoErrorType (*Enable_DecodeWait)(void *pHandle);
+ ExynosVideoErrorType (*Set_ImmediateDisplay)(void *pHandle);
+ ExynosVideoErrorType (*Enable_DecodeWait)(void *pHandle);
} ExynosVideoDecOps;
typedef struct _ExynosVideoEncOps {
ExynosVideoErrorType (*Set_EncParam)(void *pHandle, ExynosVideoEncParam*encParam);
ExynosVideoErrorType (*Set_FrameTag)(void *pHandle, int frameTag);
int (*Get_FrameTag)(void *pHandle);
- ExynosVideoErrorType (*Set_FrameType)(void *pHandle, int frameType);
+ ExynosVideoErrorType (*Set_FrameType)(void *pHandle, ExynosVideoFrameType frameType);
ExynosVideoErrorType (*Set_FrameRate)(void *pHandle, int frameRate);
ExynosVideoErrorType (*Set_BitRate)(void *pHandle, int bitRate);
ExynosVideoErrorType (*Set_FrameSkip)(void *pHandle, int frameSkip);
height = exynosOutputPort->portDefinition.format.video.nSliceHeight =
exynosInputPort->portDefinition.format.video.nSliceHeight;
- switch(exynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch((int)exynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
if (width && height)
goto EXIT;
}
- switch (nParamIndex) {
+ switch ((int)nParamIndex) {
case OMX_IndexParamVideoInit:
{
OMX_PORT_PARAM_TYPE *portParam = (OMX_PORT_PARAM_TYPE *)ComponentParameterStructure;
goto EXIT;
}
- switch (nIndex) {
+ switch ((int)nIndex) {
case OMX_IndexParamVideoPortFormat:
{
OMX_VIDEO_PARAM_PORTFORMATTYPE *portFormat = (OMX_VIDEO_PARAM_PORTFORMATTYPE *)ComponentParameterStructure;
goto EXIT;
}
- switch (nIndex) {
+ switch ((EXYNOS_OMX_INDEXTYPE)nIndex) {
case OMX_IndexVendorThumbnailMode:
{
EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
#endif
#ifdef TIZEN_FEATURE_E54XX
/* IL Client assigns FD value in pBuffer */
- plane.addr = pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer;
+ plane.addr = pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer;
#else
- plane.addr = Exynos_OSAL_SharedMemory_IONToVirt(pVideoDec->hSharedMemory, pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer);
+ plane.addr = Exynos_OSAL_SharedMemory_IONToVirt(pVideoDec->hSharedMemory, (int)pExynosInputPort->extendBufferHeader[i].OMXBufferHeader->pBuffer);
#endif
#if 0
} else {
pExynosOutputPort->portDefinition.format.video.nStride = width;
pExynosOutputPort->portDefinition.format.video.nSliceHeight = height;
- switch (pExynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
pExynosOutputPort->portDefinition.nBufferSize = (width * height * 3) / 2;
pExynosOutputPort->portDefinition.format.video.nStride = width;
pExynosOutputPort->portDefinition.format.video.nSliceHeight = height;
- switch (pExynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
// case OMX_SEC_COLOR_FormatNV12TPhysicalAddress:
pExynosOutputPort->portDefinition.format.video.nStride = width;
pExynosOutputPort->portDefinition.format.video.nSliceHeight = height;
- switch (pExynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
pExynosOutputPort->portDefinition.nBufferSize = (width * height * 3) / 2;
pExynosOutputPort->portDefinition.format.video.nStride = width;
pExynosOutputPort->portDefinition.format.video.nSliceHeight = height;
- switch (pExynosOutputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosOutputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
case OMX_COLOR_FormatYUV420SemiPlanar:
pExynosOutputPort->portDefinition.nBufferSize = (width * height * 3) / 2;
{
#ifdef USE_DMA_BUF
if (csc_method == CSC_METHOD_HW) {
- pSrcBuf[0] = Exynos_OSAL_SharedMemory_VirtToION(pVideoEnc->hSharedMemory, checkInputStream);
+ pSrcBuf[0] = (unsigned char *)Exynos_OSAL_SharedMemory_VirtToION(pVideoEnc->hSharedMemory, checkInputStream);
pSrcBuf[1] = NULL;
pSrcBuf[2] = NULL;
}
#endif
- switch (eColorFormat) {
+ switch ((int)eColorFormat) {
case OMX_COLOR_FormatYUV420Planar:
/* YUV420Planar converted to YUV420Semiplanar (interleaved UV plane) as per MFC spec.*/
csc_src_color_format = omx_2_hal_pixel_format((unsigned int)OMX_COLOR_FormatYUV420Planar);
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
- switch ((EXYNOS_OMX_COLOR_FORMATTYPE)pExynosInputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosInputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_COLOR_FormatYUV420Planar: /* Converted to NV12 in Exynos_Preprocessor_InputData */
case OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd:
goto EXIT;
}
- switch (nIndex) {
+ switch ((int)nIndex) {
case OMX_IndexParamVideoAvc:
{
OMX_VIDEO_PARAM_AVCTYPE *pDstAVCComponent = NULL;
pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle;
pH264Enc = (EXYNOS_H264ENC_HANDLE *)((EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle;
- switch (nIndex) {
+ switch ((int)nIndex) {
case OMX_IndexConfigVideoIntraPeriod:
{
OMX_U32 nPFrames = (*((OMX_U32 *)pComponentConfigStructure)) - 1;
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
- switch ((EXYNOS_OMX_COLOR_FORMATTYPE)pExynosInputPort->portDefinition.format.video.eColorFormat) {
- case (EXYNOS_OMX_COLOR_FORMATTYPE)OMX_COLOR_FormatYUV420SemiPlanar:
- case (EXYNOS_OMX_COLOR_FORMATTYPE)OMX_COLOR_FormatYUV420Planar: /* Converted to NV12 in Exynos_Preprocessor_InputData */
+ switch ((int)pExynosInputPort->portDefinition.format.video.eColorFormat) {
+ case OMX_COLOR_FormatYUV420SemiPlanar:
+ case OMX_COLOR_FormatYUV420Planar: /* Converted to NV12 in Exynos_Preprocessor_InputData */
#ifdef TIZEN_FEATURE_E54XX
case OMX_SEC_COLOR_FormatNV12L_DmaBuf_Fd:
#endif
pCommonParam->CbPadVal = 0;
pCommonParam->CrPadVal = 0;
- switch ((EXYNOS_OMX_COLOR_FORMATTYPE)pExynosInputPort->portDefinition.format.video.eColorFormat) {
+ switch ((int)pExynosInputPort->portDefinition.format.video.eColorFormat) {
case OMX_COLOR_FormatYUV420SemiPlanar:
case OMX_COLOR_FormatYUV420Planar: /* Converted to NV12 in Exynos_Preprocessor_InputData */
#ifdef TIZEN_FEATURE_E54XX
for (i = 0; i < MFC_OUTPUT_BUFFER_NUM_MAX; i++) {
ExynosVideoPlane plane;
pVideoEnc->pMFCEncOutputBuffer[i] = (CODEC_ENC_BUFFER *)Exynos_OSAL_Malloc(sizeof(CODEC_ENC_BUFFER));
+
+ if (pVideoEnc->pMFCEncOutputBuffer[i] == NULL) {
+ Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc output buffer");
+ ret = OMX_ErrorInsufficientResources;
+ goto EXIT;
+ }
pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0] =
(void *)Exynos_OSAL_SharedMemory_Alloc(pVideoEnc->hSharedMemory, OutBufferSize, NORMAL_MEMORY);
+
if (pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0] == NULL) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc output buffer");
ret = OMX_ErrorInsufficientResources;
#define OMX_DEBUG_LEVEL 2 /* EXYNOS_LOG_INFO */
+#undef ALOGV
#define ALOGV(...) Exynos_OSAL_Log(EXYNOS_LOG_VERVOSE, __VA_ARGS__)
+#undef ALOGD
#define ALOGD(...) Exynos_OSAL_Log(EXYNOS_LOG_TRACE, __VA_ARGS__)
+#undef ALOGI
#define ALOGI(...) Exynos_OSAL_Log(EXYNOS_LOG_INFO, __VA_ARGS__)
+#undef ALOGW
#define ALOGW(...) Exynos_OSAL_Log(EXYNOS_LOG_WARNING, __VA_ARGS__)
+#undef ALOGE
#define ALOGE(...) Exynos_OSAL_Log(EXYNOS_LOG_ERROR, __VA_ARGS__)
#ifndef EXYNOS_LOG_TAG
}
Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "%s: buffer unlocked: 0x%x", __func__, handle);
-#endif
EXIT:
+#endif
+
FunctionOut();
return ret;
goto EXIT;
}
- switch (nIndex) {
+ switch ((int)nIndex) {
#ifdef TIZEN_FEATURE_E54XX
case OMX_IndexParamEnablePlatformSpecificBuffers:
#else
pElement = (EXYNOS_SHAREDMEM_LIST *)Exynos_OSAL_Malloc(sizeof(EXYNOS_SHAREDMEM_LIST));
Exynos_OSAL_Memset(pElement, 0, sizeof(EXYNOS_SHAREDMEM_LIST));
- IONBuffer = ionfd;
+ IONBuffer = (ion_buffer)ionfd;
if (IONBuffer <= 0) {
Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "ion_alloc Error: %d", IONBuffer);