swr: move if() block into the only branch where it can be true.

This should make the code a tiny tiny bit faster.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/8/head
Michael Niedermayer 12 years ago
parent 17da2d9eee
commit d53f447130
  1. 9
      libswresample/resample_template.c

@ -126,12 +126,13 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int
}
*consumed= FFMAX(sample_index, 0);
index += FFMIN(sample_index, 0) << c->phase_shift;
}
if(compensation_distance){
compensation_distance -= dst_index;
av_assert1(compensation_distance > 0);
if(compensation_distance){
compensation_distance -= dst_index;
av_assert1(compensation_distance > 0);
}
}
if(update_ctx){
c->frac= frac;
c->index= index;

Loading…
Cancel
Save