summaryrefslogtreecommitdiff
path: root/libavcodec/aac.c
diff options
context:
space:
mode:
authorRobert Swain <robert.swain@gmail.com>2008-08-21 12:13:22 +0000
committerRobert Swain <robert.swain@gmail.com>2008-08-21 12:13:22 +0000
commit65b20b2485535ba7a2d24378c0f063aeae046681 (patch)
tree34458b27a4c3d5105c9c911661a8c6123d3abea1 /libavcodec/aac.c
parentfbd91d7cad28915dd7e6061b869b22171ca84101 (diff)
Reindent after last commit
Originally committed as revision 14882 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac.c')
-rw-r--r--libavcodec/aac.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c
index 26d860adf6..7459f4f613 100644
--- a/libavcodec/aac.c
+++ b/libavcodec/aac.c
@@ -618,24 +618,24 @@ static int decode_tns(AACContext * ac, TemporalNoiseShaping * tns,
if ((tns->n_filt[w] = get_bits(gb, 2 - is8))) {
coef_res = get_bits1(gb);
- for (filt = 0; filt < tns->n_filt[w]; filt++) {
- int tmp2_idx;
- tns->length[w][filt] = get_bits(gb, 6 - 2*is8);
+ for (filt = 0; filt < tns->n_filt[w]; filt++) {
+ int tmp2_idx;
+ tns->length[w][filt] = get_bits(gb, 6 - 2*is8);
+
+ if ((tns->order[w][filt] = get_bits(gb, 5 - 2*is8)) > tns_max_order) {
+ av_log(ac->avccontext, AV_LOG_ERROR, "TNS filter order %d is greater than maximum %d.",
+ tns->order[w][filt], tns_max_order);
+ tns->order[w][filt] = 0;
+ return -1;
+ }
+ tns->direction[w][filt] = get_bits1(gb);
+ coef_compress = get_bits1(gb);
+ coef_len = coef_res + 3 - coef_compress;
+ tmp2_idx = 2*coef_compress + coef_res;
- if ((tns->order[w][filt] = get_bits(gb, 5 - 2*is8)) > tns_max_order) {
- av_log(ac->avccontext, AV_LOG_ERROR, "TNS filter order %d is greater than maximum %d.",
- tns->order[w][filt], tns_max_order);
- tns->order[w][filt] = 0;
- return -1;
+ for (i = 0; i < tns->order[w][filt]; i++)
+ tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)];
}
- tns->direction[w][filt] = get_bits1(gb);
- coef_compress = get_bits1(gb);
- coef_len = coef_res + 3 - coef_compress;
- tmp2_idx = 2*coef_compress + coef_res;
-
- for (i = 0; i < tns->order[w][filt]; i++)
- tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)];
- }
}
}
return 0;