summaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-14 02:23:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-14 02:23:04 +0200
commit5e379cd3ee87f00db3fdc25e559f9ff1b7ef8efe (patch)
tree826d4f0234b4377788d7f399d6a581e2436833b0 /libswresample
parent6c8ee74af2af032267b6dd109a829d8ea0e7090d (diff)
swresample/resample: simplify index/consumed calculation for the filter = 1 case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/resample_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswresample/resample_template.c b/libswresample/resample_template.c
index 9269fea5e3..a627f1194a 100644
--- a/libswresample/resample_template.c
+++ b/libswresample/resample_template.c
@@ -116,8 +116,8 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int
index += (frac + dst_index * (int64_t)dst_incr_frac) / c->src_incr;
frac = (frac + dst_index * (int64_t)dst_incr_frac) % c->src_incr;
av_assert2(index >= 0);
- *consumed= index >> c->phase_shift;
- index &= c->phase_mask;
+ *consumed= index;
+ index = 0;
}else if(compensation_distance == 0 && !c->linear && index >= 0){
int sample_index = 0;
for(dst_index=0; dst_index < dst_size; dst_index++){