[FFmpeg-devel] [PATCH 1/2] libavcodec/webp: add support for animated WebP decoding

Anton Khirnov anton at khirnov.net
Tue May 9 09:23:18 EEST 2023


Quoting Thilo Borgmann (2023-04-27 20:08:50)
> From: Josef Zlomek <josef at pex.com>
> 
> Fixes: 4907
> 
> Adds support for decoding of animated WebP.
> 
> The WebP parser now splits the input stream into packets containing one frame.
> 
> The WebP decoder adds the animation related features according to the specs:
> https://developers.google.com/speed/webp/docs/riff_container#animation
> The frames of the animation may be smaller than the image canvas.
> Therefore, the frame is decoded to a temporary frame,
> then it is blended into the canvas, the canvas is copied to the output frame,
> and finally the frame is disposed from the canvas.
> 
> The output to AV_PIX_FMT_YUVA420P/AV_PIX_FMT_YUV420P is still supported.
> The background color is specified only as BGRA in the WebP file
> so it is converted to YUVA if YUV formats are output.
> 
> Signed-off-by: Josef Zlomek <josef at pex.com>
> ---
>  Changelog                |   1 +
>  libavcodec/codec_desc.c  |   3 +-
>  libavcodec/version.h     |   2 +-
>  libavcodec/webp.c        | 713 +++++++++++++++++++++++++++++++++++----

This patch is unreadable and should be split.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list