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 7015C438A3 for ; Sat, 2 Jul 2022 16:32:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0A03D68B8A0; Sat, 2 Jul 2022 19:32:21 +0300 (EEST) Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A438868B89A for ; Sat, 2 Jul 2022 19:32:14 +0300 (EEST) Received: by mail-yb1-f176.google.com with SMTP id e80so1985978ybb.4 for ; Sat, 02 Jul 2022 09:32:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=kZmTOw9dseg5tylOGb79Nym77J9zQoGBRhlhS/UV4nc=; b=PcpkCXZTAXVo8ART2o3guezpD2twEm0TPh22Uo/3pzC98VdC05109DBsnp+3+qiJ1i aQj5LTiEFSTGxowsFG1JstG2XenTKoYeq/x13M+oKs6oDv01U30mlUFcFTrc/ZNcOmtB Vdj/3DdhTLdN01/zt0UAlYu1lkFku02fa8j3q7WS7efy3FHjy5SMWS62XyI4Qvgn1YyH isCsl938Rv23mOZ5ZuLtBbPdaoYg1SIiJGryY1kE4ioHFVp5jFpYHhFzE2prqyIq0iPo GXrpxI1MxM9Y0czVk8A1LCVsfM4joTHJ7MgcxAIti4Ir5VQ65rxlWDEXX+qVBbVfGt1c aU2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=kZmTOw9dseg5tylOGb79Nym77J9zQoGBRhlhS/UV4nc=; b=oFfs4hx5ey6HFjbZmUWJxRc5wz7eKbI98Xao6m1SaqSHb4NK4u6RsJaSnwzFLmmhZA m5cROXFjrCwsgNW3l2WDAW+2K8x6qxX/z4KL0Oe2jVRzScu4StHLe+x/Vjv33f7eE40r PFkxAb04lRftZv+VjbRxs0oI0iJmRJzce5PmsCdwhyVb3OQISLHJ7tL9cCzbqD4mdNag p2hY9uwY9+OA0VjdMebxkyd38nHGklowsS+imdsddDJaQZ6/JXMj9U8/BSXFvOq6RC6j DqDsjI95VtBdF0LhF7Ju1j1DGeA6euhaV+jSM3zdyqWLCcQedIT2MozL7glsr89dpvbJ z3Fg== X-Gm-Message-State: AJIora+6W90vLvJpVcmviUOjUiBbzYc/0AhT89kPvut85eOY0u6IpO1P w7P4xxrQRkYhnWD6wtCww2v2RDfp/qR0yoYrdgYP51gucrs= X-Google-Smtp-Source: AGRyM1vXT1oO4TJ0J6OlPCDZcw9WSJu2tUzSDRd/Rr1qpRiLhDwdhYGuoK27GjEsBz/C88G+nNB9xNz+/TnDY67ygA0= X-Received: by 2002:a25:da15:0:b0:66e:189f:8e77 with SMTP id n21-20020a25da15000000b0066e189f8e77mr4957403ybf.370.1656779532793; Sat, 02 Jul 2022 09:32:12 -0700 (PDT) MIME-Version: 1.0 References: <20220630210434.1551769-1-vigneshv@google.com> <20220630210434.1551769-2-vigneshv@google.com> <165675449715.31466.4432489889968017112@lain.khirnov.net> In-Reply-To: <165675449715.31466.4432489889968017112@lain.khirnov.net> From: Vignesh Venkatasubramanian Date: Sat, 2 Jul 2022 09:32:01 -0700 Message-ID: To: FFmpeg development discussions and patches , Vignesh Venkatasubramanian Subject: Re: [FFmpeg-devel] [PATCH 2/2] avformat/mov: Support parsing of still AVIF Alpha Channel 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 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: On Sat, Jul 2, 2022 at 2:35 AM Anton Khirnov wrote: > > Quoting Vignesh Venkatasubramanian (2022-06-30 23:04:34) > > Parse the alpha channel for still AVIF images and expose it as a > > separate track. This is the simplest way of supporting AVIF alpha > > channel in a codec independent manner (similar to how ffmpeg > > supports animated AVIF with alpha channel). > > > > One can use the alphamerge filter to get a transparent image with > > a single command. For example: > > > > ffmpeg -i image_with_alpha.avif -filter_complex alphamerge image_with_alpha.png > > > > Signed-off-by: Vignesh Venkatasubramanian > > --- > > libavformat/isom.h | 1 + > > libavformat/mov.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 67 insertions(+) > > I am against this patch, this is a digusting hack. > > These are not two streams, it is a single stream and should be exposed > as such. > Yes, while it is a hack, it is also the simplest way of supporting AVIF images with alpha. Since AVIF alpha images require two separate decoders, i could not think of any other solution that does not involve modifying the underlying av1 codec itself. If there are any alternative solutions where we can expose a single stream that needs two codecs, then i am open to implementing that. Otherwise, this solution improves the current situation where there is no way for the user to extract the alpha channel (albeit in a hacky way). > -- > Anton Khirnov -- Vignesh _______________________________________________ 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".