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 5357F47494 for ; Tue, 10 Oct 2023 12:12:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8E8DD68C97B; Tue, 10 Oct 2023 15:12:40 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C10E068C5B3 for ; Tue, 10 Oct 2023 15:12:33 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 75AC824048D for ; Tue, 10 Oct 2023 14:12:33 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id APt1ywHQ1uZv for ; Tue, 10 Oct 2023 14:12:32 +0200 (CEST) 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 C6AD12400FF for ; Tue, 10 Oct 2023 14:12:32 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id A06341601B9; Tue, 10 Oct 2023 14:12:32 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: References: <20231007162503.1057-1-jamrial@gmail.com> <169693664668.6638.10128181560102102339@lain.khirnov.net> <169693887584.6638.1972986298885513458@lain.khirnov.net> Mail-Followup-To: FFmpeg development discussions and patches Date: Tue, 10 Oct 2023 14:12:32 +0200 Message-ID: <169693995263.6638.15354508532639422601@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 0/7] Container level frame cropping parameters 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: Quoting James Almer (2023-10-10 13:58:00) > On 10/10/2023 8:54 AM, Anton Khirnov wrote: > > Quoting James Almer (2023-10-10 13:44:19) > >> On 10/10/2023 8:17 AM, Anton Khirnov wrote: > >>> Quoting James Almer (2023-10-07 18:24:56) > >>>> This is a simple set to add support to stream wide, container level cropping > >>>> parameters, as featured in formats like Matroska and ISOBMFF. It's needed for > >>>> things like AV1 streams generated by certain hardware encoders that produce > >>>> dimension aligned output, and unlike H26x, can't export cropping info within > >>>> the bitstream. > >>>> In this set i add the packet side data type, mux and demux support to Matroska, > >>>> and handling code to ffmpeg and ffplay. Missing is support for clap boxes in > >>>> ISOBMFF, and exporting the relevant side data from encoders like AMF. > >>>> > >>>> It's a rebased and updated version to the set i sent a month ago. > >>> > >>> Why is there no lavc-decoder handling? I would expect cropping side data > >>> submitted to lavc to be somehow propagated to decoded frames. > >>> Though there is a question of how to combine side data with the > >>> codec-level cropping. > >> > >> I thought about adding lavc support alongside the CLI handling, yeah. > >> And it should be a matter of adding the values to the existing ones in > >> frame->crop_* as exported by decoders, which av_frame_apply_cropping() > >> will then handle. > >> > >> And the reason i add support to the CLI by including a filter instead of > >> leaving it up to lavc is that av_frame_apply_cropping() may not do exact > >> cropping if AV_CODEC_FLAG_UNALIGNED is not set. > > > > I intend to have the CLI always set AVCodecContext.apply_cropping=0 and > > have it handled by lavfi for this exact reason, just didn't get to > > actually doing it yet. Feel free and welcome to do it yourself. > > The cropping filter doesn't look at the frame cropping fields, though. > It in fact exports cropping into them if you pass it hw frames. It only > looks at input arguments. So it doesn't seem like that can be done > without changing the filter. I mean ffmpeg CLI would look at the frame cropping fields and insert the crop filter accordingly, as it does for other bits of metadata. -- 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".