[FFmpeg-cvslog] avutil/channel_layout: add a 5.1.2 layout using side channels

James Almer git at videolan.org
Fri Jan 3 15:30:21 EET 2025


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Dec 30 15:15:54 2024 -0300| [da9dcaba69da5b06547c6bb718cf72158d4aa3e6] | committer: James Almer

avutil/channel_layout: add a 5.1.2 layout using side channels

And rename the existing 5.1.2 to explicitly state it contains back channels.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da9dcaba69da5b06547c6bb718cf72158d4aa3e6
---

 doc/APIchanges                            | 3 +++
 libavutil/channel_layout.c                | 3 ++-
 libavutil/channel_layout.h                | 2 ++
 libavutil/version.h                       | 2 +-
 tests/ref/fate/channel_layout             | 3 ++-
 tests/ref/fate/iamf-5_1_4                 | 4 ++--
 tests/ref/fate/mov-mp4-iamf-5_1_4         | 4 ++--
 tests/streamgroups/audio_element-5_1_4    | 2 +-
 tests/streamgroups/mix_presentation-5_1_4 | 2 +-
 9 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 4fa4db142f..9f5829921c 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
 
 API changes, most recent first:
 
+2025-01-xx - xxxxxxxxxx - lavu 59.54.100 - frame.h
+  Add AV_CH_LAYOUT_5POINT1POINT2 and AV_CHANNEL_LAYOUT_5POINT1POINT2.
+
 2024-12-xx - xxxxxxxxxx - lavu 59.53.100 - frame.h
   Add av_frame_side_data_remove_by_props().
 
diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
index dcf102d57a..cfa8e05d56 100644
--- a/libavutil/channel_layout.c
+++ b/libavutil/channel_layout.c
@@ -213,7 +213,8 @@ static const struct channel_layout_name channel_layout_map[] = {
     { "7.1",            AV_CHANNEL_LAYOUT_7POINT1             },
     { "7.1(wide)",      AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK   },
     { "7.1(wide-side)", AV_CHANNEL_LAYOUT_7POINT1_WIDE        },
-    { "5.1.2",          AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK  },
+    { "5.1.2",          AV_CHANNEL_LAYOUT_5POINT1POINT2       },
+    { "5.1.2(back)",    AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK  },
     { "octagonal",      AV_CHANNEL_LAYOUT_OCTAGONAL           },
     { "cube",           AV_CHANNEL_LAYOUT_CUBE                },
     { "5.1.4",          AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK  },
diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h
index 5ec09f10b1..456be8481f 100644
--- a/libavutil/channel_layout.h
+++ b/libavutil/channel_layout.h
@@ -240,6 +240,7 @@ enum AVChannelOrder {
 #define AV_CH_LAYOUT_7POINT1           (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
 #define AV_CH_LAYOUT_7POINT1_WIDE      (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
 #define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
+#define AV_CH_LAYOUT_5POINT1POINT2     (AV_CH_LAYOUT_5POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
 #define AV_CH_LAYOUT_5POINT1POINT2_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
 #define AV_CH_LAYOUT_OCTAGONAL         (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
 #define AV_CH_LAYOUT_CUBE              (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
@@ -416,6 +417,7 @@ typedef struct AVChannelLayout {
 #define AV_CHANNEL_LAYOUT_7POINT1           AV_CHANNEL_LAYOUT_MASK(8,  AV_CH_LAYOUT_7POINT1)
 #define AV_CHANNEL_LAYOUT_7POINT1_WIDE      AV_CHANNEL_LAYOUT_MASK(8,  AV_CH_LAYOUT_7POINT1_WIDE)
 #define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8,  AV_CH_LAYOUT_7POINT1_WIDE_BACK)
+#define AV_CHANNEL_LAYOUT_5POINT1POINT2     AV_CHANNEL_LAYOUT_MASK(8,  AV_CH_LAYOUT_5POINT1POINT2)
 #define AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_5POINT1POINT2_BACK)
 #define AV_CHANNEL_LAYOUT_OCTAGONAL         AV_CHANNEL_LAYOUT_MASK(8,  AV_CH_LAYOUT_OCTAGONAL)
 #define AV_CHANNEL_LAYOUT_CUBE              AV_CHANNEL_LAYOUT_MASK(8,  AV_CH_LAYOUT_CUBE)
diff --git a/libavutil/version.h b/libavutil/version.h
index b430555c88..75b47461ff 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  59
-#define LIBAVUTIL_VERSION_MINOR  53
+#define LIBAVUTIL_VERSION_MINOR  54
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
diff --git a/tests/ref/fate/channel_layout b/tests/ref/fate/channel_layout
index 206f8d51c7..fcbe6cc8b3 100644
--- a/tests/ref/fate/channel_layout
+++ b/tests/ref/fate/channel_layout
@@ -25,7 +25,8 @@ hexagonal      FL+FR+FC+BL+BR+BC
 7.1            FL+FR+FC+LFE+BL+BR+SL+SR
 7.1(wide)      FL+FR+FC+LFE+BL+BR+FLC+FRC
 7.1(wide-side) FL+FR+FC+LFE+FLC+FRC+SL+SR
-5.1.2          FL+FR+FC+LFE+BL+BR+TFL+TFR
+5.1.2          FL+FR+FC+LFE+SL+SR+TFL+TFR
+5.1.2(back)    FL+FR+FC+LFE+BL+BR+TFL+TFR
 octagonal      FL+FR+FC+BL+BR+BC+SL+SR
 cube           FL+FR+BL+BR+TFL+TFR+TBL+TBR
 5.1.4          FL+FR+FC+LFE+BL+BR+TFL+TFR+TBL+TBR
diff --git a/tests/ref/fate/iamf-5_1_4 b/tests/ref/fate/iamf-5_1_4
index fdee50b8e0..3441ea6ce9 100644
--- a/tests/ref/fate/iamf-5_1_4
+++ b/tests/ref/fate/iamf-5_1_4
@@ -116,7 +116,7 @@ output_gain_flags=0
 output_gain=0/1
 [/SUBCOMPONENT]
 [SUBCOMPONENT]
-channel_layout=5.1.2
+channel_layout=5.1.2(back)
 output_gain_flags=0
 output_gain=0/1
 [/SUBCOMPONENT]
@@ -335,7 +335,7 @@ dialogue_anchored_loudness=0/1
 album_anchored_loudness=0/1
 [/PIECE]
 [PIECE]
-sound_system=5.1.2
+sound_system=5.1.2(back)
 integrated_loudness=0/256
 digital_peak=0/256
 true_peak=0/1
diff --git a/tests/ref/fate/mov-mp4-iamf-5_1_4 b/tests/ref/fate/mov-mp4-iamf-5_1_4
index 36106528ab..2e45042744 100644
--- a/tests/ref/fate/mov-mp4-iamf-5_1_4
+++ b/tests/ref/fate/mov-mp4-iamf-5_1_4
@@ -116,7 +116,7 @@ output_gain_flags=0
 output_gain=0/1
 [/SUBCOMPONENT]
 [SUBCOMPONENT]
-channel_layout=5.1.2
+channel_layout=5.1.2(back)
 output_gain_flags=0
 output_gain=0/1
 [/SUBCOMPONENT]
@@ -357,7 +357,7 @@ dialogue_anchored_loudness=0/1
 album_anchored_loudness=0/1
 [/PIECE]
 [PIECE]
-sound_system=5.1.2
+sound_system=5.1.2(back)
 integrated_loudness=0/256
 digital_peak=0/256
 true_peak=0/1
diff --git a/tests/streamgroups/audio_element-5_1_4 b/tests/streamgroups/audio_element-5_1_4
index f537d1dc5d..173c8d4515 100644
--- a/tests/streamgroups/audio_element-5_1_4
+++ b/tests/streamgroups/audio_element-5_1_4
@@ -3,5 +3,5 @@ demixing=dmixp_mode=1:parameter_id=998,
 recon_gain=parameter_id=101,
 layer=ch_layout=stereo,
 layer=ch_layout=5.1,
-layer=ch_layout=5.1.2,
+layer=ch_layout=5.1.2(back),
 layer=ch_layout=5.1.4,
diff --git a/tests/streamgroups/mix_presentation-5_1_4 b/tests/streamgroups/mix_presentation-5_1_4
index 36fcd20124..d1d71ebaeb 100644
--- a/tests/streamgroups/mix_presentation-5_1_4
+++ b/tests/streamgroups/mix_presentation-5_1_4
@@ -1,2 +1,2 @@
 type=iamf_mix_presentation:id=2:stg=0:annotations=en-us=Mix_Presentation,
-submix=parameter_id=100:parameter_rate=48000:default_mix_gain=1.0|element=stg=0:parameter_id=100:headphones_rendering_mode=stereo:annotations=en-us=Scalable_Submix|layout=sound_system=stereo:integrated_loudness=1.0|layout=sound_system=5.1|layout=sound_system=5.1.2|layout=sound_system=5.1.4,
+submix=parameter_id=100:parameter_rate=48000:default_mix_gain=1.0|element=stg=0:parameter_id=100:headphones_rendering_mode=stereo:annotations=en-us=Scalable_Submix|layout=sound_system=stereo:integrated_loudness=1.0|layout=sound_system=5.1|layout=sound_system=5.1.2(back)|layout=sound_system=5.1.4,



More information about the ffmpeg-cvslog mailing list