]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Fix for a problem with inverted sign of output data from ffvorbis decoder.
authorserge <serge@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 20 May 2009 07:24:38 +0000 (07:24 +0000)
committerserge <serge@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 20 May 2009 07:24:38 +0000 (07:24 +0000)
Now the sign of audio samples in ffvorbis output is the same as in original
uncompressed audio file and this also allows the use of tiny_psnr to compare
ffvorbis with libvorbis/tremor.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18878 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/vorbis_dec.c

index f7b10e61b372746932fb789c647503cd09da9a37..827619efa060814fce8a0bf6df6320f1a00e3450 100644 (file)
@@ -896,8 +896,8 @@ static int vorbis_parse_id_hdr(vorbis_context *vc){
     vc->saved           = av_mallocz((vc->blocksize[1]/4)*vc->audio_channels * sizeof(float));
     vc->previous_window=0;
 
-    ff_mdct_init(&vc->mdct[0], bl0, 1, 1.0);
-    ff_mdct_init(&vc->mdct[1], bl1, 1, 1.0);
+    ff_mdct_init(&vc->mdct[0], bl0, 1, -1.0);
+    ff_mdct_init(&vc->mdct[1], bl1, 1, -1.0);
 
     AV_DEBUG(" vorbis version %d \n audio_channels %d \n audio_samplerate %d \n bitrate_max %d \n bitrate_nom %d \n bitrate_min %d \n blk_0 %d blk_1 %d \n ",
             vc->version, vc->audio_channels, vc->audio_samplerate, vc->bitrate_maximum, vc->bitrate_nominal, vc->bitrate_minimum, vc->blocksize[0], vc->blocksize[1]);