xref: /aosp_15_r20/external/libxaac/encoder/ixheaace_mps_huff_tab.h (revision 15dc779a375ca8b5125643b829a8aa4b70d7f451)
1 /******************************************************************************
2  *                                                                            *
3  * Copyright (C) 2023 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19  */
20 
21 #pragma once
22 typedef struct {
23   UWORD32 value;
24   UWORD8 length;
25 } ixheaace_mps_huff_entry;
26 
27 typedef struct {
28   ixheaace_mps_huff_entry entry[2][2];
29   ixheaace_mps_huff_entry escape;
30 
31 } ixheaace_mps_lav1_2d;
32 
33 typedef struct {
34   ixheaace_mps_huff_entry entry[4][4];
35   ixheaace_mps_huff_entry escape;
36 
37 } ixheaace_mps_lav3_2d;
38 
39 typedef struct {
40   ixheaace_mps_huff_entry entry[6][6];
41   ixheaace_mps_huff_entry escape;
42 
43 } ixheaace_mps_lav5_2d;
44 
45 typedef struct {
46   ixheaace_mps_huff_entry entry[7][7];
47   ixheaace_mps_huff_entry escape;
48 
49 } ixheaace_mps_lav6_2d;
50 
51 typedef struct {
52   ixheaace_mps_huff_entry entry[8][8];
53   ixheaace_mps_huff_entry escape;
54 
55 } ixheaace_mps_lav7_2d;
56 
57 typedef struct {
58   ixheaace_mps_huff_entry entry[10][10];
59   ixheaace_mps_huff_entry escape;
60 
61 } ixheaace_mps_lav9_2d;
62 
63 typedef struct {
64   ixheaace_mps_huff_entry entry[13][13];
65   ixheaace_mps_huff_entry escape;
66 
67 } ixheaace_mps_lav12_2d;
68 
69 typedef struct {
70   ixheaace_mps_lav3_2d lav3;
71   ixheaace_mps_lav5_2d lav5;
72   ixheaace_mps_lav7_2d lav7;
73   ixheaace_mps_lav9_2d lav9;
74 
75 } ixheaace_mps_huff_cld_tab_2d;
76 
77 typedef struct {
78   ixheaace_mps_lav1_2d lav1;
79   ixheaace_mps_lav3_2d lav3;
80   ixheaace_mps_lav5_2d lav5;
81   ixheaace_mps_lav7_2d lav7;
82 
83 } ixheaace_mps_huff_icc_tab_2d;
84 
85 typedef struct {
86   ixheaace_mps_huff_entry h1_d[2][31];
87   ixheaace_mps_huff_cld_tab_2d h2_d[2][2];
88 
89 } ixheaace_mps_huff_cld_table;
90 
91 typedef struct {
92   ixheaace_mps_huff_entry h1_d[2][8];
93   ixheaace_mps_huff_icc_tab_2d h2_d[2][2];
94 
95 } ixheaace_mps_huff_icc_table;
96 
97 typedef struct {
98   ixheaace_mps_huff_entry cld[31];
99   ixheaace_mps_huff_entry icc[8];
100 
101 } ixheaace_mps_huff_pt0_table;
102 
103 typedef struct {
104   UWORD32 value[31];
105   UWORD8 length[31];
106 } ixheaace_mps_sac_huff_cld_tab;
107 
108 typedef struct {
109   UWORD32 value[8];
110   UWORD8 length[8];
111 } ixheaace_mps_sac_huff_icc_tab;
112 
113 typedef struct {
114   UWORD32 value[26];
115   UWORD8 length[26];
116 } ixheaace_mps_sac_huff_cpc_tab;
117 
118 typedef struct {
119   ixheaace_mps_sac_huff_cld_tab huff_pt0;
120   ixheaace_mps_sac_huff_cld_tab huff_diff[2];
121 
122 } ixheaace_mps_sac_huffman_cld_table;
123 
124 typedef struct {
125   ixheaace_mps_sac_huff_icc_tab huff_pt0;
126   ixheaace_mps_sac_huff_icc_tab huff_diff[2];
127 
128 } ixheaace_mps_sac_huffman_icc_table;
129 
130 typedef struct {
131   ixheaace_mps_sac_huff_cpc_tab huff_pt0;
132   ixheaace_mps_sac_huff_cpc_tab huff_diff[2];
133 
134 } ixheaace_mps_sac_huff_cpc_table;
135 
136 extern const ixheaace_mps_huff_cld_table ixheaace_mps_212_huff_cld_tab;
137 extern const ixheaace_mps_huff_icc_table ixheaace_mps_212_huff_icc_tab;
138 extern const ixheaace_mps_huff_pt0_table ixheaace_mps_212_huff_part_0_tab;
139 extern const ixheaace_mps_sac_huffman_cld_table ixheaace_mps_515_huff_cld_tab;
140 extern const ixheaace_mps_sac_huffman_icc_table ixheaace_mps_515_huff_icc_tab;
141 extern const ixheaace_mps_sac_huff_cpc_table ixheaace_mps_515_huff_cpc_tab;
142