Index: media/base/channel_layout.cc |
diff --git a/media/base/channel_layout.cc b/media/base/channel_layout.cc |
index 958430ac4e7768f10c45f00120d6fd8d10e98928..6103a7bf5e9c45545302ba312e7a97370f0fe2de 100644 |
--- a/media/base/channel_layout.cc |
+++ b/media/base/channel_layout.cc |
@@ -48,104 +48,105 @@ static const int kLayoutToChannels[] = { |
// surround sound channel in FFmpeg's 5.1 layout is in the 5th position (because |
// the order is L, R, C, LFE, LS, RS), so |
// kChannelOrderings[CHANNEL_LAYOUT_5POINT1][SIDE_LEFT] = 4; |
-static const int kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX] = { |
- // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR |
+static const int |
rileya (GONE FROM CHROMIUM)
2014/01/27 20:59:38
This possibly unnecessary indenting brought to you
|
+ kChannelOrderings[CHANNEL_LAYOUT_HISTOGRAM_MAX][CHANNELS_HISTOGRAM_MAX] = { |
+ // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR |
- // CHANNEL_LAYOUT_NONE |
- { -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_NONE |
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_UNSUPPORTED |
- { -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_UNSUPPORTED |
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_MONO |
- { -1 , -1 , 0 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_MONO |
+ {-1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_STEREO |
- { 0 , 1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_STEREO |
+ {0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_2_1 |
- { 0 , 1 , -1 , -1 , -1 , -1 , -1 , -1 , 2 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_2_1 |
+ {0, 1, -1, -1, -1, -1, -1, -1, 2, -1, -1}, |
- // CHANNEL_LAYOUT_SURROUND |
- { 0 , 1 , 2 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_SURROUND |
+ {0, 1, 2, -1, -1, -1, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_4_0 |
- { 0 , 1 , 2 , -1 , -1 , -1 , -1 , -1 , 3 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_4_0 |
+ {0, 1, 2, -1, -1, -1, -1, -1, 3, -1, -1}, |
- // CHANNEL_LAYOUT_2_2 |
- { 0 , 1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , 2 , 3 }, |
+ // CHANNEL_LAYOUT_2_2 |
+ {0, 1, -1, -1, -1, -1, -1, -1, -1, 2, 3}, |
- // CHANNEL_LAYOUT_QUAD |
- { 0 , 1 , -1 , -1 , 2 , 3 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_QUAD |
+ {0, 1, -1, -1, 2, 3, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_5_0 |
- { 0 , 1 , 2 , -1 , -1 , -1 , -1 , -1 , -1 , 3 , 4 }, |
+ // CHANNEL_LAYOUT_5_0 |
+ {0, 1, 2, -1, -1, -1, -1, -1, -1, 3, 4}, |
- // CHANNEL_LAYOUT_5_1 |
- { 0 , 1 , 2 , 3 , -1 , -1 , -1 , -1 , -1 , 4 , 5 }, |
+ // CHANNEL_LAYOUT_5_1 |
+ {0, 1, 2, 3, -1, -1, -1, -1, -1, 4, 5}, |
- // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR |
+ // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR |
- // CHANNEL_LAYOUT_5_0_BACK |
- { 0 , 1 , 2 , -1 , 3 , 4 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_5_0_BACK |
+ {0, 1, 2, -1, 3, 4, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_5_1_BACK |
- { 0 , 1 , 2 , 3 , 4 , 5 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_5_1_BACK |
+ {0, 1, 2, 3, 4, 5, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_7_0 |
- { 0 , 1 , 2 , -1 , 5 , 6 , -1 , -1 , -1 , 3 , 4 }, |
+ // CHANNEL_LAYOUT_7_0 |
+ {0, 1, 2, -1, 5, 6, -1, -1, -1, 3, 4}, |
- // CHANNEL_LAYOUT_7_1 |
- { 0 , 1 , 2 , 3 , 6 , 7 , -1 , -1 , -1 , 4 , 5 }, |
+ // CHANNEL_LAYOUT_7_1 |
+ {0, 1, 2, 3, 6, 7, -1, -1, -1, 4, 5}, |
- // CHANNEL_LAYOUT_7_1_WIDE |
- { 0 , 1 , 2 , 3 , -1 , -1 , 6 , 7 , -1 , 4 , 5 }, |
+ // CHANNEL_LAYOUT_7_1_WIDE |
+ {0, 1, 2, 3, -1, -1, 6, 7, -1, 4, 5}, |
- // CHANNEL_LAYOUT_STEREO_DOWNMIX |
- { 0 , 1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_STEREO_DOWNMIX |
+ {0, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_2POINT1 |
- { 0 , 1 , -1 , 2 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_2POINT1 |
+ {0, 1, -1, 2, -1, -1, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_3_1 |
- { 0 , 1 , 2 , 3 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_3_1 |
+ {0, 1, 2, 3, -1, -1, -1, -1, -1, -1, -1}, |
- // CHANNEL_LAYOUT_4_1 |
- { 0 , 1 , 2 , 4 , -1 , -1 , -1 , -1 , 3 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_4_1 |
+ {0, 1, 2, 4, -1, -1, -1, -1, 3, -1, -1}, |
- // CHANNEL_LAYOUT_6_0 |
- { 0 , 1 , 2 , -1 , -1 , -1 , -1 , -1 , 5 , 3 , 4 }, |
+ // CHANNEL_LAYOUT_6_0 |
+ {0, 1, 2, -1, -1, -1, -1, -1, 5, 3, 4}, |
- // CHANNEL_LAYOUT_6_0_FRONT |
- { 0 , 1 , -1 , -1 , -1 , -1 , 4 , 5 , -1 , 2 , 3 }, |
+ // CHANNEL_LAYOUT_6_0_FRONT |
+ {0, 1, -1, -1, -1, -1, 4, 5, -1, 2, 3}, |
- // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR |
+ // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR |
- // CHANNEL_LAYOUT_HEXAGONAL |
- { 0 , 1 , 2 , -1 , 3 , 4 , -1 , -1 , 5 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_HEXAGONAL |
+ {0, 1, 2, -1, 3, 4, -1, -1, 5, -1, -1}, |
- // CHANNEL_LAYOUT_6_1 |
- { 0 , 1 , 2 , 3 , -1 , -1 , -1 , -1 , 6 , 4 , 5 }, |
+ // CHANNEL_LAYOUT_6_1 |
+ {0, 1, 2, 3, -1, -1, -1, -1, 6, 4, 5}, |
- // CHANNEL_LAYOUT_6_1_BACK |
- { 0 , 1 , 2 , 3 , 4 , 5 , -1 , -1 , 6 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_6_1_BACK |
+ {0, 1, 2, 3, 4, 5, -1, -1, 6, -1, -1}, |
- // CHANNEL_LAYOUT_6_1_FRONT |
- { 0 , 1 , -1 , 6 , -1 , -1 , 4 , 5 , -1 , 2 , 3 }, |
+ // CHANNEL_LAYOUT_6_1_FRONT |
+ {0, 1, -1, 6, -1, -1, 4, 5, -1, 2, 3}, |
- // CHANNEL_LAYOUT_7_0_FRONT |
- { 0 , 1 , 2 , -1 , -1 , -1 , 5 , 6 , -1 , 3 , 4 }, |
+ // CHANNEL_LAYOUT_7_0_FRONT |
+ {0, 1, 2, -1, -1, -1, 5, 6, -1, 3, 4}, |
- // CHANNEL_LAYOUT_7_1_WIDE_BACK |
- { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_7_1_WIDE_BACK |
+ {0, 1, 2, 3, 4, 5, 6, 7, -1, -1, -1}, |
- // CHANNEL_LAYOUT_OCTAGONAL |
- { 0 , 1 , 2 , -1 , 5 , 6 , -1 , -1 , 7 , 3 , 4 }, |
+ // CHANNEL_LAYOUT_OCTAGONAL |
+ {0, 1, 2, -1, 5, 6, -1, -1, 7, 3, 4}, |
- // CHANNEL_LAYOUT_DISCRETE |
- { -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, |
+ // CHANNEL_LAYOUT_DISCRETE |
+ {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, |
- // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR |
+ // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR |
}; |
int ChannelLayoutToChannelCount(ChannelLayout layout) { |
@@ -246,7 +247,7 @@ const char* ChannelLayoutToString(ChannelLayout layout) { |
return "OCTAGONAL"; |
case CHANNEL_LAYOUT_DISCRETE: |
return "DISCRETE"; |
- case CHANNEL_LAYOUT_MAX: |
+ case CHANNEL_LAYOUT_HISTOGRAM_MAX: |
break; |
} |
NOTREACHED() << "Invalid channel layout provided: " << layout; |