ffvvc / FFmpeg

VVC Decoder for ffmpeg
Other
48 stars 12 forks source link

OLS_A Assertion Failure #211

Closed frankplow closed 2 months ago

frankplow commented 2 months ago

The conformance bitstream OLS_A triggers this assertion

https://github.com/ffvvc/FFmpeg/blob/e81b6d78fc2ddf8edd53a6a052713354ef8d27c2/libavcodec/vvc/vvc_thread.c#L182

nuomi2021 commented 2 months ago

@frankplow is this the same issue you shared with me? We run the parse process more than once for a CTU. thank you.

frankplow commented 2 months ago

@nuomi2021 I hadn't looked into this much before posting this issue, I just saw these conformance tests were failing and thought I'd track them but yes it also looks as though a CTU is parsed twice, similar to those other hangs. I'll have a go fixing this conformance bitstream and see if that sorts the fuzz bitstreams as well.

frankplow commented 2 months ago

Patch posted upstream for this issue: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240418185955.91111-1-post@frankplowman.com/

Unfortunately this does not seem to fix the hanging issue with the fuzzed bitstreams. For id:000155 at least, all NAL units have nuh_layer_id = 0. Their temporal IDs do change, however that looks like that's handled here: https://github.com/ffvvc/FFmpeg/blob/e81b6d78fc2ddf8edd53a6a052713354ef8d27c2/libavcodec/vvc/vvcdec.c#L603 is this all that's needed for temporal scalability, or should we be skipping NAL units with temporal_id > 0 as well?

nuomi2021 commented 2 months ago

is this all that's needed for temporal scalability, or should we be skipping NAL units with temporal_id > 0 as well?

not clear yet, it may combined with RPR or temporal scaling, so we can skip it first. Then, we support the temporal scaling.

For id:000155 at least, all NAL units have nuh_layer_id = 0

155 is an error clip, it will falsely trigger parse twice. Need time to check how to reject it.