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>
This commit is contained in:
parent
17da2d9eee
commit
d53f447130
@ -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…
Reference in New Issue
Block a user