Re: [FFmpeg-devel] [PATCH v2 18/19] fate/matroska: Test remuxing tracks for hearing/visually impaired

2021-02-21 Thread Andreas Rheinhardt
Carl Eugen Hoyos:
> Am Sa., 20. Feb. 2021 um 17:00 Uhr schrieb Andreas Rheinhardt
> :
>>
>> The tests also test the other dispositions: commentary, descriptions
>> as well as dub and original language.
>>
>> Signed-off-by: Andreas Rheinhardt 
>> ---
>> The first version of the matroska-wtv-remux test used the fixed-point
>> mp2 decoder; given that no floats are involved I presumed that this
>> would give reproducible results among different arches. I was wrong [1].
> 
> How is this possible?
> 
I just had a second look and I think I was wrong about the culprit. Here
is the diff from ppc from Andriy:

-1206b022950477c92c2313a1fa11143b
*tests/data/fate/matroska-wtv-remux.matroska
+95d7ff43421e95554fb50c02e5b09e5e
*tests/data/fate/matroska-wtv-remux.matroska
 752499 tests/data/fate/matroska-wtv-remux.matroska
 #extradata 0:5, 0x001c0014
 #extradata 1:   22, 0x12dc010c
@@ -46,7 +46,7 @@
 1,144,144,   24,  576, 0x422e12bd
 4,144,144,   24, 6912, 0xfccb037f
 2,163,163,   24,  192, 0xc948791d
-3,163,163,0,   19, 0x09f10390
+3,163,163,0,   19, 0x2e110794
 1,168,168,   24,  576, 0xa7581b29
 4,168,168,   24, 6912, 0xa650ad97
 2,187,187,   24,  192, 0xc948791d
Test matroska-wtv-remux failed. Look at
tests/data/fate/matroska-wtv-remux.err for details.
tests/Makefile:255: recipe for target 'fate-matroska-wtv-remux' failed
make: *** [fate-matroska-wtv-remux] Error 1

Stream 3 is the hearing impaired stream. It is also completely blank
(consists only of zeroes after decoding); stream 4 is the ordinary audio
track (also mp2) decoded to pcm_24be. There is no dif for it. So it
seems to be the alac encoder, something which I had not considered
previously because this is a lossless encoder. But now I looked and
there are doubles in ff_lpc_calc_coeffs, but this code is only used if
compression_level == 2 (the default). I will give this another try by
setting it to 1.

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

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

Re: [FFmpeg-devel] [PATCH v2 18/19] fate/matroska: Test remuxing tracks for hearing/visually impaired

2021-02-21 Thread Carl Eugen Hoyos
Am Sa., 20. Feb. 2021 um 17:00 Uhr schrieb Andreas Rheinhardt
:
>
> The tests also test the other dispositions: commentary, descriptions
> as well as dub and original language.
>
> Signed-off-by: Andreas Rheinhardt 
> ---
> The first version of the matroska-wtv-remux test used the fixed-point
> mp2 decoder; given that no floats are involved I presumed that this
> would give reproducible results among different arches. I was wrong [1].

How is this possible?

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

[FFmpeg-devel] [PATCH v2 18/19] fate/matroska: Test remuxing tracks for hearing/visually impaired

2021-02-20 Thread Andreas Rheinhardt
The tests also test the other dispositions: commentary, descriptions
as well as dub and original language.

Signed-off-by: Andreas Rheinhardt 
---
The first version of the matroska-wtv-remux test used the fixed-point
mp2 decoder; given that no floats are involved I presumed that this
would give reproducible results among different arches. I was wrong [1].
Therefore this version uses only streamcopy.

I intend to apply this patchset tomorrow.

[1]: 
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210217101356.1723370-18-andreas.rheinha...@gmail.com/

 tests/fate/matroska.mak  |  21 +
 tests/ref/fate/matroska-mpegts-remux |  52 +
 tests/ref/fate/matroska-wtv-remux| 111 +++
 3 files changed, 184 insertions(+)
 create mode 100644 tests/ref/fate/matroska-mpegts-remux
 create mode 100644 tests/ref/fate/matroska-wtv-remux

diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 4c10fe663f..74461107c9 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -100,6 +100,27 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL 
MATROSKA_DEMUXER \
+= fate-matroska-vp8-alpha-remux
 fate-matroska-vp8-alpha-remux: CMD = transcode matroska 
$(TARGET_SAMPLES)/vp8_alpha/vp8_video_with_alpha.webm matroska "-c copy 
-disposition +hearing_impaired -cluster_size_limit 10" "-c copy -t 0.2" "" 
"-show_entries stream_disposition:stream_side_data_list"
 
+# The sample has two audio tracks which are both streamcopied twice with
+# different dispositions. The first input track is muxed once marked as
+# original and once marked as dub; the second input audio track is already
+# marked as being for the hearing impaired. It is muxed once as-is and once
+# additionally marked as comment.
+FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL WTV_DEMUXER   \
+MPEGAUDIO_PARSER DVBSUB_PARSER  \
+MP2_DECODER MATROSKA_MUXER  \
+MATROSKA_DEMUXER FRAMECRC_MUXER \
+PIPE_PROTOCOL)  \
+   += fate-matroska-wtv-remux
+fate-matroska-wtv-remux: CMD = transcode wtv 
$(TARGET_SAMPLES)/wtv/law-and-order-partial.wtv matroska "-map 0 -vn -map 0:a:1 
-c copy -disposition:s +descriptions -disposition:a:0 +original 
-disposition:a:1 +comment -map 0:a:0 -disposition:a:3 +dub" "-map 0:0 -map 0:1 
-map 0:2 -c copy -t 0.2" "" "-show_entries 
stream_disposition:stream=index,codec_name"
+
+# The audio stream to be remuxed here has AV_DISPOSITION_VISUAL_IMPAIRED.
+FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL MPEGTS_DEMUXER\
+AC3_DECODER MATROSKA_MUXER  \
+MATROSKA_DEMUXER FRAMECRC_MUXER \
+PIPE_PROTOCOL)  \
+   += fate-matroska-mpegts-remux
+fate-matroska-mpegts-remux: CMD = transcode mpegts 
$(TARGET_SAMPLES)/mpegts/pmtchange.ts matroska "-map 0:2 -map 0:2 -c copy 
-disposition:a:1 -visual_impaired+hearing_impaired" "-map 0 -c copy" "" 
"-show_entries stream_disposition:stream=index"
+
 FATE_MATROSKA_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER) += 
fate-matroska-spherical-mono
 fate-matroska-spherical-mono: CMD = run ffprobe$(PROGSSUF)$(EXESUF) 
-show_entries stream_side_data_list -select_streams v -v 0 
$(TARGET_SAMPLES)/mkv/spherical.mkv
 
diff --git a/tests/ref/fate/matroska-mpegts-remux 
b/tests/ref/fate/matroska-mpegts-remux
new file mode 100644
index 00..3c0b41cca9
--- /dev/null
+++ b/tests/ref/fate/matroska-mpegts-remux
@@ -0,0 +1,52 @@
+4e6253c1f5f96ff64ae855dea426547d 
*tests/data/fate/matroska-mpegts-remux.matroska
+6509 tests/data/fate/matroska-mpegts-remux.matroska
+#tb 0: 1/1000
+#media_type 0: audio
+#codec_id 0: ac3
+#sample_rate 0: 48000
+#channel_layout 0: 3
+#channel_layout_name 0: stereo
+#tb 1: 1/1000
+#media_type 1: audio
+#codec_id 1: ac3
+#sample_rate 1: 48000
+#channel_layout 1: 3
+#channel_layout_name 1: stereo
+0,  0,  0,   32,  768, 0xa63778d4
+1,  0,  0,   32,  768, 0xa63778d4
+0, 32, 32,   32,  768, 0x7d577f3f
+1, 32, 32,   32,  768, 0x7d577f3f
+0, 64, 64,   32,  768, 0xd86b7c8f
+1, 64, 64,   32,  768, 0xd86b7c8f
+0, 96, 96,   32,  626, 0x09f4382f
+1, 96, 96,   32,  626, 0x09f4382f
+[STREAM]
+index=0
+DISPOSITION:default=1
+DISPOSITION:dub=0
+DISPOSITION:original=0
+DISPOSITION:comment=0
+DISPOSITION:lyrics=0
+DISPOSITION:karaoke=0
+DISPOSITION:forced=0
+DISPOSITION:hearing_impaired=0
+DISPOSITION:visual_impaired=1
+DISPOSITION:clean_effects=0
+DISPOSITION:attached_pic=0