[FFmpeg-soc] [soc]: r1751 - in eac3: ac3tab.c ac3tab.h eac3dec.c
jbr
subversion at mplayerhq.hu
Wed Jan 2 01:02:32 CET 2008
Author: jbr
Date: Wed Jan 2 01:02:32 2008
New Revision: 1751
Log:
cosmetics: rename some E-AC3 tables
Modified:
eac3/ac3tab.c
eac3/ac3tab.h
eac3/eac3dec.c
Modified: eac3/ac3tab.c
==============================================================================
--- eac3/ac3tab.c (original)
+++ eac3/ac3tab.c Wed Jan 2 01:02:32 2008
@@ -209,7 +209,7 @@ const uint16_t ff_ac3_hearing_threshold_
{ 0x0840,0x0840,0x04e0 },
};
-const uint8_t ff_ac3_hebaptab[64] = {
+const uint8_t ff_eac3_hebap_tab[64] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 8,
8, 8, 9, 9, 9, 10, 10, 10, 10, 11,
11, 11, 11, 12, 12, 12, 12, 13, 13, 13,
@@ -229,7 +229,7 @@ const uint8_t ff_ac3_bap_tab[64]= {
15, 15, 15, 15,
};
-const uint8_t ff_bits_vs_hebap[20] = {
+const uint8_t ff_eac3_bits_vs_hebap[20] = {
0, 2, 3, 4, 5, 7, 8, 9, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 14, 16,
};
@@ -304,20 +304,20 @@ const int16_t ff_eac3_gaq_remap[12][2][3
* Map GAQ mode and gaqgain to Gk
* Gk = 1 << ff_gaq_gk[GAQ Mode][gaqgain]
*/
-const uint8_t ff_gaq_gk[4][3]={
+const uint8_t ff_eac3_gaq_gk[4][3]={
{0, 0, 0},
{0, 1, 0},
{0, 2, 0},
{0, 1, 2}
};
-const int16_t ff_vq_hebap1[4][6] = {
+static const int16_t vq_hebap1[4][6] = {
{ 7167, 4739, 1106, 4269, 10412, 4820},
{ -5702, -3187, -14483, -1392, -2027, 849},
{ 633, 6199, 7009, -12779, -2306, -2636},
{ -1468, -7031, 7592, 10617, -5946, -3062},
};
-const int16_t ff_vq_hebap2[8][6] = {
+static const int16_t vq_hebap2[8][6] = {
{ -12073, 608, -7019, 590, 4000, 869},
{ 6692, 15689, -6178, -9239, -74, 133},
{ 1855, -989, 20596, -2920, -4475, 225},
@@ -327,7 +327,7 @@ const int16_t ff_vq_hebap2[8][6] = {
{ 6221, -17915, -5516, 6266, 358, 1162},
{ 3753, -1066, 4283, -3227, 15928, 10186},
};
-const int16_t ff_vq_hebap3[16][6] = {
+static const int16_t vq_hebap3[16][6] = {
{ -10028, 20779, 10982, -4560, 798, -68},
{ 11050, 20490, -6617, -5342, -1797, -1631},
{ 3977, -542, 7118, -1166, 18844, 14678},
@@ -345,7 +345,7 @@ const int16_t ff_vq_hebap3[16][6] = {
{ 21667, -6335, -8290, -101, -1349, -22},
{ -22003, -6476, 7974, 648, 2054, -331},
};
-const int16_t ff_vq_hebap4[32][6] = {
+static const int16_t vq_hebap4[32][6] = {
{ 6636, -4593, 14173, -17297, -16523, 864},
{ 3658, 22540, 104, -1763, -84, 6},
{ 21580, -17815, -7282, -1575, -2078, -320},
@@ -378,7 +378,7 @@ const int16_t ff_vq_hebap4[32][6] = {
{ -83, 278, 323, 55, -154, 232},
{ 7788, 1462, 18395, 15296, -15763, -1131},
};
-const int16_t ff_vq_hebap5[128][6] = {
+static const int16_t vq_hebap5[128][6] = {
{ -3394, -19730, 2963, 9590, 4660, 19673},
{ -15665, -6405, 17671, 3860, -8232, -19429},
{ 4467, 412, -17873, -8037, 691, -17307},
@@ -508,7 +508,7 @@ const int16_t ff_vq_hebap5[128][6] = {
{ -23728, -4451, -2688, -14679, -4266, 9919},
{ 8495, -894, 20438, -13820, -17267, 139},
};
-const int16_t ff_vq_hebap6[256][6] = {
+static const int16_t vq_hebap6[256][6] = {
{ 10154, 7365, 16861, 18681, -22893, -3636},
{ -2619, -3788, -5529, -5192, -9009, -20298},
{ -5583, -22800, 21297, 7012, 745, 720},
@@ -766,7 +766,7 @@ const int16_t ff_vq_hebap6[256][6] = {
{ -765, -20706, -3412, 18870, 2765, 1420},
{ -3059, 2708, -19022, -331, 3537, 116},
};
-const int16_t ff_vq_hebap7[512][6] = {
+static const int16_t vq_hebap7[512][6] = {
{ -21173, 21893, 10390, 13646, 10718, -9177},
{ -22519, -8193, 18328, -6629, 25518, -10848},
{ 6800, -13758, -13278, 22418, 14667, -20938},
@@ -1281,15 +1281,15 @@ const int16_t ff_vq_hebap7[512][6] = {
{ 3231, -3284, 27336, 4174, -1683, 497},
};
-const int16_t (*ff_vq_hebap[8])[6] = {
+const int16_t (*ff_eac3_vq_hebap[8])[6] = {
NULL,
- ff_vq_hebap1,
- ff_vq_hebap2,
- ff_vq_hebap3,
- ff_vq_hebap4,
- ff_vq_hebap5,
- ff_vq_hebap6,
- ff_vq_hebap7,
+ vq_hebap1,
+ vq_hebap2,
+ vq_hebap3,
+ vq_hebap4,
+ vq_hebap5,
+ vq_hebap6,
+ vq_hebap7,
};
/**
Modified: eac3/ac3tab.h
==============================================================================
--- eac3/ac3tab.h (original)
+++ eac3/ac3tab.h Wed Jan 2 01:02:32 2008
@@ -31,7 +31,7 @@ extern const uint16_t ff_ac3_bitrate_tab
extern const int16_t ff_ac3_window[256];
extern const uint8_t ff_ac3_log_add_tab[260];
extern const uint16_t ff_ac3_hearing_threshold_tab[50][3];
-extern const uint8_t ff_ac3_hebaptab[64];
+extern const uint8_t ff_eac3_hebap_tab[64];
extern const uint8_t ff_ac3_bap_tab[64];
extern const uint8_t ff_ac3_slow_decay_tab[4];
extern const uint8_t ff_ac3_fast_decay_tab[4];
@@ -41,18 +41,11 @@ extern const int16_t ff_ac3_floor_tab[8
extern const uint16_t ff_ac3_fast_gain_tab[8];
extern const uint8_t ff_ac3_critical_band_size_tab[50];
extern const uint8_t ff_eac3_blocks[4];
-extern const uint8_t ff_bits_vs_hebap[20];
+extern const uint8_t ff_eac3_bits_vs_hebap[20];
extern const int16_t ff_eac3_gaq_remap[12][2][3][2];
-extern const uint8_t ff_gaq_gk[4][3];
+extern const uint8_t ff_eac3_gaq_gk[4][3];
-extern const int16_t ff_vq_hebap1[4][6];
-extern const int16_t ff_vq_hebap2[8][6];
-extern const int16_t ff_vq_hebap3[16][6];
-extern const int16_t ff_vq_hebap4[32][6];
-extern const int16_t ff_vq_hebap5[128][6];
-extern const int16_t ff_vq_hebap6[256][6];
-extern const int16_t ff_vq_hebap7[512][6];
-extern const int16_t (*ff_vq_hebap[8])[6];
+extern const int16_t (*ff_eac3_vq_hebap[8])[6];
extern const uint8_t ff_eac3_frm_expstr[32][6];
extern const uint8_t ff_eac3_defcplbndstrc[18];
extern const uint8_t ff_eac3_defspxbndstrc[17];
Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c (original)
+++ eac3/eac3dec.c Wed Jan 2 01:02:32 2008
@@ -183,7 +183,7 @@ void ff_eac3_get_transform_coeffs_aht_ch
gs = 0;
for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
if (s->hebap[ch][bin] > 7 && s->hebap[ch][bin] < end_bap)
- s->gaq_gain[gs++] = ff_gaq_gk[gaq_mode][get_bits1(gbc)];
+ s->gaq_gain[gs++] = ff_eac3_gaq_gk[gaq_mode][get_bits1(gbc)];
}
} else if (gaq_mode == EAC3_GAQ_124) {
/* read 1.67-bit GAQ gain codes (3 codes in 5 bits) */
@@ -193,9 +193,9 @@ void ff_eac3_get_transform_coeffs_aht_ch
if (s->hebap[ch][bin] > 7 && s->hebap[ch][bin] < end_bap) {
if(gc++ == 2) {
int group_gain = get_bits(gbc, 5);
- s->gaq_gain[gs++] = ff_gaq_gk[gaq_mode][gaq_ungroup_tab[group_gain][0]];
- s->gaq_gain[gs++] = ff_gaq_gk[gaq_mode][gaq_ungroup_tab[group_gain][1]];
- s->gaq_gain[gs++] = ff_gaq_gk[gaq_mode][gaq_ungroup_tab[group_gain][2]];
+ s->gaq_gain[gs++] = ff_eac3_gaq_gk[gaq_mode][gaq_ungroup_tab[group_gain][0]];
+ s->gaq_gain[gs++] = ff_eac3_gaq_gk[gaq_mode][gaq_ungroup_tab[group_gain][1]];
+ s->gaq_gain[gs++] = ff_eac3_gaq_gk[gaq_mode][gaq_ungroup_tab[group_gain][2]];
gc = 0;
}
}
@@ -205,7 +205,7 @@ void ff_eac3_get_transform_coeffs_aht_ch
gs=0;
for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
hebap = s->hebap[ch][bin];
- bits = ff_bits_vs_hebap[hebap];
+ bits = ff_eac3_bits_vs_hebap[hebap];
if (!hebap) {
/* hebap=0 */
for (blk = 0; blk < 6; blk++) {
@@ -215,7 +215,7 @@ void ff_eac3_get_transform_coeffs_aht_ch
/* Vector Quantization */
int v = get_bits(gbc, bits);
for (blk = 0; blk < 6; blk++) {
- s->pre_mantissa[blk][ch][bin] = ff_vq_hebap[hebap][v][blk] / 32768.0f;
+ s->pre_mantissa[blk][ch][bin] = ff_eac3_vq_hebap[hebap][v][blk] / 32768.0f;
}
} else {
/* Gain Adaptive Quantization */
@@ -1121,7 +1121,7 @@ int ff_eac3_parse_audio_block(AC3DecodeC
else if (s->channel_uses_aht[ch] == 1)
ff_ac3_bit_alloc_calc_bap(s->mask[ch], s->psd[ch],
s->start_freq[ch], s->end_freq[ch], s->snr_offset[ch],
- s->bit_alloc_params.floor, ff_ac3_hebaptab,
+ s->bit_alloc_params.floor, ff_eac3_hebap_tab,
s->hebap[ch]);
}
More information about the FFmpeg-soc
mailing list