Skip to content

Commit 044bfc7

Browse files
committed
avcodec/aac{enc,}tab: Deduplicate swb tables
Signed-off-by: Andreas Rheinhardt <[email protected]>
1 parent ab1bc2f commit 044bfc7

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

libavcodec/aacenctab.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ static const uint8_t swb_size_128_96[] = {
2525
4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36
2626
};
2727

28-
static const uint8_t swb_size_128_64[] = {
29-
4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36
30-
};
28+
#define swb_size_128_64 swb_size_128_96
3129

3230
static const uint8_t swb_size_128_48[] = {
3331
4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16

libavcodec/aactab.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,6 @@ const uint8_t ff_aac_num_swb_128[] = {
170170
12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15
171171
};
172172

173-
const uint8_t ff_aac_num_swb_120[] = {
174-
12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15
175-
};
176-
177173
const uint8_t ff_aac_num_swb_96[] = {
178174
12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14
179175
};
@@ -1838,13 +1834,7 @@ static const uint16_t swb_offset_768_48[] =
18381834
544, 576, 608, 640, 672, 704, 736, 768
18391835
};
18401836

1841-
static const uint16_t swb_offset_768_32[] =
1842-
{
1843-
0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48,
1844-
56, 64, 72, 80, 88, 96, 108, 120, 132, 144, 160, 176,
1845-
196, 216, 240, 264, 292, 320, 352, 384, 416, 448, 480, 512,
1846-
544, 576, 608, 640, 672, 704, 736, 768
1847-
};
1837+
#define swb_offset_768_32 swb_offset_768_48
18481838

18491839
static const uint16_t swb_offset_768_24[] =
18501840
{

libavcodec/aactab.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ extern const uint8_t ff_aac_num_swb_768 [];
7676
extern const uint8_t ff_aac_num_swb_512 [];
7777
extern const uint8_t ff_aac_num_swb_480 [];
7878
extern const uint8_t ff_aac_num_swb_128 [];
79-
extern const uint8_t ff_aac_num_swb_120 [];
79+
#define ff_aac_num_swb_120 ff_aac_num_swb_128
8080
extern const uint8_t ff_aac_num_swb_96 [];
8181
// @}
8282

0 commit comments

Comments
 (0)