And rename the existing 5.1.2 to explicitly state it contains back channels.
Signed-off-by: James Almer <jamr...@gmail.com> --- libavutil/channel_layout.c | 3 ++- libavutil/channel_layout.h | 2 ++ tests/ref/fate/channel_layout | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) 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/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 -- 2.47.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".