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 6728D4426A for ; Tue, 4 Oct 2022 11:34:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 52A4668BC16; Tue, 4 Oct 2022 14:34:43 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 720FB68BBBA for ; Tue, 4 Oct 2022 14:34:36 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 2A3A02404E4 for ; Tue, 4 Oct 2022 13:34:36 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id YgRzT_HJw6ky for ; Tue, 4 Oct 2022 13:34:35 +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 827A02400F4 for ; Tue, 4 Oct 2022 13:34:35 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id 857351601B2; Tue, 4 Oct 2022 13:34:35 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <4369be7d-a656-9c0f-0596-68740b42d345@rothenpieler.org> References: <20221001061341.662-1-ovchinnikov.dmitrii@gmail.com> <4369be7d-a656-9c0f-0596-68740b42d345@rothenpieler.org> Mail-Followup-To: FFmpeg development discussions and patches Date: Tue, 04 Oct 2022 13:34:35 +0200 Message-ID: <166488327551.5794.1088668843570519933@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [crop support for matroska demuxer 1/3] libavcodec: Add crop related fields to structure AVCodecContext and AVCodecParameters. 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 Timo Rothenpieler (2022-10-01 13:24:26) > On 01.10.2022 08:13, OvchinnikovDmitrii wrote: > > --- > > libavcodec/avcodec.h | 8 ++++++++ > > libavcodec/codec_par.h | 8 ++++++++ > > 2 files changed, 16 insertions(+) > > > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > > index 7365eb5cc0..66df571afc 100644 > > --- a/libavcodec/avcodec.h > > +++ b/libavcodec/avcodec.h > > @@ -585,6 +585,14 @@ typedef struct AVCodecContext { > > */ > > int coded_width, coded_height; > > > > + /** > > + * The dimensions of the crop, usually from container. > > + */ > > + int crop_top; > > + int crop_left; > > + int crop_bottom; > > + int crop_right; > > + > > Shouldn't these be added at the very end, to not break ABI? > yes they should > I'm also not very convinced this kind of information really belongs into > AVCodecContext and codecpar. > Can't it just be frame-sidedata? AVFrame already has fields for this, which are typically filled from codec-level headers. The idea here is to support container-level information, so some new fields for lavf are certainly needed, but I'm not convinced just adding them to AVCodecContext is the best solution. The semantics of these new fields definitely need to be defined more precisely (like who sets them and what does lavc do with the values). -- 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".