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