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@gmail.com>
This commit is contained in:
James Almer 2024-12-30 15:15:54 -03:00
parent 551041e384
commit da9dcaba69
9 changed files with 16 additions and 9 deletions

View file

@ -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().

View file

@ -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 },

View file

@ -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)

View file

@ -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, \

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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,

View file

@ -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,