diff mbox

[FFmpeg-devel,v2,5/5] avformat/s337m: Test wav subdemux

Message ID 20190806115044.4116-6-nicolas.gaullier@arkena.com
State New
Headers show

Commit Message

Gaullier Nicolas Aug. 6, 2019, 11:50 a.m. UTC
incl. 24bits 5.1+2 dolby_e decoding
---
 tests/Makefile       | 1 +
 tests/fate-run.sh    | 4 ++++
 tests/fate/audio.mak | 5 +++++
 3 files changed, 10 insertions(+)

Comments

Tomas Härdin Aug. 6, 2019, 12:17 p.m. UTC | #1
tis 2019-08-06 klockan 13:50 +0200 skrev Nicolas Gaullier:
> diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak
> index c41958ea2d..0e56d401ea 100644
> --- a/tests/fate/audio.mak
> +++ b/tests/fate/audio.mak
> @@ -24,6 +24,11 @@ fate-dolby-e: CMD = pcm -i $(TARGET_SAMPLES)/dolby_e/16-11
>  fate-dolby-e: CMP = oneoff
>  fate-dolby-e: REF = $(SAMPLES)/dolby_e/16-11.pcm
>  
> +FATE_SAMPLES_AUDIO-$(call DEMDEMDEC, WAV, S337M, DOLBY_E) += fate-dolby-e-wav
> +fate-dolby-e-wav: CMD = dolbye2pcm16 -i $(TARGET_SAMPLES)/dolby_e/512.wav
> +fate-dolby-e-wav: CMP = oneoff
> +fate-dolby-e-wav: REF = $(SAMPLES)/dolby_e/512.wav.pcm

This does a floaty comparison, right? Since the Dolby-E decoder is
float at the moment..

/Tomas
Gaullier Nicolas Aug. 6, 2019, 1:09 p.m. UTC | #2
>> +FATE_SAMPLES_AUDIO-$(call DEMDEMDEC, WAV, S337M, DOLBY_E) += 

>> +fate-dolby-e-wav

>> +fate-dolby-e-wav: CMD = dolbye2pcm16 -i 

>> +$(TARGET_SAMPLES)/dolby_e/512.wav

>> +fate-dolby-e-wav: CMP = oneoff

>> +fate-dolby-e-wav: REF = $(SAMPLES)/dolby_e/512.wav.pcm

>

>This does a floaty comparison, right? Since the Dolby-E decoder is float at the moment..

The test is similar to the current "fate-dolby-e", this new one is only different because the input dolby E stream is 24 bits (instead of 16), contains 5.1+2 (instead of 5.1)... and uses wav wrapper of course.
In both case, the comparison is based on the truncated 16-bit output of the Dolby-E decoder (but I think the inner precision of the codec is higher) AND a tolerance of +/-1.
At the end, I think there is no rounding/platform-dependant issue, if this is your concern.

Nicolas
Tomas Härdin Aug. 6, 2019, 2:48 p.m. UTC | #3
tis 2019-08-06 klockan 13:09 +0000 skrev Gaullier Nicolas:
> > > +FATE_SAMPLES_AUDIO-$(call DEMDEMDEC, WAV, S337M, DOLBY_E) += 
> > > +fate-dolby-e-wav
> > > +fate-dolby-e-wav: CMD = dolbye2pcm16 -i 
> > > +$(TARGET_SAMPLES)/dolby_e/512.wav
> > > +fate-dolby-e-wav: CMP = oneoff
> > > +fate-dolby-e-wav: REF = $(SAMPLES)/dolby_e/512.wav.pcm
> > 
> > This does a floaty comparison, right? Since the Dolby-E decoder is
> > float at the moment..
> The test is similar to the current "fate-dolby-e", this new one is
> only different because the input dolby E stream is 24 bits (instead
> of 16), contains 5.1+2 (instead of 5.1)... and uses wav wrapper of
> course.
> In both case, the comparison is based on the truncated 16-bit output
> of the Dolby-E decoder (but I think the inner precision of the codec
> is higher) AND a tolerance of +/-1.

There being a tolerance is what I was getting at. Some tests expect
bitexact output, which is obviously problematic with a float decoder :)

/Tomas
diff mbox

Patch

diff --git a/tests/Makefile b/tests/Makefile
index 0ef571b067..ebaa465597 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -75,6 +75,7 @@  ENCDEC2 = $(call ALLYES, $(firstword $(1))_ENCODER $(lastword $(1))_DECODER  \
                          $(firstword $(3))_MUXER   $(lastword $(3))_DEMUXER)
 
 DEMDEC  = $(call ALLYES, $(1)_DEMUXER $(2:%=%_DECODER))
+DEMDEMDEC  = $(call ALLYES, $(1)_DEMUXER $(2)_DEMUXER $(3:%=%_DECODER))
 ENCMUX  = $(call ALLYES, $(1:%=%_ENCODER) $(2)_MUXER)
 
 DEMMUX  = $(call ALLYES, $(1)_DEMUXER $(2)_MUXER)
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 2f1991da52..8ecb2b6cfa 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -162,6 +162,10 @@  pcm(){
     ffmpeg "$@" -vn -f s16le -
 }
 
+dolbye2pcm16(){
+    ffmpeg -dolbyeprobe 1 "$@" -vn -f s16le -
+}
+
 fmtstdout(){
     fmt=$1
     shift 1
diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak
index c41958ea2d..0e56d401ea 100644
--- a/tests/fate/audio.mak
+++ b/tests/fate/audio.mak
@@ -24,6 +24,11 @@  fate-dolby-e: CMD = pcm -i $(TARGET_SAMPLES)/dolby_e/16-11
 fate-dolby-e: CMP = oneoff
 fate-dolby-e: REF = $(SAMPLES)/dolby_e/16-11.pcm
 
+FATE_SAMPLES_AUDIO-$(call DEMDEMDEC, WAV, S337M, DOLBY_E) += fate-dolby-e-wav
+fate-dolby-e-wav: CMD = dolbye2pcm16 -i $(TARGET_SAMPLES)/dolby_e/512.wav
+fate-dolby-e-wav: CMP = oneoff
+fate-dolby-e-wav: REF = $(SAMPLES)/dolby_e/512.wav.pcm
+
 FATE_SAMPLES_AUDIO-$(call DEMDEC, DSS, DSS_SP) += fate-dss-lp fate-dss-sp
 fate-dss-lp: CMD = framecrc -i $(TARGET_SAMPLES)/dss/lp.dss -frames 30
 fate-dss-sp: CMD = framecrc -i $(TARGET_SAMPLES)/dss/sp.dss -frames 30