diff mbox

[FFmpeg-devel,PATCHv2] FATE: Add test for HEVC files that claim to have two first slices

Message ID 20190321144829.74557-1-derek.buitenhuis@gmail.com
State Superseded
Headers show

Commit Message

Derek Buitenhuis March 21, 2019, 2:48 p.m. UTC
This makes sure we don't regress on 70c8c8a818f39bc262565ec29fae2baffb3e1660.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
---
Sample: http://chromashift.org/two_first_slice.mp4 (Trimmed to 500KiB like Carl requested).
MD5: 58b637d5500c2911d8cfe99fee86cb04
---
 tests/fate/hevc.mak                 |  3 +++
 tests/ref/fate/hevc-two-first-slice | 12 ++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 tests/ref/fate/hevc-two-first-slice

Comments

James Almer March 21, 2019, 3:26 p.m. UTC | #1
On 3/21/2019 11:48 AM, Derek Buitenhuis wrote:
> This makes sure we don't regress on 70c8c8a818f39bc262565ec29fae2baffb3e1660.
> 
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
> ---
> Sample: http://chromashift.org/two_first_slice.mp4 (Trimmed to 500KiB like Carl requested).
> MD5: 58b637d5500c2911d8cfe99fee86cb04
> ---
>  tests/fate/hevc.mak                 |  3 +++
>  tests/ref/fate/hevc-two-first-slice | 12 ++++++++++++
>  2 files changed, 15 insertions(+)
>  create mode 100644 tests/ref/fate/hevc-two-first-slice
> 
> diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak
> index db3ea19340..5ec6e279b9 100644
> --- a/tests/fate/hevc.mak
> +++ b/tests/fate/hevc.mak
> @@ -253,6 +253,9 @@ fate-hevc-extradata-reload: CMD = framemd5 -i $(TARGET_SAMPLES)/hevc/extradata-r
>  fate-hevc-monochrome-crop: CMD = probeframes -show_entries frame=width,height:stream=width,height $(TARGET_SAMPLES)/hevc/hevc-monochrome.hevc
>  FATE_HEVC_FFPROBE-$(call DEMDEC, HEVC, HEVC) += fate-hevc-monochrome-crop
>  
> +hevc-two-first-slice: CMD = threads=2 framemd5 -i $(TARGET_SAMPLES)/hevc/two_first_slice.mp4 -sws_flags bitexact -t 00:00.20 -an
> +FATE_HEVC += hevc-two-first-slice
> +
>  FATE_SAMPLES_AVCONV += $(FATE_HEVC-yes)
>  FATE_SAMPLES_FFPROBE += $(FATE_HEVC_FFPROBE-yes)
>  
> diff --git a/tests/ref/fate/hevc-two-first-slice b/tests/ref/fate/hevc-two-first-slice
> new file mode 100644
> index 0000000000..8ce7a066c7
> --- /dev/null
> +++ b/tests/ref/fate/hevc-two-first-slice
> @@ -0,0 +1,12 @@
> +#format: frame checksums
> +#version: 2
> +#hash: MD5
> +#tb 0: 1/15
> +#media_type 0: video
> +#codec_id 0: rawvideo
> +#dimensions 0: 1920x1080
> +#sar 0: 0/1
> +#stream#, dts,        pts, duration,     size, hash
> +0,          0,          0,        1,  3110400, c88154281ada839d3f209b0eab012577
> +0,          1,          1,        1,  3110400, a2623ba4639cf246b803c08e7233112f
> +0,          2,          2,        1,  3110400, 9208fcdb16664e91ada77d15cc29ace9

Are you sure the faulty packet is the third one? When i debugged this
the one that reproduced the issue was the 31st. Or is this a cut sample
starting from the faulty RAP?
Derek Buitenhuis March 21, 2019, 3:29 p.m. UTC | #2
On 21/03/2019 15:26, James Almer wrote:
> Are you sure the faulty packet is the third one? When i debugged this
> the one that reproduced the issue was the 31st. Or is this a cut sample
> starting from the faulty RAP?

Definitely sure it's covered within this command, and file's number of packets.

Easy to verify: Run the fate test with your patch reverted, and it deadlocks.

- Derek
Derek Buitenhuis March 21, 2019, 3:33 p.m. UTC | #3
On 21/03/2019 15:29, Derek Buitenhuis wrote:
> Definitely sure it's covered within this command, and file's number of packets.
> 
> Easy to verify: Run the fate test with your patch reverted, and it deadlocks.

Scratch that. I was mistaken, it doesn't work with the trimmed file...

Re-testing, and re-sending.

Also had two lines staged but not amended... woops.

- Derek
Carl Eugen Hoyos March 21, 2019, 10:12 p.m. UTC | #4
2019-03-21 16:33 GMT+01:00, Derek Buitenhuis <derek.buitenhuis@gmail.com>:
> On 21/03/2019 15:29, Derek Buitenhuis wrote:
>> Definitely sure it's covered within this command, and file's number of
>> packets.
>>
>> Easy to verify: Run the fate test with your patch reverted, and it
>> deadlocks.
>
> Scratch that. I was mistaken, it doesn't work with the trimmed file...

I tested the following again:
$ dd if=nal_header_deadlock.mp4 of=nal_header_deadlock_cut.mp4 bs=100k count=5
$ md5sum nal_header_deadlock_cut.mp4
58b637d5500c2911d8cfe99fee86cb04  nal_header_deadlock_cut.mp4
This file hangs with 3ac474892, the last commit before James's fix.

Carl Eugen
diff mbox

Patch

diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak
index db3ea19340..5ec6e279b9 100644
--- a/tests/fate/hevc.mak
+++ b/tests/fate/hevc.mak
@@ -253,6 +253,9 @@  fate-hevc-extradata-reload: CMD = framemd5 -i $(TARGET_SAMPLES)/hevc/extradata-r
 fate-hevc-monochrome-crop: CMD = probeframes -show_entries frame=width,height:stream=width,height $(TARGET_SAMPLES)/hevc/hevc-monochrome.hevc
 FATE_HEVC_FFPROBE-$(call DEMDEC, HEVC, HEVC) += fate-hevc-monochrome-crop
 
+hevc-two-first-slice: CMD = threads=2 framemd5 -i $(TARGET_SAMPLES)/hevc/two_first_slice.mp4 -sws_flags bitexact -t 00:00.20 -an
+FATE_HEVC += hevc-two-first-slice
+
 FATE_SAMPLES_AVCONV += $(FATE_HEVC-yes)
 FATE_SAMPLES_FFPROBE += $(FATE_HEVC_FFPROBE-yes)
 
diff --git a/tests/ref/fate/hevc-two-first-slice b/tests/ref/fate/hevc-two-first-slice
new file mode 100644
index 0000000000..8ce7a066c7
--- /dev/null
+++ b/tests/ref/fate/hevc-two-first-slice
@@ -0,0 +1,12 @@ 
+#format: frame checksums
+#version: 2
+#hash: MD5
+#tb 0: 1/15
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 0/1
+#stream#, dts,        pts, duration,     size, hash
+0,          0,          0,        1,  3110400, c88154281ada839d3f209b0eab012577
+0,          1,          1,        1,  3110400, a2623ba4639cf246b803c08e7233112f
+0,          2,          2,        1,  3110400, 9208fcdb16664e91ada77d15cc29ace9