[FFmpeg-cvslog] AAC encoder: fix I/S relative error evaluation

Claudio Freire git at videolan.org
Wed Jan 13 16:26:56 CET 2016


ffmpeg | branch: master | Claudio Freire <klaussfreire at gmail.com> | Fri Jan  8 06:18:24 2016 -0300| [aa64a483575be65eedb336ab949e865e441d1f85] | committer: Claudio Freire

AAC encoder: fix I/S relative error evaluation

The relative error between two encoding strategies is the simple
difference of rate-distortion values, and not the absolute
difference. An absolute measure would allow worsening of the
quantization error as well as improving.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa64a483575be65eedb336ab949e865e441d1f85
---

 libavcodec/aacenc_is.c |    2 +-
 tests/fate/aac.mak     |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/aacenc_is.c b/libavcodec/aacenc_is.c
index ac4789a..d77fcb5 100644
--- a/libavcodec/aacenc_is.c
+++ b/libavcodec/aacenc_is.c
@@ -87,7 +87,7 @@ struct AACISError ff_aac_is_encoding_err(AACEncContext *s, ChannelElement *cpe,
 
     is_error.pass = dist2 <= dist1;
     is_error.phase = phase;
-    is_error.error = fabsf(dist1 - dist2);
+    is_error.error = dist2 - dist1;
     is_error.dist1 = dist1;
     is_error.dist2 = dist2;
     is_error.ener01 = ener01;
diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 81edc12..f3ad7d9 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -191,9 +191,9 @@ fate-aac-is-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-ref
 fate-aac-is-encode: CMP = stddev
 fate-aac-is-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
 fate-aac-is-encode: CMP_SHIFT = -4096
-fate-aac-is-encode: CMP_TARGET = 725
+fate-aac-is-encode: CMP_TARGET = 597
 fate-aac-is-encode: SIZE_TOLERANCE = 3560
-fate-aac-is-encode: FUZZ = 5
+fate-aac-is-encode: FUZZ = 10
 
 FATE_AAC_ENCODE += fate-aac-ms-encode
 fate-aac-ms-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -c:a aac -aac_pns 0 -aac_is 0 -aac_ms 1 -aac_tns 0 -b:a 128k -cutoff 22050



More information about the ffmpeg-cvslog mailing list