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 886DD48337 for ; Sun, 28 Jan 2024 10:29:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4819168D16E; Sun, 28 Jan 2024 12:29:36 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3A97468D128 for ; Sun, 28 Jan 2024 12:29:30 +0200 (EET) Authentication-Results: mail0.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=gB/lKfaG; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id A43332405F2; Sun, 28 Jan 2024 11:29:29 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id crq_nnWIWLQP; Sun, 28 Jan 2024 11:29:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1706437768; bh=FwilzHN7c6hmpu/d1/eHib+wL0+6H7jcfX5aq++OYvw=; h=Subject:From:To:Cc:In-Reply-To:References:Date:From; b=gB/lKfaGD/Pyz0tYYevn1PIy906veNp2GJxtbDoilV45Ewsi8Z6Wv+F0ODIC+hQn/ 0gP2W338Njbi2JQp0HA/+eGUuad7s15RLAPRpwFvr2cZAMySH5cWX543oqBWLzkUWu kqqoBVqGRcSY3fL9o4NrzIvUC1AvB+ivLgi/CKCiHfsqXTZWA5da5XcvPDn07mK9IC LbFPS48THiWHzT7BiANMsn0sp6Xo6j/JZmqGRI1QBaRv7YOoiE9rnPUdxi3W8NKpPl YAd1w8xrzPady5Cq2uVqQdI+a4jdMfvAcLETNC/AOHRmzDf+q6Eknr3k00lkdgXp6t rwf5JcUK0k4qg== Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id B62672404E5; Sun, 28 Jan 2024 11:29:28 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id 840C61601B9; Sun, 28 Jan 2024 11:29:22 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <4ae8bd17-1589-4a7f-93fc-db7db53c33c5@mail.de> References: <20231231123018.59035-1-thilo.borgmann@mail.de> <20231231123018.59035-3-thilo.borgmann@mail.de> <170617704310.8914.705271194770221831@lain.khirnov.net> <4ae8bd17-1589-4a7f-93fc-db7db53c33c5@mail.de> Mail-Followup-To: FFmpeg development discussions and patches , Thilo Borgmann Date: Sun, 28 Jan 2024 11:29:22 +0100 Message-ID: <170643776251.8914.9919833129719060471@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v9 2/6] avcodec/webp: separate VP8 decoding 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: , Reply-To: FFmpeg development discussions and patches Cc: Thilo Borgmann Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Quoting Thilo Borgmann via ffmpeg-devel (2024-01-25 16:39:19) > Am 25.01.24 um 11:04 schrieb Anton Khirnov: > > Quoting Thilo Borgmann via ffmpeg-devel (2023-12-31 13:30:14) > >> --- > >> libavcodec/webp.c | 50 +++++++++++++++++++++++++++++++++++++++++------ > >> 1 file changed, 44 insertions(+), 6 deletions(-) > >> > >> diff --git a/libavcodec/webp.c b/libavcodec/webp.c > >> index 4fd107aa0c..58a20b73da 100644 > >> --- a/libavcodec/webp.c > >> +++ b/libavcodec/webp.c > >> @@ -194,6 +194,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 */ > > > > Nested codec contexts are in general highly undesirable and should be > > avoided whenever possible. > > AFAICT we do it that way in the other codecs as well (cri, ftr, imm5, > tdsc, tiff). So what do you suggest to do to avoid having it nested? Integrating the two decoders directly, as is done now. With nesting it is very tricky to handle all the corner cases properly, especially passing through all the options to the innner decoder, like direct rendering, other user callbacks, etc. It should only be done as a last resort and there should be a strong argument to do it this way. -- Anton Khirnov _______________________________________________ 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".