Opened 4 years ago

Last modified 8 months ago

#6907 open defect

hevc decoding regression

Reported by: Evgeniy1990 Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: hevc regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

After the update ffmpeg git-n3.4-dev-2207-geea64ef4fif RAW video files has stopped playing.

Test sample: https://yadi.sk/d/_CMwldVX3QSNxx

Attachments (1)

Sintel_272p_logo_cut.265 (200.0 KB ) - added by Carl Eugen Hoyos 4 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Carl Eugen Hoyos, 4 years ago

Component: ffmpegavcodec
Keywords: hevc regression added
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Summary: RAW video does not playhevc decoding regression
Version: unspecifiedgit-master

For future tickets:
Please remember to provide a simplified command line that allows to reproduce the issue together with the console output.

Regression since 2b44dcbc44e99daf9515753e9fd4c2e1ea53a2fa

$ ffmpeg -i Sintel_272p_logo_cut.265
ffmpeg version N-89463-gc7a5e80 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl
  libavutil      56.  5.100 / 56.  5.100
  libavcodec     58.  6.103 / 58.  6.103
  libavformat    58.  3.100 / 58.  3.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  7.100 /  7.  7.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[hevc @ 0x2f48780] Unknown HEVC profile: 0
    Last message repeated 1 times
[hevc @ 0x2f48780] Invalid value of delta_poc: -2
[hevc @ 0x2f48780] SPS 0 does not exist.
[hevc @ 0x2f48780] PPS id out of range: 0

...

[hevc @ 0x2f48780] PPS id out of range: 0
[hevc @ 0x2f48780] Error parsing NAL unit #0.
[hevc @ 0x2f47240] decoding for stream 0 failed
[hevc @ 0x2f47240] Could not find codec parameters for stream 0 (Video: hevc, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, hevc, from 'Sintel_272p_logo_cut.265':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: hevc, none, 25 fps, 25 tbr, 1200k tbn, 25 tbc
At least one output file must be specified

by Carl Eugen Hoyos, 4 years ago

Attachment: Sintel_272p_logo_cut.265 added

comment:2 by Balling, 8 months ago

This is not a RAW video file. It is Annex B HEVC. This is a very strange issue. Not only everything is zero out on HEVC profile and tier and no info about progressive stuff in VPS and SPS; there is 3 sub layers... Now the problem (and regression) with SPS is that it says "Invalid value of delta_poc: -2", and there is indeed one in SPS. Maybe this thing should be unsigned, you know.

in reply to:  2 ; comment:3 by James, 8 months ago

Replying to Balling:

This is not a RAW video file. It is Annex B HEVC. This is a very strange issue. Not only everything is zero out on HEVC profile and tier and no info about progressive stuff in VPS and SPS; there is 3 sub layers... Now the problem (and regression) with SPS is that it says "Invalid value of delta_poc: -2", and there is indeed one in SPS. Maybe this thing should be unsigned, you know.

Making it unsigned will not change the fact the coded value is wrong. It should be between 0 and 32767, yet it's 4294967293 in the bitstream.
So changing the type and adapting the error check will still make it fail. The only "solution" would be to remove the check altogether and allow out of range values again.

in reply to:  3 comment:4 by Balling, 8 months ago

Replying to jamrial:
Yeah, this value is delta_poc_minus_1, which means the actual value is -3 (in the bitstream).
The real solution here will be to allow decoding even with invalid SPS, instead of READING ALL (!) of NALs after that WITH an error. This is just wow, why it cannot exit immediately if it is that problematic? Cannot it understand that it will not be able to decode further?

Ah, yes, BTW, it regressed further. Now it does not stop decoding.

Last edited 8 months ago by Balling (previous) (diff)

in reply to:  3 ; comment:5 by Michael Niedermayer, 8 months ago

Replying to jamrial:

Making it unsigned will not change the fact the coded value is wrong. It should be between 0 and 32767, yet it's 4294967293 in the bitstream.
So changing the type and adapting the error check will still make it fail. The only "solution" would be to remove the check altogether and allow out of range values again.

is it always 4294967293 and always at position 1 ?
if so then only that would need to be allowed, also it would need to be checked that such out of range value doesnt have any unintended downstream effects.
Also strictly speaking simply removing the check is likely not enough as that would likely require a 32bit int

in reply to:  5 comment:6 by Balling, 8 months ago

Replying to michael:
It is not at position 1. Not even close, there is a complicated tree and this one value is almost at the end of SPS. All others delta_poc_minus_1 are good though.

Note: See TracTickets for help on using tickets.