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 6F52D47ED5 for ; Thu, 30 Nov 2023 14:27:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 70CCF68CFF5; Thu, 30 Nov 2023 16:27:31 +0200 (EET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D4EE868CC6D for ; Thu, 30 Nov 2023 16:27:25 +0200 (EET) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6cd97c135e8so905784b3a.0 for ; Thu, 30 Nov 2023 06:27:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701354443; x=1701959243; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5kJuLzUU8750GyqXl5ROioHwtpLd0guPCA+dum5yufs=; b=DqBWIHsk3oHYl1VHrn13KkTch6nfuMly1vGIXibruR/lVHCLc+DJmmzBwY4LdN+vla aaiftwjWVYHIbmyjsNHu6MoirZNhKGM3fwmhpNwxBaXSmVKf9mcZocuBrmtkLEDtAKSW ikJrdYiaXNV/2Aekk+k2+9h6QrA6Ii5kZUqhe7XeKwP3AEU+J1A6whGa4xEqsRP+GWpU xj/uE4p+oRFmpdl8sfp8b7nnGeem1Henc7cx6aKJGNEcAUurt/8vSybnoqDB8XIwbQ8c kmTQknNfK0t01zNzqSbjgwPb8nog9H/I1kNC4bmZxcU1yeBmjFhNrs3PPyR3+o80okKx muRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701354443; x=1701959243; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5kJuLzUU8750GyqXl5ROioHwtpLd0guPCA+dum5yufs=; b=AjC3fjVAjoikTWb8yVi5NjiECEGfk6uEUOsYjIrpR1wr5X7mUHo9MFV3BN/N3P6owD 7kyiQaA8g+DMmQ8OgLW+7qPZNueI4T2VgU1H/NRqiU3IZ+LM8nM8ksqUGyqR+ag0YyXZ JFd2c/4AZLKomRLBlEReEtDpjU6IDZ7ntLBWuk+akNVPmfeqmgsYgWrP4XG/dugGVaFv o+GSi47BhYMlqxaSb8jhRtnL+AJwbv+Qt6GRgwqhdRGPauHPfKPkcvqhtdKzLlXmY2ZS BhEkPQDmo5L4XWsghA9Dbba8btS1+kCtGz1D8KciEVa4KdbD/A1smwT0wYX6xkhZRcXo wu9Q== X-Gm-Message-State: AOJu0Yx0zz4SgXMSXIULnOJLbUOV14ESOgjncUwGu9Nx48oKqjU36qY7 UbxlOuwjIrprD1eNT0bKZ9vxZABzVao= X-Google-Smtp-Source: AGHT+IHnui6phpajhum+jPp6Ld6n5eZkR59RK4RHWJ4Y/+GDBgSfO82zwYjb8h7DWGrSe/a38B3Fhw== X-Received: by 2002:a05:6a20:728b:b0:18b:c8f8:e539 with SMTP id o11-20020a056a20728b00b0018bc8f8e539mr25504654pzk.42.1701354443147; Thu, 30 Nov 2023 06:27:23 -0800 (PST) Received: from [192.168.0.14] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id nu3-20020a17090b1b0300b002804c91633dsm1381390pjb.14.2023.11.30.06.27.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Nov 2023 06:27:22 -0800 (PST) Message-ID: <46f5df91-8a4c-4825-9cd5-eeb11f1d402e@gmail.com> Date: Thu, 30 Nov 2023 11:27:49 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20231126012858.40388-1-jamrial@gmail.com> <20231126012858.40388-5-jamrial@gmail.com> <170134209102.8914.7650187143643457061@lain.khirnov.net> <170135204821.8914.6559181968107342090@lain.khirnov.net> From: James Almer Autocrypt: addr=jamrial@gmail.com; keydata= xsBNBFjZtqABCADLW+vdEoZaJZDsIO6geYFTOcn1unsEHefj9zn+3oTHlDFFzO47mzHsSfbK 9JE2xpOJEVnC8FAF5Sayi/pVwV+mtQUV3n5dgVeVBYF9GUQwOGFCpK8X54RRqhkgknbunOEE 0CtgAJgmpFmmmHgq02GvEspx1h/rh4apqwQR6QX4Favb+x9+i9ytVpwVcBX94vo2toyP7h/K BWfadQmb8ltgE1kshfg+SQs/H5bTV5Z1DuEASf02ZL/1qYB/sdTgWPLv9XMUHHsRFmMY8TMx wJSkP+Af3AiYQPJYz1B1D4tt98T/NoiVdin10zATakPjV8hXaobuRmxgakkUASXudydDABEB AAHNH0phbWVzIEFsbWVyIDxqYW1yaWFsQGdtYWlsLmNvbT7CwJIEEwEIADwCGwMGCwkIBwMC BhUIAgkKCwQWAgMBAh4BAheAFiEEd1EujP2UoWlX5pp6FGMBrXN2WeAFAmJoLUUCGQEACgkQ FGMBrXN2WeAFVQf9GtGhniRs1PzNUOgJktCnv6j4BbLieaIPYPEFXKDHOgjqQE2zVMYXnoXl Jam928ii902a8OY06r9ywn/R8ApD1/3NY/v64O71CY9scz5XyH2au8wIZ6HwFy3/f7sqjdGD uctY8Qs7rjT7NkoC5lmgMu2v2k03dGtM9AAf5AK5gU+H0EUw7vmKKiXzUqt5kvBuf4CEwXvH AQT1SMJ52rIlDWB7FQFyZeUbOAK2IgY/KNedfK6nsgd/eQVnlofPd2XoddE7kP6iys7jJefw DD3g3rZyDTq7in5dyk5glaNpWZpbHGBs+9SCYLnfQ8XvWqPFOD+gj0plamKANgOvavKTxM7A TQRY2bagAQgA69YtILj8kYxmqPr/M8+MXT7wVoOWVW9lvSmPquCELaDy/NIS7D06VC5EuE/6 JlJXZMTn37NLlyWhzwOgXuXw5w2tyoQQBuvqGiXJijuXwXH7HKdzrc6rpYtAqt5w05hzNrFS KrS0izG64VpWrfproy3BsL+8TBm9brLhhNPynVRqVukbbGzlATTzNQGZ14TTi2/dL6DkMQnM qn4jX9UEe4GdGQBP50bUJSSmeiIkyNLWA+znuN2PZEz930ZwNrF9GtDVw7mzcmpCZ7spldE2 tutbpy9D1bIqxyqBrYDSezyzL2adR1qgHyOTMCHg2AYNkrIQHrSyJxKTpZ1/hqOp8wARAQAB wsBfBBgBAgAJBQJY2bagAhsMAAoJEBRjAa1zdlnghekH/0Yb0iYJ74oID2f/Fj+AJKS2ekQF P2xOr8lpGzgp/+yWUvPtqbX0A33anBJdYwxaAC0NataX3tfZ+oJkzXqfmqhIHMPYHdZesJA2 Bk9hU/33mDl5s5U66/z0uelWzwKVHoQ2O6or4+qF3HJFSJLCe9uvWJ3zXf9F342Ftj73sfx+ 3xkw/IXsN1RqbYqDlzpoEQ99SIEfY/8Jjwnd3sIPfqkuyeaYfe6GJDqKawdCEP1oRRlbXEAp TJgYz8r3nPhGv9cdHNDCk44ISbsqVuxIEnLqi4fTPZaGupiQhT+srl268TTAp2TQW7+6Ce/b NPQorMquzS/LZoyALpmsYi/miMc= In-Reply-To: <170135204821.8914.6559181968107342090@lain.khirnov.net> 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 11/30/2023 10:47 AM, Anton Khirnov wrote: > 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. But this is the only boolean field. Also, there can be at most six layers, so it's not exactly a huge waste either way. _______________________________________________ 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".