From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D4D6649126 for ; Sun, 4 Feb 2024 11:03:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DB07968D12E; Sun, 4 Feb 2024 13:03:05 +0200 (EET) Received: from shout02.mail.de (shout02.mail.de [62.201.172.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E8CA768CDBC for ; Sun, 4 Feb 2024 13:02:58 +0200 (EET) Received: from postfix01.mail.de (postfix01.bt.mail.de [10.0.121.125]) by shout02.mail.de (Postfix) with ESMTP id B848E240A12 for ; Sun, 4 Feb 2024 12:02:57 +0100 (CET) Received: from smtp01.mail.de (smtp02.bt.mail.de [10.0.121.212]) by postfix01.mail.de (Postfix) with ESMTP id 9FF9B80298 for ; Sun, 4 Feb 2024 12:02:57 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp01.mail.de (Postfix) with ESMTPSA id 29EC0240A5C for ; Sun, 4 Feb 2024 12:02:56 +0100 (CET) Message-ID: Date: Sun, 4 Feb 2024 12:02:56 +0100 MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org References: Content-Language: en-US In-Reply-To: X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 1625 X-purgate-ID: 154282::1707044577-BE52C878-DA75BE76/0/0 Subject: Re: [FFmpeg-devel] [PATCH 1/3] avcodec/vp8: Enforce key-frame only for WebP X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Thilo Borgmann via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Thilo Borgmann Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 03.02.24 14:57, Andreas Rheinhardt wrote: > Andreas Rheinhardt: >> VP8-in-WebP only uses key frame encoding (see [1]), yet this >> is currently not enforced. This commit does so in order to >> make output reproducible with frame-threading as the VP8 decoder's >> update_thread_context is not called at all when using decoding >> VP8-in-WebP (as this is unnecessary for key frame-only streams). >> >> [1]: https://developers.google.com/speed/webp/docs/riff_container >> >> Signed-off-by: Andreas Rheinhardt >> --- >> libavcodec/vp8.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c >> index 83c60adeb0..7972775a1c 100644 >> --- a/libavcodec/vp8.c >> +++ b/libavcodec/vp8.c >> @@ -2665,7 +2665,11 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, >> if (ret < 0) >> goto err; >> >> - if (s->actually_webp) { >> + if (!is_vp7 && s->actually_webp) { >> + // VP8 in WebP is supposed to be intra-only. Enforce this here >> + // to ensure that output is reproducible with frame-threading. >> + if (!s->keyframe) >> + return AVERROR_INVALIDDATA; >> // avctx->pix_fmt already set in caller. >> } else if (!is_vp7 && s->pix_fmt == AV_PIX_FMT_NONE) { >> s->pix_fmt = get_pixel_format(s); > > Will apply this patchset tomorrow unless there are objections. Works as expected for me for a coupled version of the animated webp decoder which can follow-up. 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".