PR #21711 opened by James Almer (jamrial) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21711 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21711.patch
Decoders should only worry about exporting AVCodeContext->delay during init. >From cbec54ad3284dae87a960c34318661f735d27bf6 Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Tue, 10 Feb 2026 10:39:32 -0300 Subject: [PATCH 1/3] tests/fate/dca: use stream_demux for lossless tests Unlike md5, the adler32 hash shows the frames with priming samples, which will be useful in the following commits. Signed-off-by: James Almer <[email protected]> --- tests/fate/dca.mak | 6 +++--- tests/ref/fate/dca-xll_51_16_192_768_0 | 16 ++++++---------- tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 | 16 ++++++---------- tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 | 16 ++++++---------- tests/ref/fate/dca-xll_51_16_192_768_1 | 16 ++++++---------- tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 | 16 ++++++---------- tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 | 16 ++++++---------- tests/ref/fate/dca-xll_51_24_48_768 | 16 ++++++---------- tests/ref/fate/dca-xll_51_24_48_768-dmix_2 | 16 ++++++---------- tests/ref/fate/dca-xll_51_24_48_768-dmix_6 | 16 ++++++---------- tests/ref/fate/dca-xll_51_24_48_none | 10 +++------- tests/ref/fate/dca-xll_51_24_48_none-dmix_2 | 10 +++------- tests/ref/fate/dca-xll_51_24_48_none-dmix_6 | 10 +++------- tests/ref/fate/dca-xll_71_24_48_768_0 | 16 ++++++---------- tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 | 16 ++++++---------- tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 | 16 ++++++---------- tests/ref/fate/dca-xll_71_24_48_768_1 | 16 ++++++---------- tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 | 16 ++++++---------- tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 | 16 ++++++---------- tests/ref/fate/dca-xll_71_24_96_768 | 16 ++++++---------- tests/ref/fate/dca-xll_71_24_96_768-dmix_2 | 16 ++++++---------- tests/ref/fate/dca-xll_71_24_96_768-dmix_6 | 16 ++++++---------- tests/ref/fate/dca-xll_x96_51_24_96_1509 | 16 ++++++---------- tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 | 16 ++++++---------- tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 | 16 ++++++---------- tests/ref/fate/dca-xll_xch_61_24_48_768 | 16 ++++++---------- tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 | 16 ++++++---------- tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 | 16 ++++++---------- 28 files changed, 156 insertions(+), 264 deletions(-) diff --git a/tests/fate/dca.mak b/tests/fate/dca.mak index 5c513ae4e8..c200cb06b6 100644 --- a/tests/fate/dca.mak +++ b/tests/fate/dca.mak @@ -23,9 +23,9 @@ DCADEC_SUITE_LOSSY = core_51_24_48_768_0 \ define FATE_DCADEC_LOSSLESS_SUITE FATE_DCADEC_LOSSLESS_$(2) += fate-dca-$(1) fate-dca-$(1)-dmix_2 fate-dca-$(1)-dmix_6 -fate-dca-$(1): CMD = framemd5 -i $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd -c:a pcm_$(2) -af aresample -fate-dca-$(1)-dmix_2: CMD = framemd5 -downmix 0x3 -i $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd -c:a pcm_$(2) -af aresample -fate-dca-$(1)-dmix_6: CMD = framemd5 -downmix 0x60f -i $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd -c:a pcm_$(2) -af aresample +fate-dca-$(1): CMD = stream_demux dtshd $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd "" "-c:a pcm_$(2) -af aresample" +fate-dca-$(1)-dmix_2: CMD = stream_demux dtshd $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd "-downmix 0x3" "-c:a pcm_$(2) -af aresample" +fate-dca-$(1)-dmix_6: CMD = stream_demux dtshd $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd "-downmix 0x60f" "-c:a pcm_$(2) -af aresample" endef define FATE_DCADEC_LOSSY_SUITE diff --git a/tests/ref/fate/dca-xll_51_16_192_768_0 b/tests/ref/fate/dca-xll_51_16_192_768_0 index 756d11d868..716ba6a50b 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_0 +++ b/tests/ref/fate/dca-xll_51_16_192_768_0 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/192000 #media_type 0: audio #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 2048, 2048, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 4096, 4096, 2048, 24576, 97e888b4de888608d08d193aecd2bd6b -0, 6144, 6144, 2048, 24576, 96d20b0b657183ee88a5ec7d919d5313 -0, 8192, 8192, 2048, 24576, d6a98e7cea8e9b397e89f178aa719b19 -0, 10240, 10240, 2048, 24576, fb3432fe46696579220baa1c49e7dcd5 +0, 0, 0, 2048, 24576, 0x00000000 +0, 2048, 2048, 2048, 24576, 0x00000000 +0, 4096, 4096, 2048, 24576, 0x004b62f1 +0, 6144, 6144, 2048, 24576, 0x66edba5f +0, 8192, 8192, 2048, 24576, 0xf2aa3d4b +0, 10240, 10240, 2048, 24576, 0xa6741aff diff --git a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 index 756d11d868..716ba6a50b 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 +++ b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/192000 #media_type 0: audio #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 2048, 2048, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 4096, 4096, 2048, 24576, 97e888b4de888608d08d193aecd2bd6b -0, 6144, 6144, 2048, 24576, 96d20b0b657183ee88a5ec7d919d5313 -0, 8192, 8192, 2048, 24576, d6a98e7cea8e9b397e89f178aa719b19 -0, 10240, 10240, 2048, 24576, fb3432fe46696579220baa1c49e7dcd5 +0, 0, 0, 2048, 24576, 0x00000000 +0, 2048, 2048, 2048, 24576, 0x00000000 +0, 4096, 4096, 2048, 24576, 0x004b62f1 +0, 6144, 6144, 2048, 24576, 0x66edba5f +0, 8192, 8192, 2048, 24576, 0xf2aa3d4b +0, 10240, 10240, 2048, 24576, 0xa6741aff diff --git a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 index 756d11d868..716ba6a50b 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 +++ b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/192000 #media_type 0: audio #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 2048, 2048, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 4096, 4096, 2048, 24576, 97e888b4de888608d08d193aecd2bd6b -0, 6144, 6144, 2048, 24576, 96d20b0b657183ee88a5ec7d919d5313 -0, 8192, 8192, 2048, 24576, d6a98e7cea8e9b397e89f178aa719b19 -0, 10240, 10240, 2048, 24576, fb3432fe46696579220baa1c49e7dcd5 +0, 0, 0, 2048, 24576, 0x00000000 +0, 2048, 2048, 2048, 24576, 0x00000000 +0, 4096, 4096, 2048, 24576, 0x004b62f1 +0, 6144, 6144, 2048, 24576, 0x66edba5f +0, 8192, 8192, 2048, 24576, 0xf2aa3d4b +0, 10240, 10240, 2048, 24576, 0xa6741aff diff --git a/tests/ref/fate/dca-xll_51_16_192_768_1 b/tests/ref/fate/dca-xll_51_16_192_768_1 index 756d11d868..716ba6a50b 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_1 +++ b/tests/ref/fate/dca-xll_51_16_192_768_1 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/192000 #media_type 0: audio #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 2048, 2048, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 4096, 4096, 2048, 24576, 97e888b4de888608d08d193aecd2bd6b -0, 6144, 6144, 2048, 24576, 96d20b0b657183ee88a5ec7d919d5313 -0, 8192, 8192, 2048, 24576, d6a98e7cea8e9b397e89f178aa719b19 -0, 10240, 10240, 2048, 24576, fb3432fe46696579220baa1c49e7dcd5 +0, 0, 0, 2048, 24576, 0x00000000 +0, 2048, 2048, 2048, 24576, 0x00000000 +0, 4096, 4096, 2048, 24576, 0x004b62f1 +0, 6144, 6144, 2048, 24576, 0x66edba5f +0, 8192, 8192, 2048, 24576, 0xf2aa3d4b +0, 10240, 10240, 2048, 24576, 0xa6741aff diff --git a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 index 21a574fd90..fe13ca438c 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 +++ b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/192000 #media_type 0: audio #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: stereo -#stream#, dts, pts, duration, size, hash -0, 0, 0, 2048, 8192, 0829f71740aab1ab98b33eae21dee122 -0, 2048, 2048, 2048, 8192, c8ca1cff44674809d464ec39cf1bd1e9 -0, 4096, 4096, 2048, 8192, d67d26915ca86554568aac685c9a6dc3 -0, 6144, 6144, 2048, 8192, 8fdf69fdac9985ac4f9470a7b8e8529d -0, 8192, 8192, 2048, 8192, dc8a9ca39b38c98147f2308f985ff648 -0, 10240, 10240, 2048, 8192, ea13b97373762ab16d0f664013fdc962 +0, 0, 0, 2048, 8192, 0x00000000 +0, 2048, 2048, 2048, 8192, 0x5a180402 +0, 4096, 4096, 2048, 8192, 0x53413568 +0, 6144, 6144, 2048, 8192, 0x2a34e9e1 +0, 8192, 8192, 2048, 8192, 0x51dad4d7 +0, 10240, 10240, 2048, 8192, 0x9861024c diff --git a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 index 756d11d868..716ba6a50b 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 +++ b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/192000 #media_type 0: audio #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 2048, 2048, 2048, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 4096, 4096, 2048, 24576, 97e888b4de888608d08d193aecd2bd6b -0, 6144, 6144, 2048, 24576, 96d20b0b657183ee88a5ec7d919d5313 -0, 8192, 8192, 2048, 24576, d6a98e7cea8e9b397e89f178aa719b19 -0, 10240, 10240, 2048, 24576, fb3432fe46696579220baa1c49e7dcd5 +0, 0, 0, 2048, 24576, 0x00000000 +0, 2048, 2048, 2048, 24576, 0x00000000 +0, 4096, 4096, 2048, 24576, 0x004b62f1 +0, 6144, 6144, 2048, 24576, 0x66edba5f +0, 8192, 8192, 2048, 24576, 0xf2aa3d4b +0, 10240, 10240, 2048, 24576, 0xa6741aff diff --git a/tests/ref/fate/dca-xll_51_24_48_768 b/tests/ref/fate/dca-xll_51_24_48_768 index 96c936bdc2..f37c38d17f 100644 --- a/tests/ref/fate/dca-xll_51_24_48_768 +++ b/tests/ref/fate/dca-xll_51_24_48_768 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 9216, 13a95890b5f0947d6f058ca9c30a3e01 -0, 512, 512, 512, 9216, 13a95890b5f0947d6f058ca9c30a3e01 -0, 1024, 1024, 512, 9216, 96ca6b6987c99d2f23bcd4754b257e8a -0, 1536, 1536, 512, 9216, 67cf8fd7f6bead8a8225758e33068963 -0, 2048, 2048, 512, 9216, 8760d8a994cf173c1d6d818da419ea1d -0, 2560, 2560, 512, 9216, 981ef3eef27d72d6c6425c7e6ad78da0 +0, 0, 0, 512, 9216, 0x00000000 +0, 512, 512, 512, 9216, 0x00000000 +0, 1024, 1024, 512, 9216, 0x03de31ea +0, 1536, 1536, 512, 9216, 0xfdbede52 +0, 2048, 2048, 512, 9216, 0x280a9c97 +0, 2560, 2560, 512, 9216, 0x2d8de2d5 diff --git a/tests/ref/fate/dca-xll_51_24_48_768-dmix_2 b/tests/ref/fate/dca-xll_51_24_48_768-dmix_2 index 0527069aef..32edc3bedd 100644 --- a/tests/ref/fate/dca-xll_51_24_48_768-dmix_2 +++ b/tests/ref/fate/dca-xll_51_24_48_768-dmix_2 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: stereo -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 3072, d2a70550489de356a2cd6bfc40711204 -0, 512, 512, 512, 3072, d2a70550489de356a2cd6bfc40711204 -0, 1024, 1024, 512, 3072, 0ff2c55663b5113c2edf6ee9cc6b82b7 -0, 1536, 1536, 512, 3072, ceb660aaf1632ac2bd11a6d86f1dd54d -0, 2048, 2048, 512, 3072, 4b136de05d39ed227e7ce566c12d1258 -0, 2560, 2560, 512, 3072, 9cd674b794c426e6db221bae008a1cf0 +0, 0, 0, 512, 3072, 0x00000000 +0, 512, 512, 512, 3072, 0x00000000 +0, 1024, 1024, 512, 3072, 0xa27d155c +0, 1536, 1536, 512, 3072, 0x56efed53 +0, 2048, 2048, 512, 3072, 0x0bf82010 +0, 2560, 2560, 512, 3072, 0x00af1cf2 diff --git a/tests/ref/fate/dca-xll_51_24_48_768-dmix_6 b/tests/ref/fate/dca-xll_51_24_48_768-dmix_6 index 96c936bdc2..f37c38d17f 100644 --- a/tests/ref/fate/dca-xll_51_24_48_768-dmix_6 +++ b/tests/ref/fate/dca-xll_51_24_48_768-dmix_6 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 9216, 13a95890b5f0947d6f058ca9c30a3e01 -0, 512, 512, 512, 9216, 13a95890b5f0947d6f058ca9c30a3e01 -0, 1024, 1024, 512, 9216, 96ca6b6987c99d2f23bcd4754b257e8a -0, 1536, 1536, 512, 9216, 67cf8fd7f6bead8a8225758e33068963 -0, 2048, 2048, 512, 9216, 8760d8a994cf173c1d6d818da419ea1d -0, 2560, 2560, 512, 9216, 981ef3eef27d72d6c6425c7e6ad78da0 +0, 0, 0, 512, 9216, 0x00000000 +0, 512, 512, 512, 9216, 0x00000000 +0, 1024, 1024, 512, 9216, 0x03de31ea +0, 1536, 1536, 512, 9216, 0xfdbede52 +0, 2048, 2048, 512, 9216, 0x280a9c97 +0, 2560, 2560, 512, 9216, 0x2d8de2d5 diff --git a/tests/ref/fate/dca-xll_51_24_48_none b/tests/ref/fate/dca-xll_51_24_48_none index 6c5b48b26b..2e6d17e292 100644 --- a/tests/ref/fate/dca-xll_51_24_48_none +++ b/tests/ref/fate/dca-xll_51_24_48_none @@ -1,12 +1,8 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 1024, 1024, 1024, 18432, 6707daa7724fdc552869e522a7936f26 -0, 2048, 2048, 1024, 18432, be4cc5d54a49870a83edba83f21a7fb5 +0, 0, 0, 1024, 18432, 0x00000000 +0, 1024, 1024, 1024, 18432, 0x5ca6ebf7 +0, 2048, 2048, 1024, 18432, 0xb5520ea3 diff --git a/tests/ref/fate/dca-xll_51_24_48_none-dmix_2 b/tests/ref/fate/dca-xll_51_24_48_none-dmix_2 index 6c5b48b26b..2e6d17e292 100644 --- a/tests/ref/fate/dca-xll_51_24_48_none-dmix_2 +++ b/tests/ref/fate/dca-xll_51_24_48_none-dmix_2 @@ -1,12 +1,8 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 1024, 1024, 1024, 18432, 6707daa7724fdc552869e522a7936f26 -0, 2048, 2048, 1024, 18432, be4cc5d54a49870a83edba83f21a7fb5 +0, 0, 0, 1024, 18432, 0x00000000 +0, 1024, 1024, 1024, 18432, 0x5ca6ebf7 +0, 2048, 2048, 1024, 18432, 0xb5520ea3 diff --git a/tests/ref/fate/dca-xll_51_24_48_none-dmix_6 b/tests/ref/fate/dca-xll_51_24_48_none-dmix_6 index 6c5b48b26b..2e6d17e292 100644 --- a/tests/ref/fate/dca-xll_51_24_48_none-dmix_6 +++ b/tests/ref/fate/dca-xll_51_24_48_none-dmix_6 @@ -1,12 +1,8 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 1024, 1024, 1024, 18432, 6707daa7724fdc552869e522a7936f26 -0, 2048, 2048, 1024, 18432, be4cc5d54a49870a83edba83f21a7fb5 +0, 0, 0, 1024, 18432, 0x00000000 +0, 1024, 1024, 1024, 18432, 0x5ca6ebf7 +0, 2048, 2048, 1024, 18432, 0xb5520ea3 diff --git a/tests/ref/fate/dca-xll_71_24_48_768_0 b/tests/ref/fate/dca-xll_71_24_48_768_0 index e74e54d44e..64a0699f77 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_0 +++ b/tests/ref/fate/dca-xll_71_24_48_768_0 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 7.1 -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 12288, ca9f8c8eb1b9b311cb79999fa376c7f0 -0, 512, 512, 512, 12288, 4072783b8efb99a9e5817067d68f61c6 -0, 1024, 1024, 512, 12288, b37a89420643e09e4c92a6a8b68efb73 -0, 1536, 1536, 512, 12288, 40d58b703681c7b673da1198e9555280 -0, 2048, 2048, 512, 12288, 3f0e22e71e7419256487ef9392abb102 -0, 2560, 2560, 512, 12288, 6a48d9a5e0c74d93cf678e6140a196f7 +0, 0, 0, 512, 12288, 0xa5edf1df +0, 512, 512, 512, 12288, 0x00000000 +0, 1024, 1024, 512, 12288, 0x6613373c +0, 1536, 1536, 512, 12288, 0xa36ccec0 +0, 2048, 2048, 512, 12288, 0xdf1c88c5 +0, 2560, 2560, 512, 12288, 0x71c4dd77 diff --git a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 index 2787b6751d..0db890b10c 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 +++ b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 9216, a2b724b146069938f0e2cb82490dea54 -0, 512, 512, 512, 9216, 13a95890b5f0947d6f058ca9c30a3e01 -0, 1024, 1024, 512, 9216, f38ce0585a816744ecb2120503347c11 -0, 1536, 1536, 512, 9216, 4d535bed6e022a780ecbe90f303985cf -0, 2048, 2048, 512, 9216, 438f3a2fd98d1037e1ffbe696900d85c -0, 2560, 2560, 512, 9216, 3ed1193e013d8ef43f502c7d4037a3f9 +0, 0, 0, 512, 9216, 0xa1d1f1df +0, 512, 512, 512, 9216, 0x00000000 +0, 1024, 1024, 512, 9216, 0xeeb20c83 +0, 1536, 1536, 512, 9216, 0xfda4b141 +0, 2048, 2048, 512, 9216, 0x252ab888 +0, 2560, 2560, 512, 9216, 0x744c04e4 diff --git a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 index 2787b6751d..0db890b10c 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 +++ b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 9216, a2b724b146069938f0e2cb82490dea54 -0, 512, 512, 512, 9216, 13a95890b5f0947d6f058ca9c30a3e01 -0, 1024, 1024, 512, 9216, f38ce0585a816744ecb2120503347c11 -0, 1536, 1536, 512, 9216, 4d535bed6e022a780ecbe90f303985cf -0, 2048, 2048, 512, 9216, 438f3a2fd98d1037e1ffbe696900d85c -0, 2560, 2560, 512, 9216, 3ed1193e013d8ef43f502c7d4037a3f9 +0, 0, 0, 512, 9216, 0xa1d1f1df +0, 512, 512, 512, 9216, 0x00000000 +0, 1024, 1024, 512, 9216, 0xeeb20c83 +0, 1536, 1536, 512, 9216, 0xfda4b141 +0, 2048, 2048, 512, 9216, 0x252ab888 +0, 2560, 2560, 512, 9216, 0x744c04e4 diff --git a/tests/ref/fate/dca-xll_71_24_48_768_1 b/tests/ref/fate/dca-xll_71_24_48_768_1 index e74e54d44e..64a0699f77 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_1 +++ b/tests/ref/fate/dca-xll_71_24_48_768_1 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 7.1 -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 12288, ca9f8c8eb1b9b311cb79999fa376c7f0 -0, 512, 512, 512, 12288, 4072783b8efb99a9e5817067d68f61c6 -0, 1024, 1024, 512, 12288, b37a89420643e09e4c92a6a8b68efb73 -0, 1536, 1536, 512, 12288, 40d58b703681c7b673da1198e9555280 -0, 2048, 2048, 512, 12288, 3f0e22e71e7419256487ef9392abb102 -0, 2560, 2560, 512, 12288, 6a48d9a5e0c74d93cf678e6140a196f7 +0, 0, 0, 512, 12288, 0xa5edf1df +0, 512, 512, 512, 12288, 0x00000000 +0, 1024, 1024, 512, 12288, 0x6613373c +0, 1536, 1536, 512, 12288, 0xa36ccec0 +0, 2048, 2048, 512, 12288, 0xdf1c88c5 +0, 2560, 2560, 512, 12288, 0x71c4dd77 diff --git a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 index 57f1dab0b1..0534dedc72 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 +++ b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: stereo -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 3072, d2a70550489de356a2cd6bfc40711204 -0, 512, 512, 512, 3072, d2a70550489de356a2cd6bfc40711204 -0, 1024, 1024, 512, 3072, 4961cb5a954b57d157f075e051032389 -0, 1536, 1536, 512, 3072, b2ac42e29deb0bb6095550ec59a1da84 -0, 2048, 2048, 512, 3072, d30bd752b75ead1b8f62202fe8b1d692 -0, 2560, 2560, 512, 3072, ff7562359eca2706580050d849ca2de4 +0, 0, 0, 512, 3072, 0x00000000 +0, 512, 512, 512, 3072, 0x00000000 +0, 1024, 1024, 512, 3072, 0x1bf4e1f9 +0, 1536, 1536, 512, 3072, 0x89a1d6cd +0, 2048, 2048, 512, 3072, 0xf088ee73 +0, 2560, 2560, 512, 3072, 0x401cc303 diff --git a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 index 5f847e65c4..9f9d2a7a2f 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 +++ b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 9216, a2b724b146069938f0e2cb82490dea54 -0, 512, 512, 512, 9216, 13a95890b5f0947d6f058ca9c30a3e01 -0, 1024, 1024, 512, 9216, 13ee6aa61ed484c3d64c9d6546e296bb -0, 1536, 1536, 512, 9216, 4db0762920d0bb3ecd765168e2acd296 -0, 2048, 2048, 512, 9216, 6253047a99cbc0e6b1d484b7828466b6 -0, 2560, 2560, 512, 9216, 2977e1080514c6d2150ed2fde267e714 +0, 0, 0, 512, 9216, 0xa1d1f1df +0, 512, 512, 512, 9216, 0x00000000 +0, 1024, 1024, 512, 9216, 0xd12a04fd +0, 1536, 1536, 512, 9216, 0x7832be51 +0, 2048, 2048, 512, 9216, 0x1446a948 +0, 2560, 2560, 512, 9216, 0x83cefa37 diff --git a/tests/ref/fate/dca-xll_71_24_96_768 b/tests/ref/fate/dca-xll_71_24_96_768 index df8ec4da7b..c3307f126d 100644 --- a/tests/ref/fate/dca-xll_71_24_96_768 +++ b/tests/ref/fate/dca-xll_71_24_96_768 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/96000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 7.1 -#stream#, dts, pts, duration, size, hash -0, 0, 0, 1024, 24576, 0b24a527d66f2b0cab97f37e4cd79987 -0, 1024, 1024, 1024, 24576, 91ff0dac5df86e798bfef5e573536b08 -0, 2048, 2048, 1024, 24576, c2b5e663fa260abc9c737d16110052a8 -0, 3072, 3072, 1024, 24576, 81f474e17d875f7c5a2cbaadef4f7c0a -0, 4096, 4096, 1024, 24576, 959200e06f2f8489b9e36c74b073edae -0, 5120, 5120, 1024, 24576, ef1ed14d39cce6ba1ab9736831aa1b30 +0, 0, 0, 1024, 24576, 0xbdfff0e4 +0, 1024, 1024, 1024, 24576, 0x00000000 +0, 2048, 2048, 1024, 24576, 0x47d8aee7 +0, 3072, 3072, 1024, 24576, 0x2018104b +0, 4096, 4096, 1024, 24576, 0x850b8f49 +0, 5120, 5120, 1024, 24576, 0x17f7ca6f diff --git a/tests/ref/fate/dca-xll_71_24_96_768-dmix_2 b/tests/ref/fate/dca-xll_71_24_96_768-dmix_2 index b57af93a10..c91428aa8c 100644 --- a/tests/ref/fate/dca-xll_71_24_96_768-dmix_2 +++ b/tests/ref/fate/dca-xll_71_24_96_768-dmix_2 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/96000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 1024, 18432, 0a675f172b0e1a171c46dfaa4f1d0f00 -0, 1024, 1024, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 2048, 2048, 1024, 18432, 0a6efad6cc824656594d5d7abce1e547 -0, 3072, 3072, 1024, 18432, a1beb9f5afcf72b99671a7cef8c35505 -0, 4096, 4096, 1024, 18432, e73de9b6688ec463178f694540f71d61 -0, 5120, 5120, 1024, 18432, e2e326c2f61d28ad11cea665ea638ae4 +0, 0, 0, 1024, 18432, 0xb8cdf0e4 +0, 1024, 1024, 1024, 18432, 0x00000000 +0, 2048, 2048, 1024, 18432, 0x89262806 +0, 3072, 3072, 1024, 18432, 0xab935a48 +0, 4096, 4096, 1024, 18432, 0xb9d4ef6a +0, 5120, 5120, 1024, 18432, 0x259fb33e diff --git a/tests/ref/fate/dca-xll_71_24_96_768-dmix_6 b/tests/ref/fate/dca-xll_71_24_96_768-dmix_6 index b57af93a10..c91428aa8c 100644 --- a/tests/ref/fate/dca-xll_71_24_96_768-dmix_6 +++ b/tests/ref/fate/dca-xll_71_24_96_768-dmix_6 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/96000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 1024, 18432, 0a675f172b0e1a171c46dfaa4f1d0f00 -0, 1024, 1024, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 2048, 2048, 1024, 18432, 0a6efad6cc824656594d5d7abce1e547 -0, 3072, 3072, 1024, 18432, a1beb9f5afcf72b99671a7cef8c35505 -0, 4096, 4096, 1024, 18432, e73de9b6688ec463178f694540f71d61 -0, 5120, 5120, 1024, 18432, e2e326c2f61d28ad11cea665ea638ae4 +0, 0, 0, 1024, 18432, 0xb8cdf0e4 +0, 1024, 1024, 1024, 18432, 0x00000000 +0, 2048, 2048, 1024, 18432, 0x89262806 +0, 3072, 3072, 1024, 18432, 0xab935a48 +0, 4096, 4096, 1024, 18432, 0xb9d4ef6a +0, 5120, 5120, 1024, 18432, 0x259fb33e diff --git a/tests/ref/fate/dca-xll_x96_51_24_96_1509 b/tests/ref/fate/dca-xll_x96_51_24_96_1509 index 838b1dea54..5640e34633 100644 --- a/tests/ref/fate/dca-xll_x96_51_24_96_1509 +++ b/tests/ref/fate/dca-xll_x96_51_24_96_1509 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/96000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 1024, 1024, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 2048, 2048, 1024, 18432, f68686e3f6dec5aa00fc8ef495c3a3fa -0, 3072, 3072, 1024, 18432, 03adab4e2a4a5e9917d29de09e0afb22 -0, 4096, 4096, 1024, 18432, d7d1ab1efd7f2ff45f7374b41abaec51 -0, 5120, 5120, 1024, 18432, fe2aa09319ac1d7017e29fdab6207f27 +0, 0, 0, 1024, 18432, 0x00000000 +0, 1024, 1024, 1024, 18432, 0x00000000 +0, 2048, 2048, 1024, 18432, 0xa6b18739 +0, 3072, 3072, 1024, 18432, 0xd4df050d +0, 4096, 4096, 1024, 18432, 0xd2fba779 +0, 5120, 5120, 1024, 18432, 0x9ba1c641 diff --git a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 index 838b1dea54..5640e34633 100644 --- a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 +++ b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/96000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 1024, 1024, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 2048, 2048, 1024, 18432, f68686e3f6dec5aa00fc8ef495c3a3fa -0, 3072, 3072, 1024, 18432, 03adab4e2a4a5e9917d29de09e0afb22 -0, 4096, 4096, 1024, 18432, d7d1ab1efd7f2ff45f7374b41abaec51 -0, 5120, 5120, 1024, 18432, fe2aa09319ac1d7017e29fdab6207f27 +0, 0, 0, 1024, 18432, 0x00000000 +0, 1024, 1024, 1024, 18432, 0x00000000 +0, 2048, 2048, 1024, 18432, 0xa6b18739 +0, 3072, 3072, 1024, 18432, 0xd4df050d +0, 4096, 4096, 1024, 18432, 0xd2fba779 +0, 5120, 5120, 1024, 18432, 0x9ba1c641 diff --git a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 index 838b1dea54..5640e34633 100644 --- a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 +++ b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/96000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 1024, 1024, 1024, 18432, f9debe3f07be68533bf0295e3d2ba68a -0, 2048, 2048, 1024, 18432, f68686e3f6dec5aa00fc8ef495c3a3fa -0, 3072, 3072, 1024, 18432, 03adab4e2a4a5e9917d29de09e0afb22 -0, 4096, 4096, 1024, 18432, d7d1ab1efd7f2ff45f7374b41abaec51 -0, 5120, 5120, 1024, 18432, fe2aa09319ac1d7017e29fdab6207f27 +0, 0, 0, 1024, 18432, 0x00000000 +0, 1024, 1024, 1024, 18432, 0x00000000 +0, 2048, 2048, 1024, 18432, 0xa6b18739 +0, 3072, 3072, 1024, 18432, 0xd4df050d +0, 4096, 4096, 1024, 18432, 0xd2fba779 +0, 5120, 5120, 1024, 18432, 0x9ba1c641 diff --git a/tests/ref/fate/dca-xll_xch_61_24_48_768 b/tests/ref/fate/dca-xll_xch_61_24_48_768 index c0eb4aed5f..9317c91145 100644 --- a/tests/ref/fate/dca-xll_xch_61_24_48_768 +++ b/tests/ref/fate/dca-xll_xch_61_24_48_768 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 6.1 -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 10752, c3c5b236c266a9090378def1ad497a21 -0, 512, 512, 512, 10752, 36eb6749f8d9ce9f94860dcc447253ac -0, 1024, 1024, 512, 10752, 586dbf42917c8353a3d3a65d4a510aa5 -0, 1536, 1536, 512, 10752, 08aa4874b4e092982cef8bd9623ebcaf -0, 2048, 2048, 512, 10752, 809775c772fd730bbbb516cadc71406b -0, 2560, 2560, 512, 10752, 81ef75c310c242b38787cd18203aa8c6 +0, 0, 0, 512, 10752, 0xd4320448 +0, 512, 512, 512, 10752, 0x00000000 +0, 1024, 1024, 512, 10752, 0xb0d63493 +0, 1536, 1536, 512, 10752, 0xb25bd689 +0, 2048, 2048, 512, 10752, 0x946292ae +0, 2560, 2560, 512, 10752, 0x2cc3e026 diff --git a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 index 0e69ebcf94..dd89ea31d5 100644 --- a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 +++ b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 9216, 652c4e61f9abe9fba9de792242e2d31d -0, 512, 512, 512, 9216, 13a95890b5f0947d6f058ca9c30a3e01 -0, 1024, 1024, 512, 9216, bc9a102c0d879d25b5b362e20eaf277e -0, 1536, 1536, 512, 9216, 06c77edb9dbd3aa927ffec3e5cf78266 -0, 2048, 2048, 512, 9216, f4010c574400a0876aa29a71f1bf1af3 -0, 2560, 2560, 512, 9216, b6d34a134c79bf105d88ecc4ac148f92 +0, 0, 0, 512, 9216, 0xb1820448 +0, 512, 512, 512, 9216, 0x00000000 +0, 1024, 1024, 512, 9216, 0xeeef4c10 +0, 1536, 1536, 512, 9216, 0x7bb4ed68 +0, 2048, 2048, 512, 9216, 0x6aaf9f0b +0, 2560, 2560, 512, 9216, 0x8ca1e2f7 diff --git a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 index 0e69ebcf94..dd89ea31d5 100644 --- a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 +++ b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 @@ -1,15 +1,11 @@ -#format: frame checksums -#version: 2 -#hash: MD5 #tb 0: 1/48000 #media_type 0: audio #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -#stream#, dts, pts, duration, size, hash -0, 0, 0, 512, 9216, 652c4e61f9abe9fba9de792242e2d31d -0, 512, 512, 512, 9216, 13a95890b5f0947d6f058ca9c30a3e01 -0, 1024, 1024, 512, 9216, bc9a102c0d879d25b5b362e20eaf277e -0, 1536, 1536, 512, 9216, 06c77edb9dbd3aa927ffec3e5cf78266 -0, 2048, 2048, 512, 9216, f4010c574400a0876aa29a71f1bf1af3 -0, 2560, 2560, 512, 9216, b6d34a134c79bf105d88ecc4ac148f92 +0, 0, 0, 512, 9216, 0xb1820448 +0, 512, 512, 512, 9216, 0x00000000 +0, 1024, 1024, 512, 9216, 0xeeef4c10 +0, 1536, 1536, 512, 9216, 0x7bb4ed68 +0, 2048, 2048, 512, 9216, 0x6aaf9f0b +0, 2560, 2560, 512, 9216, 0x8ca1e2f7 -- 2.52.0 >From 4ba8ae9448e66827825064542729cf8dece428b8 Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Tue, 10 Feb 2026 11:19:54 -0300 Subject: [PATCH 2/3] avformat/dtshddec: properly support priming and padding samples Don't just export initial_padding, but also take it into account for timestamps by adjusting the stream's start_time. Also, export the padding samples in a way that's actually supported, as currently trailing_padding is unused so no user will look at it. For the sake of not reducing coverage and because the lossy tests have reference files that contain the priming samples, add the skip_manual flags2 to the tests so we still output them. A new ffprobe call will ensure the demuxer behavior is tested too. Signed-off-by: James Almer <[email protected]> --- libavformat/dtshddec.c | 8 +++- tests/fate/dca.mak | 16 +++---- tests/ref/fate/dca-xll_51_16_192_768_0 | 46 +++++++++++++++--- tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_51_16_192_768_1 | 46 +++++++++++++++--- tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_51_24_48_768 | 46 +++++++++++++++--- tests/ref/fate/dca-xll_51_24_48_768-dmix_2 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_51_24_48_768-dmix_6 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_51_24_48_none | 28 +++++++++-- tests/ref/fate/dca-xll_51_24_48_none-dmix_2 | 29 ++++++++++-- tests/ref/fate/dca-xll_51_24_48_none-dmix_6 | 29 ++++++++++-- tests/ref/fate/dca-xll_71_24_48_768_0 | 46 +++++++++++++++--- tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_71_24_48_768_1 | 46 +++++++++++++++--- tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_71_24_96_768 | 46 +++++++++++++++--- tests/ref/fate/dca-xll_71_24_96_768-dmix_2 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_71_24_96_768-dmix_6 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_x96_51_24_96_1509 | 46 +++++++++++++++--- .../ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 | 47 ++++++++++++++++--- .../ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 | 47 ++++++++++++++++--- tests/ref/fate/dca-xll_xch_61_24_48_768 | 46 +++++++++++++++--- .../ref/fate/dca-xll_xch_61_24_48_768-dmix_2 | 47 ++++++++++++++++--- .../ref/fate/dca-xll_xch_61_24_48_768-dmix_6 | 47 ++++++++++++++++--- 29 files changed, 1068 insertions(+), 162 deletions(-) diff --git a/libavformat/dtshddec.c b/libavformat/dtshddec.c index 28d3aeb47a..b980fde6a9 100644 --- a/libavformat/dtshddec.c +++ b/libavformat/dtshddec.c @@ -59,6 +59,7 @@ static int dtshd_read_header(AVFormatContext *s) uint64_t chunk_type, chunk_size; int64_t duration, orig_nb_samples, data_start; AVStream *st; + FFStream *sti; int ret; char *value; @@ -67,7 +68,8 @@ static int dtshd_read_header(AVFormatContext *s) return AVERROR(ENOMEM); st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_id = AV_CODEC_ID_DTS; - ffstream(st)->need_parsing = AVSTREAM_PARSE_FULL_RAW; + sti = ffstream(st); + sti->need_parsing = AVSTREAM_PARSE_FULL_RAW; for (;;) { chunk_type = avio_rb64(pb); @@ -111,6 +113,10 @@ static int dtshd_read_header(AVFormatContext *s) st->codecpar->ch_layout.nb_channels = ff_dca_count_chs_for_mask(avio_rb16(pb)); st->codecpar->initial_padding = avio_rb16(pb); st->codecpar->trailing_padding = FFMAX(st->duration - orig_nb_samples - st->codecpar->initial_padding, 0); + st->start_time = + sti->start_skip_samples = st->codecpar->initial_padding; + sti->first_discard_sample = orig_nb_samples + st->codecpar->initial_padding; + sti->last_discard_sample = st->duration; avio_skip(pb, chunk_size - 21); break; case FILEINFO: diff --git a/tests/fate/dca.mak b/tests/fate/dca.mak index c200cb06b6..7d5746fd9c 100644 --- a/tests/fate/dca.mak +++ b/tests/fate/dca.mak @@ -23,14 +23,14 @@ DCADEC_SUITE_LOSSY = core_51_24_48_768_0 \ define FATE_DCADEC_LOSSLESS_SUITE FATE_DCADEC_LOSSLESS_$(2) += fate-dca-$(1) fate-dca-$(1)-dmix_2 fate-dca-$(1)-dmix_6 -fate-dca-$(1): CMD = stream_demux dtshd $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd "" "-c:a pcm_$(2) -af aresample" -fate-dca-$(1)-dmix_2: CMD = stream_demux dtshd $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd "-downmix 0x3" "-c:a pcm_$(2) -af aresample" -fate-dca-$(1)-dmix_6: CMD = stream_demux dtshd $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd "-downmix 0x60f" "-c:a pcm_$(2) -af aresample" +fate-dca-$(1): CMD = stream_demux dtshd $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd "-flags2 skip_manual" "-c:a pcm_$(2) -af aresample" "-show_entries stream=initial_padding:packet=pts,duration:packet_side_data" +fate-dca-$(1)-dmix_2: CMD = stream_demux dtshd $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd "-downmix 0x3 -flags2 skip_manual" "-c:a pcm_$(2) -af aresample" "-show_entries stream=start_time,initial_padding:packet=pts,duration:packet_side_data" +fate-dca-$(1)-dmix_6: CMD = stream_demux dtshd $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd "-downmix 0x60f -flags2 skip_manual" "-c:a pcm_$(2) -af aresample" "-show_entries stream=start_time,initial_padding:packet=pts,duration:packet_side_data" endef define FATE_DCADEC_LOSSY_SUITE FATE_DCADEC_LOSSY += fate-dca-$(1) -fate-dca-$(1): CMD = ffmpeg -i $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd -f f32le -af aresample - +fate-dca-$(1): CMD = ffmpeg -flags2 skip_manual -i $(TARGET_SAMPLES)/dts/dcadec-suite/$(1).dtshd -f f32le -af aresample - fate-dca-$(1): REF = $(SAMPLES)/dts/dcadec-suite/$(1).f32 endef @@ -40,21 +40,21 @@ $(foreach N,$(DCADEC_SUITE_LOSSY),$(eval $(call FATE_DCADEC_LOSSY_SUITE,$(N)))) # lossy downmix tests FATE_DCADEC_LOSSY += fate-dca-core_51_24_48_768_1-dmix_2 -fate-dca-core_51_24_48_768_1-dmix_2: CMD = ffmpeg -downmix stereo -i $(TARGET_SAMPLES)/dts/dcadec-suite/core_51_24_48_768_1.dtshd -f f32le -af aresample - +fate-dca-core_51_24_48_768_1-dmix_2: CMD = ffmpeg -downmix stereo -flags2 skip_manual -i $(TARGET_SAMPLES)/dts/dcadec-suite/core_51_24_48_768_1.dtshd -f f32le -af aresample - fate-dca-core_51_24_48_768_1-dmix_2: REF = $(SAMPLES)/dts/dcadec-suite/core_51_24_48_768_1-dmix_2.f32 FATE_DCADEC_LOSSY += fate-dca-x96_xxch_71_24_96_3840-dmix_2 -fate-dca-x96_xxch_71_24_96_3840-dmix_2: CMD = ffmpeg -downmix stereo -i $(TARGET_SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840.dtshd -f f32le -af aresample - +fate-dca-x96_xxch_71_24_96_3840-dmix_2: CMD = ffmpeg -downmix stereo -flags2 skip_manual -i $(TARGET_SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840.dtshd -f f32le -af aresample - # intentionally uses the dmix_6 reference because the sample does not contain stereo downmix coefficients fate-dca-x96_xxch_71_24_96_3840-dmix_2: REF = $(SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840-dmix_6.f32 FATE_DCADEC_LOSSY += fate-dca-x96_xxch_71_24_96_3840-dmix_6 -fate-dca-x96_xxch_71_24_96_3840-dmix_6: CMD = ffmpeg -downmix "FL+FR+FC+LFE+SL+SR" -i $(TARGET_SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840.dtshd -f f32le -af aresample - +fate-dca-x96_xxch_71_24_96_3840-dmix_6: CMD = ffmpeg -downmix "FL+FR+FC+LFE+SL+SR" -flags2 skip_manual -i $(TARGET_SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840.dtshd -f f32le -af aresample - fate-dca-x96_xxch_71_24_96_3840-dmix_6: REF = $(SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840-dmix_6.f32 FATE_DCADEC_LOSSY += fate-dca-xch_61_24_48_768-dmix_6 -fate-dca-xch_61_24_48_768-dmix_6: CMD = ffmpeg -downmix "5.1(side)" -i $(TARGET_SAMPLES)/dts/dcadec-suite/xch_61_24_48_768.dtshd -f f32le -af aresample - +fate-dca-xch_61_24_48_768-dmix_6: CMD = ffmpeg -downmix "5.1(side)" -flags2 skip_manual -i $(TARGET_SAMPLES)/dts/dcadec-suite/xch_61_24_48_768.dtshd -f f32le -af aresample - fate-dca-xch_61_24_48_768-dmix_6: REF = $(SAMPLES)/dts/dcadec-suite/xch_61_24_48_768-dmix_6.f32 $(FATE_DCADEC_LOSSY): CMP = oneoff diff --git a/tests/ref/fate/dca-xll_51_16_192_768_0 b/tests/ref/fate/dca-xll_51_16_192_768_0 index 716ba6a50b..3d165dca20 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_0 +++ b/tests/ref/fate/dca-xll_51_16_192_768_0 @@ -3,9 +3,43 @@ #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 2048, 24576, 0x00000000 -0, 2048, 2048, 2048, 24576, 0x00000000 -0, 4096, 4096, 2048, 24576, 0x004b62f1 -0, 6144, 6144, 2048, 24576, 0x66edba5f -0, 8192, 8192, 2048, 24576, 0xf2aa3d4b -0, 10240, 10240, 2048, 24576, 0xa6741aff +0, -4096, -4096, 2048, 24576, 0x00000000 +0, -2048, -2048, 2048, 24576, 0x00000000 +0, 0, 0, 2048, 24576, 0x004b62f1 +0, 2048, 2048, 2048, 24576, 0x66edba5f +0, 4096, 4096, 2048, 24576, 0xf2aa3d4b +0, 6144, 6144, 2048, 24576, 0xa6741aff +[PACKET] +pts=0 +duration=2048 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=4096 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=2048 +duration=2048 +[/PACKET] +[PACKET] +pts=4096 +duration=2048 +[/PACKET] +[PACKET] +pts=6144 +duration=2048 +[/PACKET] +[PACKET] +pts=8192 +duration=2048 +[/PACKET] +[PACKET] +pts=10240 +duration=2048 +[/PACKET] +[STREAM] +initial_padding=4096 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 index 716ba6a50b..30bb49ca1a 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 +++ b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_2 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 2048, 24576, 0x00000000 -0, 2048, 2048, 2048, 24576, 0x00000000 -0, 4096, 4096, 2048, 24576, 0x004b62f1 -0, 6144, 6144, 2048, 24576, 0x66edba5f -0, 8192, 8192, 2048, 24576, 0xf2aa3d4b -0, 10240, 10240, 2048, 24576, 0xa6741aff +0, -4096, -4096, 2048, 24576, 0x00000000 +0, -2048, -2048, 2048, 24576, 0x00000000 +0, 0, 0, 2048, 24576, 0x004b62f1 +0, 2048, 2048, 2048, 24576, 0x66edba5f +0, 4096, 4096, 2048, 24576, 0xf2aa3d4b +0, 6144, 6144, 2048, 24576, 0xa6741aff +[PACKET] +pts=0 +duration=2048 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=4096 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=2048 +duration=2048 +[/PACKET] +[PACKET] +pts=4096 +duration=2048 +[/PACKET] +[PACKET] +pts=6144 +duration=2048 +[/PACKET] +[PACKET] +pts=8192 +duration=2048 +[/PACKET] +[PACKET] +pts=10240 +duration=2048 +[/PACKET] +[STREAM] +initial_padding=4096 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 index 716ba6a50b..30bb49ca1a 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 +++ b/tests/ref/fate/dca-xll_51_16_192_768_0-dmix_6 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 2048, 24576, 0x00000000 -0, 2048, 2048, 2048, 24576, 0x00000000 -0, 4096, 4096, 2048, 24576, 0x004b62f1 -0, 6144, 6144, 2048, 24576, 0x66edba5f -0, 8192, 8192, 2048, 24576, 0xf2aa3d4b -0, 10240, 10240, 2048, 24576, 0xa6741aff +0, -4096, -4096, 2048, 24576, 0x00000000 +0, -2048, -2048, 2048, 24576, 0x00000000 +0, 0, 0, 2048, 24576, 0x004b62f1 +0, 2048, 2048, 2048, 24576, 0x66edba5f +0, 4096, 4096, 2048, 24576, 0xf2aa3d4b +0, 6144, 6144, 2048, 24576, 0xa6741aff +[PACKET] +pts=0 +duration=2048 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=4096 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=2048 +duration=2048 +[/PACKET] +[PACKET] +pts=4096 +duration=2048 +[/PACKET] +[PACKET] +pts=6144 +duration=2048 +[/PACKET] +[PACKET] +pts=8192 +duration=2048 +[/PACKET] +[PACKET] +pts=10240 +duration=2048 +[/PACKET] +[STREAM] +initial_padding=4096 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_16_192_768_1 b/tests/ref/fate/dca-xll_51_16_192_768_1 index 716ba6a50b..3d165dca20 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_1 +++ b/tests/ref/fate/dca-xll_51_16_192_768_1 @@ -3,9 +3,43 @@ #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 2048, 24576, 0x00000000 -0, 2048, 2048, 2048, 24576, 0x00000000 -0, 4096, 4096, 2048, 24576, 0x004b62f1 -0, 6144, 6144, 2048, 24576, 0x66edba5f -0, 8192, 8192, 2048, 24576, 0xf2aa3d4b -0, 10240, 10240, 2048, 24576, 0xa6741aff +0, -4096, -4096, 2048, 24576, 0x00000000 +0, -2048, -2048, 2048, 24576, 0x00000000 +0, 0, 0, 2048, 24576, 0x004b62f1 +0, 2048, 2048, 2048, 24576, 0x66edba5f +0, 4096, 4096, 2048, 24576, 0xf2aa3d4b +0, 6144, 6144, 2048, 24576, 0xa6741aff +[PACKET] +pts=0 +duration=2048 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=4096 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=2048 +duration=2048 +[/PACKET] +[PACKET] +pts=4096 +duration=2048 +[/PACKET] +[PACKET] +pts=6144 +duration=2048 +[/PACKET] +[PACKET] +pts=8192 +duration=2048 +[/PACKET] +[PACKET] +pts=10240 +duration=2048 +[/PACKET] +[STREAM] +initial_padding=4096 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 index fe13ca438c..2ebc65ab6c 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 +++ b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_2 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: stereo -0, 0, 0, 2048, 8192, 0x00000000 -0, 2048, 2048, 2048, 8192, 0x5a180402 -0, 4096, 4096, 2048, 8192, 0x53413568 -0, 6144, 6144, 2048, 8192, 0x2a34e9e1 -0, 8192, 8192, 2048, 8192, 0x51dad4d7 -0, 10240, 10240, 2048, 8192, 0x9861024c +0, -4096, -4096, 2048, 8192, 0x00000000 +0, -2048, -2048, 2048, 8192, 0x5a180402 +0, 0, 0, 2048, 8192, 0x53413568 +0, 2048, 2048, 2048, 8192, 0x2a34e9e1 +0, 4096, 4096, 2048, 8192, 0x51dad4d7 +0, 6144, 6144, 2048, 8192, 0x9861024c +[PACKET] +pts=0 +duration=2048 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=4096 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=2048 +duration=2048 +[/PACKET] +[PACKET] +pts=4096 +duration=2048 +[/PACKET] +[PACKET] +pts=6144 +duration=2048 +[/PACKET] +[PACKET] +pts=8192 +duration=2048 +[/PACKET] +[PACKET] +pts=10240 +duration=2048 +[/PACKET] +[STREAM] +initial_padding=4096 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 index 716ba6a50b..30bb49ca1a 100644 --- a/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 +++ b/tests/ref/fate/dca-xll_51_16_192_768_1-dmix_6 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s16le #sample_rate 0: 192000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 2048, 24576, 0x00000000 -0, 2048, 2048, 2048, 24576, 0x00000000 -0, 4096, 4096, 2048, 24576, 0x004b62f1 -0, 6144, 6144, 2048, 24576, 0x66edba5f -0, 8192, 8192, 2048, 24576, 0xf2aa3d4b -0, 10240, 10240, 2048, 24576, 0xa6741aff +0, -4096, -4096, 2048, 24576, 0x00000000 +0, -2048, -2048, 2048, 24576, 0x00000000 +0, 0, 0, 2048, 24576, 0x004b62f1 +0, 2048, 2048, 2048, 24576, 0x66edba5f +0, 4096, 4096, 2048, 24576, 0xf2aa3d4b +0, 6144, 6144, 2048, 24576, 0xa6741aff +[PACKET] +pts=0 +duration=2048 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=4096 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=2048 +duration=2048 +[/PACKET] +[PACKET] +pts=4096 +duration=2048 +[/PACKET] +[PACKET] +pts=6144 +duration=2048 +[/PACKET] +[PACKET] +pts=8192 +duration=2048 +[/PACKET] +[PACKET] +pts=10240 +duration=2048 +[/PACKET] +[STREAM] +initial_padding=4096 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_24_48_768 b/tests/ref/fate/dca-xll_51_24_48_768 index f37c38d17f..1ce046367c 100644 --- a/tests/ref/fate/dca-xll_51_24_48_768 +++ b/tests/ref/fate/dca-xll_51_24_48_768 @@ -3,9 +3,43 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 512, 9216, 0x00000000 -0, 512, 512, 512, 9216, 0x00000000 -0, 1024, 1024, 512, 9216, 0x03de31ea -0, 1536, 1536, 512, 9216, 0xfdbede52 -0, 2048, 2048, 512, 9216, 0x280a9c97 -0, 2560, 2560, 512, 9216, 0x2d8de2d5 +0, -1024, -1024, 512, 9216, 0x00000000 +0, -512, -512, 512, 9216, 0x00000000 +0, 0, 0, 512, 9216, 0x03de31ea +0, 512, 512, 512, 9216, 0xfdbede52 +0, 1024, 1024, 512, 9216, 0x280a9c97 +0, 1536, 1536, 512, 9216, 0x2d8de2d5 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_24_48_768-dmix_2 b/tests/ref/fate/dca-xll_51_24_48_768-dmix_2 index 32edc3bedd..43396ba00f 100644 --- a/tests/ref/fate/dca-xll_51_24_48_768-dmix_2 +++ b/tests/ref/fate/dca-xll_51_24_48_768-dmix_2 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: stereo -0, 0, 0, 512, 3072, 0x00000000 -0, 512, 512, 512, 3072, 0x00000000 -0, 1024, 1024, 512, 3072, 0xa27d155c -0, 1536, 1536, 512, 3072, 0x56efed53 -0, 2048, 2048, 512, 3072, 0x0bf82010 -0, 2560, 2560, 512, 3072, 0x00af1cf2 +0, -1024, -1024, 512, 3072, 0x00000000 +0, -512, -512, 512, 3072, 0x00000000 +0, 0, 0, 512, 3072, 0xa27d155c +0, 512, 512, 512, 3072, 0x56efed53 +0, 1024, 1024, 512, 3072, 0x0bf82010 +0, 1536, 1536, 512, 3072, 0x00af1cf2 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_24_48_768-dmix_6 b/tests/ref/fate/dca-xll_51_24_48_768-dmix_6 index f37c38d17f..e2c2e9c035 100644 --- a/tests/ref/fate/dca-xll_51_24_48_768-dmix_6 +++ b/tests/ref/fate/dca-xll_51_24_48_768-dmix_6 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 512, 9216, 0x00000000 -0, 512, 512, 512, 9216, 0x00000000 -0, 1024, 1024, 512, 9216, 0x03de31ea -0, 1536, 1536, 512, 9216, 0xfdbede52 -0, 2048, 2048, 512, 9216, 0x280a9c97 -0, 2560, 2560, 512, 9216, 0x2d8de2d5 +0, -1024, -1024, 512, 9216, 0x00000000 +0, -512, -512, 512, 9216, 0x00000000 +0, 0, 0, 512, 9216, 0x03de31ea +0, 512, 512, 512, 9216, 0xfdbede52 +0, 1024, 1024, 512, 9216, 0x280a9c97 +0, 1536, 1536, 512, 9216, 0x2d8de2d5 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_24_48_none b/tests/ref/fate/dca-xll_51_24_48_none index 2e6d17e292..2448297cb6 100644 --- a/tests/ref/fate/dca-xll_51_24_48_none +++ b/tests/ref/fate/dca-xll_51_24_48_none @@ -3,6 +3,28 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 1024, 18432, 0x00000000 -0, 1024, 1024, 1024, 18432, 0x5ca6ebf7 -0, 2048, 2048, 1024, 18432, 0xb5520ea3 +0, -1024, -1024, 1024, 18432, 0x00000000 +0, 0, 0, 1024, 18432, 0x5ca6ebf7 +0, 1024, 1024, 1024, 18432, 0xb5520ea3 +[PACKET] +pts=0 +duration=1024 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=1024 +duration=1024 +[/PACKET] +[PACKET] +pts=2048 +duration=1024 +[/PACKET] +[STREAM] +initial_padding=1024 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_24_48_none-dmix_2 b/tests/ref/fate/dca-xll_51_24_48_none-dmix_2 index 2e6d17e292..26a7326039 100644 --- a/tests/ref/fate/dca-xll_51_24_48_none-dmix_2 +++ b/tests/ref/fate/dca-xll_51_24_48_none-dmix_2 @@ -3,6 +3,29 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 1024, 18432, 0x00000000 -0, 1024, 1024, 1024, 18432, 0x5ca6ebf7 -0, 2048, 2048, 1024, 18432, 0xb5520ea3 +0, -1024, -1024, 1024, 18432, 0x00000000 +0, 0, 0, 1024, 18432, 0x5ca6ebf7 +0, 1024, 1024, 1024, 18432, 0xb5520ea3 +[PACKET] +pts=0 +duration=1024 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=1024 +duration=1024 +[/PACKET] +[PACKET] +pts=2048 +duration=1024 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_51_24_48_none-dmix_6 b/tests/ref/fate/dca-xll_51_24_48_none-dmix_6 index 2e6d17e292..26a7326039 100644 --- a/tests/ref/fate/dca-xll_51_24_48_none-dmix_6 +++ b/tests/ref/fate/dca-xll_51_24_48_none-dmix_6 @@ -3,6 +3,29 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 1024, 18432, 0x00000000 -0, 1024, 1024, 1024, 18432, 0x5ca6ebf7 -0, 2048, 2048, 1024, 18432, 0xb5520ea3 +0, -1024, -1024, 1024, 18432, 0x00000000 +0, 0, 0, 1024, 18432, 0x5ca6ebf7 +0, 1024, 1024, 1024, 18432, 0xb5520ea3 +[PACKET] +pts=0 +duration=1024 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=1024 +duration=1024 +[/PACKET] +[PACKET] +pts=2048 +duration=1024 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_71_24_48_768_0 b/tests/ref/fate/dca-xll_71_24_48_768_0 index 64a0699f77..7315d456c5 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_0 +++ b/tests/ref/fate/dca-xll_71_24_48_768_0 @@ -3,9 +3,43 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 7.1 -0, 0, 0, 512, 12288, 0xa5edf1df -0, 512, 512, 512, 12288, 0x00000000 -0, 1024, 1024, 512, 12288, 0x6613373c -0, 1536, 1536, 512, 12288, 0xa36ccec0 -0, 2048, 2048, 512, 12288, 0xdf1c88c5 -0, 2560, 2560, 512, 12288, 0x71c4dd77 +0, -1024, -1024, 512, 12288, 0xa5edf1df +0, -512, -512, 512, 12288, 0x00000000 +0, 0, 0, 512, 12288, 0x6613373c +0, 512, 512, 512, 12288, 0xa36ccec0 +0, 1024, 1024, 512, 12288, 0xdf1c88c5 +0, 1536, 1536, 512, 12288, 0x71c4dd77 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 index 0db890b10c..e28ee93429 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 +++ b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_2 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 512, 9216, 0xa1d1f1df -0, 512, 512, 512, 9216, 0x00000000 -0, 1024, 1024, 512, 9216, 0xeeb20c83 -0, 1536, 1536, 512, 9216, 0xfda4b141 -0, 2048, 2048, 512, 9216, 0x252ab888 -0, 2560, 2560, 512, 9216, 0x744c04e4 +0, -1024, -1024, 512, 9216, 0xa1d1f1df +0, -512, -512, 512, 9216, 0x00000000 +0, 0, 0, 512, 9216, 0xeeb20c83 +0, 512, 512, 512, 9216, 0xfda4b141 +0, 1024, 1024, 512, 9216, 0x252ab888 +0, 1536, 1536, 512, 9216, 0x744c04e4 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 index 0db890b10c..e28ee93429 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 +++ b/tests/ref/fate/dca-xll_71_24_48_768_0-dmix_6 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 512, 9216, 0xa1d1f1df -0, 512, 512, 512, 9216, 0x00000000 -0, 1024, 1024, 512, 9216, 0xeeb20c83 -0, 1536, 1536, 512, 9216, 0xfda4b141 -0, 2048, 2048, 512, 9216, 0x252ab888 -0, 2560, 2560, 512, 9216, 0x744c04e4 +0, -1024, -1024, 512, 9216, 0xa1d1f1df +0, -512, -512, 512, 9216, 0x00000000 +0, 0, 0, 512, 9216, 0xeeb20c83 +0, 512, 512, 512, 9216, 0xfda4b141 +0, 1024, 1024, 512, 9216, 0x252ab888 +0, 1536, 1536, 512, 9216, 0x744c04e4 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_71_24_48_768_1 b/tests/ref/fate/dca-xll_71_24_48_768_1 index 64a0699f77..7315d456c5 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_1 +++ b/tests/ref/fate/dca-xll_71_24_48_768_1 @@ -3,9 +3,43 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 7.1 -0, 0, 0, 512, 12288, 0xa5edf1df -0, 512, 512, 512, 12288, 0x00000000 -0, 1024, 1024, 512, 12288, 0x6613373c -0, 1536, 1536, 512, 12288, 0xa36ccec0 -0, 2048, 2048, 512, 12288, 0xdf1c88c5 -0, 2560, 2560, 512, 12288, 0x71c4dd77 +0, -1024, -1024, 512, 12288, 0xa5edf1df +0, -512, -512, 512, 12288, 0x00000000 +0, 0, 0, 512, 12288, 0x6613373c +0, 512, 512, 512, 12288, 0xa36ccec0 +0, 1024, 1024, 512, 12288, 0xdf1c88c5 +0, 1536, 1536, 512, 12288, 0x71c4dd77 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 index 0534dedc72..da70f543b6 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 +++ b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_2 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: stereo -0, 0, 0, 512, 3072, 0x00000000 -0, 512, 512, 512, 3072, 0x00000000 -0, 1024, 1024, 512, 3072, 0x1bf4e1f9 -0, 1536, 1536, 512, 3072, 0x89a1d6cd -0, 2048, 2048, 512, 3072, 0xf088ee73 -0, 2560, 2560, 512, 3072, 0x401cc303 +0, -1024, -1024, 512, 3072, 0x00000000 +0, -512, -512, 512, 3072, 0x00000000 +0, 0, 0, 512, 3072, 0x1bf4e1f9 +0, 512, 512, 512, 3072, 0x89a1d6cd +0, 1024, 1024, 512, 3072, 0xf088ee73 +0, 1536, 1536, 512, 3072, 0x401cc303 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 index 9f9d2a7a2f..f1f7ddddea 100644 --- a/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 +++ b/tests/ref/fate/dca-xll_71_24_48_768_1-dmix_6 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 512, 9216, 0xa1d1f1df -0, 512, 512, 512, 9216, 0x00000000 -0, 1024, 1024, 512, 9216, 0xd12a04fd -0, 1536, 1536, 512, 9216, 0x7832be51 -0, 2048, 2048, 512, 9216, 0x1446a948 -0, 2560, 2560, 512, 9216, 0x83cefa37 +0, -1024, -1024, 512, 9216, 0xa1d1f1df +0, -512, -512, 512, 9216, 0x00000000 +0, 0, 0, 512, 9216, 0xd12a04fd +0, 512, 512, 512, 9216, 0x7832be51 +0, 1024, 1024, 512, 9216, 0x1446a948 +0, 1536, 1536, 512, 9216, 0x83cefa37 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_71_24_96_768 b/tests/ref/fate/dca-xll_71_24_96_768 index c3307f126d..efa1a44458 100644 --- a/tests/ref/fate/dca-xll_71_24_96_768 +++ b/tests/ref/fate/dca-xll_71_24_96_768 @@ -3,9 +3,43 @@ #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 7.1 -0, 0, 0, 1024, 24576, 0xbdfff0e4 -0, 1024, 1024, 1024, 24576, 0x00000000 -0, 2048, 2048, 1024, 24576, 0x47d8aee7 -0, 3072, 3072, 1024, 24576, 0x2018104b -0, 4096, 4096, 1024, 24576, 0x850b8f49 -0, 5120, 5120, 1024, 24576, 0x17f7ca6f +0, -2048, -2048, 1024, 24576, 0xbdfff0e4 +0, -1024, -1024, 1024, 24576, 0x00000000 +0, 0, 0, 1024, 24576, 0x47d8aee7 +0, 1024, 1024, 1024, 24576, 0x2018104b +0, 2048, 2048, 1024, 24576, 0x850b8f49 +0, 3072, 3072, 1024, 24576, 0x17f7ca6f +[PACKET] +pts=0 +duration=1024 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=2048 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=1024 +duration=1024 +[/PACKET] +[PACKET] +pts=2048 +duration=1024 +[/PACKET] +[PACKET] +pts=3072 +duration=1024 +[/PACKET] +[PACKET] +pts=4096 +duration=1024 +[/PACKET] +[PACKET] +pts=5120 +duration=1024 +[/PACKET] +[STREAM] +initial_padding=2048 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_71_24_96_768-dmix_2 b/tests/ref/fate/dca-xll_71_24_96_768-dmix_2 index c91428aa8c..1c8bd6c0e7 100644 --- a/tests/ref/fate/dca-xll_71_24_96_768-dmix_2 +++ b/tests/ref/fate/dca-xll_71_24_96_768-dmix_2 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 1024, 18432, 0xb8cdf0e4 -0, 1024, 1024, 1024, 18432, 0x00000000 -0, 2048, 2048, 1024, 18432, 0x89262806 -0, 3072, 3072, 1024, 18432, 0xab935a48 -0, 4096, 4096, 1024, 18432, 0xb9d4ef6a -0, 5120, 5120, 1024, 18432, 0x259fb33e +0, -2048, -2048, 1024, 18432, 0xb8cdf0e4 +0, -1024, -1024, 1024, 18432, 0x00000000 +0, 0, 0, 1024, 18432, 0x89262806 +0, 1024, 1024, 1024, 18432, 0xab935a48 +0, 2048, 2048, 1024, 18432, 0xb9d4ef6a +0, 3072, 3072, 1024, 18432, 0x259fb33e +[PACKET] +pts=0 +duration=1024 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=2048 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=1024 +duration=1024 +[/PACKET] +[PACKET] +pts=2048 +duration=1024 +[/PACKET] +[PACKET] +pts=3072 +duration=1024 +[/PACKET] +[PACKET] +pts=4096 +duration=1024 +[/PACKET] +[PACKET] +pts=5120 +duration=1024 +[/PACKET] +[STREAM] +initial_padding=2048 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_71_24_96_768-dmix_6 b/tests/ref/fate/dca-xll_71_24_96_768-dmix_6 index c91428aa8c..1c8bd6c0e7 100644 --- a/tests/ref/fate/dca-xll_71_24_96_768-dmix_6 +++ b/tests/ref/fate/dca-xll_71_24_96_768-dmix_6 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 1024, 18432, 0xb8cdf0e4 -0, 1024, 1024, 1024, 18432, 0x00000000 -0, 2048, 2048, 1024, 18432, 0x89262806 -0, 3072, 3072, 1024, 18432, 0xab935a48 -0, 4096, 4096, 1024, 18432, 0xb9d4ef6a -0, 5120, 5120, 1024, 18432, 0x259fb33e +0, -2048, -2048, 1024, 18432, 0xb8cdf0e4 +0, -1024, -1024, 1024, 18432, 0x00000000 +0, 0, 0, 1024, 18432, 0x89262806 +0, 1024, 1024, 1024, 18432, 0xab935a48 +0, 2048, 2048, 1024, 18432, 0xb9d4ef6a +0, 3072, 3072, 1024, 18432, 0x259fb33e +[PACKET] +pts=0 +duration=1024 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=2048 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=1024 +duration=1024 +[/PACKET] +[PACKET] +pts=2048 +duration=1024 +[/PACKET] +[PACKET] +pts=3072 +duration=1024 +[/PACKET] +[PACKET] +pts=4096 +duration=1024 +[/PACKET] +[PACKET] +pts=5120 +duration=1024 +[/PACKET] +[STREAM] +initial_padding=2048 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_x96_51_24_96_1509 b/tests/ref/fate/dca-xll_x96_51_24_96_1509 index 5640e34633..4cc53eee5a 100644 --- a/tests/ref/fate/dca-xll_x96_51_24_96_1509 +++ b/tests/ref/fate/dca-xll_x96_51_24_96_1509 @@ -3,9 +3,43 @@ #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 1024, 18432, 0x00000000 -0, 1024, 1024, 1024, 18432, 0x00000000 -0, 2048, 2048, 1024, 18432, 0xa6b18739 -0, 3072, 3072, 1024, 18432, 0xd4df050d -0, 4096, 4096, 1024, 18432, 0xd2fba779 -0, 5120, 5120, 1024, 18432, 0x9ba1c641 +0, -2048, -2048, 1024, 18432, 0x00000000 +0, -1024, -1024, 1024, 18432, 0x00000000 +0, 0, 0, 1024, 18432, 0xa6b18739 +0, 1024, 1024, 1024, 18432, 0xd4df050d +0, 2048, 2048, 1024, 18432, 0xd2fba779 +0, 3072, 3072, 1024, 18432, 0x9ba1c641 +[PACKET] +pts=0 +duration=1024 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=2048 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=1024 +duration=1024 +[/PACKET] +[PACKET] +pts=2048 +duration=1024 +[/PACKET] +[PACKET] +pts=3072 +duration=1024 +[/PACKET] +[PACKET] +pts=4096 +duration=1024 +[/PACKET] +[PACKET] +pts=5120 +duration=1024 +[/PACKET] +[STREAM] +initial_padding=2048 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 index 5640e34633..05b36097d9 100644 --- a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 +++ b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_2 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 1024, 18432, 0x00000000 -0, 1024, 1024, 1024, 18432, 0x00000000 -0, 2048, 2048, 1024, 18432, 0xa6b18739 -0, 3072, 3072, 1024, 18432, 0xd4df050d -0, 4096, 4096, 1024, 18432, 0xd2fba779 -0, 5120, 5120, 1024, 18432, 0x9ba1c641 +0, -2048, -2048, 1024, 18432, 0x00000000 +0, -1024, -1024, 1024, 18432, 0x00000000 +0, 0, 0, 1024, 18432, 0xa6b18739 +0, 1024, 1024, 1024, 18432, 0xd4df050d +0, 2048, 2048, 1024, 18432, 0xd2fba779 +0, 3072, 3072, 1024, 18432, 0x9ba1c641 +[PACKET] +pts=0 +duration=1024 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=2048 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=1024 +duration=1024 +[/PACKET] +[PACKET] +pts=2048 +duration=1024 +[/PACKET] +[PACKET] +pts=3072 +duration=1024 +[/PACKET] +[PACKET] +pts=4096 +duration=1024 +[/PACKET] +[PACKET] +pts=5120 +duration=1024 +[/PACKET] +[STREAM] +initial_padding=2048 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 index 5640e34633..05b36097d9 100644 --- a/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 +++ b/tests/ref/fate/dca-xll_x96_51_24_96_1509-dmix_6 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 96000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 1024, 18432, 0x00000000 -0, 1024, 1024, 1024, 18432, 0x00000000 -0, 2048, 2048, 1024, 18432, 0xa6b18739 -0, 3072, 3072, 1024, 18432, 0xd4df050d -0, 4096, 4096, 1024, 18432, 0xd2fba779 -0, 5120, 5120, 1024, 18432, 0x9ba1c641 +0, -2048, -2048, 1024, 18432, 0x00000000 +0, -1024, -1024, 1024, 18432, 0x00000000 +0, 0, 0, 1024, 18432, 0xa6b18739 +0, 1024, 1024, 1024, 18432, 0xd4df050d +0, 2048, 2048, 1024, 18432, 0xd2fba779 +0, 3072, 3072, 1024, 18432, 0x9ba1c641 +[PACKET] +pts=0 +duration=1024 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=2048 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=1024 +duration=1024 +[/PACKET] +[PACKET] +pts=2048 +duration=1024 +[/PACKET] +[PACKET] +pts=3072 +duration=1024 +[/PACKET] +[PACKET] +pts=4096 +duration=1024 +[/PACKET] +[PACKET] +pts=5120 +duration=1024 +[/PACKET] +[STREAM] +initial_padding=2048 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_xch_61_24_48_768 b/tests/ref/fate/dca-xll_xch_61_24_48_768 index 9317c91145..b69f70b583 100644 --- a/tests/ref/fate/dca-xll_xch_61_24_48_768 +++ b/tests/ref/fate/dca-xll_xch_61_24_48_768 @@ -3,9 +3,43 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 6.1 -0, 0, 0, 512, 10752, 0xd4320448 -0, 512, 512, 512, 10752, 0x00000000 -0, 1024, 1024, 512, 10752, 0xb0d63493 -0, 1536, 1536, 512, 10752, 0xb25bd689 -0, 2048, 2048, 512, 10752, 0x946292ae -0, 2560, 2560, 512, 10752, 0x2cc3e026 +0, -1024, -1024, 512, 10752, 0xd4320448 +0, -512, -512, 512, 10752, 0x00000000 +0, 0, 0, 512, 10752, 0xb0d63493 +0, 512, 512, 512, 10752, 0xb25bd689 +0, 1024, 1024, 512, 10752, 0x946292ae +0, 1536, 1536, 512, 10752, 0x2cc3e026 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 index dd89ea31d5..1b0e77adaf 100644 --- a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 +++ b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_2 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 512, 9216, 0xb1820448 -0, 512, 512, 512, 9216, 0x00000000 -0, 1024, 1024, 512, 9216, 0xeeef4c10 -0, 1536, 1536, 512, 9216, 0x7bb4ed68 -0, 2048, 2048, 512, 9216, 0x6aaf9f0b -0, 2560, 2560, 512, 9216, 0x8ca1e2f7 +0, -1024, -1024, 512, 9216, 0xb1820448 +0, -512, -512, 512, 9216, 0x00000000 +0, 0, 0, 512, 9216, 0xeeef4c10 +0, 512, 512, 512, 9216, 0x7bb4ed68 +0, 1024, 1024, 512, 9216, 0x6aaf9f0b +0, 1536, 1536, 512, 9216, 0x8ca1e2f7 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] diff --git a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 index dd89ea31d5..1b0e77adaf 100644 --- a/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 +++ b/tests/ref/fate/dca-xll_xch_61_24_48_768-dmix_6 @@ -3,9 +3,44 @@ #codec_id 0: pcm_s24le #sample_rate 0: 48000 #channel_layout_name 0: 5.1(side) -0, 0, 0, 512, 9216, 0xb1820448 -0, 512, 512, 512, 9216, 0x00000000 -0, 1024, 1024, 512, 9216, 0xeeef4c10 -0, 1536, 1536, 512, 9216, 0x7bb4ed68 -0, 2048, 2048, 512, 9216, 0x6aaf9f0b -0, 2560, 2560, 512, 9216, 0x8ca1e2f7 +0, -1024, -1024, 512, 9216, 0xb1820448 +0, -512, -512, 512, 9216, 0x00000000 +0, 0, 0, 512, 9216, 0xeeef4c10 +0, 512, 512, 512, 9216, 0x7bb4ed68 +0, 1024, 1024, 512, 9216, 0x6aaf9f0b +0, 1536, 1536, 512, 9216, 0x8ca1e2f7 +[PACKET] +pts=0 +duration=512 +[SIDE_DATA] +side_data_type=Skip Samples +skip_samples=1024 +discard_padding=0 +skip_reason=0 +discard_reason=0 +[/SIDE_DATA] +[/PACKET] +[PACKET] +pts=512 +duration=512 +[/PACKET] +[PACKET] +pts=1024 +duration=512 +[/PACKET] +[PACKET] +pts=1536 +duration=512 +[/PACKET] +[PACKET] +pts=2048 +duration=512 +[/PACKET] +[PACKET] +pts=2560 +duration=512 +[/PACKET] +[STREAM] +initial_padding=1024 +start_time=0.021333 +[/STREAM] -- 2.52.0 >From 586a858e5f77d3211822864bc1e921771b0da076 Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Tue, 10 Feb 2026 11:30:32 -0300 Subject: [PATCH 3/3] avcodec: set skip_samples in generic code Decoders should only worry about exporting AVCodeContext->delay during init. Signed-off-by: James Almer <[email protected]> --- libavcodec/avcodec.c | 2 ++ libavcodec/liblc3dec.c | 1 - libavcodec/libopusdec.c | 2 +- libavcodec/opus/parse.c | 2 -- libavcodec/wmadec.c | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index de4e083db1..9ff4c7f319 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -354,6 +354,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code if (!avctx->bit_rate) avctx->bit_rate = get_bit_rate(avctx); + avci->skip_samples = avctx->delay; + /* validate channel layout from the decoder */ if ((avctx->ch_layout.nb_channels && !av_channel_layout_check(&avctx->ch_layout)) || avctx->ch_layout.nb_channels > FF_SANE_NB_CHANNELS) { diff --git a/libavcodec/liblc3dec.c b/libavcodec/liblc3dec.c index 953445ecfa..b27c2ee90f 100644 --- a/libavcodec/liblc3dec.c +++ b/libavcodec/liblc3dec.c @@ -87,7 +87,6 @@ static av_cold int liblc3_decode_init(AVCodecContext *avctx) avctx->delay = lc3_hr_delay_samples( liblc3->hr_mode, liblc3->frame_us, liblc3->srate_hz); - avctx->internal->skip_samples = avctx->delay; return 0; } diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c index c602499b7c..fc2119baff 100644 --- a/libavcodec/libopusdec.c +++ b/libavcodec/libopusdec.c @@ -139,7 +139,7 @@ static av_cold int libopus_decode_init(AVCodecContext *avc) #endif /* Decoder delay (in samples) at 48kHz */ - avc->delay = avc->internal->skip_samples = opus->pre_skip; + avc->delay = opus->pre_skip; return 0; } diff --git a/libavcodec/opus/parse.c b/libavcodec/opus/parse.c index 716561d62c..1c7876e37e 100644 --- a/libavcodec/opus/parse.c +++ b/libavcodec/opus/parse.c @@ -321,8 +321,6 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx, } avctx->delay = AV_RL16(extradata + 10); - if (avctx->internal) - avctx->internal->skip_samples = avctx->delay; channels = avctx->extradata ? extradata[9] : (channels == 1) ? 1 : 2; if (!channels) { diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index 78ea25e109..c44239e81e 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -140,7 +140,7 @@ static av_cold int wma_decode_init(AVCodecContext *avctx) avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; - avctx->internal->skip_samples = s->frame_len * 2; + avctx->delay = s->frame_len * 2; return 0; } -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
