[FFmpeg-devel] [PATCH] dca: add new fate tests based on the dcadec-samples test suite
Hendrik Leppkes
h.leppkes at gmail.com
Mon Feb 1 23:51:41 CET 2016
On Mon, Feb 1, 2016 at 11:29 PM, James Almer <jamrial at gmail.com> wrote:
> On 2/1/2016 7:01 PM, Hendrik Leppkes wrote:
>> ---
>> tests/fate/dca.mak | 72 +++++++++++++++++++++++++++
>> tests/ref/fate/dca-xll_51_16_192_768_0 | 1 +
>> tests/ref/fate/dca-xll_51_16_192_768_1 | 1 +
>> tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 | 1 +
>> tests/ref/fate/dca-xll_51_24_48_768 | 1 +
>> tests/ref/fate/dca-xll_51_24_48_none | 1 +
>> tests/ref/fate/dca-xll_71_24_48_768_0 | 1 +
>> tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 | 1 +
>> tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 | 1 +
>> tests/ref/fate/dca-xll_71_24_48_768_1 | 1 +
>> tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 | 1 +
>> tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 | 1 +
>> tests/ref/fate/dca-xll_71_24_96_768 | 1 +
>> tests/ref/fate/dca-xll_x96_51_24_96_1509 | 1 +
>> tests/ref/fate/dca-xll_xch_61_24_48_768 | 1 +
>> 15 files changed, 86 insertions(+)
>> create mode 100644 tests/ref/fate/dca-xll_51_16_192_768_0
>> create mode 100644 tests/ref/fate/dca-xll_51_16_192_768_1
>> create mode 100644 tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2
>> create mode 100644 tests/ref/fate/dca-xll_51_24_48_768
>> create mode 100644 tests/ref/fate/dca-xll_51_24_48_none
>> create mode 100644 tests/ref/fate/dca-xll_71_24_48_768_0
>> create mode 100644 tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2
>> create mode 100644 tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6
>> create mode 100644 tests/ref/fate/dca-xll_71_24_48_768_1
>> create mode 100644 tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2
>> create mode 100644 tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6
>> create mode 100644 tests/ref/fate/dca-xll_71_24_96_768
>> create mode 100644 tests/ref/fate/dca-xll_x96_51_24_96_1509
>> create mode 100644 tests/ref/fate/dca-xll_xch_61_24_48_768
>>
>> diff --git a/tests/fate/dca.mak b/tests/fate/dca.mak
>> index d8c1117..78d2f33 100644
>> --- a/tests/fate/dca.mak
>> +++ b/tests/fate/dca.mak
>> @@ -1,3 +1,75 @@
>> +# dcadec test samples
>> +DCADEC_SUITE_LOSSLESS_16 = xll_51_16_192_768_0 \
>> + xll_51_16_192_768_1 \
>> +
>> +DCADEC_SUITE_LOSSLESS_24 = xll_51_24_48_768 \
>> + xll_51_24_48_none \
>> + xll_71_24_48_768_0 \
>> + xll_71_24_48_768_1 \
>> + xll_71_24_96_768 \
>> + xll_x96_51_24_96_1509 \
>> + xll_xch_61_24_48_768 \
>> +
>> +DCADEC_SUITE_LOSSY = core_51_24_48_768_0 \
>> + core_51_24_48_768_1 \
>> + x96_51_24_96_1509 \
>> + x96_xch_61_24_96_3840 \
>> + x96_xxch_71_24_96_3840 \
>> + xbr_51_24_48_3840 \
>> + xbr_xch_61_24_48_3840 \
>> + xbr_xxch_71_24_48_3840 \
>> + xch_61_24_48_768 \
>> + xxch_71_24_48_2046 \
>> +
>> +define FATE_DCADEC_LOSSLESS_SUITE
>> +FATE_DCADEC_LOSSLESS += fate-dca-$(1)
>> +fate-dca-$(1): CMD = md5 -i $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd -f $(2)
>
> Unlike the existing xll sample, all these new ones have six frames max, so you
> could use framecrc or framemd5 instead.
Suppose that might make debugging easier in the future if something breaks.
>
>> +endef
>> +
>> +define FATE_DCADEC_LOSSY_SUITE
>> +FATE_DCADEC_LOSSY += fate-dca-$(1)
>> +fate-dca-$(1): CMD = pcm -i $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd
>> +fate-dca-$(1): CMP = oneoff
>
> Should be ok assuming converting to s16 before doing the comparison is acceptable.
> I say this because the samples are 24bit if decoded using the fixed codepath, and
> once we create the reference pcm files and add them to the fate suit, we'll be
> stuck with them.
The decoder works in float by default, and all other float codecs use
this kind of test.
Not sure how much precision there actually is in the dca float signal
for lossy, but if someone thinks its worse it we could try to use
tiny_psnr in float or s32 mode (it doesn't do s24)
Would require more careful tuning of the test though, as the precision
on different systems will definitely differ then.
>
>> +fate-dca-$(1): REF = $(SAMPLES)/dts/dcadec-suite/$(1).pcm
>> +endef
>> +
>> +$(foreach N,$(DCADEC_SUITE_LOSSLESS_16),$(eval $(call FATE_DCADEC_LOSSLESS_SUITE,$(N),s16le)))
>> +$(foreach N,$(DCADEC_SUITE_LOSSLESS_24),$(eval $(call FATE_DCADEC_LOSSLESS_SUITE,$(N),s24le)))
>> +$(foreach N,$(DCADEC_SUITE_LOSSY),$(eval $(call FATE_DCADEC_LOSSY_SUITE,$(N))))
>> +
>> +# downmix tests
>> +FATE_DCADEC_LOSSLESS += fate-dca-xll_51_16_192_768_1-dmix_2
>> +fate-dca-xll_51_16_192_768_1-dmix_2: CMD = md5 -request_channel_layout 3 -i $(TARGET_SAMPLES)/dts/dcadec-suite/xll_51_16_192_768_1.dtshd -f s16le
>> +
>> +FATE_DCADEC_LOSSLESS += fate-dca-xll_71_24_48_768_0-dmix_2
>> +fate-dca-xll_71_24_48_768_0-dmix_2: CMD = md5 -request_channel_layout 3 -i $(TARGET_SAMPLES)/dts/dcadec-suite/xll_71_24_48_768_0.dtshd -f s24le
>
> This sample doesn't have stereo coeffs, so you're testing the same 5.1 stream as
> the one below. Notice the md5 ref values for both are the same.
This is actually intentional to test this particular case.
>
>> +
>> +FATE_DCADEC_LOSSLESS += fate-dca-xll_71_24_48_768_0-dmix_6
>> +fate-dca-xll_71_24_48_768_0-dmix_6: CMD = md5 -request_channel_layout 0x60f -i $(TARGET_SAMPLES)/dts/dcadec-suite/xll_71_24_48_768_0.dtshd -f s24le
>> +
>> +FATE_DCADEC_LOSSLESS += fate-dca-xll_71_24_48_768_1-dmix_2
>> +fate-dca-xll_71_24_48_768_1-dmix_2: CMD = md5 -request_channel_layout 3 -i $(TARGET_SAMPLES)/dts/dcadec-suite/xll_71_24_48_768_1.dtshd -f s24le
>> +
>> +FATE_DCADEC_LOSSLESS += fate-dca-xll_71_24_48_768_1-dmix_6
>> +fate-dca-xll_71_24_48_768_1-dmix_6: CMD = md5 -request_channel_layout 0x60f -i $(TARGET_SAMPLES)/dts/dcadec-suite/xll_71_24_48_768_1.dtshd -f s24le
>> +
>> +FATE_DCADEC_LOSSY += fate-dca-core_51_24_48_768_1-dmix_2
>> +fate-dca-core_51_24_48_768_1-dmix_2: CMD = pcm -request_channel_layout 3 -i $(TARGET_SAMPLES)/dts/dcadec-suite/core_51_24_48_768_1.dtshd
>> +fate-dca-core_51_24_48_768_1-dmix_2: CMP = oneoff
>> +fate-dca-core_51_24_48_768_1-dmix_2: REF = $(SAMPLES)/dts/dcadec-suite/core_51_24_48_768_1-dmix_2.pcm
>> +
>> +FATE_DCADEC_LOSSY += fate-dca-x96_xxch_71_24_96_3840-dmix_2
>> +fate-dca-x96_xxch_71_24_96_3840-dmix_2: CMD = pcm -request_channel_layout 3 -i $(TARGET_SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840.dtshd
>
> Also here. The pcm ref files this test and the one below create are exactly the
> same.
Same here for the lossy case, although I could probably remove this
one and skip the extra reference file.
>
>> +fate-dca-x96_xxch_71_24_96_3840-dmix_2: CMP = oneoff
>> +fate-dca-x96_xxch_71_24_96_3840-dmix_2: REF = $(SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840-dmix_2.pcm
>> +
>> +FATE_DCADEC_LOSSY += fate-dca-x96_xxch_71_24_96_3840-dmix_6
>> +fate-dca-x96_xxch_71_24_96_3840-dmix_6: CMD = pcm -request_channel_layout 0x60f -i $(TARGET_SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840.dtshd
>> +fate-dca-x96_xxch_71_24_96_3840-dmix_6: CMP = oneoff
>> +fate-dca-x96_xxch_71_24_96_3840-dmix_6: REF = $(SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840-dmix_6.pcm
>> +
>> +FATE_DCA-$(call DEMDEC, DTS, DCA) += $(FATE_DCADEC_LOSSLESS) $(FATE_DCADEC_LOSSY)
>> +
>> FATE_DCA-$(call DEMDEC, MPEGTS, DCA) += fate-dca-core
>> fate-dca-core: CMD = pcm -i $(TARGET_SAMPLES)/dts/dts.ts
>> fate-dca-core: CMP = oneoff
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list