| | 218 | /* We do not only have to interleave, but also reorder the channels |
|---|
| | 219 | * Channel reordering according to number of output channels of libA52 |
|---|
| | 220 | * The reordering needs to be different for different channel configurations |
|---|
| | 221 | * (3F2R, 1F2R etc), so this is only temporary. |
|---|
| | 222 | * The WG-4 order is appropriate for stereo, quadrophonia, and 5.1 surround. |
|---|
| | 223 | * |
|---|
| | 224 | * 6 channel mode |
|---|
| | 225 | * channel liba52 order WG-4 order |
|---|
| | 226 | * 0 LFE // L |
|---|
| | 227 | * 1 L // R |
|---|
| | 228 | * 2 C // LS |
|---|
| | 229 | * 3 R // RS |
|---|
| | 230 | * 4 LS // C |
|---|
| | 231 | * 5 RS // LFE |
|---|
| | 232 | * |
|---|
| | 233 | * The liba52 moves channels to the front if there are unused spaces, so |
|---|
| | 234 | * there is no gap between channels. The translation table says which |
|---|
| | 235 | * channel of the new stream [use the new channel # as index] is taken |
|---|
| | 236 | * from which original channel [use the number from the array to address |
|---|
| | 237 | * the original channel]. |
|---|
| | 238 | */ |
|---|
| | 239 | |
|---|
| | 240 | static const int translation[7][6] = |
|---|
| | 241 | {{ 0, 0, 0, 0, 0, 0 }, /* 0 channels (rarely used) */ |
|---|
| | 242 | { 0, 0, 0, 0, 0, 0 }, /* 1 ch */ |
|---|
| | 243 | { 0, 1, 0, 0, 0, 0 }, /* 2 */ |
|---|
| | 244 | { 1, 2, 0, 0, 0, 0 }, /* 3 */ |
|---|
| | 245 | { 1, 3, 2, 0, 0, 0 }, /* 4 */ |
|---|
| | 246 | { 1, 3, 4, 2, 0, 0 }, /* 5 */ |
|---|
| | 247 | { 1, 3, 4, 5, 2, 0 }}; /* 6 */ |
|---|
| | 248 | |
|---|