[FFmpeg-devel] [PATCH v13 2/8] avcodec/webp: separate VP8 decoding

Anton Khirnov anton at khirnov.net
Fri Jun 21 14:52:51 EEST 2024


Quoting Thilo Borgmann via ffmpeg-devel (2024-06-21 12:43:17)
> From: Thilo Borgmann via ffmpeg-devel <ffmpeg-devel at ffmpeg.org>
> 
> ---
>  libavcodec/webp.c | 50 +++++++++++++++++++++++++++++++++++++++++------
>  1 file changed, 44 insertions(+), 6 deletions(-)
> 
> diff --git a/libavcodec/webp.c b/libavcodec/webp.c
> index af4ebcec27..c52b9732b4 100644
> --- a/libavcodec/webp.c
> +++ b/libavcodec/webp.c
> @@ -195,6 +195,7 @@ typedef struct WebPContext {
>      AVFrame *alpha_frame;               /* AVFrame for alpha data decompressed from VP8L */
>      AVPacket *pkt;                      /* AVPacket to be passed to the underlying VP8 decoder */
>      AVCodecContext *avctx;              /* parent AVCodecContext */
> +    AVCodecContext *avctx_vp8;          /* wrapper context for VP8 decoder */

As I said before, nested decoders should be avoided whenever possible,
because properly forwarding everything between the caller and the nested
decoder is very tricky and almost never fully correct. For example, this
patch seems to break direct rendering.

And even if a nested decoder is unavoidable for some reason, it need a
lot more justification than none.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list