Lines Matching refs:tns
832 static int decode_tns(AACContext *ac, TemporalNoiseShaping *tns,
839 if ((tns->n_filt[w] = get_bits(gb, 2 - is8))) {
842 for (filt = 0; filt < tns->n_filt[w]; filt++) {
844 tns->length[w][filt] = get_bits(gb, 6 - 2 * is8);
846 if ((tns->order[w][filt] = get_bits(gb, 5 - 2 * is8)) > tns_max_order) {
848 tns->order[w][filt], tns_max_order);
849 tns->order[w][filt] = 0;
852 if (tns->order[w][filt]) {
853 tns->direction[w][filt] = get_bits1(gb);
858 for (i = 0; i < tns->order[w][filt]; i++)
859 tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)];
1314 TemporalNoiseShaping *tns = &sce->tns;
1348 if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics))
1672 static void apply_tns(float coef[1024], TemporalNoiseShaping *tns,
1682 for (filt = 0; filt < tns->n_filt[w]; filt++) {
1684 bottom = FFMAX(0, top - tns->length[w][filt]);
1685 order = tns->order[w][filt];
1690 compute_lpc_coefs(tns->coef[w][filt], order, lpc, 0, 0, 0);
1696 if (tns->direction[w][filt]) {
1887 if (che->ch[0].tns.present)
1888 apply_tns(che->ch[0].coeffs, &che->ch[0].tns, &che->ch[0].ics, 1);
1889 if (che->ch[1].tns.present)
1890 apply_tns(che->ch[1].coeffs, &che->ch[1].tns, &che->ch[1].ics, 1);