From cff880401d9f9ba9419e3d359dbd823ac280531d Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Mon, 6 Oct 2014 14:23:22 +0100 Subject: [PATCH] goom2k1: removing block of code that does nothing 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 | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/gst/goom2k1/filters.c b/gst/goom2k1/filters.c index 016f25bf86..c73c77c81d 100644 --- a/gst/goom2k1/filters.c +++ b/gst/goom2k1/filters.c @@ -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