Commit 5e379cd3 authored by Michael Niedermayer's avatar Michael Niedermayer

swresample/resample: simplify index/consumed calculation for the filter = 1 case

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6c8ee74a
...@@ -116,8 +116,8 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int ...@@ -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; index += (frac + dst_index * (int64_t)dst_incr_frac) / c->src_incr;
frac = (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); av_assert2(index >= 0);
*consumed= index >> c->phase_shift; *consumed= index;
index &= c->phase_mask; index = 0;
}else if(compensation_distance == 0 && !c->linear && index >= 0){ }else if(compensation_distance == 0 && !c->linear && index >= 0){
int sample_index = 0; int sample_index = 0;
for(dst_index=0; dst_index < dst_size; dst_index++){ for(dst_index=0; dst_index < dst_size; dst_index++){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment