fixed build warnings 70/152370/2 accepted/tizen/unified/20170926.165813 submit/tizen/20170926.084427
authorSejun Park <sejun79.park@samsung.com>
Tue, 26 Sep 2017 02:49:32 +0000 (11:49 +0900)
committerSejun Park <sejun79.park@samsung.com>
Tue, 26 Sep 2017 03:00:02 +0000 (12:00 +0900)
Change-Id: I06c2512f892345e0a1d70764040b94d1c05f03c3

18 files changed:
exynos/libcsc/csc.c
exynos/libcsc/csc_helper.c
exynos/libv4l2/exynos_subdev.c
exynos/libv4l2/exynos_v4l2.c
exynos4/libcodec/video/v4l2/dec/ExynosVideoDecoder.c
exynos4/libcodec/video/v4l2/include/ExynosVideoApi.h
openmax/component/video/dec/Exynos_OMX_Vdec.c
openmax/component/video/dec/Exynos_OMX_VdecControl.c [changed mode: 0644->0755]
openmax/component/video/dec/h264/Exynos_OMX_H264dec.c [changed mode: 0644->0755]
openmax/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c
openmax/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c [changed mode: 0644->0755]
openmax/component/video/dec/vc1/Exynos_OMX_Wmvdec.c
openmax/component/video/enc/Exynos_OMX_Venc.c [changed mode: 0644->0755]
openmax/component/video/enc/h264/Exynos_OMX_H264enc.c [changed mode: 0644->0755]
openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c
openmax/osal/Exynos_OSAL_Log.h
openmax/osal/Exynos_OSAL_Platform_Specific.c
openmax/osal/Exynos_OSAL_SharedMemory.c

index 3c6fe3d70f00bf0a7fb5c9acdbfe9a6d84248042..0729db1909d7929e08e8b84bda4217f3ce171ef6 100755 (executable)
@@ -236,6 +236,12 @@ static CSC_ERRORCODE conv_sw_src_nv12t(
     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)
@@ -423,7 +429,7 @@ static CSC_ERRORCODE csc_init_hw(
 #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;
         }
     }
index 400b7a6cbcd167156b7b80da1d2898a7b580b2de..e43086d5c6d8e5f0b2c5225a57e30add1f475dae 100755 (executable)
@@ -64,7 +64,7 @@ unsigned int omx_2_hal_pixel_format(
     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;
index acf811cf4ea39ae18a4963038dc78a164b4a11a6..974263849e3eb7fd1a082f0bb29120d19b124301 100755 (executable)
@@ -81,7 +81,6 @@ int exynos_subdev_open_devname(const char *devname, int oflag, ...)
     va_list ap;
     FILE *stream_fd;
     char filename[64], name[64];
-    long size;
     int i = 0;
 
     do {
index 796ac5bc6a82886c601f139f4b3bc3820f9d4f21..1994210937c05ad27762bec12a7a3e01baacac42 100755 (executable)
@@ -103,7 +103,7 @@ int exynos_v4l2_open_devname(const char *devname, int oflag, ...)
     va_list ap;
     FILE *stream_fd;
     char filename[64], name[64];
-    int i = 0;
+    int size, i = 0;
 
     do {
         if (i > VIDEODEV_MAX)
@@ -125,15 +125,16 @@ int exynos_v4l2_open_devname(const char *devname, int oflag, ...)
             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 */
index e07f97ea8dc95ccd50d17557a43e3c9feffd9928..eb3dc3edfacb432ea2548e0b511817bfe6fa7496 100755 (executable)
@@ -563,6 +563,7 @@ static ExynosVideoErrorType MFC_Decoder_Get_FramePackingInfo(
     pFramePacking->frame1_grid_pos_y = OPERATE_BIT(seiGridPos, 0xf, 12);
 EXIT:
 #endif
+
     return ret;
 }
 
@@ -591,6 +592,7 @@ static ExynosVideoErrorType MFC_Decoder_Enable_DecodeWait(void *pHandle)
     }
 EXIT:
 #endif
+
     return ret;
 }
 
index b89adccdc4b8b76fdcd5d6fc2f44d3afab438ef6..663834939ed55c92ae3d150c2eac36e8d060bb4e 100755 (executable)
@@ -234,8 +234,8 @@ typedef struct _ExynosVideoDecOps {
     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 {
@@ -247,7 +247,7 @@ 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);
index 585c49a1a75c8964779a562914df9ff96ddefd73..3645669747275d2e239a11e64ed9b18d7d1a12a7 100755 (executable)
@@ -132,7 +132,7 @@ void Exynos_UpdateFrameSize(OMX_COMPONENTTYPE *pOMXComponent)
         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)
old mode 100644 (file)
new mode 100755 (executable)
index 8d05edf..049e851
@@ -1094,7 +1094,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeGetParameter(
         goto EXIT;
     }
 
-    switch (nParamIndex) {
+    switch ((int)nParamIndex) {
     case OMX_IndexParamVideoInit:
     {
         OMX_PORT_PARAM_TYPE *portParam = (OMX_PORT_PARAM_TYPE *)ComponentParameterStructure;
@@ -1235,7 +1235,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeSetParameter(
         goto EXIT;
     }
 
-    switch (nIndex) {
+    switch ((int)nIndex) {
     case OMX_IndexParamVideoPortFormat:
     {
         OMX_VIDEO_PARAM_PORTFORMATTYPE *portFormat = (OMX_VIDEO_PARAM_PORTFORMATTYPE *)ComponentParameterStructure;
@@ -1375,7 +1375,7 @@ OMX_ERRORTYPE Exynos_OMX_VideoDecodeSetConfig(
         goto EXIT;
     }
 
-    switch (nIndex) {
+    switch ((EXYNOS_OMX_INDEXTYPE)nIndex) {
     case OMX_IndexVendorThumbnailMode:
     {
         EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle;
old mode 100644 (file)
new mode 100755 (executable)
index 7b85fdd..902126f
@@ -607,9 +607,9 @@ OMX_ERRORTYPE H264CodecSrcInit(OMX_COMPONENTTYPE *pOMXComponent)
 #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 {
@@ -1598,7 +1598,7 @@ OMX_ERRORTYPE Exynos_H264Dec_SetParameter(
             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;
index 356b067a8d6c6981dfef671ab0d611a0fa5b2bf8..399f547bb5f490ead10a454e9036c58e18d8c30e 100755 (executable)
@@ -1167,7 +1167,7 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_SetParameter(
             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:
old mode 100644 (file)
new mode 100755 (executable)
index 1e2b0a8..591ec03
@@ -1756,7 +1756,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_SetParameter(
             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;
index 78ef7b0fb2b770f97b181cd49bbf722636a49380..809ea3e1a37e62298377460a5c9c1a8c619708a2 100755 (executable)
@@ -1639,7 +1639,7 @@ OMX_ERRORTYPE Exynos_WmvDec_SetParameter(
             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;
old mode 100644 (file)
new mode 100755 (executable)
index 90190c8..f4fa1c3
@@ -233,13 +233,13 @@ OMX_BOOL Exynos_CSC_InputData(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_DATA
                 {
 #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);
old mode 100644 (file)
new mode 100755 (executable)
index 9dbde18..2c451a4
@@ -257,7 +257,7 @@ static void Set_H264Enc_Param(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
     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:
@@ -1278,7 +1278,7 @@ OMX_ERRORTYPE Exynos_H264Enc_SetParameter(
         goto EXIT;
     }
 
-    switch (nIndex) {
+    switch ((int)nIndex) {
     case OMX_IndexParamVideoAvc:
     {
         OMX_VIDEO_PARAM_AVCTYPE *pDstAVCComponent = NULL;
@@ -1508,7 +1508,7 @@ OMX_ERRORTYPE Exynos_H264Enc_SetConfig(
     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;
index d6ff970b1ee10452b74d7c0af106954abb86bd21..f1ff7e47cc67285c1f54e4111cde5b9a0d0fa1a8 100755 (executable)
@@ -243,9 +243,9 @@ static void Set_Mpeg4Enc_Param(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
     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
@@ -343,7 +343,7 @@ static void Set_H263Enc_Param(EXYNOS_OMX_BASECOMPONENT *pExynosComponent)
     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
@@ -1119,8 +1119,15 @@ OMX_ERRORTYPE Mpeg4CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent)
             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;
index ba86bd3edb4bad766c24f0876a5ee95314b5418a..5009e95d0554944096c1e2ff2155e1230ba4e2a1 100755 (executable)
@@ -81,10 +81,15 @@ typedef enum _LOG_LEVEL
 
 #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
index 02b16a7df9c7e92de4d6a27853f4054176d661df..5b9027a313facf565f0c0b9c6c65d3b92166587f 100755 (executable)
@@ -133,9 +133,10 @@ OMX_ERRORTYPE Exynos_OSAL_UnlockPBHandle(OMX_IN OMX_U32 handle)
     }
 
     Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "%s: buffer unlocked: 0x%x", __func__, handle);
-#endif
 
 EXIT:
+#endif
+
     FunctionOut();
 
     return ret;
@@ -484,7 +485,7 @@ OMX_ERRORTYPE Exynos_OSAL_SetPBParameter(
         goto EXIT;
     }
 
-    switch (nIndex) {
+    switch ((int)nIndex) {
 #ifdef TIZEN_FEATURE_E54XX
     case OMX_IndexParamEnablePlatformSpecificBuffers:
 #else
index 6964b92ca5343e296f759a46c86f7c0b485a338a..35b44f727ea77aaf60dc4fc1633cea1c7a746a08 100755 (executable)
@@ -301,7 +301,7 @@ OMX_PTR Exynos_OSAL_SharedMemory_Map(OMX_HANDLETYPE handle, OMX_U32 size, unsign
     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);