~ubuntu-branches/debian/experimental/libav/experimental

« back to all changes in this revision

Viewing changes to libavcodec/aacdec.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-01-18 15:46:55 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20140118154655-iz6u00yevkat1jqi
Tags: 6:10~alpha2-1
New Upstream release 10_alpha2. This upstream git snapshot has too many
changes to list here, cf. to the upstream Changelog:
http://git.libav.org/?p=libav.git;a=blob;f=Changelog;hb=refs/tags/v10_alpha2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1065
1065
    ff_mdct_init(&ac->mdct_ltp,   11, 0, -2.0 * 32768.0);
1066
1066
    // window initialization
1067
1067
    ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
1068
 
    ff_kbd_window_init(ff_aac_kbd_long_512,  4.0, 512);
1069
1068
    ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
1070
1069
    ff_init_ff_sine_windows(10);
1071
1070
    ff_init_ff_sine_windows( 9);
1178
1177
        if (aot == AOT_ER_AAC_LD || aot == AOT_ER_AAC_ELD) {
1179
1178
            ics->swb_offset        =     ff_swb_offset_512[ac->oc[1].m4ac.sampling_index];
1180
1179
            ics->num_swb           =    ff_aac_num_swb_512[ac->oc[1].m4ac.sampling_index];
 
1180
            ics->tns_max_bands     =  ff_tns_max_bands_512[ac->oc[1].m4ac.sampling_index];
1181
1181
            if (!ics->num_swb || !ics->swb_offset)
1182
1182
                return AVERROR_BUG;
1183
1183
        } else {
1184
1184
            ics->swb_offset        =    ff_swb_offset_1024[ac->oc[1].m4ac.sampling_index];
1185
1185
            ics->num_swb           =   ff_aac_num_swb_1024[ac->oc[1].m4ac.sampling_index];
 
1186
            ics->tns_max_bands     = ff_tns_max_bands_1024[ac->oc[1].m4ac.sampling_index];
1186
1187
        }
1187
 
        ics->tns_max_bands         = ff_tns_max_bands_1024[ac->oc[1].m4ac.sampling_index];
1188
1188
        if (aot != AOT_ER_AAC_ELD) {
1189
1189
            ics->predictor_present     = get_bits1(gb);
1190
1190
            ics->predictor_reset_group = 0;
2429
2429
    float *in    = sce->coeffs;
2430
2430
    float *out   = sce->ret;
2431
2431
    float *saved = sce->saved;
2432
 
    const float *lwindow_prev = ics->use_kb_window[1] ? ff_aac_kbd_long_512 : ff_sine_512;
2433
2432
    float *buf  = ac->buf_mdct;
2434
2433
 
2435
2434
    // imdct
2436
2435
    ac->mdct.imdct_half(&ac->mdct_ld, buf, in);
2437
2436
 
2438
2437
    // window overlapping
2439
 
    ac->fdsp.vector_fmul_window(out, saved, buf, lwindow_prev, 256);
 
2438
    if (ics->use_kb_window[1]) {
 
2439
        // AAC LD uses a low overlap sine window instead of a KBD window
 
2440
        memcpy(out, saved, 192 * sizeof(float));
 
2441
        ac->fdsp.vector_fmul_window(out + 192, saved + 192, buf, ff_sine_128, 64);
 
2442
        memcpy(                     out + 320, buf + 64, 192 * sizeof(float));
 
2443
    } else {
 
2444
        ac->fdsp.vector_fmul_window(out, saved, buf, ff_sine_512, 256);
 
2445
    }
2440
2446
 
2441
2447
    // buffer update
2442
2448
    memcpy(saved, buf + 256, 256 * sizeof(float));