diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-26 18:14:21 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-10-31 21:44:48 +0100 |
commit | 40a8cb9e6cdb3d05f5f984ab961a4b077185f8fe (patch) | |
tree | 12e00f007557a1820f3dcfc1e7ec4aaba58f63f2 /libavcodec/aacpsdata.c | |
parent | 774611a349f687ba2cd26cc1e3c11eaa38aab484 (diff) | |
download | ffmpeg-40a8cb9e6cdb3d05f5f984ab961a4b077185f8fe.tar.gz |
avcodec/aacps_common: Combine huffman tabels
This allows to avoid the relocations inherent in an array
to individual tables; it also reduces padding.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/aacpsdata.c')
-rw-r--r-- | libavcodec/aacpsdata.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/libavcodec/aacpsdata.c b/libavcodec/aacpsdata.c index 8241346b0d..6885b386c0 100644 --- a/libavcodec/aacpsdata.c +++ b/libavcodec/aacpsdata.c @@ -21,7 +21,9 @@ #include <stdint.h> -static const uint8_t huff_iid_df1_tab[][2] = { +static const uint8_t huff_sizes[] = { 61, 61, 29, 29, 15, 15, 8, 8, 8, 8 }; + +static const uint8_t aacps_huff_tabs[][2] = { /* huff_iid_df1 - 61 entries */ { 28, 4 }, { 32, 4 }, { 29, 3 }, { 31, 3 }, { 27, 5 }, { 33, 5 }, { 26, 6 }, { 34, 6 }, { 25, 7 }, { 35, 7 }, @@ -36,9 +38,6 @@ static const uint8_t huff_iid_df1_tab[][2] = { { 57, 18 }, { 58, 18 }, { 0, 18 }, { 1, 18 }, { 10, 18 }, { 50, 18 }, { 14, 16 }, { 46, 16 }, { 20, 12 }, { 23, 10 }, { 30, 1 }, -}; - -static const uint8_t huff_iid_dt1_tab[][2] = { /* huff_iid_dt1 - 61 entries */ { 31, 2 }, { 26, 7 }, { 34, 7 }, { 27, 6 }, { 33, 6 }, { 35, 8 }, { 24, 9 }, { 36, 9 }, { 39, 11 }, { 41, 12 }, @@ -53,9 +52,6 @@ static const uint8_t huff_iid_dt1_tab[][2] = { { 14, 15 }, { 46, 15 }, { 50, 16 }, { 51, 16 }, { 19, 13 }, { 21, 12 }, { 25, 9 }, { 28, 5 }, { 32, 5 }, { 29, 3 }, { 30, 1 }, -}; - -static const uint8_t huff_iid_df0_tab[][2] = { /* huff_iid_df0 - 29 entries */ { 14, 1 }, { 15, 3 }, { 13, 3 }, { 16, 4 }, { 12, 4 }, { 17, 5 }, { 11, 5 }, { 10, 6 }, { 18, 6 }, { 19, 6 }, @@ -63,9 +59,6 @@ static const uint8_t huff_iid_df0_tab[][2] = { { 22, 13 }, { 6, 13 }, { 23, 14 }, { 24, 14 }, { 5, 15 }, { 25, 15 }, { 4, 16 }, { 3, 17 }, { 0, 17 }, { 1, 17 }, { 2, 17 }, { 26, 17 }, { 27, 18 }, { 28, 18 }, -}; - -static const uint8_t huff_iid_dt0_tab[][2] = { /* huff_iid_dt0 - 29 entries */ { 14, 1 }, { 13, 2 }, { 15, 3 }, { 12, 4 }, { 16, 5 }, { 11, 6 }, { 17, 7 }, { 10, 8 }, { 18, 9 }, { 9, 10 }, @@ -73,41 +66,23 @@ static const uint8_t huff_iid_dt0_tab[][2] = { { 22, 17 }, { 6, 17 }, { 23, 19 }, { 0, 19 }, { 1, 19 }, { 2, 19 }, { 3, 20 }, { 4, 20 }, { 5, 20 }, { 24, 20 }, { 25, 20 }, { 26, 20 }, { 27, 20 }, { 28, 20 }, -}; - -static const uint8_t huff_icc_df_tab[][2] = { /* huff_icc_df - 15 entries */ { 7, 1 }, { 8, 2 }, { 6, 3 }, { 9, 4 }, { 5, 5 }, { 10, 6 }, { 4, 7 }, { 11, 8 }, { 12, 9 }, { 3, 10 }, { 13, 11 }, { 2, 12 }, { 14, 13 }, { 1, 14 }, { 0, 14 }, -}; - -static const uint8_t huff_icc_dt_tab[][2] = { /* huff_icc_dt - 15 entries */ { 7, 1 }, { 8, 2 }, { 6, 3 }, { 9, 4 }, { 5, 5 }, { 10, 6 }, { 4, 7 }, { 11, 8 }, { 3, 9 }, { 12, 10 }, { 2, 11 }, { 13, 12 }, { 1, 13 }, { 0, 14 }, { 14, 14 }, -}; - -static const uint8_t huff_ipd_df_tab[][2] = { /* huff_ipd_df - 8 entries */ { 1, 3 }, { 4, 4 }, { 5, 4 }, { 3, 4 }, { 6, 4 }, { 2, 4 }, { 7, 4 }, { 0, 1 }, -}; - -static const uint8_t huff_ipd_dt_tab[][2] = { /* huff_ipd_dt - 8 entries */ { 5, 4 }, { 4, 5 }, { 3, 5 }, { 2, 4 }, { 6, 4 }, { 1, 3 }, { 7, 3 }, { 0, 1 }, -}; - -static const uint8_t huff_opd_df_tab[][2] = { /* huff_opd_df - 8 entries */ { 7, 3 }, { 1, 3 }, { 3, 4 }, { 6, 4 }, { 2, 4 }, { 5, 5 }, { 4, 5 }, { 0, 1 }, -}; - -static const uint8_t huff_opd_dt_tab[][2] = { /* huff_opd_dt - 8 entries */ { 5, 4 }, { 2, 4 }, { 6, 4 }, { 4, 5 }, { 3, 5 }, { 1, 3 }, { 7, 3 }, { 0, 1 }, |