Lines Matching refs:tns
1700 static int decode_tns(AACContext *ac, TemporalNoiseShaping *tns,
1707 if ((tns->n_filt[w] = get_bits(gb, 2 - is8))) {
1710 for (filt = 0; filt < tns->n_filt[w]; filt++) {
1712 tns->length[w][filt] = get_bits(gb, 6 - 2 * is8);
1714 if ((tns->order[w][filt] = get_bits(gb, 5 - 2 * is8)) > tns_max_order) {
1717 tns->order[w][filt], tns_max_order);
1718 tns->order[w][filt] = 0;
1721 if (tns->order[w][filt]) {
1722 tns->direction[w][filt] = get_bits1(gb);
1727 for (i = 0; i < tns->order[w][filt]; i++)
1728 tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)];
2130 TemporalNoiseShaping *tns = &sce->tns;
2178 tns->present = get_bits1(gb);
2179 if (tns->present && !er_syntax) {
2180 ret = decode_tns(ac, tns, gb, ics);
2193 if (tns->present && er_syntax) {
2194 ret = decode_tns(ac, tns, gb, ics);
2210 tns->present = 0;
2607 static void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns,
2622 for (filt = 0; filt < tns->n_filt[w]; filt++) {
2624 bottom = FFMAX(0, top - tns->length[w][filt]);
2625 order = tns->order[w][filt];
2630 AAC_RENAME(compute_lpc_coefs)(tns->coef[w][filt], order, lpc, 0, 0, 0);
2636 if (tns->direction[w][filt]) {
2712 if (sce->tns.present)
2713 ac->apply_tns(predFreq, &sce->tns, &sce->ics, 0);
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);