Lines Matching refs:che
136 if (!ac->che[type][id]) {
137 if (!(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
139 AAC_RENAME(ff_aac_sbr_ctx_init)(ac, &ac->che[type][id]->sbr, type);
146 ac->output_element[(*channels)++] = &ac->che[type][id]->ch[0];
149 ac->output_element[(*channels)++] = &ac->che[type][id]->ch[1];
153 if (ac->che[type][id])
154 AAC_RENAME(ff_aac_sbr_ctx_close)(&ac->che[type][id]->sbr);
155 av_freep(&ac->che[type][id]);
168 ChannelElement *che = ac->che[type][id];
169 if (che) {
170 che->ch[0].ret = che->ch[0].ret_buf;
171 che->ch[1].ret = che->ch[1].ret_buf;
577 ac->tag_che_map[type][id] = ac->che[type][iid];
613 ChannelElement *che = ac->che[type][i];
614 if (che) {
616 memset(che->ch[j].saved, 0, sizeof(che->ch[j].saved));
724 return ac->tag_che_map[type][elem_id] = ac->che[type][elem_id];
730 return ac->tag_che_map[TYPE_CPE][elem_id] = ac->che[TYPE_CPE][2];
735 return ac->tag_che_map[TYPE_SCE][elem_id] = ac->che[TYPE_SCE][1];
752 return ac->tag_che_map[type][elem_id] = ac->che[TYPE_LFE][0];
757 return ac->tag_che_map[TYPE_CPE][elem_id] = ac->che[TYPE_CPE][1];
774 return ac->tag_che_map[type][elem_id] = ac->che[TYPE_SCE][1];
780 return ac->tag_che_map[TYPE_SCE][elem_id] = ac->che[TYPE_SCE][1];
787 return ac->tag_che_map[TYPE_CPE][elem_id] = ac->che[TYPE_CPE][0];
791 return ac->tag_che_map[TYPE_SCE][elem_id] = ac->che[TYPE_SCE][1];
796 return ac->tag_che_map[TYPE_SCE][elem_id] = ac->che[TYPE_SCE][0];
2358 static int decode_cce(AACContext *ac, GetBitContext *gb, ChannelElement *che)
2364 SingleChannelElement *sce = &che->ch[0];
2365 ChannelCoupling *coup = &che->coup;
2542 ChannelElement *che, enum RawDataBlockType elem_type)
2555 if (!che) {
2584 res = AAC_RENAME(ff_decode_sbr_extension)(ac, &che->sbr, gb, crc_flag, cnt, elem_type);
3008 ChannelElement *cce = ac->che[TYPE_CCE][i];
3052 ChannelElement *che = ac->che[type][i];
3053 if (che && che->present) {
3055 apply_channel_coupling(ac, che, type, i, BEFORE_TNS, AAC_RENAME(apply_dependent_coupling));
3057 if (che->ch[0].ics.predictor_present) {
3058 if (che->ch[0].ics.ltp.present)
3059 ac->apply_ltp(ac, &che->ch[0]);
3060 if (che->ch[1].ics.ltp.present && type == TYPE_CPE)
3061 ac->apply_ltp(ac, &che->ch[1]);
3064 if (che->ch[0].tns.present)
3065 ac->apply_tns(che->ch[0].coeffs, &che->ch[0].tns, &che->ch[0].ics, 1);
3066 if (che->ch[1].tns.present)
3067 ac->apply_tns(che->ch[1].coeffs, &che->ch[1].tns, &che->ch[1].ics, 1);
3069 apply_channel_coupling(ac, che, type, i, BETWEEN_TNS_AND_IMDCT, AAC_RENAME(apply_dependent_coupling));
3070 if (type != TYPE_CCE || che->coup.coupling_point == AFTER_IMDCT) {
3071 imdct_and_window(ac, &che->ch[0]);
3073 ac->update_ltp(ac, &che->ch[0]);
3075 imdct_and_window(ac, &che->ch[1]);
3077 ac->update_ltp(ac, &che->ch[1]);
3080 AAC_RENAME(ff_sbr_apply)(ac, &che->sbr, type, che->ch[0].ret, che->ch[1].ret);
3084 apply_channel_coupling(ac, che, type, i, AFTER_IMDCT, AAC_RENAME(apply_independent_coupling));
3091 che->ch[0].ret[j] = (int32_t)av_clip64((int64_t)che->ch[0].ret[j]*128, INT32_MIN, INT32_MAX-0x8000)+0x8000;
3093 che->ch[1].ret[j] = (int32_t)av_clip64((int64_t)che->ch[1].ret[j]*128, INT32_MIN, INT32_MAX-0x8000)+0x8000;
3097 che->present = 0;
3098 } else if (che) {
3172 ChannelElement *che;
3200 if (!(che=get_che(ac, elem_type, elem_id))) {
3206 che->present = 1;
3211 err = decode_ics(ac, &che->ch[0], gb, 0, 0);
3214 err = decode_cpe(ac, gb, che);
3217 err = decode_ics(ac, &che->ch[0], gb, 0, 0);
3244 ChannelElement *che = NULL, *che_prev = NULL;
3299 if (!(che=get_che(ac, elem_type, elem_id))) {
3306 che->present = 1;
3312 err = decode_ics(ac, &che->ch[0], gb, 0, 0);
3318 err = decode_cpe(ac, gb, che);
3323 err = decode_cce(ac, gb, che);
3327 err = decode_ics(ac, &che->ch[0], gb, 0, 0);
3389 che_prev = che;
3522 if (ac->che[type][i])
3523 AAC_RENAME(ff_aac_sbr_ctx_close)(&ac->che[type][i]->sbr);
3524 av_freep(&ac->che[type][i]);