diff options
author | Claudio Freire <klaussfreire@gmail.com> | 2016-01-08 06:18:24 -0300 |
---|---|---|
committer | Claudio Freire <klaussfreire@gmail.com> | 2016-01-13 05:28:34 -0300 |
commit | aa64a483575be65eedb336ab949e865e441d1f85 (patch) | |
tree | 62c6d7722b982e9ba27a5d42cc95204da078d2eb | |
parent | 6711aa21e263a270ecd2d6a6ee1b673e665ce98a (diff) | |
download | ffmpeg-streaming-aa64a483575be65eedb336ab949e865e441d1f85.zip ffmpeg-streaming-aa64a483575be65eedb336ab949e865e441d1f85.tar.gz |
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.
-rw-r--r-- | libavcodec/aacenc_is.c | 2 | ||||
-rw-r--r-- | 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 |