Commit 7366b2f552 for ffmpeg
commit 7366b2f552c929337a7cf14c3ed18b55ddfdbab3
Author: Lynne <dev@lynne.ee>
Date: Sun Oct 4 18:14:45 2026 +0900
tests/fate/aac: compare the NMR VBR/ABR encode tests by stddev
Pinning per-packet sizes of the float NMR coder's output is not portable:
two builds of the same tree emit a few different packets at -q:a 8. Use
the decoded-PCM stddev comparison the other AAC encode tests use.
diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 7da94cf30b..b263d9c7c0 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -263,14 +263,21 @@ fate-aac-yoraw-encode: REF = $(SAMPLES)/audio-reference/yo.raw-short.wav
fate-aac-yoraw-encode: CMP_TARGET = 226
fate-aac-yoraw-encode: FUZZ = 17
-# NMR quality-target modes, per-packet sizes pinned: VBR at the finest quality
-# drives frames against the decoder-buffer limit
-FATE_AAC_ENCODE_TRANSCODE += fate-aac-nmr-vbr-encode
-fate-aac-nmr-vbr-encode: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav adts "-af aresample -c:a aac -q:a 8 -t 2" "-c copy"
-
-# ABR through the rate servo's boot (~2s)
-FATE_AAC_ENCODE_TRANSCODE += fate-aac-nmr-abr-encode
-fate-aac-nmr-abr-encode: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav adts "-af aresample -c:a aac -aac_rc abr -b:a 96k -t 3" "-c copy"
+# NMR quality-target modes: VBR at the finest quality drives frames against
+# the decoder-buffer limit; ABR runs through the rate servo's boot
+FATE_AAC_ENCODE += fate-aac-nmr-vbr-encode
+fate-aac-nmr-vbr-encode: CMD = enc_dec_pcm mp4 wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -c:a aac -q:a 8 -fflags +bitexact -flags +bitexact
+fate-aac-nmr-vbr-encode: CMP = stddev
+fate-aac-nmr-vbr-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
+fate-aac-nmr-vbr-encode: CMP_TARGET = 67
+fate-aac-nmr-vbr-encode: FUZZ = 5
+
+FATE_AAC_ENCODE += fate-aac-nmr-abr-encode
+fate-aac-nmr-abr-encode: CMD = enc_dec_pcm mp4 wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -c:a aac -aac_rc abr -b:a 96k -fflags +bitexact -flags +bitexact
+fate-aac-nmr-abr-encode: CMP = stddev
+fate-aac-nmr-abr-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
+fate-aac-nmr-abr-encode: CMP_TARGET = 451
+fate-aac-nmr-abr-encode: FUZZ = 15
tests/data/fate/aac-5_1_2.adts: TAG = GEN
tests/data/fate/aac-5_1_2.adts: tests/data/asynth-44100-8.wav
@@ -363,12 +370,11 @@ FATE_AAC_FRAMECRC-$(call FRAMECRC, MOV, AAC, ARESAMPLE_FILTER PAN_FILTER PCM_F32
FATE_AAC_ENCODE-$(call TRANSCODE, AAC, MP4 MOV, WAV_MUXER WAV_DEMUXER PCM_S16LE_DECODER ARESAMPLE_FILTER) += $(FATE_AAC_ENCODE)
FATE_AAC_ENCODE_FFPROBE-$(call TRANSCODE, AAC, ADTS AAC, WAV_DEMUXER PCM_S16LE_DECODER ARESAMPLE_FILTER) += $(FATE_AAC_ENCODE_FFPROBE)
-FATE_AAC_ENCODE_TRANSCODE-$(call TRANSCODE, AAC, ADTS AAC, WAV_DEMUXER PCM_S16LE_DECODER ARESAMPLE_FILTER) += $(FATE_AAC_ENCODE_TRANSCODE)
FATE_AAC_BSF-$(call FRAMECRC, AAC MATROSKA, AAC, AAC_PARSER AAC_ADTSTOASC_BSF MATROSKA_MUXER) += fate-aac-autobsf-adtstoasc
-FATE_SAMPLES_FFMPEG += $(FATE_AAC_ALL) $(FATE_AAC_FRAMECRC-yes) $(FATE_AAC_ENCODE-yes) $(FATE_AAC_ENCODE_TRANSCODE-yes) $(FATE_AAC_BSF-yes)
+FATE_SAMPLES_FFMPEG += $(FATE_AAC_ALL) $(FATE_AAC_FRAMECRC-yes) $(FATE_AAC_ENCODE-yes) $(FATE_AAC_BSF-yes)
FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_AAC_ENCODE_FFPROBE-yes)
-fate-aac: $(FATE_AAC_ALL) $(FATE_AAC_FRAMECRC-yes) $(FATE_AAC_ENCODE-yes) $(FATE_AAC_ENCODE_FFPROBE-yes) $(FATE_AAC_ENCODE_TRANSCODE-yes) $(FATE_AAC_BSF-yes)
+fate-aac: $(FATE_AAC_ALL) $(FATE_AAC_FRAMECRC-yes) $(FATE_AAC_ENCODE-yes) $(FATE_AAC_ENCODE_FFPROBE-yes) $(FATE_AAC_BSF-yes)
fate-aac-latm: $(FATE_AAC_LATM-yes)
diff --git a/tests/ref/fate/aac-nmr-abr-encode b/tests/ref/fate/aac-nmr-abr-encode
deleted file mode 100644
index 9418f60149..0000000000
--- a/tests/ref/fate/aac-nmr-abr-encode
+++ /dev/null
@@ -1,138 +0,0 @@
-8a93613d6b0acab3fc863fda864a48e5 *tests/data/fate/aac-nmr-abr-encode.adts
-31792 tests/data/fate/aac-nmr-abr-encode.adts
-#tb 0: 1/28224000
-#media_type 0: audio
-#codec_id 0: aac
-#sample_rate 0: 44100
-#channel_layout_name 0: stereo
-0, 0, 0, 655360, 269, 0xfa9b83e0
-0, 655360, 655360, 655360, 464, 0xa230e9b1
-0, 1310720, 1310720, 655360, 260, 0x549a7ba3
-0, 1966080, 1966080, 655360, 262, 0xe5ce7d83
-0, 2621440, 2621440, 655360, 259, 0x26067677
-0, 3276800, 3276800, 655360, 261, 0x2bdc7bc4
-0, 3932160, 3932160, 655360, 244, 0xc16d750e
-0, 4587520, 4587520, 655360, 252, 0xb09d7762
-0, 5242880, 5242880, 655360, 263, 0x91157965
-0, 5898240, 5898240, 655360, 259, 0xb3e972f4
-0, 6553600, 6553600, 655360, 268, 0xcbe9813d
-0, 7208960, 7208960, 655360, 252, 0xf9c076f3
-0, 7864320, 7864320, 655360, 398, 0x2851be3c
-0, 8519680, 8519680, 655360, 320, 0x166d991d
-0, 9175040, 9175040, 655360, 408, 0xca4cd36f
-0, 9830400, 9830400, 655360, 239, 0x78c2742b
-0, 10485760, 10485760, 655360, 246, 0xca377334
-0, 11141120, 11141120, 655360, 240, 0x635e7250
-0, 11796480, 11796480, 655360, 220, 0x3bbd66ae
-0, 12451840, 12451840, 655360, 210, 0xf244638d
-0, 13107200, 13107200, 655360, 209, 0x64a6563b
-0, 13762560, 13762560, 655360, 221, 0xa96762cd
-0, 14417920, 14417920, 655360, 226, 0x749f66c4
-0, 15073280, 15073280, 655360, 226, 0xd0eb6387
-0, 15728640, 15728640, 655360, 223, 0xc3826574
-0, 16384000, 16384000, 655360, 220, 0x78a86d47
-0, 17039360, 17039360, 655360, 230, 0xb4446dc3
-0, 17694720, 17694720, 655360, 215, 0x306f7104
-0, 18350080, 18350080, 655360, 229, 0x91de69c3
-0, 19005440, 19005440, 655360, 219, 0x078e672d
-0, 19660800, 19660800, 655360, 214, 0xb5b766a4
-0, 20316160, 20316160, 655360, 220, 0x7023610b
-0, 20971520, 20971520, 655360, 210, 0x182a5ee8
-0, 21626880, 21626880, 655360, 203, 0xdf3655a9
-0, 22282240, 22282240, 655360, 231, 0x13d565d0
-0, 22937600, 22937600, 655360, 229, 0x5e0063f5
-0, 23592960, 23592960, 655360, 232, 0xf03468e7
-0, 24248320, 24248320, 655360, 244, 0x882a7785
-0, 24903680, 24903680, 655360, 236, 0xf8bd7012
-0, 25559040, 25559040, 655360, 228, 0x1956677a
-0, 26214400, 26214400, 655360, 266, 0x3e6b81a9
-0, 26869760, 26869760, 655360, 233, 0x5ab66d73
-0, 27525120, 27525120, 655360, 244, 0x25b56b66
-0, 28180480, 28180480, 655360, 184, 0xd9695100
-0, 28835840, 28835840, 655360, 229, 0x22f771cd
-0, 29491200, 29491200, 655360, 260, 0xc6fa8312
-0, 30146560, 30146560, 655360, 256, 0x48197e58
-0, 30801920, 30801920, 655360, 247, 0xea997935
-0, 31457280, 31457280, 655360, 239, 0xa22f7015
-0, 32112640, 32112640, 655360, 259, 0x8b2384c0
-0, 32768000, 32768000, 655360, 252, 0xd23e790d
-0, 33423360, 33423360, 655360, 240, 0x25056b8c
-0, 34078720, 34078720, 655360, 256, 0xab1077f8
-0, 34734080, 34734080, 655360, 238, 0xd99a6cc5
-0, 35389440, 35389440, 655360, 223, 0x4ffe6c3f
-0, 36044800, 36044800, 655360, 222, 0x8c7c5f7a
-0, 36700160, 36700160, 655360, 231, 0xcc3172bf
-0, 37355520, 37355520, 655360, 224, 0xc23b68cf
-0, 38010880, 38010880, 655360, 222, 0xf0986a4d
-0, 38666240, 38666240, 655360, 233, 0x92a36bc9
-0, 39321600, 39321600, 655360, 251, 0x11516fb9
-0, 39976960, 39976960, 655360, 263, 0x0f0b7e11
-0, 40632320, 40632320, 655360, 408, 0xbf1ccc26
-0, 41287680, 41287680, 655360, 531, 0xa5690ccd
-0, 41943040, 41943040, 655360, 308, 0x5eed9716
-0, 42598400, 42598400, 655360, 277, 0x3668903e
-0, 43253760, 43253760, 655360, 239, 0x2bab729b
-0, 43909120, 43909120, 655360, 227, 0x3c8b7095
-0, 44564480, 44564480, 655360, 190, 0x6c3257ab
-0, 45219840, 45219840, 655360, 209, 0x19125f77
-0, 45875200, 45875200, 655360, 196, 0xcec25cec
-0, 46530560, 46530560, 655360, 250, 0x3e2875d4
-0, 47185920, 47185920, 655360, 276, 0x37138362
-0, 47841280, 47841280, 655360, 210, 0x77d55f66
-0, 48496640, 48496640, 655360, 202, 0x88c06283
-0, 49152000, 49152000, 655360, 201, 0x364a5f76
-0, 49807360, 49807360, 655360, 218, 0x38ee6916
-0, 50462720, 50462720, 655360, 205, 0x017c6140
-0, 51118080, 51118080, 655360, 205, 0xba40628e
-0, 51773440, 51773440, 655360, 211, 0x3ab1628d
-0, 52428800, 52428800, 655360, 208, 0x9b636846
-0, 53084160, 53084160, 655360, 207, 0xcbd06506
-0, 53739520, 53739520, 655360, 207, 0x487f6291
-0, 54394880, 54394880, 655360, 218, 0x7aa870d9
-0, 55050240, 55050240, 655360, 256, 0x3495754e
-0, 55705600, 55705600, 655360, 335, 0xd95aa995
-0, 56360960, 56360960, 655360, 196, 0x54e75268
-0, 57016320, 57016320, 655360, 209, 0x04de5e1e
-0, 57671680, 57671680, 655360, 206, 0xa2f463a5
-0, 58327040, 58327040, 655360, 204, 0xad526074
-0, 58982400, 58982400, 655360, 209, 0xde2e5aec
-0, 59637760, 59637760, 655360, 209, 0x8c6d6905
-0, 60293120, 60293120, 655360, 202, 0x44ca5964
-0, 60948480, 60948480, 655360, 206, 0xd8685ef3
-0, 61603840, 61603840, 655360, 209, 0xff6360ce
-0, 62259200, 62259200, 655360, 207, 0xa9fc61b1
-0, 62914560, 62914560, 655360, 209, 0x312d6796
-0, 63569920, 63569920, 655360, 218, 0x4c9f695f
-0, 64225280, 64225280, 655360, 224, 0x34996723
-0, 64880640, 64880640, 655360, 234, 0x02096ec5
-0, 65536000, 65536000, 655360, 246, 0xa63a70c2
-0, 66191360, 66191360, 655360, 277, 0x8559914c
-0, 66846720, 66846720, 655360, 240, 0xa2087438
-0, 67502080, 67502080, 655360, 245, 0xc61a826b
-0, 68157440, 68157440, 655360, 248, 0xd92a7776
-0, 68812800, 68812800, 655360, 244, 0xa4517d63
-0, 69468160, 69468160, 655360, 258, 0x79cb75e2
-0, 70123520, 70123520, 655360, 274, 0x98708776
-0, 70778880, 70778880, 655360, 239, 0xcd83750c
-0, 71434240, 71434240, 655360, 232, 0x05336d82
-0, 72089600, 72089600, 655360, 234, 0x55847ac8
-0, 72744960, 72744960, 655360, 234, 0x76da6e4c
-0, 73400320, 73400320, 655360, 221, 0x919969bf
-0, 74055680, 74055680, 655360, 223, 0xfbfb69c2
-0, 74711040, 74711040, 655360, 228, 0xf9e373d7
-0, 75366400, 75366400, 655360, 224, 0xd0975f50
-0, 76021760, 76021760, 655360, 234, 0xa66d6e10
-0, 76677120, 76677120, 655360, 249, 0x2a276d92
-0, 77332480, 77332480, 655360, 239, 0x53516e65
-0, 77987840, 77987840, 655360, 270, 0xa6b77886
-0, 78643200, 78643200, 655360, 274, 0x076d7c58
-0, 79298560, 79298560, 655360, 269, 0x93fc811b
-0, 79953920, 79953920, 655360, 239, 0x9dfc73de
-0, 80609280, 80609280, 655360, 255, 0x6aa47d01
-0, 81264640, 81264640, 655360, 236, 0x755271f0
-0, 81920000, 81920000, 655360, 241, 0x8bab73ea
-0, 82575360, 82575360, 655360, 246, 0xa0ac7c7a
-0, 83230720, 83230720, 655360, 251, 0x74447d8a
-0, 83886080, 83886080, 655360, 223, 0xefc36a30
-0, 84541440, 84541440, 655360, 241, 0x88ab6e54
-0, 85196800, 85196800, 655360, 191, 0x89b45c00
diff --git a/tests/ref/fate/aac-nmr-vbr-encode b/tests/ref/fate/aac-nmr-vbr-encode
deleted file mode 100644
index 55c360bbf2..0000000000
--- a/tests/ref/fate/aac-nmr-vbr-encode
+++ /dev/null
@@ -1,95 +0,0 @@
-e81c4916deef786ee1c608312a10cfd3 *tests/data/fate/aac-nmr-vbr-encode.adts
-113626 tests/data/fate/aac-nmr-vbr-encode.adts
-#tb 0: 1/28224000
-#media_type 0: audio
-#codec_id 0: aac
-#sample_rate 0: 44100
-#channel_layout_name 0: stereo
-0, 0, 0, 655360, 1432, 0xa47d9aba
-0, 655360, 655360, 655360, 1448, 0xccd8bcb2
-0, 1310720, 1310720, 655360, 1432, 0xd087ef11
-0, 1966080, 1966080, 655360, 1387, 0x52b1d993
-0, 2621440, 2621440, 655360, 1452, 0x9fb1a7ba
-0, 3276800, 3276800, 655360, 1412, 0xe912e636
-0, 3932160, 3932160, 655360, 1445, 0x312bdfd6
-0, 4587520, 4587520, 655360, 1408, 0xf391e39b
-0, 5242880, 5242880, 655360, 1400, 0x7b44fad2
-0, 5898240, 5898240, 655360, 1433, 0xcb84f594
-0, 6553600, 6553600, 655360, 1423, 0x131be20d
-0, 7208960, 7208960, 655360, 1438, 0x8510fa98
-0, 7864320, 7864320, 655360, 1406, 0x7c65bd4e
-0, 8519680, 8519680, 655360, 1423, 0x11ddf5c4
-0, 9175040, 9175040, 655360, 1448, 0xf566feef
-0, 9830400, 9830400, 655360, 1358, 0xc04ec806
-0, 10485760, 10485760, 655360, 1451, 0x1660fe6e
-0, 11141120, 11141120, 655360, 1451, 0xf81b1064
-0, 11796480, 11796480, 655360, 1396, 0x3f9cfb0f
-0, 12451840, 12451840, 655360, 1382, 0x0bb2ec24
-0, 13107200, 13107200, 655360, 1395, 0xcb71dcb6
-0, 13762560, 13762560, 655360, 1345, 0x5defc602
-0, 14417920, 14417920, 655360, 1396, 0x5fc7e2ba
-0, 15073280, 15073280, 655360, 1370, 0x3d24eb78
-0, 15728640, 15728640, 655360, 1356, 0x2773e5aa
-0, 16384000, 16384000, 655360, 1312, 0x109dc0f9
-0, 17039360, 17039360, 655360, 1341, 0x21d3d81c
-0, 17694720, 17694720, 655360, 1319, 0x0d90c7b2
-0, 18350080, 18350080, 655360, 1355, 0x0c53e537
-0, 19005440, 19005440, 655360, 1352, 0xb69edf91
-0, 19660800, 19660800, 655360, 1352, 0x788ed5eb
-0, 20316160, 20316160, 655360, 1344, 0x3af9d252
-0, 20971520, 20971520, 655360, 1296, 0x5eafc05d
-0, 21626880, 21626880, 655360, 1352, 0xbe22d67a
-0, 22282240, 22282240, 655360, 1358, 0x6569dcaf
-0, 22937600, 22937600, 655360, 1371, 0x21f2d28c
-0, 23592960, 23592960, 655360, 1354, 0xf068d8dc
-0, 24248320, 24248320, 655360, 1348, 0x8990d8c6
-0, 24903680, 24903680, 655360, 1350, 0x6c12e7dc
-0, 25559040, 25559040, 655360, 1338, 0x2225c0e1
-0, 26214400, 26214400, 655360, 1368, 0x6b11db0e
-0, 26869760, 26869760, 655360, 1352, 0xeda9c2b9
-0, 27525120, 27525120, 655360, 1376, 0x1b92da50
-0, 28180480, 28180480, 655360, 1263, 0x8af89e03
-0, 28835840, 28835840, 655360, 1374, 0x466ae490
-0, 29491200, 29491200, 655360, 1335, 0xcc46dd61
-0, 30146560, 30146560, 655360, 1335, 0x7417c793
-0, 30801920, 30801920, 655360, 1337, 0xd4a4c744
-0, 31457280, 31457280, 655360, 1356, 0xd2f1e61e
-0, 32112640, 32112640, 655360, 1360, 0x2cfacf15
-0, 32768000, 32768000, 655360, 1374, 0x853bf9c4
-0, 33423360, 33423360, 655360, 1337, 0x8718e0bc
-0, 34078720, 34078720, 655360, 1333, 0x3443cb14
-0, 34734080, 34734080, 655360, 1391, 0xaf6ddeb5
-0, 35389440, 35389440, 655360, 1349, 0x966dfa91
-0, 36044800, 36044800, 655360, 1322, 0x60bccbb9
-0, 36700160, 36700160, 655360, 1356, 0xf363e54c
-0, 37355520, 37355520, 655360, 1330, 0x6439ce4a
-0, 38010880, 38010880, 655360, 1350, 0xeadfd452
-0, 38666240, 38666240, 655360, 1328, 0x2e4dcf0b
-0, 39321600, 39321600, 655360, 1300, 0x943cc8f7
-0, 39976960, 39976960, 655360, 1316, 0x9071cda4
-0, 40632320, 40632320, 655360, 1322, 0xff05acac
-0, 41287680, 41287680, 655360, 1397, 0x820ac663
-0, 41943040, 41943040, 655360, 1127, 0x03e73eef
-0, 42598400, 42598400, 655360, 1125, 0xd8fa42ed
-0, 43253760, 43253760, 655360, 1071, 0x864622e0
-0, 43909120, 43909120, 655360, 1159, 0x45d160c4
-0, 44564480, 44564480, 655360, 1037, 0xd8e624d0
-0, 45219840, 45219840, 655360, 1056, 0x70b422bd
-0, 45875200, 45875200, 655360, 1027, 0xf33a1216
-0, 46530560, 46530560, 655360, 1281, 0x4e0fb0a1
-0, 47185920, 47185920, 655360, 1293, 0x3b98adc6
-0, 47841280, 47841280, 655360, 1027, 0x9bbe0e89
-0, 48496640, 48496640, 655360, 1060, 0x6bda21fb
-0, 49152000, 49152000, 655360, 1060, 0xf3312f1c
-0, 49807360, 49807360, 655360, 1088, 0x01193f8b
-0, 50462720, 50462720, 655360, 1103, 0x023f43bd
-0, 51118080, 51118080, 655360, 1109, 0x991f49fc
-0, 51773440, 51773440, 655360, 1072, 0xb2cb21e3
-0, 52428800, 52428800, 655360, 1040, 0xeb492506
-0, 53084160, 53084160, 655360, 1355, 0x53669cf5
-0, 53739520, 53739520, 655360, 1014, 0x10750d2b
-0, 54394880, 54394880, 655360, 1029, 0xdd471f62
-0, 55050240, 55050240, 655360, 1221, 0x61598299
-0, 55705600, 55705600, 655360, 1445, 0x65e0e77d
-0, 56360960, 56360960, 655360, 1123, 0x975437bb
-0, 57016320, 57016320, 655360, 14, 0x3f2f0844