diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-05-19 18:59:13 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-05-19 22:56:37 +0200 |
commit | ddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0 (patch) | |
tree | 37cac966ce40236420e0180c49ab2d0401000bf7 | |
parent | 36f10380043c8b8c5cbf8c1add8695089cdaa341 (diff) | |
download | ffmpeg-ddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0.tar.gz |
vorbis: simplify the inner loop in setup_classifs
-rw-r--r-- | libavcodec/vorbisdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 718f7607a2..caf36eb3f2 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1321,11 +1321,11 @@ static av_always_inline int setup_classifs(vorbis_context *vc, assert(vr->classifications > 1 && temp <= 65536); //needed for inverse[] - for (i = 0; i < c_p_c; ++i) { + for (i = partition_count + c_p_c - 1; i >= partition_count; i--) { temp2 = (((uint64_t)temp) * inverse_class) >> 32; - if (partition_count + c_p_c - 1 - i < vr->ptns_to_read) - vr->classifs[p + partition_count + c_p_c - 1 - i] = - temp - temp2 * vr->classifications; + + if (i < vr->ptns_to_read) + vr->classifs[p + i] = temp - temp2 * vr->classifications; temp = temp2; } } |