diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2014-06-18 07:26:03 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-18 14:15:52 +0200 |
commit | cbf21628a5e56914c74c811c5663975990f56f77 (patch) | |
tree | be6dd810f9247a5f551aaceb6592407db913fc4d /libswresample/resample_template.c | |
parent | 076ab9f7e3b1f4a02d31bba2b8e55407f5deff17 (diff) | |
download | ffmpeg-cbf21628a5e56914c74c811c5663975990f56f77.tar.gz |
swr: remove div/mod from DSP functions.
Also fix a bug with resample_compensation resetting dst_incr.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/resample_template.c')
-rw-r--r-- | libswresample/resample_template.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libswresample/resample_template.c b/libswresample/resample_template.c index f0e1dc0ec7..9279c71150 100644 --- a/libswresample/resample_template.c +++ b/libswresample/resample_template.c @@ -126,8 +126,6 @@ int RENAME(swri_resample_common)(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; @@ -145,8 +143,8 @@ int RENAME(swri_resample_common)(ResampleContext *c, OUT(dst[dst_index], val); #endif - 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++; |