diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-09-16 17:48:02 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-09-16 17:48:02 +0100 |
commit | 5ba811bdf00fc52dec86f5de62c2d8cf3ad0ab47 (patch) | |
tree | f3e74396e21803dcf3b0794d60a71cd41203c555 | |
parent | a860adb49c4cd9c1271778cb7c2930c25efb2a97 (diff) | |
download | ffmpeg-5ba811bdf00fc52dec86f5de62c2d8cf3ad0ab47.tar.gz |
aacenc_tns: fix coefficient compression condition
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
-rw-r--r-- | libavcodec/aacenc_tns.c | 2 | ||||
-rw-r--r-- | tests/fate/aac.mak | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aacenc_tns.c b/libavcodec/aacenc_tns.c index 8e0a00fc78..815b4e3ab9 100644 --- a/libavcodec/aacenc_tns.c +++ b/libavcodec/aacenc_tns.c @@ -41,7 +41,7 @@ static inline int compress_coeffs(int *coef, int order, int c_bits) const int shift_val = c_bits ? 8 : 4; const int high_idx = c_bits ? 11 : 5; for (i = 0; i < order; i++) - if (coef[i] < low_idx && coef[i] > high_idx) + if (coef[i] < low_idx || coef[i] > high_idx) res++; if (res == order) for (i = 0; i < order; i++) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 1c815dd535..cbefc38a75 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -172,7 +172,7 @@ fate-aac-tns-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-re fate-aac-tns-encode: CMP = stddev fate-aac-tns-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-aac-tns-encode: CMP_SHIFT = -4096 -fate-aac-tns-encode: CMP_TARGET = 648.80 +fate-aac-tns-encode: CMP_TARGET = 650.28 fate-aac-tns-encode: FUZZ = 2.8 fate-aac-tns-encode: SIZE_TOLERANCE = 3560 |