40 [0] = {
"FL",
"front left" },
41 [1] = {
"FR",
"front right" },
42 [2] = {
"FC",
"front center" },
43 [3] = {
"LFE",
"low frequency" },
44 [4] = {
"BL",
"back left" },
45 [5] = {
"BR",
"back right" },
46 [6] = {
"FLC",
"front left-of-center" },
47 [7] = {
"FRC",
"front right-of-center" },
48 [8] = {
"BC",
"back center" },
49 [9] = {
"SL",
"side left" },
50 [10] = {
"SR",
"side right" },
51 [11] = {
"TC",
"top center" },
52 [12] = {
"TFL",
"top front left" },
53 [13] = {
"TFC",
"top front center" },
54 [14] = {
"TFR",
"top front right" },
55 [15] = {
"TBL",
"top back left" },
56 [16] = {
"TBC",
"top back center" },
57 [17] = {
"TBR",
"top back right" },
58 [29] = {
"DL",
"downmix left" },
59 [30] = {
"DR",
"downmix right" },
60 [31] = {
"WL",
"wide left" },
61 [32] = {
"WR",
"wide right" },
62 [33] = {
"SDL",
"surround direct left" },
63 [34] = {
"SDR",
"surround direct right" },
64 [35] = {
"LFE2",
"low frequency 2" },
71 return channel_names[channel_id].
name;
108 #if FF_API_GET_CHANNEL_LAYOUT_COMPAT
124 if (channel_names[i].name &&
125 strlen(channel_names[i].name) == name_len &&
126 !memcmp(channel_names[i].name, name, name_len))
127 return (int64_t)1 << i;
128 i = strtol(name, &end, 10);
130 #if FF_API_GET_CHANNEL_LAYOUT_COMPAT
132 if (end - name == name_len ||
133 (end + 1 - name == name_len && *end ==
'c')) {
135 if (end - name == name_len) {
137 "Single channel layout '%.*s' is interpreted as a number of channels, "
138 "switch to the syntax '%.*sc' otherwise it will be interpreted as a "
139 "channel layout number in a later version\n",
140 name_len, name, name_len, name);
146 if ((end + 1 - name == name_len && *end ==
'c'))
148 #if FF_API_GET_CHANNEL_LAYOUT_COMPAT
152 layout = strtoll(name, &end, 0);
153 if (end - name == name_len)
154 return FFMAX(layout, 0);
158 #if FF_API_GET_CHANNEL_LAYOUT_COMPAT
165 const char *name_end = name + strlen(name);
166 int64_t
layout = 0, layout_single;
168 for (n = name; n < name_end; n = e + 1) {
169 for (e = n; e < name_end && *e !=
'+' && *e !=
'|'; e++);
170 #if FF_API_GET_CHANNEL_LAYOUT_COMPAT
177 layout |= layout_single;
182 #if FF_API_GET_CHANNEL_LAYOUT_COMPAT
194 if (nb_channels <= 0)
205 if (channel_layout) {
208 for (i = 0, ch = 0; i < 64; i++) {
209 if ((channel_layout & (UINT64_C(1) << i))) {
234 return av_popcount64(channel_layout);
248 if (!(channel_layout & channel) ||
251 channel_layout &= channel - 1;
260 for (i = 0; i < 64; i++)
261 if ((1ULL<<i) & channel)
272 if ((1ULL<<i) & channel)
273 return channel_names[i].description;
284 for (i = 0; i < 64; i++) {
285 if ((1ULL << i) & channel_layout && !index--)