Revision e22910b2 libavcodec/aacdec.c

View differences:

libavcodec/aacdec.c
1763 1763
    int i, sfb;
1764 1764

  
1765 1765
    if (sce->ics.window_sequence[0] != EIGHT_SHORT_SEQUENCE) {
1766
        float *predTime = ac->buf_mdct;
1767
        float *predFreq = sce->ret;
1766
        float *predTime = sce->ret;
1767
        float *predFreq = ac->buf_mdct;
1768 1768
        int16_t num_samples = 2048;
1769 1769

  
1770 1770
        if (ltp->lag < 1024)
......
1797 1797
    const float *swindow = ics->use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
1798 1798
    int i;
1799 1799

  
1800
    for (i = 0; i < 512; i++)
1801
        ac->buf_mdct[1535 - i] = ac->buf_mdct[512 + i];
1802

  
1803 1800
    if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
1804 1801
        memcpy(saved_ltp,       saved, 512 * sizeof(float));
1805 1802
        memset(saved_ltp + 576, 0,     448 * sizeof(float));
1806
        ac->dsp.vector_fmul_reverse(saved_ltp + 448, ac->buf_mdct + 960,     swindow,     128);
1803
        ac->dsp.vector_fmul_reverse(saved_ltp + 448, ac->buf_mdct + 960,     &swindow[64],      64);
1804
        for (i = 0; i < 64; i++)
1805
            saved_ltp[i + 512] = ac->buf_mdct[1023 - i] * swindow[63 - i];
1807 1806
    } else if (ics->window_sequence[0] == LONG_START_SEQUENCE) {
1808 1807
        memcpy(saved_ltp,       ac->buf_mdct + 512, 448 * sizeof(float));
1809 1808
        memset(saved_ltp + 576, 0,                  448 * sizeof(float));
1810
        ac->dsp.vector_fmul_reverse(saved_ltp + 448, ac->buf_mdct + 960,     swindow,     128);
1809
        ac->dsp.vector_fmul_reverse(saved_ltp + 448, ac->buf_mdct + 960,     &swindow[64],      64);
1810
        for (i = 0; i < 64; i++)
1811
            saved_ltp[i + 512] = ac->buf_mdct[1023 - i] * swindow[63 - i];
1811 1812
    } else { // LONG_STOP or ONLY_LONG
1812
        ac->dsp.vector_fmul_reverse(saved_ltp,       ac->buf_mdct + 512,     lwindow,     1024);
1813
        ac->dsp.vector_fmul_reverse(saved_ltp,       ac->buf_mdct + 512,     &lwindow[512],     512);
1814
        for (i = 0; i < 512; i++)
1815
            saved_ltp[i + 512] = ac->buf_mdct[1023 - i] * lwindow[511 - i];
1813 1816
    }
1814 1817

  
1815 1818
    memcpy(sce->ltp_state, &sce->ltp_state[1024], 1024 * sizeof(int16_t));

Also available in: Unified diff