Lines Matching refs:tns
72 TemporalNoiseShaping *tns = &sce->tns;
77 if (!sce->tns.present)
81 put_bits(&s->pb, 2 - is8, sce->tns.n_filt[i]);
82 if (!tns->n_filt[i])
85 for (filt = 0; filt < tns->n_filt[i]; filt++) {
86 put_bits(&s->pb, 6 - 2 * is8, tns->length[i][filt]);
87 put_bits(&s->pb, 5 - 2 * is8, tns->order[i][filt]);
88 if (!tns->order[i][filt])
90 put_bits(&s->pb, 1, tns->direction[i][filt]);
91 coef_compress = compress_coeffs(tns->coef_idx[i][filt],
92 tns->order[i][filt], c_bits);
95 for (w = 0; w < tns->order[i][filt]; w++)
96 put_bits(&s->pb, coef_len, tns->coef_idx[i][filt][w]);
104 TemporalNoiseShaping *tns = &sce->tns;
112 for (filt = 0; filt < tns->n_filt[w]; filt++) {
114 bottom = FFMAX(0, top - tns->length[w][filt]);
115 order = tns->order[w][filt];
120 compute_lpc_coefs(tns->coef[w][filt], order, lpc, 0, 0, 0);
126 if (tns->direction[w][filt]) {
163 TemporalNoiseShaping *tns = &sce->tns;
178 sce->tns.present = 0;
202 tns->n_filt[w] = is8 ? 1 : order != TNS_MAX_ORDER ? 2 : 3;
203 for (g = 0; g < tns->n_filt[w]; g++) {
204 tns->direction[w][g] = slant != 2 ? slant : en[g] < en[!g];
205 tns->order[w][g] = g < tns->n_filt[w] ? order/tns->n_filt[w] : order - oc_start;
206 tns->length[w][g] = g < tns->n_filt[w] ? sfb_len/tns->n_filt[w] : sfb_len - os_start;
207 quantize_coefs(&coefs[oc_start], tns->coef_idx[w][g], tns->coef[w][g],
208 tns->order[w][g], c_bits);
209 oc_start += tns->order[w][g];
210 os_start += tns->length[w][g];
214 sce->tns.present = !!count;