Lines Matching refs:it_bit_buff
106 ixheaacd_aac_bytealign(struct ia_bit_buf_struct *it_bit_buff) { in ixheaacd_aac_bytealign() argument
108 num_bit = (it_bit_buff->bit_pos + 1); in ixheaacd_aac_bytealign()
110 it_bit_buff->bit_pos = 7; in ixheaacd_aac_bytealign()
111 it_bit_buff->cnt_bits -= num_bit; in ixheaacd_aac_bytealign()
112 it_bit_buff->ptr_read_next += 1; in ixheaacd_aac_bytealign()
118 struct ia_bit_buf_struct *it_bit_buff) { in ixheaacd_read_pce_channel_info() argument
121 tmp = ixheaacd_read_bits_buf(it_bit_buff, 5); in ixheaacd_read_pce_channel_info()
135 VOID ixheaacd_read_pce_mixdown_data(struct ia_bit_buf_struct *it_bit_buff, in ixheaacd_read_pce_mixdown_data() argument
138 WORD32 mix_down_flag = ixheaacd_read_bits_buf(it_bit_buff, mix_down_present); in ixheaacd_read_pce_mixdown_data()
140 ixheaacd_read_bits_buf(it_bit_buff, mix_down_element_no); in ixheaacd_read_pce_mixdown_data()
144 VOID ixheaacd_skip_bits(struct ia_bit_buf_struct *it_bit_buff, WORD32 bits, in ixheaacd_skip_bits() argument
148 ixheaacd_read_bits_buf(it_bit_buff, bits); in ixheaacd_skip_bits()
154 struct ia_bit_buf_struct *it_bit_buff) { in ixheaacd_read_prog_config_element() argument
158 tmp = ixheaacd_read_bits_buf(it_bit_buff, 6); in ixheaacd_read_prog_config_element()
171 ptr_config_element->samp_freq_index = ixheaacd_read_bits_buf(it_bit_buff, 4); in ixheaacd_read_prog_config_element()
176 tmp = ixheaacd_read_bits_buf(it_bit_buff, 21); in ixheaacd_read_prog_config_element()
190 ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 4); in ixheaacd_read_prog_config_element()
191 ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 4); in ixheaacd_read_prog_config_element()
192 ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 3); in ixheaacd_read_prog_config_element()
197 ptr_config_element->front_element_tag_select, it_bit_buff); in ixheaacd_read_prog_config_element()
202 ptr_config_element->side_element_tag_select, it_bit_buff); in ixheaacd_read_prog_config_element()
207 ptr_config_element->back_element_tag_select, it_bit_buff); in ixheaacd_read_prog_config_element()
213 ixheaacd_read_bits_buf(it_bit_buff, 4); in ixheaacd_read_prog_config_element()
219 ixheaacd_read_bits_buf(it_bit_buff, 4); in ixheaacd_read_prog_config_element()
222 ixheaacd_skip_bits(it_bit_buff, 5, ptr_config_element->num_valid_cc_elements); in ixheaacd_read_prog_config_element()
226 if (bits_to_read <= it_bit_buff->bit_pos) { in ixheaacd_read_prog_config_element()
227 bits_to_read = it_bit_buff->bit_pos - bits_to_read; in ixheaacd_read_prog_config_element()
229 bits_to_read = 8 - (bits_to_read) + it_bit_buff->bit_pos; in ixheaacd_read_prog_config_element()
231 tmp = ixheaacd_read_bits_buf(it_bit_buff, bits_to_read); in ixheaacd_read_prog_config_element()
233 tmp = ixheaacd_read_bits_buf(it_bit_buff, 8); in ixheaacd_read_prog_config_element()
235 ixheaacd_skip_bits(it_bit_buff, 8, tmp); in ixheaacd_read_prog_config_element()
240 WORD ixheaacd_decode_pce(struct ia_bit_buf_struct *it_bit_buff, in ixheaacd_decode_pce() argument
249 ixheaacd_read_prog_config_element(&ptr_config_element, it_bit_buff); in ixheaacd_decode_pce()
253 ixheaacd_read_prog_config_element(ptr_prog_config, it_bit_buff); in ixheaacd_decode_pce()
260 ia_adif_header_struct *adif, struct ia_bit_buf_struct *it_bit_buff) { in ixheaacd_get_adif_header() argument
264 ixheaacd_read_bits_buf(it_bit_buff, 16); in ixheaacd_get_adif_header()
265 tmp = ixheaacd_read_bits_buf(it_bit_buff, 17); in ixheaacd_get_adif_header()
268 ixheaacd_skip_bits(it_bit_buff, 8, 9); in ixheaacd_get_adif_header()
271 tmp = ixheaacd_read_bits_buf(it_bit_buff, 3); in ixheaacd_get_adif_header()
275 ixheaacd_read_bits_buf(it_bit_buff, 23); in ixheaacd_get_adif_header()
277 tmp = ixheaacd_read_bits_buf(it_bit_buff, 4); in ixheaacd_get_adif_header()
281 ixheaacd_read_bits_buf(it_bit_buff, 20); in ixheaacd_get_adif_header()
287 ixheaacd_read_prog_config_element(&adif->str_prog_config, it_bit_buff); in ixheaacd_get_adif_header()
297 struct ia_bit_buf_struct *it_bit_buff) { in ixheaacd_find_syncword() argument
298 adts->sync_word = (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 12); in ixheaacd_find_syncword()
304 ixheaacd_read_bidirection(it_bit_buff, -4); in ixheaacd_find_syncword()
305 if (it_bit_buff->cnt_bits < 12) { in ixheaacd_find_syncword()
308 adts->sync_word = (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 12); in ixheaacd_find_syncword()
310 ixheaacd_read_bidirection(it_bit_buff, -12); in ixheaacd_find_syncword()
317 struct ia_bit_buf_struct *it_bit_buff) { in ixheaacd_adtsframe() argument
321 ia_adts_crc_info_struct *ptr_adts_crc_info = it_bit_buff->pstr_adts_crc_info; in ixheaacd_adtsframe()
324 ixheaacd_read_bidirection(it_bit_buff, -12); in ixheaacd_adtsframe()
325 crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff, in ixheaacd_adtsframe()
327 ixheaacd_find_syncword(adts, it_bit_buff); in ixheaacd_adtsframe()
329 tmp = ixheaacd_read_bits_buf(it_bit_buff, 10); in ixheaacd_adtsframe()
344 tmp = ixheaacd_read_bits_buf(it_bit_buff, 21); in ixheaacd_adtsframe()
350 tmp = ixheaacd_read_bits_buf(it_bit_buff, 13); in ixheaacd_adtsframe()
354 ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg); in ixheaacd_adtsframe()
357 ixheaacd_skip_bits(it_bit_buff, 16, adts->no_raw_data_blocks); in ixheaacd_adtsframe()
358 adts->crc_check = ixheaacd_read_bits_buf(it_bit_buff, 16); in ixheaacd_adtsframe()
365 ixheaacd_aac_bytealign(it_bit_buff); in ixheaacd_adtsframe()
370 struct ia_bit_buf_struct *it_bit_buff, in ixheaacd_get_samp_rate() argument
375 index = ixheaacd_read_bits_buf(it_bit_buff, 4); in ixheaacd_get_samp_rate()
379 sampling_rate = ixheaacd_read_bits_buf(it_bit_buff, 24); in ixheaacd_get_samp_rate()
415 ia_bit_buf_struct *it_bit_buff, in ixheaacd_get_ld_sbr_header() argument
420 tmp = ixheaacd_read_bits_buf(it_bit_buff, 16); in ixheaacd_get_ld_sbr_header()
431 sbr_header_data->freq_scale = ixheaacd_read_bits_buf(it_bit_buff, 2); in ixheaacd_get_ld_sbr_header()
432 sbr_header_data->alter_scale = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_get_ld_sbr_header()
433 sbr_header_data->noise_bands = ixheaacd_read_bits_buf(it_bit_buff, 2); in ixheaacd_get_ld_sbr_header()
441 sbr_header_data->limiter_bands = ixheaacd_read_bits_buf(it_bit_buff, 2); in ixheaacd_get_ld_sbr_header()
442 sbr_header_data->limiter_gains = ixheaacd_read_bits_buf(it_bit_buff, 2); in ixheaacd_get_ld_sbr_header()
443 sbr_header_data->interpol_freq = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_get_ld_sbr_header()
444 sbr_header_data->smoothing_mode = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_get_ld_sbr_header()
455 WORD32 ixheaacd_eld_sbr_header(ia_bit_buf_struct *it_bit_buff, WORD32 channels, in ixheaacd_eld_sbr_header() argument
479 bit_cnt = ixheaacd_get_ld_sbr_header(it_bit_buff, pstr_sbr_config); in ixheaacd_eld_sbr_header()
487 struct ia_bit_buf_struct *it_bit_buff) { in ixheaacd_ga_hdr_dec() argument
489 WORD32 cnt_bits = it_bit_buff->cnt_bits; in ixheaacd_ga_hdr_dec()
502 it_bit_buff->bit_pos; in ixheaacd_ga_hdr_dec()
504 aac_state_struct->audio_object_type = ixheaacd_read_bits_buf(it_bit_buff, 5); in ixheaacd_ga_hdr_dec()
507 tmp = ixheaacd_read_bits_buf(it_bit_buff, 6); in ixheaacd_ga_hdr_dec()
513 tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info, in ixheaacd_ga_hdr_dec()
524 aac_state_struct->ch_config = ixheaacd_read_bits_buf(it_bit_buff, 4); in ixheaacd_ga_hdr_dec()
531 tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info, in ixheaacd_ga_hdr_dec()
541 ixheaacd_read_bits_buf(it_bit_buff, 5); in ixheaacd_ga_hdr_dec()
556 aac_state_struct->frame_len_flag = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
559 ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
560 aac_state_struct->extension_flag = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
565 &aac_state_struct->p_config->str_prog_config, it_bit_buff); in ixheaacd_ga_hdr_dec()
583 ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
585 ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
587 ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
590 ixheaacd_read_bits_buf(it_bit_buff, 2); in ixheaacd_ga_hdr_dec()
593 ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
611 err = ixheaacd_config(it_bit_buff, in ixheaacd_ga_hdr_dec()
644 dummy = ixheaacd_skip_bits_buf(it_bit_buff, it_bit_buff->cnt_bits); in ixheaacd_ga_hdr_dec()
646 if ((SIZE_T)it_bit_buff->ptr_read_next == in ixheaacd_ga_hdr_dec()
647 (SIZE_T)it_bit_buff->ptr_bit_buf_base) { in ixheaacd_ga_hdr_dec()
648 *bytes_consumed = ((WORD32)it_bit_buff->size) >> 3; in ixheaacd_ga_hdr_dec()
650 *bytes_consumed = (((((SIZE_T)it_bit_buff->ptr_read_next - in ixheaacd_ga_hdr_dec()
651 (SIZE_T)it_bit_buff->ptr_bit_buf_base)) in ixheaacd_ga_hdr_dec()
653 7 - it_bit_buff->bit_pos + 7) >> in ixheaacd_ga_hdr_dec()
669 aac_state_struct->extension_flag_3 = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
678 ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
680 ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
682 ixheaacd_eld_sbr_header(it_bit_buff, aac_state_struct->ch_config, in ixheaacd_ga_hdr_dec()
689 ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
692 int ep_config = ixheaacd_read_bits_buf(it_bit_buff, 2); in ixheaacd_ga_hdr_dec()
696 int direct_map = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
702 tmp = (header_len * 8) - it_bit_buff->cnt_bits; in ixheaacd_ga_hdr_dec()
705 (it_bit_buff->cnt_bits >= 16)) { in ixheaacd_ga_hdr_dec()
706 tmp = ixheaacd_read_bits_buf(it_bit_buff, 11); in ixheaacd_ga_hdr_dec()
709 tmp = ixheaacd_read_bits_buf(it_bit_buff, 5); in ixheaacd_ga_hdr_dec()
712 WORD32 sbr_present_flag = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
714 tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info, in ixheaacd_ga_hdr_dec()
722 if (it_bit_buff->cnt_bits >= 12) { in ixheaacd_ga_hdr_dec()
723 tmp = ixheaacd_read_bits_buf(it_bit_buff, 11); in ixheaacd_ga_hdr_dec()
725 tmp = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_ga_hdr_dec()
731 ixheaacd_read_bidirection(it_bit_buff, -11); in ixheaacd_ga_hdr_dec()
746 *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) >> 3; in ixheaacd_ga_hdr_dec()
747 if (it_bit_buff->bit_pos < 7) *bytes_consumed += 1; in ixheaacd_ga_hdr_dec()
757 struct ia_bit_buf_struct *it_bit_buff, in ixheaacd_check_if_adts() argument
761 result = ixheaacd_adtsframe(adts, it_bit_buff); in ixheaacd_check_if_adts()
777 struct ia_bit_buf_struct *it_bit_buff, WORD32 *bytes_consumed, in ixheaacd_latm_header_decode() argument
785 WORD32 cnt_bits = it_bit_buff->cnt_bits; in ixheaacd_latm_header_decode()
793 sync = ixheaacd_read_bits_buf(it_bit_buff, 11); in ixheaacd_latm_header_decode()
796 sync = ((sync & 0x3ff) << 1) | ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_latm_header_decode()
798 if (it_bit_buff->cnt_bits < 13) { in ixheaacd_latm_header_decode()
799 ixheaacd_read_bidirection(it_bit_buff, -11); in ixheaacd_latm_header_decode()
800 *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8; in ixheaacd_latm_header_decode()
805 audio_mux_len_bytes_last = ixheaacd_read_bits_buf(it_bit_buff, 13); in ixheaacd_latm_header_decode()
808 if (it_bit_buff->cnt_bits >= (audio_mux_len_bits_last + 11)) { in ixheaacd_latm_header_decode()
809 ixheaacd_read_bidirection(it_bit_buff, audio_mux_len_bits_last); in ixheaacd_latm_header_decode()
812 next_sync = ixheaacd_read_bits_buf(it_bit_buff, 11); in ixheaacd_latm_header_decode()
816 ixheaacd_read_bidirection(it_bit_buff, in ixheaacd_latm_header_decode()
821 ixheaacd_read_bidirection(it_bit_buff, in ixheaacd_latm_header_decode()
827 ixheaacd_read_bidirection(it_bit_buff, -(13 + 11)); in ixheaacd_latm_header_decode()
829 *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8; in ixheaacd_latm_header_decode()
838 sync = ixheaacd_read_bits_buf(it_bit_buff, 11); in ixheaacd_latm_header_decode()
842 ixheaacd_read_bidirection(it_bit_buff, -25); in ixheaacd_latm_header_decode()
844 *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8; in ixheaacd_latm_header_decode()
848 audio_mux_len_bytes_last = ixheaacd_read_bits_buf(it_bit_buff, 13); in ixheaacd_latm_header_decode()
851 use_same_stream_mux = ixheaacd_read_bits_buf(it_bit_buff, 1); in ixheaacd_latm_header_decode()
854 if (it_bit_buff->cnt_bits - (audio_mux_len_bytes_last * 8 - 1 + 11) < 0) { in ixheaacd_latm_header_decode()
855 ixheaacd_read_bidirection(it_bit_buff, -25); in ixheaacd_latm_header_decode()
858 *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8; in ixheaacd_latm_header_decode()
863 ixheaacd_read_bidirection(it_bit_buff, -25); in ixheaacd_latm_header_decode()
870 ixheaacd_read_bidirection(it_bit_buff, audio_mux_len_bytes_last * 8 - 1); in ixheaacd_latm_header_decode()
875 *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8; in ixheaacd_latm_header_decode()
881 sync = ixheaacd_read_bits_buf(it_bit_buff, 11); in ixheaacd_latm_header_decode()
884 it_bit_buff, &latm_struct_element, aac_state_struct, in ixheaacd_latm_header_decode()
903 struct ia_bit_buf_struct it_bit_buff = {0}, *handle_bit_buff; in ixheaacd_aac_headerdecode() local
929 handle_bit_buff = ixheaacd_create_bit_buf(&it_bit_buff, (UWORD8 *)buffer, in ixheaacd_aac_headerdecode()
938 return ixheaacd_latm_header_decode(aac_state_struct, &it_bit_buff, in ixheaacd_aac_headerdecode()
956 &it_bit_buff, (UWORD8 *)buffer, (WORD16)(header_len - bytes_taken)); in ixheaacd_aac_headerdecode()
988 else if ((sync = ixheaacd_read_bits_buf(&it_bit_buff, 12)) == 0xfff) { in ixheaacd_aac_headerdecode()
999 &it_bit_buff, (UWORD8 *)(buffer + adts.aac_frame_length), in ixheaacd_aac_headerdecode()
1034 ixheaacd_read_bidirection(&it_bit_buff, -12); in ixheaacd_aac_headerdecode()
1036 ixheaacd_latm_header_decode(aac_state_struct, &it_bit_buff, in ixheaacd_aac_headerdecode()
1065 ixheaacd_read_bidirection(&it_bit_buff, -12); in ixheaacd_aac_headerdecode()