[FFmpeg-devel] [PATCH v7 3/7] avcodec/webp_parser: parse each frame into one packet

Thilo Borgmann thilo.borgmann at mail.de
Tue Dec 12 14:14:21 EET 2023


Am 08.12.23 um 03:02 schrieb Cosmin Stejerean via ffmpeg-devel:
> 
> 
>> On Dec 7, 2023, at 9:42 AM, Andreas Rheinhardt <andreas.rheinhardt at outlook.com> wrote:
>>
>> According to
>> https://developers.google.com/speed/webp/docs/riff_container#extended_file_format
>> metadata chunks are stored after the image data; if you split the data
>> into packets, then the metadata while only become available for the very
>> last frame, although it pertains to all of them. This makes your
>> approach unworkable.
>>
>> Additionally, the WebP muxer expects animations to be contained in a
>> single packet, hence the warnings from Michael.
> 
> What would be a better approach here, keeping all the animations in a single packet and decoding multiple frames from it, by essentially moving this logic to split them from the parser to the decoder?

Nah, nothing to do here. The whole parser patch can be dropped, I think Josef wanted this to get more out of frame threading (more pkts -> more decoder calls -> more parallel). The old untouched parser code appears fine as is.

The demuxer should be overly complicated for this reason as well (and that adds the warning Michael found). Going to strip the demuxer from that wrong though as well.

Sending v8 shortly.

Thanks,
Thilo


More information about the ffmpeg-devel mailing list