Mercurial > libavcodec.hg
comparison ac3dec.c @ 7033:f90b89217cc9 libavcodec
move rematrixing band table to ac3dec_data.c
author | jbr |
---|---|
date | Sun, 08 Jun 2008 21:09:02 +0000 |
parents | 4ef389a71e03 |
children | e943e1409077 |
comparison
equal
deleted
inserted
replaced
7032:784a2b575226 | 7033:f90b89217cc9 |
---|---|
37 #include "avcodec.h" | 37 #include "avcodec.h" |
38 #include "ac3_parser.h" | 38 #include "ac3_parser.h" |
39 #include "bitstream.h" | 39 #include "bitstream.h" |
40 #include "dsputil.h" | 40 #include "dsputil.h" |
41 #include "ac3dec.h" | 41 #include "ac3dec.h" |
42 #include "ac3dec_data.h" | |
42 | 43 |
43 /** Maximum possible frame size when the specification limit is ignored */ | 44 /** Maximum possible frame size when the specification limit is ignored */ |
44 #define AC3_MAX_FRAME_SIZE 21695 | 45 #define AC3_MAX_FRAME_SIZE 21695 |
45 | |
46 /** | |
47 * Table of bin locations for rematrixing bands | |
48 * reference: Section 7.5.2 Rematrixing : Frequency Band Definitions | |
49 */ | |
50 static const uint8_t rematrix_band_tab[5] = { 13, 25, 37, 61, 253 }; | |
51 | 46 |
52 /** table for grouping exponents */ | 47 /** table for grouping exponents */ |
53 static uint8_t exp_ungroup_tab[128][3]; | 48 static uint8_t exp_ungroup_tab[128][3]; |
54 | 49 |
55 | 50 |
577 | 572 |
578 end = FFMIN(s->end_freq[1], s->end_freq[2]); | 573 end = FFMIN(s->end_freq[1], s->end_freq[2]); |
579 | 574 |
580 for(bnd=0; bnd<s->num_rematrixing_bands; bnd++) { | 575 for(bnd=0; bnd<s->num_rematrixing_bands; bnd++) { |
581 if(s->rematrixing_flags[bnd]) { | 576 if(s->rematrixing_flags[bnd]) { |
582 bndend = FFMIN(end, rematrix_band_tab[bnd+1]); | 577 bndend = FFMIN(end, ff_ac3_rematrix_band_tab[bnd+1]); |
583 for(i=rematrix_band_tab[bnd]; i<bndend; i++) { | 578 for(i=ff_ac3_rematrix_band_tab[bnd]; i<bndend; i++) { |
584 tmp0 = s->fixed_coeffs[1][i]; | 579 tmp0 = s->fixed_coeffs[1][i]; |
585 tmp1 = s->fixed_coeffs[2][i]; | 580 tmp1 = s->fixed_coeffs[2][i]; |
586 s->fixed_coeffs[1][i] = tmp0 + tmp1; | 581 s->fixed_coeffs[1][i] = tmp0 + tmp1; |
587 s->fixed_coeffs[2][i] = tmp0 - tmp1; | 582 s->fixed_coeffs[2][i] = tmp0 - tmp1; |
588 } | 583 } |