OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <stdint.h> |
| 6 #include "media/filters/opus_constants.h" |
| 7 |
| 8 namespace media { |
| 9 |
| 10 const uint8_t kDefaultOpusChannelLayout[OPUS_MAX_CHANNELS_WITH_DEFAULT_LAYOUT] = |
| 11 { 0, 1 }; |
| 12 |
| 13 const uint8_t kFFmpegChannelDecodingLayouts [OPUS_MAX_VORBIS_CHANNELS] |
| 14 [OPUS_MAX_VORBIS_CHANNELS] = { |
| 15 {0}, |
| 16 |
| 17 // Stereo: No reorder. |
| 18 {0, 1}, |
| 19 |
| 20 // 3 Channels, from Vorbis order to: |
| 21 // L, R, Center |
| 22 {0, 2, 1}, |
| 23 |
| 24 // 4 Channels: No reorder. |
| 25 {0, 1, 2, 3}, |
| 26 |
| 27 // 5 Channels, from Vorbis order to: |
| 28 // Front L, Front R, Center, Back L, Back R |
| 29 {0, 2, 1, 3, 4}, |
| 30 |
| 31 // 6 Channels (5.1), from Vorbis order to: |
| 32 // Front L, Front R, Center, LFE, Back L, Back R |
| 33 {0, 2, 1, 5, 3, 4}, |
| 34 |
| 35 // 7 Channels (6.1), from Vorbis order to: |
| 36 // Front L, Front R, Front Center, LFE, Side L, Side R, Back Center |
| 37 {0, 2, 1, 6, 3, 4, 5}, |
| 38 |
| 39 // 8 Channels (7.1), from Vorbis order to: |
| 40 // Front L, Front R, Center, LFE, Back L, Back R, Side L, Side R |
| 41 {0, 2, 1, 7, 5, 6, 3, 4}, |
| 42 }; |
| 43 |
| 44 const uint8_t |
| 45 kOpusVorbisChannelMap[OPUS_MAX_VORBIS_CHANNELS][OPUS_MAX_VORBIS_CHANNELS] = { |
| 46 {0}, |
| 47 {0, 1}, |
| 48 {0, 2, 1}, |
| 49 {0, 1, 2, 3}, |
| 50 {0, 4, 1, 2, 3}, |
| 51 {0, 4, 1, 2, 3, 5}, |
| 52 {0, 4, 1, 2, 3, 5, 6}, |
| 53 {0, 6, 1, 2, 3, 4, 5, 7}, |
| 54 }; |
| 55 |
| 56 } // namespace media |
OLD | NEW |