videomixer: remove dead code
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Wed, 16 Apr 2014 15:56:54 +0000 (16:56 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Wed, 16 Apr 2014 16:44:50 +0000 (17:44 +0100)
While it seems to keep a compile time selection, I traced it
to some code copied from videoconvert, where it was removed,
with the following comment:

    Also remove the high-quality I420 to BGRA fast-path as it needs
    the same fix, which causes an additional instruction, which causes
    orc to emit more than 96 variables, which then just crashes.
    This can only be fixed in orc by breaking ABI and allowing more
    variables.

Thus, I remove it here as well.

Coverity 206064

gst/videomixer/videoconvert.c

index 669a1b4..53e192d 100644 (file)
@@ -1254,31 +1254,13 @@ convert_I420_BGRA (VideoConvert * convert, GstVideoFrame * dest,
     const GstVideoFrame * src)
 {
   int i;
-  int quality = 0;
   gint width = convert->width;
   gint height = convert->height;
 
-  if (quality > 3) {
-    for (i = 0; i < height; i++) {
-      if (i & 1) {
-        videomixer_video_convert_orc_convert_I420_BGRA_avg (FRAME_GET_LINE
-            (dest, i), FRAME_GET_Y_LINE (src, i), FRAME_GET_U_LINE (src,
-                i >> 1), FRAME_GET_U_LINE (src, (i >> 1) + 1),
-            FRAME_GET_V_LINE (src, i >> 1), FRAME_GET_V_LINE (src,
-                (i >> 1) + 1), width);
-      } else {
-        videomixer_video_convert_orc_convert_I420_BGRA (FRAME_GET_LINE (dest,
-                i), FRAME_GET_Y_LINE (src, i), FRAME_GET_U_LINE (src, i >> 1),
-            FRAME_GET_V_LINE (src, i >> 1), width);
-      }
-    }
-  } else {
-    for (i = 0; i < height; i++) {
-      videomixer_video_convert_orc_convert_I420_BGRA (FRAME_GET_LINE (dest, i),
-          FRAME_GET_Y_LINE (src, i),
-          FRAME_GET_U_LINE (src, i >> 1),
-          FRAME_GET_V_LINE (src, i >> 1), width);
-    }
+  for (i = 0; i < height; i++) {
+    videomixer_video_convert_orc_convert_I420_BGRA (FRAME_GET_LINE (dest, i),
+        FRAME_GET_Y_LINE (src, i),
+        FRAME_GET_U_LINE (src, i >> 1), FRAME_GET_V_LINE (src, i >> 1), width);
   }
 }
 #endif