Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] tests/fate/ac3: Make ac3-fixed-encode-2 bitexact across arches
@ 2025-05-23  9:52 Andreas Rheinhardt
  2025-05-23 11:44 ` James Almer
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2025-05-23  9:52 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

[-- Attachment #1: Type: text/plain, Size: 168 bytes --]

Patch attached. Another candidate as input file would be
dts/master_audio_7.1_24bit.dts, but then it would be unclear whether
this is still a true AC3 test.

- Andreas

[-- Attachment #2: 0001-tests-fate-ac3-Make-ac3-fixed-encode-2-bitexact-acro.patch --]
[-- Type: text/x-patch, Size: 12790 bytes --]

From 493756488cd346eda96d7a6e6273d1e6ff455d68 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Fri, 23 May 2025 11:42:38 +0200
Subject: [PATCH] tests/fate/ac3: Make ac3-fixed-encode-2 bitexact across
 arches

Don't use a 7.1 EAC3 input file for which our decoder is not
bitexact; instead just use the asynth-44100-8.wav file
which (as a 7.1 file) exhibits the same issue fixed by
1b3f4842c18409dba5a345ef9e7b3de7a4fa3657.

Also switch to a framecrc test so that the output channel layout
is directly contained in the ref file.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 tests/fate/ac3.mak                |  10 +-
 tests/ref/fate/ac3-fixed-encode-2 | 178 ++++++++++++++++++++++++++++++
 2 files changed, 184 insertions(+), 4 deletions(-)
 create mode 100644 tests/ref/fate/ac3-fixed-encode-2

diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak
index b23a9e4dcc..dfbeedbb54 100644
--- a/tests/fate/ac3.mak
+++ b/tests/fate/ac3.mak
@@ -91,10 +91,12 @@ fate-ac3-fixed-encode: CMD = md5 -i $(SRC) -c ac3_fixed -ab 128k -f ac3 -flags +
 fate-ac3-fixed-encode: CMP = oneline
 fate-ac3-fixed-encode: REF = e9d78bca187b4bbafc4512bcea8efd3e
 
-FATE_AC3-$(call ALLYES, EAC3_DEMUXER AC3_FIXED_ENCODER AC3_MUXER ARESAMPLE_FILTER) += fate-ac3-fixed-encode-2
-fate-ac3-fixed-encode-2: CMD = md5pipe -i $(TARGET_SAMPLES)/eac3/the_great_wall_7.1.eac3 -c:a ac3_fixed -ab 256k -f ac3 -flags +bitexact -af aresample
-fate-ac3-fixed-encode-2: CMP = oneline
-fate-ac3-fixed-encode-2: REF = 1b92b037b23b231c9523f334ccfb11da
+# This tests that the LFE does not get lost when converting the input 7.1
+# to a channel layout supported by the encoder.
+FATE_AC3-$(call FRAMECRC, WAV, PCM_S16LE, ARESAMPLE_FILTER AC3_FIXED_ENCODER) += fate-ac3-fixed-encode-2
+fate-ac3-fixed-encode-2: tests/data/asynth-44100-8.wav
+fate-ac3-fixed-encode-2: SRC = $(TARGET_PATH)/tests/data/asynth-44100-8.wav
+fate-ac3-fixed-encode-2: CMD = framecrc -i $(SRC) -c:a ac3_fixed -ab 256k -af aresample
 
 FATE_EAC3-$(call ALLYES, EAC3_DEMUXER EAC3_MUXER EAC3_CORE_BSF) += fate-eac3-core-bsf
 fate-eac3-core-bsf: CMD = md5pipe -i $(TARGET_SAMPLES)/eac3/the_great_wall_7.1.eac3 -c:a copy -bsf:a eac3_core -fflags +bitexact -f eac3
diff --git a/tests/ref/fate/ac3-fixed-encode-2 b/tests/ref/fate/ac3-fixed-encode-2
new file mode 100644
index 0000000000..93aff13f06
--- /dev/null
+++ b/tests/ref/fate/ac3-fixed-encode-2
@@ -0,0 +1,178 @@
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: ac3
+#sample_rate 0: 44100
+#channel_layout_name 0: 5.1(side)
+0,       -256,       -256,     1536,     1114, 0x32fd276c
+0,       1280,       1280,     1536,     1116, 0x1ac63ba7
+0,       2816,       2816,     1536,     1114, 0xdde82dbc
+0,       4352,       4352,     1536,     1114, 0x39313179
+0,       5888,       5888,     1536,     1116, 0x166214e2
+0,       7424,       7424,     1536,     1114, 0xfbcc27ad
+0,       8960,       8960,     1536,     1114, 0xe7ed3321
+0,      10496,      10496,     1536,     1114, 0xa1823473
+0,      12032,      12032,     1536,     1116, 0x1ccd1fe8
+0,      13568,      13568,     1536,     1114, 0x9377208a
+0,      15104,      15104,     1536,     1114, 0x3438299e
+0,      16640,      16640,     1536,     1116, 0x73303bb0
+0,      18176,      18176,     1536,     1114, 0x7f5225a4
+0,      19712,      19712,     1536,     1114, 0x18f92909
+0,      21248,      21248,     1536,     1114, 0x43b42275
+0,      22784,      22784,     1536,     1116, 0x06481d04
+0,      24320,      24320,     1536,     1114, 0xab4c3e3c
+0,      25856,      25856,     1536,     1114, 0x614733e9
+0,      27392,      27392,     1536,     1116, 0x06151516
+0,      28928,      28928,     1536,     1114, 0xc395467d
+0,      30464,      30464,     1536,     1114, 0x0e4a35ff
+0,      32000,      32000,     1536,     1114, 0x15b23238
+0,      33536,      33536,     1536,     1116, 0x553a1cac
+0,      35072,      35072,     1536,     1114, 0x82bc2b49
+0,      36608,      36608,     1536,     1114, 0xcfad2fc1
+0,      38144,      38144,     1536,     1114, 0x83c025fb
+0,      39680,      39680,     1536,     1116, 0x8d322df4
+0,      41216,      41216,     1536,     1114, 0x536d1e18
+0,      42752,      42752,     1536,     1114, 0xfc8b0cd7
+0,      44288,      44288,     1536,     1116, 0x22343088
+0,      45824,      45824,     1536,     1114, 0x586929ef
+0,      47360,      47360,     1536,     1114, 0xa2f13fdb
+0,      48896,      48896,     1536,     1114, 0x9bff33d0
+0,      50432,      50432,     1536,     1116, 0xd2ab3a66
+0,      51968,      51968,     1536,     1114, 0xdb2a247e
+0,      53504,      53504,     1536,     1114, 0x090f3a8a
+0,      55040,      55040,     1536,     1116, 0x6b35205b
+0,      56576,      56576,     1536,     1114, 0x0ce90a58
+0,      58112,      58112,     1536,     1114, 0xdb3ef5aa
+0,      59648,      59648,     1536,     1114, 0xbf061f9d
+0,      61184,      61184,     1536,     1116, 0x8bbd27a7
+0,      62720,      62720,     1536,     1114, 0x7ebd2783
+0,      64256,      64256,     1536,     1114, 0xdcac0a5a
+0,      65792,      65792,     1536,     1114, 0x94bd2fca
+0,      67328,      67328,     1536,     1116, 0x10ea1fe6
+0,      68864,      68864,     1536,     1114, 0xea5820ff
+0,      70400,      70400,     1536,     1114, 0x7aad0ec1
+0,      71936,      71936,     1536,     1116, 0x1449147d
+0,      73472,      73472,     1536,     1114, 0x714113e1
+0,      75008,      75008,     1536,     1114, 0x6ffee7a2
+0,      76544,      76544,     1536,     1114, 0x82d90afc
+0,      78080,      78080,     1536,     1116, 0xee9a0df5
+0,      79616,      79616,     1536,     1114, 0x3656fc83
+0,      81152,      81152,     1536,     1114, 0xdff5238f
+0,      82688,      82688,     1536,     1116, 0x66e808c9
+0,      84224,      84224,     1536,     1114, 0xa20401b2
+0,      85760,      85760,     1536,     1114, 0xc4d9044b
+0,      87296,      87296,     1536,     1114, 0xf5251139
+0,      88832,      88832,     1536,     1116, 0xf86a0913
+0,      90368,      90368,     1536,     1114, 0xd15d1957
+0,      91904,      91904,     1536,     1114, 0x59ad057e
+0,      93440,      93440,     1536,     1116, 0x57f325af
+0,      94976,      94976,     1536,     1114, 0x4c3b04f6
+0,      96512,      96512,     1536,     1114, 0x23ad161f
+0,      98048,      98048,     1536,     1114, 0xdefe17d5
+0,      99584,      99584,     1536,     1116, 0xb9391432
+0,     101120,     101120,     1536,     1114, 0x85241c4d
+0,     102656,     102656,     1536,     1114, 0xcd421ecc
+0,     104192,     104192,     1536,     1114, 0xf2ce1532
+0,     105728,     105728,     1536,     1116, 0x4b32258d
+0,     107264,     107264,     1536,     1114, 0x7ca81826
+0,     108800,     108800,     1536,     1114, 0x76bf13d5
+0,     110336,     110336,     1536,     1116, 0xc31216e9
+0,     111872,     111872,     1536,     1114, 0xab120ffc
+0,     113408,     113408,     1536,     1114, 0x0f181a0f
+0,     114944,     114944,     1536,     1114, 0x92f9012e
+0,     116480,     116480,     1536,     1116, 0x064e1344
+0,     118016,     118016,     1536,     1114, 0x89c91b77
+0,     119552,     119552,     1536,     1114, 0x389c113d
+0,     121088,     121088,     1536,     1116, 0xa117355c
+0,     122624,     122624,     1536,     1114, 0x32a305fe
+0,     124160,     124160,     1536,     1114, 0xf214191d
+0,     125696,     125696,     1536,     1114, 0xd9bc070e
+0,     127232,     127232,     1536,     1116, 0x31d2042e
+0,     128768,     128768,     1536,     1114, 0x2630f3cb
+0,     130304,     130304,     1536,     1114, 0xe6da0d64
+0,     131840,     131840,     1536,     1114, 0x541efcde
+0,     133376,     133376,     1536,     1116, 0x64d42d83
+0,     134912,     134912,     1536,     1114, 0x41403526
+0,     136448,     136448,     1536,     1114, 0x47f434d3
+0,     137984,     137984,     1536,     1116, 0x9bf435a2
+0,     139520,     139520,     1536,     1114, 0x266f2fc3
+0,     141056,     141056,     1536,     1114, 0x0d75300d
+0,     142592,     142592,     1536,     1114, 0x011d20bf
+0,     144128,     144128,     1536,     1116, 0x629f23cb
+0,     145664,     145664,     1536,     1114, 0xca5f27df
+0,     147200,     147200,     1536,     1114, 0xb6e0270c
+0,     148736,     148736,     1536,     1116, 0x38e5276e
+0,     150272,     150272,     1536,     1114, 0xdcab1be3
+0,     151808,     151808,     1536,     1114, 0x50883404
+0,     153344,     153344,     1536,     1114, 0xa1472692
+0,     154880,     154880,     1536,     1116, 0xd1f73a4e
+0,     156416,     156416,     1536,     1114, 0xf5561ff4
+0,     157952,     157952,     1536,     1114, 0xe9c32678
+0,     159488,     159488,     1536,     1116, 0x9d302a33
+0,     161024,     161024,     1536,     1114, 0xf9862b6b
+0,     162560,     162560,     1536,     1114, 0x30a42225
+0,     164096,     164096,     1536,     1114, 0xf8c42af1
+0,     165632,     165632,     1536,     1116, 0x8e89218d
+0,     167168,     167168,     1536,     1114, 0x061d231e
+0,     168704,     168704,     1536,     1114, 0x6e592578
+0,     170240,     170240,     1536,     1114, 0x48461b3e
+0,     171776,     171776,     1536,     1116, 0xbad31d60
+0,     173312,     173312,     1536,     1114, 0x29c42768
+0,     174848,     174848,     1536,     1114, 0x2d842b38
+0,     176384,     176384,     1536,     1116, 0xbff20e68
+0,     177920,     177920,     1536,     1114, 0x732417e9
+0,     179456,     179456,     1536,     1114, 0x5aecfa16
+0,     180992,     180992,     1536,     1114, 0x38ad15fb
+0,     182528,     182528,     1536,     1116, 0xf8f8252c
+0,     184064,     184064,     1536,     1114, 0x7d2d238b
+0,     185600,     185600,     1536,     1114, 0x5d72167c
+0,     187136,     187136,     1536,     1116, 0x493615d0
+0,     188672,     188672,     1536,     1114, 0x4ee91d1d
+0,     190208,     190208,     1536,     1114, 0x7477284a
+0,     191744,     191744,     1536,     1114, 0xe0703bf9
+0,     193280,     193280,     1536,     1116, 0xf69b184b
+0,     194816,     194816,     1536,     1114, 0x78b21495
+0,     196352,     196352,     1536,     1114, 0x2d0a27f9
+0,     197888,     197888,     1536,     1114, 0xddf82bbc
+0,     199424,     199424,     1536,     1116, 0xf43b1c45
+0,     200960,     200960,     1536,     1114, 0xe20f1c84
+0,     202496,     202496,     1536,     1114, 0x732417e9
+0,     204032,     204032,     1536,     1116, 0x92a11e7d
+0,     205568,     205568,     1536,     1114, 0x38ad15fb
+0,     207104,     207104,     1536,     1114, 0x65312356
+0,     208640,     208640,     1536,     1114, 0x7d2d238b
+0,     210176,     210176,     1536,     1116, 0x042e16f7
+0,     211712,     211712,     1536,     1114, 0xc7e81580
+0,     213248,     213248,     1536,     1114, 0x4ee91d1d
+0,     214784,     214784,     1536,     1116, 0x83562903
+0,     216320,     216320,     1536,     1114, 0xe0703bf9
+0,     217856,     217856,     1536,     1114, 0xde3e18ee
+0,     219392,     219392,     1536,     1114, 0x78b21495
+0,     220928,     220928,     1536,     1116, 0x222627a8
+0,     222464,     222464,     1536,     1114, 0xddf82bbc
+0,     224000,     224000,     1536,     1114, 0x85821b28
+0,     225536,     225536,     1536,     1114, 0xe20f1c84
+0,     227072,     227072,     1536,     1116, 0x71071792
+0,     228608,     228608,     1536,     1114, 0x5aecfa16
+0,     230144,     230144,     1536,     1114, 0x38ad15fb
+0,     231680,     231680,     1536,     1116, 0xf8f8252c
+0,     233216,     233216,     1536,     1114, 0x7d2d238b
+0,     234752,     234752,     1536,     1114, 0x5d72167c
+0,     236288,     236288,     1536,     1114, 0xc7e81580
+0,     237824,     237824,     1536,     1116, 0x99241d6d
+0,     239360,     239360,     1536,     1114, 0x7477284a
+0,     240896,     240896,     1536,     1114, 0xe0703bf9
+0,     242432,     242432,     1536,     1116, 0xf69b184b
+0,     243968,     243968,     1536,     1114, 0x78b21495
+0,     245504,     245504,     1536,     1114, 0x2d0a27f9
+0,     247040,     247040,     1536,     1114, 0xddf82bbc
+0,     248576,     248576,     1536,     1116, 0xf43b1c45
+0,     250112,     250112,     1536,     1114, 0xe20f1c84
+0,     251648,     251648,     1536,     1114, 0x732417e9
+0,     253184,     253184,     1536,     1116, 0x92a11e7d
+0,     254720,     254720,     1536,     1114, 0x38ad15fb
+0,     256256,     256256,     1536,     1114, 0x65312356
+0,     257792,     257792,     1536,     1114, 0x7d2d238b
+0,     259328,     259328,     1536,     1116, 0x042e16f7
+0,     260864,     260864,     1536,     1114, 0xc7e81580
+0,     262400,     262400,     1536,     1114, 0x4ee91d1d
+0,     263936,     263936,      408,     1114, 0x8c520df4
-- 
2.45.2


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FFmpeg-devel] [PATCH] tests/fate/ac3: Make ac3-fixed-encode-2 bitexact across arches
  2025-05-23  9:52 [FFmpeg-devel] [PATCH] tests/fate/ac3: Make ac3-fixed-encode-2 bitexact across arches Andreas Rheinhardt
@ 2025-05-23 11:44 ` James Almer
  0 siblings, 0 replies; 2+ messages in thread
From: James Almer @ 2025-05-23 11:44 UTC (permalink / raw)
  To: ffmpeg-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 419 bytes --]

On 5/23/2025 6:52 AM, Andreas Rheinhardt wrote:
> Patch attached. Another candidate as input file would be
> dts/master_audio_7.1_24bit.dts, but then it would be unclear whether
> this is still a true AC3 test.
> 
> - Andreas

nit: maybe limit the amount of audio frames to be encoded, since it's 
not the important part of the test, and should reduce the size of the 
ref file.

LGTM either way, thanks.


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-23 11:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-23  9:52 [FFmpeg-devel] [PATCH] tests/fate/ac3: Make ac3-fixed-encode-2 bitexact across arches Andreas Rheinhardt
2025-05-23 11:44 ` James Almer

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git