swr: remove another forgotten division in DSP function.
authorRonald S. Bultje <rsbultje@gmail.com>
Sat, 21 Jun 2014 21:09:29 +0000 (17:09 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 22 Jun 2014 03:20:22 +0000 (05:20 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/resample_template.c

index 9279c71..0fc9770 100644 (file)
@@ -168,8 +168,6 @@ int RENAME(swri_resample_linear)(ResampleContext *c,
     int dst_index;
     int index= c->index;
     int frac= c->frac;
-    int dst_incr_frac= c->dst_incr % c->src_incr;
-    int dst_incr=      c->dst_incr / c->src_incr;
     int sample_index = index >> c->phase_shift;
 
     index &= c->phase_mask;
@@ -189,8 +187,8 @@ int RENAME(swri_resample_linear)(ResampleContext *c,
         val += (v2 - val) * (FELEML) frac / c->src_incr;
         OUT(dst[dst_index], val);
 
-        frac += dst_incr_frac;
-        index += dst_incr;
+        frac += c->dst_incr_mod;
+        index += c->dst_incr_div;
         if (frac >= c->src_incr) {
             frac -= c->src_incr;
             index++;