Lines Matching refs:tns
747 static int decode_tns(AACContext * ac, TemporalNoiseShaping * tns,
753 if ((tns->n_filt[w] = get_bits(gb, 2 - is8))) {
756 for (filt = 0; filt < tns->n_filt[w]; filt++) {
758 tns->length[w][filt] = get_bits(gb, 6 - 2*is8);
760 if ((tns->order[w][filt] = get_bits(gb, 5 - 2*is8)) > tns_max_order) {
762 tns->order[w][filt], tns_max_order);
763 tns->order[w][filt] = 0;
766 if (tns->order[w][filt]) {
767 tns->direction[w][filt] = get_bits1(gb);
772 for (i = 0; i < tns->order[w][filt]; i++)
773 tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)];
1021 TemporalNoiseShaping * tns = &sce->tns;
1055 if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics))
1379 static void apply_tns(float coef[1024], TemporalNoiseShaping * tns, IndividualChannelStream * ics, int decode) {
1387 for (filt = 0; filt < tns->n_filt[w]; filt++) {
1389 bottom = FFMAX(0, top - tns->length[w][filt]);
1390 order = tns->order[w][filt];
1395 compute_lpc_coefs(tns->coef[w][filt], order, lpc, 0, 0, 0);
1401 if (tns->direction[w][filt]) {
1579 if(che->ch[0].tns.present)
1580 apply_tns(che->ch[0].coeffs, &che->ch[0].tns, &che->ch[0].ics, 1);
1581 if(che->ch[1].tns.present)
1582 apply_tns(che->ch[1].coeffs, &che->ch[1].tns, &che->ch[1].ics, 1);