diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-20 11:36:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-20 11:42:03 +0200 |
commit | ed113d7a6b2d1ff414c1127f955119643e915812 (patch) | |
tree | 17f4805c8edbe4437466fe044c4541ea37ca459c | |
parent | aef044d215a54dfbc771a767afded37c6d4a34a9 (diff) | |
parent | ddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0 (diff) | |
download | ffmpeg-ed113d7a6b2d1ff414c1127f955119643e915812.tar.gz |
Merge commit 'ddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0'
* commit 'ddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0':
vorbis: simplify the inner loop in setup_classifs
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-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 facaf4f137..661943f8b3 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1332,11 +1332,11 @@ static av_always_inline int setup_classifs(vorbis_context *vc, av_assert0(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; } } |