goom2k1: removing block of code that does nothing
authorLuis de Bethencourt <luis.bg@samsung.com>
Mon, 6 Oct 2014 13:23:22 +0000 (14:23 +0100)
committerLuis de Bethencourt <luis.bg@samsung.com>
Wed, 8 Oct 2014 13:07:56 +0000 (14:07 +0100)
The loop in zoomFilterSetResolution is meant to change the values in the
zf->firedec[] array. Each iteration writes the value of decc onto the arrya,
but no conditions that change the value of decc are ever met and the array is
filled with zero for each element. Which is the initial state of the
array before the loop begins.

The loop does nothing.

https://bugzilla.gnome.org/show_bug.cgi?id=728353

gst/goom2k1/filters.c

index 016f25b..c73c77c 100644 (file)
@@ -334,48 +334,6 @@ zoomFilterSetResolution (GoomData * gd, ZoomFilterData * zf)
       sintable[us] = (int) (1024.0f * sin (us * 2 * 3.31415f / 0xffff));
     }
   }
-
-  {
-    int loopv;
-
-    for (loopv = zf->res_y; loopv != 0;) {
-      int decc = 0;
-      int spdc = 0;
-      int accel = 0;
-
-      loopv--;
-      zf->firedec[loopv] = decc;
-      decc += spdc / 10;
-      spdc += RAND (gd) % 3;
-      spdc -= RAND (gd) % 3;
-
-      if (decc > 4)
-        spdc -= 1;
-      if (decc < -4)
-        spdc += 1;
-
-      if (spdc > 30)
-        spdc = spdc - RAND (gd) % 3 + accel / 10;
-      if (spdc < -30)
-        spdc = spdc + RAND (gd) % 3 + accel / 10;
-
-      if (decc > 8 && spdc > 1)
-        spdc -= RAND (gd) % 3 - 2;
-
-      if (decc < -8 && spdc < -1)
-        spdc += RAND (gd) % 3 + 2;
-
-      if (decc > 8 || decc < -8)
-        decc = decc * 8 / 9;
-
-      accel += RAND (gd) % 2;
-      accel -= RAND (gd) % 2;
-      if (accel > 20)
-        accel -= 2;
-      if (accel < -20)
-        accel += 2;
-    }
-  }
 }
 
 void