1Testing av_channel_layout_standard
2mono           FC
3stereo         FL+FR
42.1            FL+FR+LFE
53.0            FL+FR+FC
63.0(back)      FL+FR+BC
74.0            FL+FR+FC+BC
8quad           FL+FR+BL+BR
9quad(side)     FL+FR+SL+SR
103.1            FL+FR+FC+LFE
115.0            FL+FR+FC+BL+BR
125.0(side)      FL+FR+FC+SL+SR
134.1            FL+FR+FC+LFE+BC
145.1            FL+FR+FC+LFE+BL+BR
155.1(side)      FL+FR+FC+LFE+SL+SR
166.0            FL+FR+FC+BC+SL+SR
176.0(front)     FL+FR+FLC+FRC+SL+SR
18hexagonal      FL+FR+FC+BL+BR+BC
196.1            FL+FR+FC+LFE+BC+SL+SR
206.1(back)      FL+FR+FC+LFE+BL+BR+BC
216.1(front)     FL+FR+LFE+FLC+FRC+SL+SR
227.0            FL+FR+FC+BL+BR+SL+SR
237.0(front)     FL+FR+FC+FLC+FRC+SL+SR
247.1            FL+FR+FC+LFE+BL+BR+SL+SR
257.1(wide)      FL+FR+FC+LFE+BL+BR+FLC+FRC
267.1(wide-side) FL+FR+FC+LFE+FLC+FRC+SL+SR
27octagonal      FL+FR+FC+BL+BR+BC+SL+SR
28hexadecagonal  FL+FR+FC+BL+BR+BC+SL+SR+TFL+TFC+TFR+TBL+TBC+TBR+WL+WR
29downmix        DL+DR
3022.2           FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR
31
32Testing av_channel_name
33With AV_CHAN_FRONT_LEFT:                          FL
34With AV_CHAN_FRONT_RIGHT:                         FR
35With 63:                                       USR63
36With AV_CHAN_AMBISONIC_BASE:                   AMBI0
37With AV_CHAN_AMBISONIC_END:                 AMBI1023
38Testing av_channel_description
39With AV_CHAN_FRONT_LEFT:                  front left
40With AV_CHAN_FRONT_RIGHT:                front right
41With 63:                                     user 63
42With AV_CHAN_AMBISONIC_BASE:         ambisonic ACN 0
43With AV_CHAN_AMBISONIC_END:       ambisonic ACN 1023
44
45Testing av_channel_from_string
46With "FL":                                         0
47With "FR":                                         1
48With "USR63":                                     63
49With "AMBI0":                                   1024
50With "AMBI1023":                                2047
51
52==Native layouts==
53
54Testing av_channel_layout_from_string
55With "0x3f":                                     5.1
56With "63":                                       5.1
57With "6c":                                       5.1
58With "6C":                                6 channels
59With "6 channels":                        6 channels
60With "6 channels (FL+FR+FC+LFE+BL+BR)":          5.1
61With "FL+FR+FC+LFE+BL+BR":                       5.1
62With "5.1":                                      5.1
63With "FL+FR+USR63":         3 channels (FL+FR+USR63)
64With "FL+FR+FC+LFE+SL+SR":                 5.1(side)
65With "5.1(side)":                          5.1(side)
66
67Testing av_channel_layout_from_mask
68With AV_CH_LAYOUT_5POINT1:                 5.1(side)
69
70Testing av_channel_layout_channel_from_index
71On 5.1(side) layout with 0:                        0
72On 5.1(side) layout with 1:                        1
73On 5.1(side) layout with 2:                        2
74On 5.1(side) layout with 3:                        3
75On 5.1(side) layout with 4:                        9
76On 5.1(side) layout with 5:                       10
77On 5.1(side) layout with 6:                       -1
78
79Testing av_channel_layout_index_from_channel
80On 5.1(side) layout with AV_CHAN_FRONT_LEFT:       0
81On 5.1(side) layout with AV_CHAN_FRONT_RIGHT:      1
82On 5.1(side) layout with AV_CHAN_FRONT_CENTER:     2
83On 5.1(side) layout with AV_CHAN_LOW_FREQUENCY:    3
84On 5.1(side) layout with AV_CHAN_SIDE_LEFT:        4
85On 5.1(side) layout with AV_CHAN_SIDE_RIGHT:       5
86On 5.1(side) layout with AV_CHAN_BACK_CENTER:     -1
87
88Testing av_channel_layout_channel_from_string
89On 5.1(side) layout with "FL":                     0
90On 5.1(side) layout with "FR":                     1
91On 5.1(side) layout with "FC":                     2
92On 5.1(side) layout with "LFE":                    3
93On 5.1(side) layout with "SL":                     9
94On 5.1(side) layout with "SR":                    10
95On 5.1(side) layout with "BC":                    -1
96
97Testing av_channel_layout_index_from_string
98On 5.1(side) layout with "FL":                     0
99On 5.1(side) layout with "FR":                     1
100On 5.1(side) layout with "FC":                     2
101On 5.1(side) layout with "LFE":                    3
102On 5.1(side) layout with "SL":                     4
103On 5.1(side) layout with "SR":                     5
104On 5.1(side) layout with "BC":                    -1
105
106Testing av_channel_layout_subset
107On 5.1(side) layout with AV_CH_LAYOUT_STEREO:    0x3
108On 5.1(side) layout with AV_CH_LAYOUT_2POINT1:   0xb
109On 5.1(side) layout with AV_CH_LAYOUT_4POINT1:   0xf
110
111==Custom layouts==
112
113Testing av_channel_layout_from_string
114With "FL+FR+FC+BL+BR+LFE":    6 channels (FL+FR+FC+BL+BR+LFE)
115With "2 channels (FR+FL)":                 2 channels (FR+FL)
116With "ambisonic 1+FR+FL":      ambisonic 1+2 channels (FR+FL)
117With "ambisonic 2+FC@Foo":    ambisonic 2+1 channels (FC@Foo)
118With "FL@Foo+FR@Bar":              2 channels (FL@Foo+FR@Bar)
119With "FR+FL@Foo+USR63@Foo":  3 channels (FR+FL@Foo+USR63@Foo)
120
121Testing av_channel_layout_index_from_string
122On "FR+FL@Foo+USR63@Foo" layout with "FR":                  0
123On "FR+FL@Foo+USR63@Foo" layout with "FL":                  1
124On "FR+FL@Foo+USR63@Foo" layout with "USR63":               2
125On "FR+FL@Foo+USR63@Foo" layout with "Foo":                -1
126On "FR+FL@Foo+USR63@Foo" layout with "@Foo":                1
127On "FR+FL@Foo+USR63@Foo" layout with "FR@Foo":             -1
128On "FR+FL@Foo+USR63@Foo" layout with "FL@Foo":              1
129On "FR+FL@Foo+USR63@Foo" layout with "USR63@Foo":           2
130On "FR+FL@Foo+USR63@Foo" layout with "BC":                 -1
131
132Testing av_channel_layout_channel_from_string
133On "FR+FL@Foo+USR63@Foo" layout with "FR":                  1
134On "FR+FL@Foo+USR63@Foo" layout with "FL":                  0
135On "FR+FL@Foo+USR63@Foo" layout with "USR63":              63
136On "FR+FL@Foo+USR63@Foo" layout with "Foo":                -1
137On "FR+FL@Foo+USR63@Foo" layout with "@Foo":                0
138On "FR+FL@Foo+USR63@Foo" layout with "FR@Foo":             -1
139On "FR+FL@Foo+USR63@Foo" layout with "FL@Foo":              0
140On "FR+FL@Foo+USR63@Foo" layout with "USR63@Foo":          63
141On "FR+FL@Foo+USR63@Foo" layout with "BC":                 -1
142
143Testing av_channel_layout_index_from_channel
144On "FR+FL@Foo+USR63@Foo" layout with AV_CHAN_FRONT_RIGHT:   0
145On "FR+FL@Foo+USR63@Foo" layout with AV_CHAN_FRONT_LEFT:    1
146On "FR+FL@Foo+USR63@Foo" layout with 63:                    2
147On "FR+FL@Foo+USR63@Foo" layout with AV_CHAN_BACK_CENTER:  -1
148
149Testing av_channel_layout_channel_from_index
150On "FR+FL@Foo+USR63@Foo" layout with 0:                     1
151On "FR+FL@Foo+USR63@Foo" layout with 1:                     0
152On "FR+FL@Foo+USR63@Foo" layout with 2:                    63
153On "FR+FL@Foo+USR63@Foo" layout with 3:                    -1
154
155Testing av_channel_layout_subset
156On "FR+FL@Foo+USR63@Foo" layout with AV_CH_LAYOUT_STEREO: 0x3
157On "FR+FL@Foo+USR63@Foo" layout with AV_CH_LAYOUT_QUAD:   0x3
158
159==Ambisonic layouts==
160
161Testing av_channel_layout_from_string
162With "ambisonic 1":                               ambisonic 1
163With "ambisonic 2+stereo":                 ambisonic 2+stereo
164
165Testing av_channel_layout_index_from_channel
166On "ambisonic 2+stereo" layout with AV_CHAN_AMBISONIC_BASE: 0
167On "ambisonic 2+stereo" layout with AV_CHAN_FRONT_LEFT:     9
168On "ambisonic 2+stereo" layout with AV_CHAN_FRONT_RIGHT:   10
169On "ambisonic 2+stereo" layout with AV_CHAN_BACK_CENTER:   -1
170
171Testing av_channel_layout_channel_from_index
172On "ambisonic 2+stereo" layout with 0:                   1024
173On "ambisonic 2+stereo" layout with 9:                      0
174On "ambisonic 2+stereo" layout with 10:                     1
175On "ambisonic 2+stereo" layout with 11:                    -1
176
177Testing av_channel_layout_subset
178On "ambisonic 2+stereo" layout with AV_CH_LAYOUT_STEREO:  0x3
179On "ambisonic 2+stereo" layout with AV_CH_LAYOUT_QUAD:    0x3
180