• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *                                                                            *
3  * Copyright (C) 2018 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 #ifndef IXHEAACD_INFO_H
21 #define IXHEAACD_INFO_H
22 
23 #define chans 51
24 
25 #define EXT_SBR_DATA 13
26 
27 typedef struct {
28   WORD32 samp_rate;
29   WORD32 num_sfb_1024;
30   const WORD16 *ptr_sfb_1024;
31   WORD32 num_sfb_128;
32   const WORD16 *ptr_sfb_128;
33   WORD32 num_sfb_960;
34   const WORD16 *ptr_sfb_960;
35   WORD32 num_sfb_120;
36   const WORD16 *ptr_sfb_120;
37   WORD32 num_sfb_768;
38   const WORD16 *ptr_sfb_768;
39   WORD32 num_sfb_96;
40   const WORD16 *ptr_sfb_96;
41   WORD32 short_fss_width;
42   WORD32 long_fss_groups;
43   WORD32 num_sfb_480;
44   const WORD16 *ptr_sfb_480;
45   WORD32 num_sfb_512;
46   const WORD16 *ptr_sfb_512;
47 } ia_usac_samp_rate_info;
48 
49 typedef struct {
50   WORD32 index;
51   WORD32 len;
52   UWORD32 code_word;
53 } ia_huff_code_word_struct;
54 
55 typedef struct {
56   WORD32 num;
57   WORD32 dim;
58   WORD32 lav;
59   WORD32 lav_incr_esc;
60   WORD32 huff_mode;
61   WORD32 off;
62   WORD32 sign_code_book;
63   UWORD16 max_code_word_len;
64   ia_huff_code_word_struct *pstr_huff_code_word;
65   WORD16 *code_book_tbl;
66   WORD32 *idx_tbl;
67 } ia_huff_code_book_struct;
68 
69 typedef struct {
70   WORD32 num_ele;
71   WORD32 ele_is_cpe[(1 << LEN_TAG)];
72   WORD32 ele_tag[(1 << LEN_TAG)];
73 } ia_ele_list_struct;
74 
75 typedef struct {
76   WORD32 present;
77   WORD32 ele_tag;
78   WORD32 pseudo_enab;
79 } ia_mix_dwn_struct;
80 
81 typedef struct {
82   WORD32 tag;
83   WORD32 profile;
84   WORD32 sampling_rate_idx;
85   ia_ele_list_struct front;
86   ia_ele_list_struct side;
87   ia_ele_list_struct back;
88   ia_ele_list_struct lfe;
89   ia_ele_list_struct data;
90   ia_ele_list_struct coupling;
91   ia_mix_dwn_struct mono_mix;
92   ia_mix_dwn_struct stereo_mix;
93   ia_mix_dwn_struct matrix_mix;
94   WORD8 comments[(1 << LEN_PC_COMM) + 1];
95   WORD32 buffer_fullness;
96 } ia_prog_config_struct;
97 
98 extern ia_huff_code_book_struct ixheaacd_book;
99 
100 VOID ixheaacd_hufftab(ia_huff_code_book_struct *ptr_huff_code_book,
101                       ia_huff_code_word_struct *ptr_huff_code_word,
102                       WORD16 *code_book_tbl, WORD32 *index, WORD32 dim,
103                       WORD32 lav, WORD32 lav_incr_esc, WORD32 sign_code_book,
104                       UWORD8 max_code_word_len);
105 
106 WORD32 ixheaacd_huff_codeword(ia_huff_code_word_struct *h, UWORD16 data_present,
107                               ia_bit_buf_struct *it_bit_buff);
108 
109 #endif /* IXHEAACD_INFO_H */
110