[FFmpeg-devel] [PATCH 2/2] avcodec/av1dec: derive skip_mode_frame_idx only where it's used

Mark Thompson sw at jkqxz.net
Sat Nov 14 20:56:34 EET 2020


On 14/11/2020 17:32, Timo Rothenpieler wrote:
> On 14.11.2020 16:08, James Almer wrote:
>> On 11/14/2020 12:01 PM, Timo Rothenpieler wrote:
>>> I still strongly dislike this whole thing.
>>> The same logic is ran essentially twice.

While it's applying the same method it is not doing the same thing, because different inputs are being used.

> An ideal solution would would only run this logic once, in the AV1 decoder/parser.

No it wouldn't.

You can't do it in the parser, because the parser doesn't know which frames have been successfully decoded.  The parser still has to run the standard-dictated logic, though, because it needs to know whether the skip_mode_present syntax element is present.

The other hwaccel implementations have made the decision to push it into the driver, which definitely knows which frames have decoded successfully - I'm pretty sure that's the right answer for a correct result.

Nvdec forcing us to guess in the wrapper layer which doesn't have complete information is a problem, but we can at least make a better guess than the parser did.

- Mark


More information about the ffmpeg-devel mailing list