summaryrefslogtreecommitdiff
path: root/libavcodec/vorbisdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-20 11:36:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-20 11:42:03 +0200
commited113d7a6b2d1ff414c1127f955119643e915812 (patch)
tree17f4805c8edbe4437466fe044c4541ea37ca459c /libavcodec/vorbisdec.c
parentaef044d215a54dfbc771a767afded37c6d4a34a9 (diff)
parentddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0 (diff)
Merge commit 'ddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0'
* commit 'ddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0': vorbis: simplify the inner loop in setup_classifs Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r--libavcodec/vorbisdec.c8
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;
}
}