Revision b5ec6383

View differences:

libavcodec/aacdec.c
568 568
    // -1024 - Compensate wrong IMDCT method.
569 569
    // 60    - Required to scale values to the correct range [-32768,32767]
570 570
    //         for float to int16 conversion. (1 << (60 / 4)) == 32768
571
        ac->sf_scale  = 1. / -1024.;
572
        ac->sf_offset = 60;
571
    ac->sf_scale  = 1. / -1024.;
572
    ac->sf_offset = 60;
573 573

  
574 574
    ff_aac_tableinit();
575 575

  
libavcodec/ac3dec.c
195 195
    dsputil_init(&s->dsp, avctx);
196 196
    av_lfg_init(&s->dith_state, 0);
197 197

  
198
    /* set bias values for float to int16 conversion */
199
        s->mul_bias = 32767.0f;
198
    /* set scale value for float to int16 conversion */
199
    s->mul_bias = 32767.0f;
200 200

  
201 201
    /* allow downmixing to stereo or mono */
202 202
    if (avctx->channels > 0 && avctx->request_channels > 0 &&
libavcodec/dca.c
1838 1838
        s->samples_chanptr[i] = s->samples + i * 256;
1839 1839
    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
1840 1840

  
1841
        s->scale_bias = 1.0;
1842

  
1843
        /* allow downmixing to stereo */
1844
        if (avctx->channels > 0 && avctx->request_channels < avctx->channels &&
1845
                avctx->request_channels == 2) {
1846
            avctx->channels = avctx->request_channels;
1847
        }
1841
    s->scale_bias = 1.0;
1848 1842

  
1843
    /* allow downmixing to stereo */
1844
    if (avctx->channels > 0 && avctx->request_channels < avctx->channels &&
1845
        avctx->request_channels == 2) {
1846
        avctx->channels = avctx->request_channels;
1847
    }
1849 1848

  
1850 1849
    return 0;
1851 1850
}
libavcodec/nellymoserdec.c
135 135

  
136 136
    dsputil_init(&s->dsp, avctx);
137 137

  
138
        s->scale_bias = 1.0/(1*8);
138
    s->scale_bias = 1.0/(1*8);
139 139

  
140 140
    /* Generate overlap window */
141 141
    if (!ff_sine_128[127])
libavcodec/wmadec.c
789 789
    /* convert frame to integer */
790 790
    n = s->frame_len;
791 791
    incr = s->nb_channels;
792
        for (ch = 0; ch < MAX_CHANNELS; ch++)
793
            output[ch] = s->frame_out[ch];
794
        s->dsp.float_to_int16_interleave(samples, output, n, incr);
795
        for(ch = 0; ch < incr; ch++) {
796
            /* prepare for next block */
797
            memmove(&s->frame_out[ch][0], &s->frame_out[ch][n], n * sizeof(float));
798
        }
792
    for (ch = 0; ch < MAX_CHANNELS; ch++)
793
        output[ch] = s->frame_out[ch];
794
    s->dsp.float_to_int16_interleave(samples, output, n, incr);
795
    for (ch = 0; ch < incr; ch++) {
796
        /* prepare for next block */
797
        memmove(&s->frame_out[ch][0], &s->frame_out[ch][n], n * sizeof(float));
798
    }
799 799

  
800 800
#ifdef TRACE
801 801
    dump_shorts(s, "samples", samples, n * s->nb_channels);

Also available in: Unified diff