Bug 1403292 - Add some comments to ignore the clang-format execution on these declarations r=jya
authorSylvestre Ledru <sledru@mozilla.com>
Tue, 26 Sep 2017 21:11:33 +0200
changeset 433859 fe2e626594f52afdaa6c573de9615bb1b3cae197
parent 433858 845822d9f2b99f2caeda515955bbb8cb957e07ad
child 433860 50d414550fa4fe84656254dbdcac5e811a7fe6d9
push id8114
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 16:33:21 +0000
treeherdermozilla-beta@73e0d89a540f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1403292
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1403292 - Add some comments to ignore the clang-format execution on these declarations r=jya MozReview-Commit-ID: G30klPUAXTM
dom/media/mp3/MP3FrameParser.cpp
--- a/dom/media/mp3/MP3FrameParser.cpp
+++ b/dom/media/mp3/MP3FrameParser.cpp
@@ -216,20 +216,22 @@ FrameParser::FrameHeader::Layer() const
   return LAYERS[RawLayer()];
 }
 
 int32_t
 FrameParser::FrameHeader::SampleRate() const
 {
   // Sample rates - use [version][srate]
   static const uint16_t SAMPLE_RATE[4][4] = {
+    // clang-format off
     { 11025, 12000,  8000, 0 }, // MPEG 2.5
     {     0,     0,     0, 0 }, // Reserved
     { 22050, 24000, 16000, 0 }, // MPEG 2
     { 44100, 48000, 32000, 0 }  // MPEG 1
+    // clang-format on
   };
 
   return SAMPLE_RATE[RawVersion()][RawSampleRate()];
 }
 
 int32_t
 FrameParser::FrameHeader::Channels() const
 {
@@ -238,31 +240,34 @@ FrameParser::FrameHeader::Channels() con
   return RawChannelMode() == 3 ? 1 : 2;
 }
 
 int32_t
 FrameParser::FrameHeader::SamplesPerFrame() const
 {
   // Samples per frame - use [version][layer]
   static const uint16_t FRAME_SAMPLE[4][4] = {
+    // clang-format off
     // Layer     3     2     1       Version
     {      0,  576, 1152,  384 }, // 2.5
     {      0,    0,    0,    0 }, // Reserved
     {      0,  576, 1152,  384 }, // 2
     {      0, 1152, 1152,  384 }  // 1
+    // clang-format on
   };
 
   return FRAME_SAMPLE[RawVersion()][RawLayer()];
 }
 
 int32_t
 FrameParser::FrameHeader::Bitrate() const
 {
   // Bitrates - use [version][layer][bitrate]
   static const uint16_t BITRATE[4][4][16] = {
+    // clang-format off
     { // Version 2.5
       { 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 0 }, // Reserved
       { 0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, 0 }, // Layer 3
       { 0,   8,  16,  24,  32,  40,  48,  56,  64,  80,  96, 112, 128, 144, 160, 0 }, // Layer 2
       { 0,  32,  48,  56,  64,  80,  96, 112, 128, 144, 160, 176, 192, 224, 256, 0 }  // Layer 1
     },
     { // Reserved
       { 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 0 }, // Invalid
@@ -277,16 +282,17 @@ FrameParser::FrameHeader::Bitrate() cons
       { 0,  32,  48,  56,  64,  80,  96, 112, 128, 144, 160, 176, 192, 224, 256, 0 }  // Layer 1
     },
     { // Version 1
       { 0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 0 }, // Reserved
       { 0,  32,  40,  48,  56,  64,  80,  96, 112, 128, 160, 192, 224, 256, 320, 0 }, // Layer 3
       { 0,  32,  48,  56,  64,  80,  96, 112, 128, 160, 192, 224, 256, 320, 384, 0 }, // Layer 2
       { 0,  32,  64,  96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 0 }, // Layer 1
     }
+    // clang-format on
   };
 
   return 1000 * BITRATE[RawVersion()][RawLayer()][RawBitrate()];
 }
 
 int32_t
 FrameParser::FrameHeader::SlotSize() const
 {