- if (tns->n_filt[i]) {
- put_bits(&s->pb, 1, c_bits);
- for (filt = 0; filt < tns->n_filt[i]; filt++) {
- put_bits(&s->pb, 6 - 2 * is8, tns->length[i][filt]);
- put_bits(&s->pb, 5 - 2 * is8, tns->order[i][filt]);
- if (tns->order[i][filt]) {
- coef_compress = compress_coeffs(tns->coef_idx[i][filt],
- tns->order[i][filt], c_bits);
- put_bits(&s->pb, 1, !!tns->direction[i][filt]);
- put_bits(&s->pb, 1, !!coef_compress);
- coef_len = c_bits + 3 - coef_compress;
- for (w = 0; w < tns->order[i][filt]; w++)
- put_bits(&s->pb, coef_len, tns->coef_idx[i][filt][w]);
- }
- }
+ if (!tns->n_filt[i])
+ continue;
+ put_bits(&s->pb, 1, c_bits);
+ for (filt = 0; filt < tns->n_filt[i]; filt++) {
+ put_bits(&s->pb, 6 - 2 * is8, tns->length[i][filt]);
+ put_bits(&s->pb, 5 - 2 * is8, tns->order[i][filt]);
+ if (!tns->order[i][filt])
+ continue;
+ put_bits(&s->pb, 1, tns->direction[i][filt]);
+ coef_compress = compress_coeffs(tns->coef_idx[i][filt],
+ tns->order[i][filt], c_bits);
+ put_bits(&s->pb, 1, coef_compress);
+ coef_len = c_bits + 3 - coef_compress;
+ for (w = 0; w < tns->order[i][filt]; w++)
+ put_bits(&s->pb, coef_len, tns->coef_idx[i][filt][w]);