aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2020-06-11 22:08:30 +0300
committerJan Ekström <jeebjp@gmail.com>2020-08-04 00:17:56 +0300
commit34de0abbe71fa90e874ff902200e5c6c466ba2f6 (patch)
tree3067ef5a7906b516d8cdd3f3a662a7a6d6851c21
parent4ad868497f2b5b10bff934f46f1b590c28e999de (diff)
downloadffmpeg-34de0abbe71fa90e874ff902200e5c6c466ba2f6.tar.gz
avutil/channel_layout: add 22.2 layout
Requires some extraneous top side and bottom front channels to be defined. According to STD-B59v2, the defined channel layout is: - FL - FR - FC - LFE1 - BL - BR - FLc - FRc - BC - LFE2 - SiL - SiR - TpFL - TpFR - TpFC - TpC - TpBL - TpBR - TpSiL - TpSiR - TpBC - BtFC - BtFL - BtFR
-rw-r--r--doc/APIchanges5
-rw-r--r--libavutil/channel_layout.c6
-rw-r--r--libavutil/channel_layout.h6
-rw-r--r--libavutil/version.h2
4 files changed, 18 insertions, 1 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index 72a4833fbc..a9bf1afd4c 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,11 @@ libavutil: 2017-10-21
API changes, most recent first:
+2020-08-04 - xxxxxxxxxx - lavu 56.58.100 - channel_layout.h
+ Add AV_CH_LAYOUT_22POINT2 together with its newly required pieces:
+ AV_CH_TOP_SIDE_LEFT, AV_CH_TOP_SIDE_RIGHT, AV_CH_BOTTOM_FRONT_CENTER,
+ AV_CH_BOTTOM_FRONT_LEFT, AV_CH_BOTTOM_FRONT_RIGHT.
+
2020-07-xx - xxxxxxxxxx - lavu 56.57.100 - cpu.h
Add AV_CPU_FLAG_MMI and AV_CPU_FLAG_MSA.
diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
index 3bd5ee29b7..ac773a9e63 100644
--- a/libavutil/channel_layout.c
+++ b/libavutil/channel_layout.c
@@ -62,6 +62,11 @@ static const struct channel_name channel_names[] = {
[33] = { "SDL", "surround direct left" },
[34] = { "SDR", "surround direct right" },
[35] = { "LFE2", "low frequency 2" },
+ [36] = { "TSL", "top side left" },
+ [37] = { "TSR", "top side right" },
+ [38] = { "BFC", "bottom front center" },
+ [39] = { "BFL", "bottom front left" },
+ [40] = { "BFR", "bottom front right" },
};
static const char *get_channel_name(int channel_id)
@@ -104,6 +109,7 @@ static const struct {
{ "octagonal", 8, AV_CH_LAYOUT_OCTAGONAL },
{ "hexadecagonal", 16, AV_CH_LAYOUT_HEXADECAGONAL },
{ "downmix", 2, AV_CH_LAYOUT_STEREO_DOWNMIX, },
+ { "22.2", 24, AV_CH_LAYOUT_22POINT2, },
};
static uint64_t get_channel_layout_single(const char *name, int name_len)
diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h
index 50bb8f03c5..d39ae1177a 100644
--- a/libavutil/channel_layout.h
+++ b/libavutil/channel_layout.h
@@ -71,6 +71,11 @@
#define AV_CH_SURROUND_DIRECT_LEFT 0x0000000200000000ULL
#define AV_CH_SURROUND_DIRECT_RIGHT 0x0000000400000000ULL
#define AV_CH_LOW_FREQUENCY_2 0x0000000800000000ULL
+#define AV_CH_TOP_SIDE_LEFT 0x0000001000000000ULL
+#define AV_CH_TOP_SIDE_RIGHT 0x0000002000000000ULL
+#define AV_CH_BOTTOM_FRONT_CENTER 0x0000004000000000ULL
+#define AV_CH_BOTTOM_FRONT_LEFT 0x0000008000000000ULL
+#define AV_CH_BOTTOM_FRONT_RIGHT 0x0000010000000000ULL
/** Channel mask value used for AVCodecContext.request_channel_layout
to indicate that the user requests the channel order of the decoder output
@@ -110,6 +115,7 @@
#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_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
+#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
enum AVMatrixEncoding {
AV_MATRIX_ENCODING_NONE,
diff --git a/libavutil/version.h b/libavutil/version.h
index 975fb87f31..3e7e1f410b 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 56
-#define LIBAVUTIL_VERSION_MINOR 57
+#define LIBAVUTIL_VERSION_MINOR 58
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \