[FFmpeg-devel] [PATCH] swr: remove another forgotten division in DSP function.
Ronald S. Bultje
rsbultje at gmail.com
Sat Jun 21 23:09:29 CEST 2014
---
libswresample/resample_template.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libswresample/resample_template.c b/libswresample/resample_template.c
index bf21c9c..db208e3 100644
--- a/libswresample/resample_template.c
+++ b/libswresample/resample_template.c
@@ -158,8 +158,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;
@@ -179,8 +177,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++;
--
1.8.5.5
More information about the ffmpeg-devel
mailing list