[SCM] libav/experimental: Use floating point mathematics when encoding mpeg audio. Fixes issue 975: high db peak levels when encoding mp2

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:52:14 UTC 2013


The following commit has been merged in the experimental branch:
commit 391dbb54a640f6943bb879e8d301114caab83210
Author: Lasse Reinhold <lassemikkelreinhold at hotmail.com>
Date:   Wed Sep 30 15:13:09 2009 +0000

    Use floating point mathematics when encoding mpeg audio.
    Fixes issue 975: high db peak levels when encoding mp2
    
    Original patch by Lasse Reinhold, lassemikkelreinhold hotmail
    
    Originally committed as revision 20100 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index aefdbc6..a1e2023 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -59,7 +59,7 @@ typedef struct MpegAudioContext {
 } MpegAudioContext;
 
 /* define it to use floats in quantization (I don't like floats !) */
-//#define USE_FLOATS
+#define USE_FLOATS
 
 #include "mpegaudiodata.h"
 #include "mpegaudiotab.h"
diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref
index 4d57241..665de75 100644
--- a/tests/rotozoom.regression.ref
+++ b/tests/rotozoom.regression.ref
@@ -182,11 +182,11 @@ stddev:    3.23 PSNR: 37.92 bytes:  7603200/  7603200
 12368953 ./tests/data/a-flashsv.flv
 592b3321994e26a990deb3a0a1415de9 *./tests/data/flashsv.rotozoom.out.yuv
 stddev:    0.65 PSNR: 51.83 bytes:  7603200/  7603200
-28fbc7485c7939f40368f79adccb3e3d *./tests/data/a-mp2.mp2
+f6eb0a205350bbd7fb1028a01c7ae8aa *./tests/data/a-mp2.mp2
 96130 ./tests/data/a-mp2.mp2
-c02d5b881c424498457298739f168368 *./tests/data/mp2.rotozoom.out.wav
-stddev: 9315.45 PSNR: 16.94 bytes:  1059884/  1058444
-stddev: 4385.18 PSNR: 23.48 bytes:  1057960/  1058444
+74c7b6b15a001add199619fafe4059a1 *./tests/data/mp2.rotozoom.out.wav
+stddev: 9315.80 PSNR: 16.93 bytes:  1059884/  1058444
+stddev: 4385.25 PSNR: 23.48 bytes:  1057960/  1058444
 081bfd5e683b13cccf1b07c43c1c5005 *./tests/data/a-ac3.rm
 98751 ./tests/data/a-ac3.rm
 5d8cce28f83dd33c3c7eaf43a5db5294 *./tests/data/a-g726.wav
diff --git a/tests/vsynth.regression.ref b/tests/vsynth.regression.ref
index 70a1fa7..5df7b0d 100644
--- a/tests/vsynth.regression.ref
+++ b/tests/vsynth.regression.ref
@@ -182,11 +182,11 @@ stddev:    9.58 PSNR: 28.49 bytes:  7603200/  7603200
 14681925 ./tests/data/a-flashsv.flv
 947cb24ec45a453348ae6fe3fa278071 *./tests/data/flashsv.vsynth.out.yuv
 stddev:    2.85 PSNR: 39.02 bytes:  7603200/  7603200
-28fbc7485c7939f40368f79adccb3e3d *./tests/data/a-mp2.mp2
+f6eb0a205350bbd7fb1028a01c7ae8aa *./tests/data/a-mp2.mp2
 96130 ./tests/data/a-mp2.mp2
-c02d5b881c424498457298739f168368 *./tests/data/mp2.vsynth.out.wav
-stddev: 9315.45 PSNR: 16.94 bytes:  1059884/  1058444
-stddev: 4385.18 PSNR: 23.48 bytes:  1057960/  1058444
+74c7b6b15a001add199619fafe4059a1 *./tests/data/mp2.vsynth.out.wav
+stddev: 9315.80 PSNR: 16.93 bytes:  1059884/  1058444
+stddev: 4385.25 PSNR: 23.48 bytes:  1057960/  1058444
 081bfd5e683b13cccf1b07c43c1c5005 *./tests/data/a-ac3.rm
 98751 ./tests/data/a-ac3.rm
 5d8cce28f83dd33c3c7eaf43a5db5294 *./tests/data/a-g726.wav

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list