Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Thilo Borgmann <thilo.borgmann@mail.de>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v2 3/5] libavcodec/webp: add support for animated WebP decoding
Date: Fri, 21 Jul 2023 01:07:27 +0200
Message-ID: <e54329a9-e735-c75e-2875-16507247ac18@mail.de> (raw)
In-Reply-To: <CABWgkXLehSKH-M_ddv53sxYPM9WTFazAq3zy89bEc-dam=0dyQ@mail.gmail.com>

Am 12.07.23 um 02:20 schrieb James Zern:
> On Thu, Jul 6, 2023 at 4:28 AM Thilo Borgmann <thilo.borgmann@mail.de> wrote:
>>
>> From: Josef Zlomek <josef@pex.com>
>>
>> Fixes: 4907
>>
>> Adds support for decoding of animated WebP.
>>
>> 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@pex.com>
>> ---
>>   Changelog               |   1 +
>>   libavcodec/codec_desc.c |   3 +-
>>   libavcodec/version.h    |   2 +-
>>   libavcodec/webp.c       | 714 ++++++++++++++++++++++++++++++++++++----
>>   4 files changed, 658 insertions(+), 62 deletions(-)
>>
>> diff --git a/Changelog b/Changelog
>> index 3876082844..271926ed8f 100644
>> --- a/Changelog
>> +++ b/Changelog
>> @@ -25,6 +25,7 @@ version <next>:
>>   - Raw VVC bitstream parser, muxer and demuxer
>>   - Bitstream filter for editing metadata in VVC streams
>>   - Bitstream filter for converting VVC from MP4 to Annex B
>> +- animated WebP parser/decoder
>>
>>   version 6.0:
>>   - Radiance HDR image support
>> diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
>> index 4406dd8318..47a38a4036 100644
>> --- a/libavcodec/codec_desc.c
>> +++ b/libavcodec/codec_desc.c
>> @@ -1259,8 +1259,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
>>           .type      = AVMEDIA_TYPE_VIDEO,
>>           .name      = "webp",
>>           .long_name = NULL_IF_CONFIG_SMALL("WebP"),
>> -        .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY |
>> -                     AV_CODEC_PROP_LOSSLESS,
>> +        .props     = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS,
> 
> The frames are all intra, though with animation they may be smaller
> than the canvas and combined with the previous frame.

Well, which makes them in fact P-Frames.
Also leaving _INTRA_ONLY induces rendering issues for animated images.

Everything else in v3.

Thanks,
Thilo


_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2023-07-20 23:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 11:27 [FFmpeg-devel] [PATCH v2 0/5] webp: " Thilo Borgmann
2023-07-06 11:27 ` [FFmpeg-devel] [PATCH v2 1/5] avcodec/webp: move definitions into header Thilo Borgmann
2023-07-11 22:19   ` James Zern
2023-07-06 11:27 ` [FFmpeg-devel] [PATCH v2 2/5] avcodec/webp_parser: parse each frame into one packet Thilo Borgmann
2023-07-11 22:36   ` James Zern
2023-07-06 11:27 ` [FFmpeg-devel] [PATCH v2 3/5] libavcodec/webp: add support for animated WebP decoding Thilo Borgmann
2023-07-12  0:20   ` James Zern
2023-07-20 23:07     ` Thilo Borgmann [this message]
2023-07-06 11:27 ` [FFmpeg-devel] [PATCH v2 4/5] avcodec/webp: make init_canvas_frame static Thilo Borgmann
2023-07-12  0:20   ` James Zern
2023-07-06 11:27 ` [FFmpeg-devel] [PATCH v2 5/5] libavformat/webp: add WebP demuxer Thilo Borgmann
2023-07-06 20:24   ` James Zern
2023-07-06 21:08     ` Thilo Borgmann
2023-07-12  1:22   ` James Zern
2023-07-20 23:07     ` Thilo Borgmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e54329a9-e735-c75e-2875-16507247ac18@mail.de \
    --to=thilo.borgmann@mail.de \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git