Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v8 2/5] libavcodec/webp: add support for animated WebP decoding
Date: Thu, 21 Dec 2023 23:18:40 +0100
Message-ID: <AS8P250MB07441C4C220199C98441464C8F95A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20231215195917.91300-3-thilo.borgmann@mail.de>

Thilo Borgmann via ffmpeg-devel:
> 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       | 754 ++++++++++++++++++++++++++++++++++++----
>  4 files changed, 696 insertions(+), 64 deletions(-)
> 
> @@ -1298,12 +1326,12 @@ static int vp8_lossy_decode_frame(AVCodecContext *avctx, AVFrame *p,
>      int ret;
>  
>      if (!s->initialized) {
> -        ff_vp8_decode_init(avctx);
> +        VP8Context *s_vp8 = s->avctx_vp8->priv_data;
> +        s_vp8->actually_webp = 1;
>          s->initialized = 1;
> -        s->v.actually_webp = 1;
>      }
>      avctx->pix_fmt = s->has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P;
> -    s->lossless = 0;
> +    s->avctx_vp8->pix_fmt = avctx->pix_fmt;
>  

Separating webp.c from vp8.c should be done in commit of its own. And
you did not really separate them, because you are overwriting internals
of the VP8 decoder.

- Andreas

_______________________________________________
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-12-21 22:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-15 19:59 [FFmpeg-devel] [PATCH v8 0/5] webp: " Thilo Borgmann via ffmpeg-devel
2023-12-15 19:59 ` [FFmpeg-devel] [PATCH v8 1/5] avcodec/webp: remove unused definitions Thilo Borgmann via ffmpeg-devel
2023-12-15 19:59 ` [FFmpeg-devel] [PATCH v8 2/5] libavcodec/webp: add support for animated WebP decoding Thilo Borgmann via ffmpeg-devel
2023-12-21 22:18   ` Andreas Rheinhardt [this message]
2023-12-31 12:14     ` Thilo Borgmann via ffmpeg-devel
2023-12-15 19:59 ` [FFmpeg-devel] [PATCH v8 3/5] avcodec/webp: make init_canvas_frame static Thilo Borgmann via ffmpeg-devel
2023-12-15 19:59 ` [FFmpeg-devel] [PATCH v8 4/5] libavformat/webp: add WebP demuxer Thilo Borgmann via ffmpeg-devel
2023-12-15 19:59 ` [FFmpeg-devel] [PATCH v8 5/5] fate: add test for animated WebP Thilo Borgmann via ffmpeg-devel
2023-12-21  8:01 ` [FFmpeg-devel] [PATCH v8 0/5] webp: add support for animated WebP decoding Thilo Borgmann via ffmpeg-devel

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=AS8P250MB07441C4C220199C98441464C8F95A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --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