audioconvert: Support converting >64 channels

There's nothing requiring <= 64 channels except for getting the reorder
map and creating a channel mixing matrix, but those won't be possible to
call anyway as channel positions can only express up to 64 channels.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6819>
This commit is contained in:
Sebastian Dröge 2024-05-09 09:57:54 +03:00 committed by GStreamer Marge Bot
parent d68ac0db57
commit 399b147d90
2 changed files with 3 additions and 5 deletions

View file

@ -958,8 +958,6 @@ gst_audio_channel_mixer_new_with_matrix (GstAudioChannelMixerFlags flags,
|| format == GST_AUDIO_FORMAT_S32
|| format == GST_AUDIO_FORMAT_F32
|| format == GST_AUDIO_FORMAT_F64, NULL);
g_return_val_if_fail (in_channels > 0 && in_channels <= 64, NULL);
g_return_val_if_fail (out_channels > 0 && out_channels <= 64, NULL);
mix = g_new0 (GstAudioChannelMixer, 1);
mix->in_channels = in_channels;
@ -1120,8 +1118,6 @@ gst_audio_channel_mixer_new (GstAudioChannelMixerFlags flags,
|| format == GST_AUDIO_FORMAT_S32
|| format == GST_AUDIO_FORMAT_F32
|| format == GST_AUDIO_FORMAT_F64, NULL);
g_return_val_if_fail (in_channels > 0 && in_channels <= 64, NULL);
g_return_val_if_fail (out_channels > 0 && out_channels <= 64, NULL);
matrix =
gst_audio_channel_mixer_setup_matrix (flags, in_channels, in_position,

View file

@ -222,7 +222,6 @@ gst_audio_reorder_channels (gpointer data, gsize size, GstAudioFormat format,
g_return_val_if_fail (info->width <= 8 * 64, FALSE);
g_return_val_if_fail (size % ((info->width * channels) / 8) == 0, FALSE);
g_return_val_if_fail (channels > 0, FALSE);
g_return_val_if_fail (channels <= 64, FALSE);
if (size == 0)
return TRUE;
@ -230,6 +229,8 @@ gst_audio_reorder_channels (gpointer data, gsize size, GstAudioFormat format,
if (gst_audio_channel_positions_equal (from, to, channels))
return TRUE;
g_return_val_if_fail (channels <= 64, FALSE);
if (!gst_audio_get_channel_reorder_map (channels, from, to, reorder_map))
return FALSE;
@ -454,6 +455,7 @@ gst_audio_get_channel_reorder_map (gint channels,
g_return_val_if_fail (reorder_map != NULL, FALSE);
g_return_val_if_fail (channels > 0, FALSE);
g_return_val_if_fail (channels <= 64, FALSE);
g_return_val_if_fail (from != NULL, FALSE);
g_return_val_if_fail (to != NULL, FALSE);
g_return_val_if_fail (check_valid_channel_positions (from, channels, FALSE,