• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/ffmpeg/libavcodec/

Lines Matching refs:ics

601 static int decode_prediction(AACContext *ac, IndividualChannelStream *ics,
606 ics->predictor_reset_group = get_bits(gb, 5);
607 if (ics->predictor_reset_group == 0 || ics->predictor_reset_group > 30) {
612 for (sfb = 0; sfb < FFMIN(ics->max_sfb, ff_aac_pred_sfb_max[ac->m4ac.sampling_index]); sfb++) {
613 ics->prediction_used[sfb] = get_bits1(gb);
623 static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
628 memset(ics, 0, sizeof(IndividualChannelStream));
631 ics->window_sequence[1] = ics->window_sequence[0];
632 ics->window_sequence[0] = get_bits(gb, 2);
633 ics->use_kb_window[1] = ics->use_kb_window[0];
634 ics->use_kb_window[0] = get_bits1(gb);
635 ics->num_window_groups = 1;
636 ics->group_len[0] = 1;
637 if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
639 ics->max_sfb = get_bits(gb, 4);
642 ics->group_len[ics->num_window_groups - 1]++;
644 ics->num_window_groups++;
645 ics->group_len[ics->num_window_groups - 1] = 1;
648 ics->num_windows = 8;
649 ics->swb_offset = ff_swb_offset_128[ac->m4ac.sampling_index];
650 ics->num_swb = ff_aac_num_swb_128[ac->m4ac.sampling_index];
651 ics->tns_max_bands = ff_tns_max_bands_128[ac->m4ac.sampling_index];
652 ics->predictor_present = 0;
654 ics->max_sfb = get_bits(gb, 6);
655 ics->num_windows = 1;
656 ics->swb_offset = ff_swb_offset_1024[ac->m4ac.sampling_index];
657 ics->num_swb = ff_aac_num_swb_1024[ac->m4ac.sampling_index];
658 ics->tns_max_bands = ff_tns_max_bands_1024[ac->m4ac.sampling_index];
659 ics->predictor_present = get_bits1(gb);
660 ics->predictor_reset_group = 0;
661 if (ics->predictor_present) {
663 if (decode_prediction(ac, ics, gb)) {
664 memset(ics, 0, sizeof(IndividualChannelStream));
669 memset(ics, 0, sizeof(IndividualChannelStream));
673 memset(ics, 0, sizeof(IndividualChannelStream));
679 if (ics->max_sfb > ics->num_swb) {
682 ics->max_sfb, ics->num_swb);
683 memset(ics, 0, sizeof(IndividualChannelStream));
700 IndividualChannelStream *ics)
703 const int bits = (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) ? 3 : 5;
704 for (g = 0; g < ics->num_window_groups; g++) {
706 while (k < ics->max_sfb) {
721 if (sect_end > ics->max_sfb) {
724 sect_end, ics->max_sfb);
748 IndividualChannelStream *ics,
752 const int sf_offset = ac->sf_offset + (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE ? 12 : 0);
757 for (g = 0; g < ics->num_window_groups; g++) {
758 for (i = 0; i < ics->max_sfb;) {
833 GetBitContext *gb, const IndividualChannelStream *ics)
836 const int is8 = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE;
838 for (w = 0; w < ics->num_windows; w++) {
879 for (idx = 0; idx < cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb; idx++)
882 memset(cpe->ms_mask, 1, cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb * sizeof(cpe->ms_mask[0]));
969 const IndividualChannelStream *ics,
973 const int c = 1024 / ics->num_windows;
974 const uint16_t *offsets = ics->swb_offset;
978 for (g = 0; g < ics->num_windows; g++)
979 memset(coef + g * 128 + offsets[ics->max_sfb], 0, sizeof(float) * (c - offsets[ics->max_sfb]));
981 for (g = 0; g < ics->num_window_groups; g++) {
982 unsigned g_len = ics->group_len[g];
984 for (i = 0; i < ics->max_sfb; i++, idx++) {
1284 if (!sce->ics.predictor_initialized) {
1286 sce->ics.predictor_initialized = 1;
1289 if (sce->ics.window_sequence[0] != EIGHT_SHORT_SEQUENCE) {
1291 for (k = sce->ics.swb_offset[sfb]; k < sce->ics.swb_offset[sfb + 1]; k++) {
1293 sce->ics.predictor_present && sce->ics.prediction_used[sfb]);
1296 if (sce->ics.predictor_reset_group)
1297 reset_predictor_group(sce->predictor_state, sce->ics.predictor_reset_group);
1315 IndividualChannelStream *ics = &sce->ics;
1327 if (decode_ics_info(ac, ics, gb, 0) < 0)
1331 if (decode_band_types(ac, sce->band_type, sce->band_type_run_end, gb, ics) < 0)
1333 if (decode_scalefactors(ac, sce->sf, gb, global_gain, ics, sce->band_type, sce->band_type_run_end) < 0)
1339 if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
1343 if (decode_pulses(&pulse, gb, ics->swb_offset, ics->num_swb)) {
1348 if ((tns->present = get_bits1(gb)) && decode_tns(ac, tns, gb, ics))
1356 if (decode_spectrum_and_dequant(ac, out, gb, sce->sf, pulse_present, &pulse, ics, sce->band_type) < 0)
1370 const IndividualChannelStream *ics = &cpe->ch[0].ics;
1374 const uint16_t *offsets = ics->swb_offset;
1375 for (g = 0; g < ics->num_window_groups; g++) {
1376 for (i = 0; i < ics->max_sfb; i++, idx++) {
1379 for (group = 0; group < ics->group_len[g]; group++) {
1386 ch0 += ics->group_len[g] * 128;
1387 ch1 += ics->group_len[g] * 128;
1400 const IndividualChannelStream *ics = &cpe->ch[1].ics;
1403 const uint16_t *offsets = ics->swb_offset;
1407 for (g = 0; g < ics->num_window_groups; g++) {
1408 for (i = 0; i < ics->max_sfb;) {
1416 for (group = 0; group < ics->group_len[g]; group++)
1426 coef0 += ics->group_len[g] * 128;
1427 coef1 += ics->group_len[g] * 128;
1444 if (decode_ics_info(ac, &cpe->ch[0].ics, gb, 1))
1446 i = cpe->ch[1].ics.use_kb_window[0];
1447 cpe->ch[1].ics = cpe->ch[0].ics;
1448 cpe->ch[1].ics.use_kb_window[1] = i;
1524 for (g = 0; g < sce->ics.num_window_groups; g++) {
1525 for (sfb = 0; sfb < sce->ics.max_sfb; sfb++, idx++) {
1673 IndividualChannelStream *ics, int decode)
1675 const int mmm = FFMIN(ics->tns_max_bands, ics->max_sfb);
1680 for (w = 0; w < ics->num_windows; w++) {
1681 bottom = ics->num_swb;
1692 start = ics->swb_offset[FFMIN(bottom, mmm)];
1693 end = ics->swb_offset[FFMIN( top, mmm)];
1717 IndividualChannelStream *ics = &sce->ics;
1721 const float *swindow = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
1722 const float *lwindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_long_1024 : ff_sine_1024;
1723 const float *swindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
1729 if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
1730 if (ics->window_sequence[1] == ONLY_LONG_SEQUENCE || ics->window_sequence[1] == LONG_STOP_SEQUENCE)
1745 if ((ics->window_sequence[1] == ONLY_LONG_SEQUENCE || ics->window_sequence[1] == LONG_STOP_SEQUENCE) &&
1746 (ics->window_sequence[0] == ONLY_LONG_SEQUENCE || ics->window_sequence[0] == LONG_START_SEQUENCE)) {
1752 if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
1767 if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
1774 } else if (ics->window_sequence[0] == LONG_START_SEQUENCE) {
1791 IndividualChannelStream *ics = &cce->ch[0].ics;
1792 const uint16_t *offsets = ics->swb_offset;
1801 for (g = 0; g < ics->num_window_groups; g++) {
1802 for (i = 0; i < ics->max_sfb; i++, idx++) {
1805 for (group = 0; group < ics->group_len[g]; group++) {
1813 dest += ics->group_len[g] * 128;
1814 src += ics->group_len[g] * 128;
1888 apply_tns(che->ch[0].coeffs, &che->ch[0].tns, &che->ch[0].ics, 1);
1890 apply_tns(che->ch[1].coeffs, &che->ch[1].tns, &che->ch[1].ics, 1);