Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
2.5198421, 4.3267487,
6.3496042, 8.5498797,
10.9027236, 13.3905183,
16.0000000, 18.7207544,
21.5443469, 24.4637810,
27.4731418, 30.5673509,
33.7419917, 36.9931811,
};
/*
* bits 0:3, 4:7 index into _vals array
* 8:9 bit mask of escape-coded entries
* 12:15 number of non-zero values
*/
static const uint16_t codebook_vector10_idx[] = {
0x0000, 0x1010, 0x1020, 0x1030, 0x1040, 0x1050, 0x1060, 0x1070,
0x1080, 0x1090, 0x10a0, 0x10b0, 0x10c0, 0x10d0, 0x10e0, 0x10f0, 0x1200,
0x1001, 0x2011, 0x2021, 0x2031, 0x2041, 0x2051, 0x2061, 0x2071,
0x2081, 0x2091, 0x20a1, 0x20b1, 0x20c1, 0x20d1, 0x20e1, 0x20f1, 0x2201,
0x1002, 0x2012, 0x2022, 0x2032, 0x2042, 0x2052, 0x2062, 0x2072,
0x2082, 0x2092, 0x20a2, 0x20b2, 0x20c2, 0x20d2, 0x20e2, 0x20f2, 0x2202,
0x1003, 0x2013, 0x2023, 0x2033, 0x2043, 0x2053, 0x2063, 0x2073,
0x2083, 0x2093, 0x20a3, 0x20b3, 0x20c3, 0x20d3, 0x20e3, 0x20f3, 0x2203,
0x1004, 0x2014, 0x2024, 0x2034, 0x2044, 0x2054, 0x2064, 0x2074,
0x2084, 0x2094, 0x20a4, 0x20b4, 0x20c4, 0x20d4, 0x20e4, 0x20f4, 0x2204,
0x1005, 0x2015, 0x2025, 0x2035, 0x2045, 0x2055, 0x2065, 0x2075,
0x2085, 0x2095, 0x20a5, 0x20b5, 0x20c5, 0x20d5, 0x20e5, 0x20f5, 0x2205,
0x1006, 0x2016, 0x2026, 0x2036, 0x2046, 0x2056, 0x2066, 0x2076,
0x2086, 0x2096, 0x20a6, 0x20b6, 0x20c6, 0x20d6, 0x20e6, 0x20f6, 0x2206,
0x1007, 0x2017, 0x2027, 0x2037, 0x2047, 0x2057, 0x2067, 0x2077,
0x2087, 0x2097, 0x20a7, 0x20b7, 0x20c7, 0x20d7, 0x20e7, 0x20f7, 0x2207,
0x1008, 0x2018, 0x2028, 0x2038, 0x2048, 0x2058, 0x2068, 0x2078,
0x2088, 0x2098, 0x20a8, 0x20b8, 0x20c8, 0x20d8, 0x20e8, 0x20f8, 0x2208,
0x1009, 0x2019, 0x2029, 0x2039, 0x2049, 0x2059, 0x2069, 0x2079,
0x2089, 0x2099, 0x20a9, 0x20b9, 0x20c9, 0x20d9, 0x20e9, 0x20f9, 0x2209,
0x100a, 0x201a, 0x202a, 0x203a, 0x204a, 0x205a, 0x206a, 0x207a,
0x208a, 0x209a, 0x20aa, 0x20ba, 0x20ca, 0x20da, 0x20ea, 0x20fa, 0x220a,
0x100b, 0x201b, 0x202b, 0x203b, 0x204b, 0x205b, 0x206b, 0x207b,
0x208b, 0x209b, 0x20ab, 0x20bb, 0x20cb, 0x20db, 0x20eb, 0x20fb, 0x220b,
0x100c, 0x201c, 0x202c, 0x203c, 0x204c, 0x205c, 0x206c, 0x207c,
0x208c, 0x209c, 0x20ac, 0x20bc, 0x20cc, 0x20dc, 0x20ec, 0x20fc, 0x220c,
0x100d, 0x201d, 0x202d, 0x203d, 0x204d, 0x205d, 0x206d, 0x207d,
0x208d, 0x209d, 0x20ad, 0x20bd, 0x20cd, 0x20dd, 0x20ed, 0x20fd, 0x220d,
0x100e, 0x201e, 0x202e, 0x203e, 0x204e, 0x205e, 0x206e, 0x207e,
0x208e, 0x209e, 0x20ae, 0x20be, 0x20ce, 0x20de, 0x20ee, 0x20fe, 0x220e,
0x100f, 0x201f, 0x202f, 0x203f, 0x204f, 0x205f, 0x206f, 0x207f,
0x208f, 0x209f, 0x20af, 0x20bf, 0x20cf, 0x20df, 0x20ef, 0x20ff, 0x220f,
0x1100, 0x2110, 0x2120, 0x2130, 0x2140, 0x2150, 0x2160, 0x2170,
0x2180, 0x2190, 0x21a0, 0x21b0, 0x21c0, 0x21d0, 0x21e0, 0x21f0, 0x2300,
};
const float *const ff_aac_codebook_vector_vals[] = {
codebook_vector0_vals, codebook_vector0_vals,
codebook_vector10_vals, codebook_vector10_vals,
codebook_vector4_vals, codebook_vector4_vals,
codebook_vector10_vals, codebook_vector10_vals,
codebook_vector10_vals, codebook_vector10_vals,
codebook_vector10_vals,
};
const uint16_t *const ff_aac_codebook_vector_idx[] = {
codebook_vector02_idx, codebook_vector02_idx,
codebook_vector02_idx, codebook_vector02_idx,
codebook_vector4_idx, codebook_vector4_idx,
codebook_vector6_idx, codebook_vector6_idx,
codebook_vector8_idx, codebook_vector8_idx,
codebook_vector10_idx,
};
Alex Converse
committed
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
/* @name swb_offsets
* Sample offset into the window indicating the beginning of a scalefactor
* window band
*
* scalefactor window band - term for scalefactor bands within a window,
* given in Table 4.110 to Table 4.128.
*
* scalefactor band - a set of spectral coefficients which are scaled by one
* scalefactor. In case of EIGHT_SHORT_SEQUENCE and grouping a scalefactor band
* may contain several scalefactor window bands of corresponding frequency. For
* all other window_sequences scalefactor bands and scalefactor window bands are
* identical.
* @{
*/
static const uint16_t swb_offset_1024_96[] = {
0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 44, 48, 52, 56, 64,
72, 80, 88, 96, 108, 120, 132, 144,
156, 172, 188, 212, 240, 276, 320, 384,
448, 512, 576, 640, 704, 768, 832, 896,
960, 1024
};
static const uint16_t swb_offset_128_96[] = {
0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128
};
static const uint16_t swb_offset_1024_64[] = {
0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 44, 48, 52, 56, 64,
72, 80, 88, 100, 112, 124, 140, 156,
172, 192, 216, 240, 268, 304, 344, 384,
424, 464, 504, 544, 584, 624, 664, 704,
744, 784, 824, 864, 904, 944, 984, 1024
};
static const uint16_t swb_offset_1024_48[] = {
0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 48, 56, 64, 72, 80,
88, 96, 108, 120, 132, 144, 160, 176,
196, 216, 240, 264, 292, 320, 352, 384,
416, 448, 480, 512, 544, 576, 608, 640,
672, 704, 736, 768, 800, 832, 864, 896,
928, 1024
};
static const uint16_t swb_offset_128_48[] = {
0, 4, 8, 12, 16, 20, 28, 36,
44, 56, 68, 80, 96, 112, 128
};
static const uint16_t swb_offset_1024_32[] = {
0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 48, 56, 64, 72, 80,
88, 96, 108, 120, 132, 144, 160, 176,
196, 216, 240, 264, 292, 320, 352, 384,
416, 448, 480, 512, 544, 576, 608, 640,
672, 704, 736, 768, 800, 832, 864, 896,
928, 960, 992, 1024
};
static const uint16_t swb_offset_1024_24[] = {
0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 44, 52, 60, 68, 76,
84, 92, 100, 108, 116, 124, 136, 148,
160, 172, 188, 204, 220, 240, 260, 284,
308, 336, 364, 396, 432, 468, 508, 552,
600, 652, 704, 768, 832, 896, 960, 1024
};
static const uint16_t swb_offset_128_24[] = {
0, 4, 8, 12, 16, 20, 24, 28,
36, 44, 52, 64, 76, 92, 108, 128
};
static const uint16_t swb_offset_1024_16[] = {
0, 8, 16, 24, 32, 40, 48, 56,
64, 72, 80, 88, 100, 112, 124, 136,
148, 160, 172, 184, 196, 212, 228, 244,
260, 280, 300, 320, 344, 368, 396, 424,
456, 492, 532, 572, 616, 664, 716, 772,
832, 896, 960, 1024
};
static const uint16_t swb_offset_128_16[] = {
0, 4, 8, 12, 16, 20, 24, 28,
32, 40, 48, 60, 72, 88, 108, 128
};
static const uint16_t swb_offset_1024_8[] = {
0, 12, 24, 36, 48, 60, 72, 84,
96, 108, 120, 132, 144, 156, 172, 188,
204, 220, 236, 252, 268, 288, 308, 328,
348, 372, 396, 420, 448, 476, 508, 544,
580, 620, 664, 712, 764, 820, 880, 944,
1024
};
static const uint16_t swb_offset_128_8[] = {
0, 4, 8, 12, 16, 20, 24, 28,
36, 44, 52, 60, 72, 88, 108, 128
};
const uint16_t * const ff_swb_offset_1024[] = {
Alex Converse
committed
swb_offset_1024_96, swb_offset_1024_96, swb_offset_1024_64,
swb_offset_1024_48, swb_offset_1024_48, swb_offset_1024_32,
swb_offset_1024_24, swb_offset_1024_24, swb_offset_1024_16,
swb_offset_1024_16, swb_offset_1024_16, swb_offset_1024_8,
swb_offset_1024_8
};
const uint16_t * const ff_swb_offset_128[] = {
Alex Converse
committed
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
/* The last entry on the following row is swb_offset_128_64 but is a
duplicate of swb_offset_128_96. */
swb_offset_128_96, swb_offset_128_96, swb_offset_128_96,
swb_offset_128_48, swb_offset_128_48, swb_offset_128_48,
swb_offset_128_24, swb_offset_128_24, swb_offset_128_16,
swb_offset_128_16, swb_offset_128_16, swb_offset_128_8,
swb_offset_128_8
};
// @}
/* @name ff_tns_max_bands
* The maximum number of scalefactor bands on which TNS can operate for the long
* and short transforms respectively. The index to these tables is related to
* the sample rate of the audio.
* @{
*/
const uint8_t ff_tns_max_bands_1024[] = {
31, 31, 34, 40, 42, 51, 46, 46, 42, 42, 42, 39, 39
};
const uint8_t ff_tns_max_bands_128[] = {
9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
};
// @}