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 CEA5A47EA6 for ; Thu, 30 Nov 2023 13:47:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id ABD5368CF7D; Thu, 30 Nov 2023 15:47:35 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5FD7968CC4A for ; Thu, 30 Nov 2023 15:47:29 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1BA872405ED for ; Thu, 30 Nov 2023 14:47:29 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id V-hjbNyUjijQ for ; Thu, 30 Nov 2023 14:47:28 +0100 (CET) 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 4EC2D24043D for ; Thu, 30 Nov 2023 14:47:28 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id 3B6001601B9; Thu, 30 Nov 2023 14:47:28 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: References: <20231126012858.40388-1-jamrial@gmail.com> <20231126012858.40388-5-jamrial@gmail.com> <170134209102.8914.7650187143643457061@lain.khirnov.net> Mail-Followup-To: FFmpeg development discussions and patches Date: Thu, 30 Nov 2023 14:47:28 +0100 Message-ID: <170135204821.8914.6559181968107342090@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 4/9] avutil: introduce an Immersive Audio Model and Formats API 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-11-30 14:01:16) > > Should i link https://aomediacodec.github.io/iamf/ somewhere? Most definitely. > > > >> +/** > >> + * Mix Gain Parameter Data as defined in section 3.8.1 > >> + * > >> + * Subblocks in AVIAMFParamDefinition use this struct when the value or > >> + * @ref AVIAMFParamDefinition.param_definition_type param_definition_type is > >> + * AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN. > >> + */ > >> +typedef struct AVIAMFMixGainParameterData { > > > > Does 'ParameterData' at the end really serve any purpose? > > Follow the names as in > https://aomediacodec.github.io/iamf/#obu-parameterblock > I can change it to Parameters or Params, or just remove it. I'd drop it. The names are long enough as they are. > >> + const AVClass *av_class; > >> + > >> + // AVOption enabled fields > >> + unsigned int subblock_duration; > >> + enum AVIAMFAnimationType animation_type; > >> + AVRational start_point_value; > >> + AVRational end_point_value; > >> + AVRational control_point_value; > >> + unsigned int control_point_relative_time; > > > > All these should really be documented. Also, some vertical alignment > > would improve readability. > > > >> +/** > >> + * Parameters as defined in section 3.6.1 > > > > This really REALLY needs more documentation. > > Yes, was keeping better documentation for last. > > > > >> + */ > >> +typedef struct AVIAMFParamDefinition { > >> + const AVClass *av_class; > >> + > >> + size_t subblocks_offset; > >> + size_t subblock_size; > >> + > >> + enum AVIAMFParamDefinitionType param_definition_type; > >> + unsigned int num_subblocks; > > > > We use nb_foo generally. > > For these public fields i'm keeping the same name as they are in the > spec. I use nb_foo for arrays of structs in the demuxer/muxer patches. > But i can change it if you prefer. I prefer to be consistent with ourselves in this rather than a spec. Specs come and go. > > > >> + * > >> + * When audio_element_type is AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL, this > >> + * corresponds to an Scalable Channel Layout layer as defined in section 3.6.2. > >> + * For AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE, it is an Ambisonics channel > >> + * layout as defined in section 3.6.3 > >> + */ > >> +typedef struct AVIAMFLayer { > >> + const AVClass *av_class; > >> + > >> + // AVOption enabled fields > >> + AVChannelLayout ch_layout; > >> + > >> + unsigned int recon_gain_is_present; > > > > Every time you dedicate 4 bytes to storing one bit, God kills a kitten. > > I'll shave a few bytes. I don't see how that can be done easily due to struct alignment. I was thinking you could make it into a flags field instead. -- 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".