fixed coverity issues
[platform/adaptation/ap_samsung/libomxil-e3250-v4l2.git] / exynos4 / libswconverter / swconvertor.c
old mode 100644 (file)
new mode 100755 (executable)
index 043add2..81345a0
  *   2012.02.01 : Create
  */
 
-#include "stdio.h"
-#include "stdlib.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
 #include "swconverter.h"
 
 /*
@@ -53,7 +55,7 @@
 static int tile_4x2_read(int x_size, int y_size, int x_pos, int y_pos)
 {
     int pixel_x_m1, pixel_y_m1;
-    int roundup_x, roundup_y;
+    int roundup_x;
     int linear_addr0, linear_addr1, bank_addr ;
     int x_addr;
     int trans_addr;
@@ -62,7 +64,6 @@ static int tile_4x2_read(int x_size, int y_size, int x_pos, int y_pos)
     pixel_y_m1 = y_size -1;
 
     roundup_x = ((pixel_x_m1 >> 7) + 1);
-    roundup_y = ((pixel_x_m1 >> 6) + 1);
 
     x_addr = x_pos >> 2;
 
@@ -247,11 +248,6 @@ static void csc_tiled_to_linear_crop(
             temp1 = left&0x3F;
             if (temp3 > 192) {
                 memcpy(yuv420_dest+linear_offset, nv12t_src+tiled_offset+temp1, 64-temp1);
-                temp2 = ((left+63)>>6)<<6;
-                temp3 = ((yuv420_width-right)>>6)<<6;
-                if (temp2 == temp3) {
-                    temp2 = yuv420_width-right-(64-temp1);
-                }
                 memcpy(yuv420_dest+linear_offset+64-temp1, nv12t_src+tiled_offset+2048, 64);
                 memcpy(yuv420_dest+linear_offset+128-temp1, nv12t_src+tiled_offset1, 64);
                 memcpy(yuv420_dest+linear_offset+192-temp1, nv12t_src+tiled_offset1+2048, 64);
@@ -1386,6 +1382,7 @@ void csc_linear_to_tiled_uv(
                                         0, 0, 0, 0);
 }
 
+#ifdef USE_NEON
 /*
  * Converts tiled data to linear for mfc 6.x
  * 1. Y of NV12T to Y of YUV420P
@@ -1527,6 +1524,7 @@ void csc_linear_to_tiled_uv_neon(
     csc_linear_to_tiled_interleave_crop_neon(uv_dst, u_src, v_src,
                                              width, height, 0, 0, 0, 0);
 }
+#endif
 
 /*
  * Converts RGB565 to YUV420P
@@ -1563,9 +1561,6 @@ void csc_RGB565_to_YUV420P(
     unsigned int R, G, B;
     unsigned int Y, U, V;
 
-    unsigned int offset1 = width * height;
-    unsigned int offset2 = width/2 * height/2;
-
     unsigned short int *pSrc = (unsigned short int *)rgb_src;
 
     unsigned char *pDstY = (unsigned char *)y_dst;
@@ -1637,8 +1632,6 @@ void csc_RGB565_to_YUV420SP(
     unsigned int R, G, B;
     unsigned int Y, U, V;
 
-    unsigned int offset = width * height;
-
     unsigned short int *pSrc = (unsigned short int *)rgb_src;
 
     unsigned char *pDstY = (unsigned char *)y_dst;
@@ -1714,9 +1707,6 @@ void csc_ARGB8888_to_YUV420P(
     unsigned int R, G, B;
     unsigned int Y, U, V;
 
-    unsigned int offset1 = width * height;
-    unsigned int offset2 = width/2 * height/2;
-
     unsigned int *pSrc = (unsigned int *)rgb_src;
 
     unsigned char *pDstY = (unsigned char *)y_dst;
@@ -1788,8 +1778,6 @@ void csc_ARGB8888_to_YUV420SP(
     unsigned int R, G, B;
     unsigned int Y, U, V;
 
-    unsigned int offset = width * height;
-
     unsigned int *pSrc = (unsigned int *)rgb_src;
 
     unsigned char *pDstY = (unsigned char *)y_dst;
@@ -1825,4 +1813,4 @@ void csc_ARGB8888_to_YUV420SP(
             }
         }
     }
-}
\ No newline at end of file
+}