Commit d53f4471 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 17da2d9e
......@@ -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;
......
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