[FFmpeg-devel] [PATCH 1/2] avutil/channel_layout: add a helper function to get the ambisonic order of a layout

Anton Khirnov anton at khirnov.net
Thu May 23 10:11:55 EEST 2024


Quoting James Almer (2024-05-15 03:08:28)
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavutil/channel_layout.c | 17 ++++++++---------
>  libavutil/channel_layout.h | 10 ++++++++++
>  2 files changed, 18 insertions(+), 9 deletions(-)
> 
> diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
> index fd6718e0e7..e213f68666 100644
> --- a/libavutil/channel_layout.c
> +++ b/libavutil/channel_layout.c
> @@ -473,15 +473,14 @@ static int has_channel_names(const AVChannelLayout *channel_layout)
>      return 0;
>  }
>  
> -/**
> - * If the layout is n-th order standard-order ambisonic, with optional
> - * extra non-diegetic channels at the end, return the order.
> - * Return a negative error code otherwise.
> - */
> -static int ambisonic_order(const AVChannelLayout *channel_layout)
> +int av_channel_layout_get_ambisonic_order(const AVChannelLayout *channel_layout)

IMO the _get_ in the name is just making it unnecessarily longer.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list