summaryrefslogtreecommitdiff
path: root/libavcodec/takdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-02 21:20:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-03 11:34:51 +0200
commit7dbc27dc1dd3392a004906b7c2802e86f0250807 (patch)
tree352bc5cbae47bb9e7fb88b5b98e1c51b0c276436 /libavcodec/takdec.c
parentac1e3882cce593f5e56a14f11a73b5b032fab8d9 (diff)
avcodec/takdec: move tmp declaration to where its used
Makes the code a bit easier to read Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/takdec.c')
-rw-r--r--libavcodec/takdec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 9bfbfcc3df..83abab6344 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -371,7 +371,7 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
int subframe_size, int prev_subframe_size)
{
GetBitContext *gb = &s->gb;
- int tmp, x, y, i, j, ret = 0;
+ int x, y, i, j, ret = 0;
int dshift, size, filter_quant, filter_order;
int tfilter[MAX_PREDICTORS];
@@ -421,7 +421,7 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
s->predictors[2] = get_sbits(gb, size) << (10 - size);
s->predictors[3] = get_sbits(gb, size) << (10 - size);
if (filter_order > 4) {
- tmp = size - get_bits1(gb);
+ int tmp = size - get_bits1(gb);
for (i = 4; i < filter_order; i++) {
if (!(i & 3))
@@ -448,7 +448,7 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
x = 1 << (32 - (15 - filter_quant));
y = 1 << ((15 - filter_quant) - 1);
for (i = 0, j = filter_order - 1; i < filter_order / 2; i++, j--) {
- tmp = y + tfilter[j];
+ int tmp = y + tfilter[j];
s->filter[j] = x - ((tfilter[i] + y) >> (15 - filter_quant));
s->filter[i] = x - ((tfilter[j] + y) >> (15 - filter_quant));
}
@@ -463,7 +463,7 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
y = FF_ARRAY_ELEMS(s->residues) - filter_order;
x = subframe_size - filter_order;
while (x > 0) {
- tmp = FFMIN(y, x);
+ int tmp = FFMIN(y, x);
for (i = 0; i < tmp; i++) {
int v = 1 << (filter_quant - 1);