Lines Matching refs:ch2
510 static int parse_grid_1_chunk(DCALbrDecoder *s, LBRChunk *chunk, int ch1, int ch2) in parse_grid_1_chunk() argument
527 if (ch1 != ch2 && ff_dca_grid_1_to_scf[sb] < s->min_mono_subband) { in parse_grid_1_chunk()
528 ret = parse_scale_factors(s, s->grid_1_scf[ch2][sb]); in parse_grid_1_chunk()
540 if (ch1 != ch2) { in parse_grid_1_chunk()
542 s->grid_3_avg[ch2][sb] = parse_vlc(&s->gb, &ff_dca_vlc_avg_g3, 2) - 16; in parse_grid_1_chunk()
544 s->grid_3_avg[ch2][sb] = s->grid_3_avg[ch1][sb]; in parse_grid_1_chunk()
554 if (ch1 != ch2) { in parse_grid_1_chunk()
565 for (ch = ch1; ch <= ch2; ch++) in parse_grid_1_chunk()
578 static int parse_grid_1_sec_ch(DCALbrDecoder *s, int ch2) in parse_grid_1_sec_ch() argument
586 ret = parse_scale_factors(s, s->grid_1_scf[ch2][sb]); in parse_grid_1_sec_ch()
597 s->grid_3_avg[ch2][sb] = parse_vlc(&s->gb, &ff_dca_vlc_avg_g3, 2) - 16; in parse_grid_1_sec_ch()
604 static void parse_grid_3(DCALbrDecoder *s, int ch1, int ch2, int sb, int flag) in parse_grid_3() argument
608 for (ch = ch1; ch <= ch2; ch++) { in parse_grid_3()
709 static int parse_ts(DCALbrDecoder *s, int ch1, int ch2, in parse_ts() argument
734 parse_grid_3(s, ch1, ch2, sb_g3, flag); in parse_ts()
736 parse_grid_3(s, ch1, ch2, sb_reorder - 4, flag); in parse_ts()
740 if (ch1 != ch2) { in parse_ts()
757 else if (ch1 != ch2) in parse_ts()
758 parse_ch(s, ch2, sb_reorder, quant_level, 1); in parse_ts()
761 if (ch1 != ch2) in parse_ts()
762 parse_ch(s, ch2, sb_reorder, quant_level, 0); in parse_ts()
788 static int parse_lpc(DCALbrDecoder *s, int ch1, int ch2, int start_sb, int end_sb) in parse_lpc() argument
796 for (ch = ch1; ch <= ch2; ch++) { in parse_lpc()
809 static int parse_high_res_grid(DCALbrDecoder *s, LBRChunk *chunk, int ch1, int ch2) in parse_high_res_grid() argument
853 ret = parse_lpc(s, ch1, ch2, 0, 2); in parse_high_res_grid()
858 ret = parse_ts(s, ch1, ch2, 0, 2, 0); in parse_high_res_grid()
864 for (ch = ch1; ch <= ch2; ch++) in parse_high_res_grid()
871 static int parse_grid_2(DCALbrDecoder *s, int ch1, int ch2, in parse_grid_2() argument
881 for (ch = ch1; ch <= ch2; ch++) { in parse_grid_2()
913 static int parse_ts1_chunk(DCALbrDecoder *s, LBRChunk *chunk, int ch1, int ch2) in parse_ts1_chunk() argument
920 if ((ret = parse_lpc(s, ch1, ch2, 2, 3)) < 0) in parse_ts1_chunk()
922 if ((ret = parse_ts(s, ch1, ch2, 2, 4, 0)) < 0) in parse_ts1_chunk()
924 if ((ret = parse_grid_2(s, ch1, ch2, 0, 1, 0)) < 0) in parse_ts1_chunk()
926 if ((ret = parse_ts(s, ch1, ch2, 4, 6, 0)) < 0) in parse_ts1_chunk()
931 static int parse_ts2_chunk(DCALbrDecoder *s, LBRChunk *chunk, int ch1, int ch2) in parse_ts2_chunk() argument
939 if ((ret = parse_grid_2(s, ch1, ch2, 1, 3, 0)) < 0) in parse_ts2_chunk()
941 if ((ret = parse_ts(s, ch1, ch2, 6, s->max_mono_subband, 0)) < 0) in parse_ts2_chunk()
943 if (ch1 != ch2) { in parse_ts2_chunk()
944 if ((ret = parse_grid_1_sec_ch(s, ch2)) < 0) in parse_ts2_chunk()
946 if ((ret = parse_grid_2(s, ch1, ch2, 0, 3, 1)) < 0) in parse_ts2_chunk()
949 if ((ret = parse_ts(s, ch1, ch2, s->min_mono_subband, s->nsubbands, 1)) < 0) in parse_ts2_chunk()
1377 int ch2 = FFMIN(ch1 + 1, s->nchannels - 1); in ff_dca_lbr_parse() local
1379 if (parse_grid_1_chunk (s, &chunk.grid1 [i], ch1, ch2) < 0 || in ff_dca_lbr_parse()
1380 parse_high_res_grid(s, &chunk.hr_grid[i], ch1, ch2) < 0) { in ff_dca_lbr_parse()
1389 if (parse_ts1_chunk(s, &chunk.ts1[i], ch1, ch2) < 0 || in ff_dca_lbr_parse()
1390 parse_ts2_chunk(s, &chunk.ts2[i], ch1, ch2) < 0) { in ff_dca_lbr_parse()
1405 static void decode_grid(DCALbrDecoder *s, int ch1, int ch2) in decode_grid() argument
1409 for (ch = ch1; ch <= ch2; ch++) { in decode_grid()
1442 static void random_ts(DCALbrDecoder *s, int ch1, int ch2) in random_ts() argument
1446 for (ch = ch1; ch <= ch2; ch++) { in random_ts()
1490 static void synth_lpc(DCALbrDecoder *s, int ch1, int ch2, int sb) in synth_lpc() argument
1495 for (ch = ch1; ch <= ch2; ch++) { in synth_lpc()
1512 static void filter_ts(DCALbrDecoder *s, int ch1, int ch2) in filter_ts() argument
1518 for (ch = ch1; ch <= ch2; ch++) { in filter_ts()
1542 if (ch1 != ch2) { in filter_ts()
1544 float *samples_r = s->time_samples[ch2][sb]; in filter_ts()
1545 int ch2_pres = s->ch_pres[ch2] & (1U << sb); in filter_ts()
1590 synth_lpc(s, ch1, ch2, sb); in filter_ts()
1597 static void decode_part_stereo(DCALbrDecoder *s, int ch1, int ch2) in decode_part_stereo() argument
1601 for (ch = ch1; ch <= ch2; ch++) { in decode_part_stereo()
1606 if (s->ch_pres[ch2] & (1U << sb)) in decode_part_stereo()
1764 int ch2 = FFMIN(ch1 + 1, s->nchannels - 1); in ff_dca_lbr_filter_frame() local
1766 decode_grid(s, ch1, ch2); in ff_dca_lbr_filter_frame()
1768 random_ts(s, ch1, ch2); in ff_dca_lbr_filter_frame()
1770 filter_ts(s, ch1, ch2); in ff_dca_lbr_filter_frame()
1772 if (ch1 != ch2 && (s->part_stereo_pres & (1 << ch1))) in ff_dca_lbr_filter_frame()
1773 decode_part_stereo(s, ch1, ch2); in ff_dca_lbr_filter_frame()
1778 if (ch1 != ch2 && ch2 < nchannels) in ff_dca_lbr_filter_frame()
1779 transform_channel(s, ch2, (float *)frame->extended_data[reorder[ch2]]); in ff_dca_lbr_filter_frame()