• Home
  • Raw
  • Download

Lines Matching +full:ts +full:- +full:node

9  * http://www.apache.org/licenses/LICENSE-2.0
96 self->num_parameter_sets = 1; in ixheaacd_mps_create()
97 self->qmf_band_count = 64; in ixheaacd_mps_create()
99 self->res_ch_count = 0; in ixheaacd_mps_create()
102 self->config = mps212_config; in ixheaacd_mps_create()
103 self->frame_length = bs_frame_len; in ixheaacd_mps_create()
104 self->in_ch_count = 1; in ixheaacd_mps_create()
105 self->out_ch_count = 2; in ixheaacd_mps_create()
106 self->residual_coding = residual_coding; in ixheaacd_mps_create()
107 if (self->residual_coding) { in ixheaacd_mps_create()
108 self->bs_residual_present = 1; in ixheaacd_mps_create()
109 self->bs_residual_bands = mps212_config->bs_residual_bands; in ixheaacd_mps_create()
110 if (self->config->bs_phase_coding) { in ixheaacd_mps_create()
111 self->config->bs_phase_coding = 2; in ixheaacd_mps_create()
119 self->mps_init_done = 0; in ixheaacd_mps_create()
123 if ((self->residual_coding) && (self->res_bands > 0)) self->res_ch_count++; in ixheaacd_mps_create()
127 self->resolution = self->qmf_band_count; in ixheaacd_mps_create()
129 for (num_ch = 0; num_ch < self->out_ch_count; num_ch++) { in ixheaacd_mps_create()
130 ixheaacd_mps_synt_init(self->qmf_filt_state[num_ch]); in ixheaacd_mps_create()
133 ixheaacd_mps_qmf_hybrid_analysis_init(&self->hyb_filt_state[0]); in ixheaacd_mps_create()
135 if ((self->residual_coding) && (self->res_bands > 0)) in ixheaacd_mps_create()
136 ixheaacd_mps_qmf_hybrid_analysis_init(&self->hyb_filt_state[1]); in ixheaacd_mps_create()
138 err_code = ixheaacd_mps_decor_init(&(self->mps_decor), self->hyb_band_count_max, in ixheaacd_mps_create()
139 self->config->bs_decorr_config, in ixheaacd_mps_create()
140 self->object_type); in ixheaacd_mps_create()
143 self->mps_init_done = 0; in ixheaacd_mps_create()
149 self->parse_nxt_frame = 1; in ixheaacd_mps_create()
151 bs_frame = self->bs_frame; in ixheaacd_mps_create()
157 self->subband_var.init_flag = 0; in ixheaacd_mps_create()
158 self->subband_var.update_old_ener = 0; in ixheaacd_mps_create()
159 self->subband_var.nrg_dir = 0; in ixheaacd_mps_create()
160 memset(self->subband_var.nrg_diff, 0, 2 * sizeof(FLOAT32)); in ixheaacd_mps_create()
162 memset(self->opd_smooth.smooth_l_phase, 0, in ixheaacd_mps_create()
164 memset(self->opd_smooth.smooth_r_phase, 0, in ixheaacd_mps_create()
166 self->mps_init_done = 1; in ixheaacd_mps_create()
172 1.0f, 0.707106781186548f, 0.0f, -0.707106781186548f,
173 -1.0f, -0.707106781186548f, 0.0f, 0.707106781186548f};
177 0.0f, -0.707106781186548f, -1.0f, -0.707106781186548f};
180 if (self->object_type == AOT_ER_AAC_ELD || in ixheaacd_mps_qmf_hyb_analysis()
181 self->object_type == AOT_ER_AAC_LD) { in ixheaacd_mps_qmf_hyb_analysis()
184 for (n = 0; n < self->time_slots; n++) { in ixheaacd_mps_qmf_hyb_analysis()
185 for (k = 0; k < self->qmf_band_count; k++) { in ixheaacd_mps_qmf_hyb_analysis()
186 self->hyb_in[0][k][n].re = self->qmf_in[0][n][k].re; in ixheaacd_mps_qmf_hyb_analysis()
187 self->hyb_in[0][k][n].im = self->qmf_in[0][n][k].im; in ixheaacd_mps_qmf_hyb_analysis()
191 ixheaacd_mps_qmf_hybrid_analysis(&self->hyb_filt_state[0], self->qmf_in[0], in ixheaacd_mps_qmf_hyb_analysis()
192 self->qmf_band_count, self->time_slots, in ixheaacd_mps_qmf_hyb_analysis()
193 self->hyb_in[0]); in ixheaacd_mps_qmf_hyb_analysis()
196 if ((self->residual_coding) && (self->res_bands > 0)) { in ixheaacd_mps_qmf_hyb_analysis()
197 ixheaacd_mps_qmf_hybrid_analysis(&self->hyb_filt_state[self->in_ch_count], in ixheaacd_mps_qmf_hyb_analysis()
198 self->qmf_in[1], self->band_count[1], in ixheaacd_mps_qmf_hyb_analysis()
199 self->time_slots, self->hyb_res); in ixheaacd_mps_qmf_hyb_analysis()
206 if (self->object_type == AOT_ER_AAC_ELD || in ixheaacd_mps_qmf_hyb_synthesis()
207 self->object_type == AOT_ER_AAC_LD) { in ixheaacd_mps_qmf_hyb_synthesis()
209 for (ch = 0; ch < self->out_ch_count; ch++) { in ixheaacd_mps_qmf_hyb_synthesis()
210 for (n = 0; n < self->time_slots; n++) { in ixheaacd_mps_qmf_hyb_synthesis()
211 for (k = 0; k < self->qmf_band_count; k++) { in ixheaacd_mps_qmf_hyb_synthesis()
212 self->qmf_out_dir[ch][n][k].re = self->hyb_dir_out[ch][n][k].re; in ixheaacd_mps_qmf_hyb_synthesis()
213 self->qmf_out_dir[ch][n][k].im = self->hyb_dir_out[ch][n][k].im; in ixheaacd_mps_qmf_hyb_synthesis()
218 for (ch = 0; ch < self->out_ch_count; ch++) { in ixheaacd_mps_qmf_hyb_synthesis()
219 ixheaacd_mps_qmf_hybrid_synthesis(self->hyb_dir_out[ch], in ixheaacd_mps_qmf_hyb_synthesis()
220 self->qmf_band_count, self->time_slots, in ixheaacd_mps_qmf_hyb_synthesis()
221 self->qmf_out_dir[ch]); in ixheaacd_mps_qmf_hyb_synthesis()
234 scratch = self->scratch; in ixheaacd_mps_decor()
236 for (k = self->dir_sig_count; k < self->dir_sig_count + self->decor_sig_count; in ixheaacd_mps_decor()
238 if (self->bs_tsd_enable) { in ixheaacd_mps_decor()
239 for (sb_sample = 0; sb_sample < self->time_slots; sb_sample++) { in ixheaacd_mps_decor()
240 if (self->bs_tsd_sep_data[sb_sample]) { in ixheaacd_mps_decor()
241 for (idx = band_start; idx < self->mps_decor.num_bins; idx++) { in ixheaacd_mps_decor()
242 scratch[sb_sample][idx].re = self->v[k][sb_sample][idx].re; in ixheaacd_mps_decor()
243 scratch[sb_sample][idx].im = self->v[k][sb_sample][idx].im; in ixheaacd_mps_decor()
244 self->v[k][sb_sample][idx].re = 0.0f; in ixheaacd_mps_decor()
245 self->v[k][sb_sample][idx].im = 0.0f; in ixheaacd_mps_decor()
251 ixheaacd_mps_decor_apply(&self->mps_decor, self->v[k], self->w_diff[k], in ixheaacd_mps_decor()
252 self->time_slots, NO_RES_BANDS, in ixheaacd_mps_decor()
253 self->ldmps_config.ldmps_present_flag); in ixheaacd_mps_decor()
255 if (self->bs_tsd_enable) { in ixheaacd_mps_decor()
256 for (sb_sample = 0; sb_sample < self->time_slots; sb_sample++) { in ixheaacd_mps_decor()
257 if (self->bs_tsd_sep_data[sb_sample]) { in ixheaacd_mps_decor()
258 coeff.re = ixheaacd_tsd_mul_re[self->bs_tsd_tr_phase_data[sb_sample]]; in ixheaacd_mps_decor()
259 coeff.im = ixheaacd_tsd_mul_im[self->bs_tsd_tr_phase_data[sb_sample]]; in ixheaacd_mps_decor()
261 for (idx = band_start; idx < self->mps_decor.num_bins; idx++) { in ixheaacd_mps_decor()
262 self->w_diff[k][sb_sample][idx].re += in ixheaacd_mps_decor()
263 coeff.re * scratch[sb_sample][idx].re - in ixheaacd_mps_decor()
265 self->w_diff[k][sb_sample][idx].im += in ixheaacd_mps_decor()
276 WORD32 ts, qs, row, indx; in ixheaacd_mps_mix_res_decor() local
278 for (ts = 0; ts < self->time_slots; ts++) { in ixheaacd_mps_mix_res_decor()
279 for (qs = 0; qs < self->hyb_band_count_max; qs++) { in ixheaacd_mps_mix_res_decor()
280 indx = self->hyb_band_to_processing_band_table[qs]; in ixheaacd_mps_mix_res_decor()
282 for (row = 0; row < self->dir_sig_count; row++) { in ixheaacd_mps_mix_res_decor()
283 self->w_dir[row][ts][qs].re = self->v[row][ts][qs].re; in ixheaacd_mps_mix_res_decor()
284 self->w_dir[row][ts][qs].im = self->v[row][ts][qs].im; in ixheaacd_mps_mix_res_decor()
287 for (row = self->dir_sig_count; in ixheaacd_mps_mix_res_decor()
288 row < (self->dir_sig_count + self->decor_sig_count); row++) { in ixheaacd_mps_mix_res_decor()
289 if (indx < self->res_bands) { in ixheaacd_mps_mix_res_decor()
290 self->w_dir[row][ts][qs].re = self->hyb_res[qs][ts].re; in ixheaacd_mps_mix_res_decor()
291 self->w_dir[row][ts][qs].im = self->hyb_res[qs][ts].im; in ixheaacd_mps_mix_res_decor()
293 self->w_dir[row][ts][qs].re = 0.0f; in ixheaacd_mps_mix_res_decor()
294 self->w_dir[row][ts][qs].im = 0.0f; in ixheaacd_mps_mix_res_decor()
298 for (row = 0; row < self->dir_sig_count; row++) { in ixheaacd_mps_mix_res_decor()
299 self->w_diff[row][ts][qs].re = 0.0f; in ixheaacd_mps_mix_res_decor()
300 self->w_diff[row][ts][qs].im = 0.0f; in ixheaacd_mps_mix_res_decor()
303 for (row = self->dir_sig_count; in ixheaacd_mps_mix_res_decor()
304 row < (self->dir_sig_count + self->decor_sig_count); row++) { in ixheaacd_mps_mix_res_decor()
305 if (indx < self->res_bands) { in ixheaacd_mps_mix_res_decor()
306 self->w_diff[row][ts][qs].re = 0.0f; in ixheaacd_mps_mix_res_decor()
307 self->w_diff[row][ts][qs].im = 0.0f; in ixheaacd_mps_mix_res_decor()
315 WORD32 ts, qs, indx; in ixheaacd_mps_mix_res_decor_residual_band() local
316 for (qs = 0; qs < self->hyb_band_count_max; qs++) { in ixheaacd_mps_mix_res_decor_residual_band()
317 indx = self->hyb_band_to_processing_band_table[qs]; in ixheaacd_mps_mix_res_decor_residual_band()
318 if (indx >= self->res_bands) { in ixheaacd_mps_mix_res_decor_residual_band()
319 if (qs < self->hyb_band_count[1]) { in ixheaacd_mps_mix_res_decor_residual_band()
320 for (ts = 0; ts < self->time_slots; ts++) { in ixheaacd_mps_mix_res_decor_residual_band()
321 self->w_dir[1][ts][qs].re = 0.0f; in ixheaacd_mps_mix_res_decor_residual_band()
322 self->w_dir[1][ts][qs].im = 0.0f; in ixheaacd_mps_mix_res_decor_residual_band()
326 for (ts = 0; ts < self->time_slots; ts++) { in ixheaacd_mps_mix_res_decor_residual_band()
327 self->w_diff[1][ts][qs].re = 0.0f; in ixheaacd_mps_mix_res_decor_residual_band()
328 self->w_diff[1][ts][qs].im = 0.0f; in ixheaacd_mps_mix_res_decor_residual_band()
341 &self->hyb_filt_state[0], self->qmf_in[0], self->band_count[0], in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
342 self->time_slots, self->w_dir[0]); in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
344 if (self->res_bands) { in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
346 &self->hyb_filt_state[1], self->qmf_in[1], self->band_count[1], in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
347 self->time_slots, self->w_dir[1]); in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
349 if (self->res_bands != 28) { in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
350 ixheaacd_mps_decor_apply(&self->mps_decor, self->w_dir[0], in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
351 self->w_diff[1], self->time_slots, in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
352 self->res_bands, in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
353 self->ldmps_config.ldmps_present_flag); in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
358 ixheaacd_mps_decor_apply(&self->mps_decor, self->w_dir[0], self->w_diff[1], in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
359 self->time_slots, NO_RES_BANDS, in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
360 self->ldmps_config.ldmps_present_flag); in ixheaacd_mps_qmf_hyb_analysis_no_pre_mix()
367 WORD32 ch, ts, qs; in ixheaacd_mps_apply() local
368 WORD32 time_slots = self->time_slots; in ixheaacd_mps_apply()
369 WORD32 in_ch_count = self->in_ch_count + self->res_ch_count; in ixheaacd_mps_apply()
371 self->hyb_band_count[0] = self->band_count[0] - QMF_BANDS_TO_HYBRID + 10; in ixheaacd_mps_apply()
372 self->hyb_band_count[1] = self->band_count[1] - QMF_BANDS_TO_HYBRID + 10; in ixheaacd_mps_apply()
373 self->hyb_band_count_max = in ixheaacd_mps_apply()
374 max(self->hyb_band_count[0], self->hyb_band_count[1]); in ixheaacd_mps_apply()
375 self->mps_decor.decor_nrg_smooth.num_bins = self->hyb_band_count_max; in ixheaacd_mps_apply()
376 self->mps_decor.num_bins = self->hyb_band_count_max; in ixheaacd_mps_apply()
377 self->output_buffer = output_buffer; in ixheaacd_mps_apply()
388 for (ts = 0; ts < time_slots; ts++) { in ixheaacd_mps_apply()
389 for (qs = 0; qs < self->band_count[ch]; qs++) { in ixheaacd_mps_apply()
390 self->qmf_in[ch][qs][ts].re = in ixheaacd_mps_apply()
391 self->input_gain * input_buffer[2 * ch][ts][qs]; in ixheaacd_mps_apply()
392 self->qmf_in[ch][qs][ts].im = in ixheaacd_mps_apply()
393 self->input_gain * input_buffer[2 * ch + 1][ts][qs]; in ixheaacd_mps_apply()
398 if (!(self->pre_mix_req | self->bs_tsd_enable)) { in ixheaacd_mps_apply()
408 if ((!(self->res_bands | self->pre_mix_req)) && in ixheaacd_mps_apply()
409 (self->config->bs_phase_coding == 0)) { in ixheaacd_mps_apply()
412 } else if (self->pre_mix_req) { in ixheaacd_mps_apply()
419 if (self->config->bs_temp_shape_config == 2) { in ixheaacd_mps_apply()
426 self->parse_nxt_frame = 1; in ixheaacd_mps_apply()
427 self->pre_mix_req = 0; in ixheaacd_mps_apply()
484 grp_len = min(max_grp_len, num_val - i); in ixheaacd_mps_pcm_decode()
490 idx = i + (grp_len - j - 1); in ixheaacd_mps_pcm_decode()
494 out_data_1[idx] = next_val - ixheaacd_drc_offset; in ixheaacd_mps_pcm_decode()
496 out_data_2[idx] = next_val - ixheaacd_drc_offset; in ixheaacd_mps_pcm_decode()
499 out_data_2[idx / 2] = next_val - ixheaacd_drc_offset; in ixheaacd_mps_pcm_decode()
501 out_data_1[idx / 2] = next_val - ixheaacd_drc_offset; in ixheaacd_mps_pcm_decode()
505 grp_val = (grp_val - next_val) / num_levels; in ixheaacd_mps_pcm_decode()
515 WORD32 node = 0; in ixheaacd_mps_huff_read() local
520 node = (*node_tab)[node][next_bit]; in ixheaacd_mps_huff_read()
521 } while (node > 0); in ixheaacd_mps_huff_read()
523 *out_data = node; in ixheaacd_mps_huff_read()
534 WORD32 node = 0; in ixheaacd_mps_huff_read_2d() local
536 ixheaacd_mps_huff_read(it_bit_buff, node_tab, &node); in ixheaacd_mps_huff_read_2d()
537 *escape = (node == 0); in ixheaacd_mps_huff_read_2d()
543 huff_2d_8bit = -(node + 1); in ixheaacd_mps_huff_read_2d()
557 WORD32 diff_val = data[0] - data[1]; in ixheaacd_mps_sym_restore()
560 data[0] = -sum_val + (2 * lav + 1); in ixheaacd_mps_sym_restore()
561 data[1] = -diff_val; in ixheaacd_mps_sym_restore()
570 data[0] = -data[0]; in ixheaacd_mps_sym_restore()
571 data[1] = -data[1]; in ixheaacd_mps_sym_restore()
575 if (data[0] - data[1] != 0) { in ixheaacd_mps_sym_restore()
593 WORD32 diff_val = data[0] - data[1]; in ixheaacd_mps_sym_restoreipd()
596 data[0] = -sum_val + (2 * lav + 1); in ixheaacd_mps_sym_restoreipd()
597 data[1] = -diff_val; in ixheaacd_mps_sym_restoreipd()
603 if (data[0] - data[1] != 0) { in ixheaacd_mps_sym_restoreipd()
618 WORD32 node = 0; in ixheaacd_mps_huff_dec_pilot() local
620 ixheaacd_mps_huff_read(it_bit_buff, node_tab, &node); in ixheaacd_mps_huff_dec_pilot()
621 *pilot_data = -(node + 1); in ixheaacd_mps_huff_dec_pilot()
630 WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0; in ixheaacd_mps_huff_dec_cld_1d() local
637 &node); in ixheaacd_mps_huff_dec_cld_1d()
638 out_data[0] = -(node + 1); in ixheaacd_mps_huff_dec_cld_1d()
644 (ia_huff_node_struct)&huff_nodes->node_tab, &node); in ixheaacd_mps_huff_dec_cld_1d()
645 od = -(node + 1); in ixheaacd_mps_huff_dec_cld_1d()
651 if (od_sign) od = -od; in ixheaacd_mps_huff_dec_cld_1d()
664 WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0; in ixheaacd_mps_huff_dec_ipd_1d() local
670 &node); in ixheaacd_mps_huff_dec_ipd_1d()
671 out_data[0] = -(node + 1); in ixheaacd_mps_huff_dec_ipd_1d()
677 (ia_huff_node_struct)&huff_nodes->node_tab, &node); in ixheaacd_mps_huff_dec_ipd_1d()
678 od = -(node + 1); in ixheaacd_mps_huff_dec_ipd_1d()
689 WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0; in ixheaacd_mps_huff_dec_icc_1d() local
696 &node); in ixheaacd_mps_huff_dec_icc_1d()
697 out_data[0] = -(node + 1); in ixheaacd_mps_huff_dec_icc_1d()
703 (ia_huff_node_struct)&huff_nodes->node_tab, &node); in ixheaacd_mps_huff_dec_icc_1d()
704 od = -(node + 1); in ixheaacd_mps_huff_dec_icc_1d()
710 if (od_sign) od = -od; in ixheaacd_mps_huff_dec_icc_1d()
722 WORD32 i = 0, node = 0, offset = 0; in ia_mps_dec_huff_dec_cpc_1d() local
729 &node); in ia_mps_dec_huff_dec_cpc_1d()
730 out_data[0] = -(node + 1); in ia_mps_dec_huff_dec_cpc_1d()
736 (ia_huff_node_struct)&huff_nodes->node_tab, &node); in ia_mps_dec_huff_dec_cpc_1d()
737 od = -(node + 1); in ia_mps_dec_huff_dec_cpc_1d()
743 if (od_sign) od = -od; in ia_mps_dec_huff_dec_cpc_1d()
755 WORD32 node = 0; in ixheaacd_mps_huff_dec_cld_2d() local
763 &node); in ixheaacd_mps_huff_dec_cld_2d()
764 data = -(node + 1); in ixheaacd_mps_huff_dec_cld_2d()
771 &node); in ixheaacd_mps_huff_dec_cld_2d()
772 *p0_data[0] = -(node + 1); in ixheaacd_mps_huff_dec_cld_2d()
777 &node); in ixheaacd_mps_huff_dec_cld_2d()
778 *p0_data[1] = -(node + 1); in ixheaacd_mps_huff_dec_cld_2d()
785 (ia_huff_node_struct)&huff_nodes->lav3, in ixheaacd_mps_huff_dec_cld_2d()
790 (ia_huff_node_struct)&huff_nodes->lav5, in ixheaacd_mps_huff_dec_cld_2d()
795 (ia_huff_node_struct)&huff_nodes->lav7, in ixheaacd_mps_huff_dec_cld_2d()
800 (ia_huff_node_struct)&huff_nodes->lav9, in ixheaacd_mps_huff_dec_cld_2d()
819 out_data[esc_idx[i]][0] = esc_data[0][i] - lav; in ixheaacd_mps_huff_dec_cld_2d()
820 out_data[esc_idx[i]][1] = esc_data[1][i] - lav; in ixheaacd_mps_huff_dec_cld_2d()
832 WORD32 node = 0; in ixheaacd_mps_huff_dec_icc_2d() local
840 &node); in ixheaacd_mps_huff_dec_icc_2d()
841 data = -(node + 1); in ixheaacd_mps_huff_dec_icc_2d()
848 &node); in ixheaacd_mps_huff_dec_icc_2d()
849 *p0_data[0] = -(node + 1); in ixheaacd_mps_huff_dec_icc_2d()
854 &node); in ixheaacd_mps_huff_dec_icc_2d()
855 *p0_data[1] = -(node + 1); in ixheaacd_mps_huff_dec_icc_2d()
862 (ia_huff_node_struct)&huff_nodes->lav1, in ixheaacd_mps_huff_dec_icc_2d()
867 (ia_huff_node_struct)&huff_nodes->lav3, in ixheaacd_mps_huff_dec_icc_2d()
872 (ia_huff_node_struct)&huff_nodes->lav5, in ixheaacd_mps_huff_dec_icc_2d()
877 (ia_huff_node_struct)&huff_nodes->lav7, in ixheaacd_mps_huff_dec_icc_2d()
894 out_data[esc_idx[i]][0] = esc_data[0][i] - lav; in ixheaacd_mps_huff_dec_icc_2d()
895 out_data[esc_idx[i]][1] = esc_data[1][i] - lav; in ixheaacd_mps_huff_dec_icc_2d()
907 WORD32 node = 0; in ixheaacd_mps_huff_dec_ipd_2d() local
915 &node); in ixheaacd_mps_huff_dec_ipd_2d()
917 data = -(node + 1); in ixheaacd_mps_huff_dec_ipd_2d()
921 data--; in ixheaacd_mps_huff_dec_ipd_2d()
928 &node); in ixheaacd_mps_huff_dec_ipd_2d()
929 *p0_data[0] = -(node + 1); in ixheaacd_mps_huff_dec_ipd_2d()
934 &node); in ixheaacd_mps_huff_dec_ipd_2d()
935 *p0_data[1] = -(node + 1); in ixheaacd_mps_huff_dec_ipd_2d()
942 (ia_huff_node_struct)&huff_nodes->lav1, in ixheaacd_mps_huff_dec_ipd_2d()
947 (ia_huff_node_struct)&huff_nodes->lav3, in ixheaacd_mps_huff_dec_ipd_2d()
952 (ia_huff_node_struct)&huff_nodes->lav5, in ixheaacd_mps_huff_dec_ipd_2d()
957 (ia_huff_node_struct)&huff_nodes->lav7, in ixheaacd_mps_huff_dec_ipd_2d()
974 out_data[esc_idx[i]][0] = esc_data[0][i] - lav; in ixheaacd_mps_huff_dec_ipd_2d()
975 out_data[esc_idx[i]][1] = esc_data[1][i] - lav; in ixheaacd_mps_huff_dec_ipd_2d()
987 WORD32 node = 0; in ia_mps_dec_huff_dec_cpc_2d() local
995 &node); in ia_mps_dec_huff_dec_cpc_2d()
996 data = -(node + 1); in ia_mps_dec_huff_dec_cpc_2d()
1003 &node); in ia_mps_dec_huff_dec_cpc_2d()
1004 *p0_data[0] = -(node + 1); in ia_mps_dec_huff_dec_cpc_2d()
1009 &node); in ia_mps_dec_huff_dec_cpc_2d()
1010 *p0_data[1] = -(node + 1); in ia_mps_dec_huff_dec_cpc_2d()
1017 (ia_huff_node_struct)&huff_nodes->lav3, in ia_mps_dec_huff_dec_cpc_2d()
1022 (ia_huff_node_struct)&huff_nodes->lav6, in ia_mps_dec_huff_dec_cpc_2d()
1027 (ia_huff_node_struct)&huff_nodes->lav9, in ia_mps_dec_huff_dec_cpc_2d()
1032 (ia_huff_node_struct)&huff_nodes->lav12, in ia_mps_dec_huff_dec_cpc_2d()
1051 out_data[esc_idx[i]][0] = esc_data[0][i] - lav; in ia_mps_dec_huff_dec_cpc_2d()
1052 out_data[esc_idx[i]][1] = esc_data[1][i] - lav; in ia_mps_dec_huff_dec_cpc_2d()
1215 num_val_1_int -= 1; in ixheaacd_huff_decode()
1219 if (df_rest_flag_1) num_val_1_int -= 1; in ixheaacd_huff_decode()
1226 num_val_2_int -= 1; in ixheaacd_huff_decode()
1230 if (df_rest_flag_2) num_val_2_int -= 1; in ixheaacd_huff_decode()
1336 for (i = 0; i < num_val_1_int - 1; i += 2) { in ixheaacd_huff_decode()
1342 for (i = 0; i < num_val_2_int - 1; i += 2) { in ixheaacd_huff_decode()
1360 num_val_1_int -= 1; in ixheaacd_huff_decode()
1430 out_data[i] = out_data[i - 1] + diff_data[i]; in ixheaacd_diff_freq_decode()
1461 out_data[i] = prev_data[i] - diff_data[i]; in ixheaacd_mps_diff_time_dec_fwd()
1465 out_data[i] = prev_data[i] - diff_data[i]; in ixheaacd_mps_diff_time_dec_fwd()
1484 out_data[i] = ((msb << num_lsb) | lsb) - ixheaacd_drc_offset; in ixheaacd_attach_lsb()
1486 out_data[i] = msb - ixheaacd_drc_offset; in ixheaacd_attach_lsb()
1630 return -1; in ixheaacd_mps_ecdatapairdec()
1632 longjmp(*(it_bit_buff->xaac_jmp_buf), IA_FATAL_ERROR); in ixheaacd_mps_ecdatapairdec()
1741 WORD32 num_output_channels_at = pstr_mps_state->num_output_channels_at; in ixheaacd_update_out_buffer()
1742 WORD32 frame_length = pstr_mps_state->frame_length; in ixheaacd_update_out_buffer()
1744 WORD32 *p_time_out = pstr_mps_state->array_struct->time_out; in ixheaacd_update_out_buffer()
1759 WORD32 up_mix_type = pstr_mps_state->up_mix_type; in ixheaacd_update_time_out_buffer()
1760 WORD32 tree_config = pstr_mps_state->tree_config; in ixheaacd_update_time_out_buffer()
1761 WORD32 lfe_gain = pstr_mps_state->lfe_gain; in ixheaacd_update_time_out_buffer()
1762 WORD32 surround_gain = pstr_mps_state->surround_gain; in ixheaacd_update_time_out_buffer()
1764 if (!pstr_mps_state->bs_config.arbitrary_tree && up_mix_type != 2 && up_mix_type != 3) { in ixheaacd_update_time_out_buffer()
1765 WORD32 frame_length = pstr_mps_state->frame_length; in ixheaacd_update_time_out_buffer()
1767 WORD32 *time_out_3 = pstr_mps_state->array_struct->time_out + QBXTSX3; in ixheaacd_update_time_out_buffer()
1798 WORD32 ch, ts, qs; in ixheaacd_apply_frame() local
1802 pstr_mps_state->mps_persistent_mem.qmf_input_delay_real; in ixheaacd_apply_frame()
1804 pstr_mps_state->mps_persistent_mem.qmf_input_delay_imag; in ixheaacd_apply_frame()
1805 WORD32 num_input_channels = pstr_mps_state->num_input_channels; in ixheaacd_apply_frame()
1806 WORD32 qmf_bands = pstr_mps_state->qmf_bands; in ixheaacd_apply_frame()
1807 WORD32 cur_time_slot = pstr_mps_state->cur_time_slot; in ixheaacd_apply_frame()
1808 WORD32 time_slots = pstr_mps_state->time_slots; in ixheaacd_apply_frame()
1809 WORD32 qmf_input_delay_index = pstr_mps_state->qmf_input_delay_index; in ixheaacd_apply_frame()
1810 WORD32 up_mix_type = pstr_mps_state->up_mix_type; in ixheaacd_apply_frame()
1811 WORD32 residual_coding = pstr_mps_state->residual_coding; in ixheaacd_apply_frame()
1812 WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix; in ixheaacd_apply_frame()
1822 if (pstr_mps_state->ec_flag) in ixheaacd_apply_frame()
1823 cur_time_slot = time_slots - in_time_slots; in ixheaacd_apply_frame()
1828 if (pstr_mps_state->ec_flag) in ixheaacd_apply_frame()
1829 time_slots = time_slots - (time_slots % HOP_SLOTS); in ixheaacd_apply_frame()
1834 pbuf_real = pstr_mps_state->array_struct->buf_real; in ixheaacd_apply_frame()
1835 pbuf_imag = pstr_mps_state->array_struct->buf_imag; in ixheaacd_apply_frame()
1845 for (ts = 0; ts < in_time_slots; ts++) { in ixheaacd_apply_frame()
1846 buf_real = pbuf_re + (cur_time_slot + ts); in ixheaacd_apply_frame()
1847 buf_imag = pbuf_im + (cur_time_slot + ts); in ixheaacd_apply_frame()
1871 qmf_input_delay_index = pstr_mps_state->qmf_input_delay_index; in ixheaacd_apply_frame()
1881 for (ts = 0; ts < in_time_slots; ts++) { in ixheaacd_apply_frame()
1919 pstr_mps_state->qmf_input_delay_index = qmf_input_delay_index; in ixheaacd_apply_frame()
1922 pstr_mps_state->cur_time_slot += in_time_slots; in ixheaacd_apply_frame()
1923 cur_time_slot = pstr_mps_state->cur_time_slot; in ixheaacd_apply_frame()
1925 if (pstr_mps_state->cur_time_slot < time_slots) { in ixheaacd_apply_frame()
1926 if (pstr_mps_state->ec_flag) { in ixheaacd_apply_frame()
1927 pstr_mps_state->cur_time_slot = time_slots; in ixheaacd_apply_frame()
1932 pstr_mps_state->cur_time_slot = 0; in ixheaacd_apply_frame()
1958 if (pstr_mps_state->temp_shape_config == 2) { in ixheaacd_apply_frame()
1970 if (pstr_mps_state->temp_shape_config == 2) { in ixheaacd_apply_frame()
1981 pstr_mps_state->parse_next_bitstream_frame = 1; in ixheaacd_apply_frame()
1990 &self->p_state_aac->heaac_mps_handle; in ixheaacd_heaac_mps_apply()
1995 WORD32 *p_qmf_real = pstr_mps_state->array_struct->m_qmf_real; in ixheaacd_heaac_mps_apply()
1996 WORD32 *p_qmf_imag = pstr_mps_state->array_struct->m_qmf_imag; in ixheaacd_heaac_mps_apply()
1999 if (self->p_state_aac->heaac_mps_handle.is_first == 1) { in ixheaacd_heaac_mps_apply()
2000 self->p_state_aac->heaac_mps_handle.is_first = 1; in ixheaacd_heaac_mps_apply()
2001 if (pstr_mps_state->bytes_remaining != 0) { in ixheaacd_heaac_mps_apply()
2002 buffer_size = mps_bytes + pstr_mps_state->bytes_remaining; in ixheaacd_heaac_mps_apply()
2004 pstr_mps_state->temp_buf[ii + pstr_mps_state->bytes_remaining] = in ixheaacd_heaac_mps_apply()
2008 pstr_mps_state->ptr_mps_bit_buff = ixheaacd_create_bit_buf( in ixheaacd_heaac_mps_apply()
2009 &pstr_mps_state->mps_bit_buf, (UWORD8 *)pstr_mps_state->temp_buf, in ixheaacd_heaac_mps_apply()
2011 pstr_mps_state->ptr_mps_bit_buff->xaac_jmp_buf = in ixheaacd_heaac_mps_apply()
2012 &self->p_state_aac->xaac_jmp_buf; in ixheaacd_heaac_mps_apply()
2014 pstr_mps_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size); in ixheaacd_heaac_mps_apply()
2016 memcpy(pstr_mps_state->temp_buf, mps_buffer, mps_bytes); in ixheaacd_heaac_mps_apply()
2018 pstr_mps_state->ptr_mps_bit_buff = ixheaacd_create_bit_buf( in ixheaacd_heaac_mps_apply()
2019 &pstr_mps_state->mps_bit_buf, (UWORD8 *)mps_buffer, buffer_size); in ixheaacd_heaac_mps_apply()
2020 pstr_mps_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size); in ixheaacd_heaac_mps_apply()
2022 pstr_mps_state->ptr_mps_bit_buff->xaac_jmp_buf = in ixheaacd_heaac_mps_apply()
2023 &self->p_state_aac->xaac_jmp_buf; in ixheaacd_heaac_mps_apply()
2027 if (curr_state->num_input_channels > 2 && pstr_mps_state->mps_with_sbr == 1) { in ixheaacd_heaac_mps_apply()
2028 if (pstr_mps_state->ec_flag) { in ixheaacd_heaac_mps_apply()
2029 curr_state->num_input_channels = 2; in ixheaacd_heaac_mps_apply()
2030 pstr_mps_state->frame_ok = 0; in ixheaacd_heaac_mps_apply()
2036 n_channels = curr_state->num_input_channels; in ixheaacd_heaac_mps_apply()
2037 n_time_slots = curr_state->time_slots; in ixheaacd_heaac_mps_apply()
2038 qmf_bands = curr_state->qmf_bands; in ixheaacd_heaac_mps_apply()
2040 if (pstr_mps_state->mps_decode == 1) { in ixheaacd_heaac_mps_apply()
2041 if (pstr_mps_state->mps_with_sbr) { in ixheaacd_heaac_mps_apply()
2044 if (self->aac_config.ui_enh_sbr) in ixheaacd_heaac_mps_apply()
2047 FLOAT32 *qmf_re = self->p_state_aac->str_sbr_dec_info[0] in ixheaacd_heaac_mps_apply()
2048 ->pstr_sbr_channel[channel]->str_sbr_dec.pp_qmf_buf_real[ii]; in ixheaacd_heaac_mps_apply()
2049 FLOAT32 *qmf_im = self->p_state_aac->str_sbr_dec_info[0] in ixheaacd_heaac_mps_apply()
2050 ->pstr_sbr_channel[channel]->str_sbr_dec.pp_qmf_buf_imag[ii]; in ixheaacd_heaac_mps_apply()
2054 curr_state->clip_protect_gain, (WORD32)(qmf_re[jj] * 1024)); in ixheaacd_heaac_mps_apply()
2056 curr_state->clip_protect_gain, (WORD32)(qmf_im[jj] * 1024)); in ixheaacd_heaac_mps_apply()
2063 WORD32 *qmf_re = self->p_state_aac->str_sbr_dec_info[0] in ixheaacd_heaac_mps_apply()
2064 ->pstr_sbr_channel[channel]->str_sbr_dec.p_arr_qmf_buf_real[ii]; in ixheaacd_heaac_mps_apply()
2065 WORD32 *qmf_im = self->p_state_aac->str_sbr_dec_info[0] in ixheaacd_heaac_mps_apply()
2066 ->pstr_sbr_channel[channel]->str_sbr_dec.p_arr_qmf_buf_imag[ii]; in ixheaacd_heaac_mps_apply()
2070 curr_state->clip_protect_gain, qmf_re[jj] * 256); in ixheaacd_heaac_mps_apply()
2072 curr_state->clip_protect_gain, qmf_im[jj] * 256); in ixheaacd_heaac_mps_apply()
2088 if (!pstr_mps_state->ec_flag && pstr_mps_state->frame_ok) { in ixheaacd_heaac_mps_apply()
2093 if (!pstr_mps_state->first_frame || !pstr_mps_state->ec_flag) { in ixheaacd_heaac_mps_apply()
2095 pstr_mps_state->array_struct->m_qmf_real, in ixheaacd_heaac_mps_apply()
2096 pstr_mps_state->array_struct->m_qmf_imag, output_buf); in ixheaacd_heaac_mps_apply()
2099 if (error_code == 0 && pstr_mps_state->ec_flag && pstr_mps_state->frame_ok) { in ixheaacd_heaac_mps_apply()
2102 pstr_mps_state->frame_ok = 0; in ixheaacd_heaac_mps_apply()
2106 pstr_mps_state->i_bytes_consumed_mps = in ixheaacd_heaac_mps_apply()
2107 (WORD32)(pstr_mps_state->ptr_mps_bit_buff->ptr_read_next - in ixheaacd_heaac_mps_apply()
2108 pstr_mps_state->ptr_mps_bit_buff->ptr_bit_buf_base); in ixheaacd_heaac_mps_apply()
2110 pstr_mps_state->bytes_remaining = in ixheaacd_heaac_mps_apply()
2111 buffer_size - pstr_mps_state->i_bytes_consumed_mps; in ixheaacd_heaac_mps_apply()
2112 if (pstr_mps_state->bytes_remaining < 0) in ixheaacd_heaac_mps_apply()
2114 if (pstr_mps_state->ec_flag) in ixheaacd_heaac_mps_apply()
2116 pstr_mps_state->bytes_remaining = 0; in ixheaacd_heaac_mps_apply()
2117 pstr_mps_state->frame_ok = 0; in ixheaacd_heaac_mps_apply()
2125 if (pstr_mps_state->bytes_remaining != 0) { in ixheaacd_heaac_mps_apply()
2126 for (WORD32 ii = 0; ii < pstr_mps_state->bytes_remaining; ii++) { in ixheaacd_heaac_mps_apply()
2127 pstr_mps_state->temp_buf[ii] = in ixheaacd_heaac_mps_apply()
2128 pstr_mps_state->temp_buf[ii + pstr_mps_state->i_bytes_consumed_mps]; in ixheaacd_heaac_mps_apply()
2132 self->p_state_aac->heaac_mps_handle.is_first = 1; in ixheaacd_heaac_mps_apply()
2133 self->p_state_aac->heaac_mps_handle.first_frame = 0; in ixheaacd_heaac_mps_apply()