Lines Matching defs:che
157 if (!ac->che[type][id]) {
158 if (!(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
160 ff_aac_sbr_ctx_init(ac, &ac->che[type][id]->sbr);
167 ac->output_element[(*channels)++] = &ac->che[type][id]->ch[0];
170 ac->output_element[(*channels)++] = &ac->che[type][id]->ch[1];
174 if (ac->che[type][id])
175 ff_aac_sbr_ctx_close(&ac->che[type][id]->sbr);
176 av_freep(&ac->che[type][id]);
189 ChannelElement *che = ac->che[type][id];
190 if (che) {
191 che->ch[0].ret = che->ch[0].ret_buf;
192 che->ch[1].ret = che->ch[1].ret_buf;
489 memcpy(ac->tag_che_map, ac->che, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0]));
510 ChannelElement *che = ac->che[type][i];
511 if (che) {
513 memset(che->ch[j].saved, 0, sizeof(che->ch[j].saved));
614 return ac->tag_che_map[TYPE_CPE][elem_id] = ac->che[TYPE_CPE][2];
625 return ac->tag_che_map[type][elem_id] = ac->che[TYPE_LFE][0];
630 return ac->tag_che_map[TYPE_CPE][elem_id] = ac->che[TYPE_CPE][1];
637 return ac->tag_che_map[TYPE_SCE][elem_id] = ac->che[TYPE_SCE][1];
644 return ac->tag_che_map[TYPE_CPE][elem_id] = ac->che[TYPE_CPE][0];
651 return ac->tag_che_map[TYPE_SCE][elem_id] = ac->che[TYPE_SCE][0];
2095 static int decode_cce(AACContext *ac, GetBitContext *gb, ChannelElement *che)
2101 SingleChannelElement *sce = &che->ch[0];
2102 ChannelCoupling *coup = &che->coup;
2267 ChannelElement *che, enum RawDataBlockType elem_type)
2275 if (!che) {
2296 res = ff_decode_sbr_extension(ac, &che->sbr, gb, crc_flag, cnt, elem_type);
2677 ChannelElement *cce = ac->che[TYPE_CCE][i];
2718 ChannelElement *che = ac->che[type][i];
2719 if (che) {
2721 apply_channel_coupling(ac, che, type, i, BEFORE_TNS, apply_dependent_coupling);
2723 if (che->ch[0].ics.predictor_present) {
2724 if (che->ch[0].ics.ltp.present)
2725 ac->apply_ltp(ac, &che->ch[0]);
2726 if (che->ch[1].ics.ltp.present && type == TYPE_CPE)
2727 ac->apply_ltp(ac, &che->ch[1]);
2730 if (che->ch[0].tns.present)
2731 ac->apply_tns(che->ch[0].coeffs, &che->ch[0].tns, &che->ch[0].ics, 1);
2732 if (che->ch[1].tns.present)
2733 ac->apply_tns(che->ch[1].coeffs, &che->ch[1].tns, &che->ch[1].ics, 1);
2735 apply_channel_coupling(ac, che, type, i, BETWEEN_TNS_AND_IMDCT, apply_dependent_coupling);
2736 if (type != TYPE_CCE || che->coup.coupling_point == AFTER_IMDCT) {
2737 imdct_and_window(ac, &che->ch[0]);
2739 ac->update_ltp(ac, &che->ch[0]);
2741 imdct_and_window(ac, &che->ch[1]);
2743 ac->update_ltp(ac, &che->ch[1]);
2746 ff_sbr_apply(ac, &che->sbr, type, che->ch[0].ret, che->ch[1].ret);
2750 apply_channel_coupling(ac, che, type, i, AFTER_IMDCT, apply_independent_coupling);
2821 ChannelElement *che;
2849 if (!(che=get_che(ac, elem_type, elem_id))) {
2859 err = decode_ics(ac, &che->ch[0], gb, 0, 0);
2862 err = decode_cpe(ac, gb, che);
2865 err = decode_ics(ac, &che->ch[0], gb, 0, 0);
2886 ChannelElement *che = NULL, *che_prev = NULL;
2919 if (!(che=get_che(ac, elem_type, elem_id))) {
2931 err = decode_ics(ac, &che->ch[0], gb, 0, 0);
2937 err = decode_cpe(ac, gb, che);
2942 err = decode_cce(ac, gb, che);
2946 err = decode_ics(ac, &che->ch[0], gb, 0, 0);
2993 che_prev = che;
3124 if (ac->che[type][i])
3125 ff_aac_sbr_ctx_close(&ac->che[type][i]->sbr);
3126 av_freep(&ac->che[type][i]);