Bug 1448627 - Update cubeb to 7712aaab. draft
authorPaul Adenot <paul@paul.cx>
Sun, 25 Mar 2018 11:33:26 +0200
changeset 772167 29d9aa9b0e493d9fb4bdeada3bef939c69fd4465
parent 772164 8a4bb920ffab7e8d1e599c0b26d748e39021e2f4
push id103867
push userpaul@paul.cx
push dateSun, 25 Mar 2018 09:33:59 +0000
bugs1448627
milestone61.0a1
Bug 1448627 - Update cubeb to 7712aaab. MozReview-Commit-ID: HbYayQvtQQc
media/libcubeb/README_MOZILLA
media/libcubeb/src/cubeb_mixer.cpp
--- a/media/libcubeb/README_MOZILLA
+++ b/media/libcubeb/README_MOZILLA
@@ -1,8 +1,8 @@
 The source from this directory was copied from the cubeb
 git repository using the update.sh script.  The only changes
 made were those applied by update.sh and the addition of
 Makefile.in build files for the Mozilla build system.
 
 The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
 
-The git commit ID used was 77cb1a9a37bb9fcc43743770727cb6a31b27ab74 (2018-03-23 14:38:34 +1000)
+The git commit ID used was 7712aaabfa140e8c7fe890e3f5f65dfe3fe58632 (2018-03-25 11:30:38 +0200)
--- a/media/libcubeb/src/cubeb_mixer.cpp
+++ b/media/libcubeb/src/cubeb_mixer.cpp
@@ -9,19 +9,16 @@
 
 #define NOMINMAX
 
 #include <algorithm>
 #include <cassert>
 #include <climits>
 #include <cmath>
 #include <cstdlib>
-#ifdef _MSC_VER
-#include <intrin.h>
-#endif
 #include <memory>
 #include <type_traits>
 #include "cubeb-internal.h"
 #include "cubeb_mixer.h"
 #include "cubeb_utils.h"
 
 #ifndef FF_ARRAY_ELEMS
 #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
@@ -75,26 +72,25 @@ cubeb_channel_layout_check(cubeb_channel
     }
     return l;
 }
 
 unsigned int cubeb_channel_layout_nb_channels(cubeb_channel_layout x)
 {
 #if __GNUC__ || __clang__
   return __builtin_popcount (x);
-#elif _MSC_VER
-  return __popcnt(x);
 #else
   x -= (x >> 1) & 0x55555555;
   x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
   x = (x + (x >> 4)) & 0x0F0F0F0F;
   x += x >> 8;
   return (x + (x >> 16)) & 0x3F;
 #endif
 }
+
 struct MixerContext {
   MixerContext(cubeb_sample_format f,
                uint32_t in_channels,
                cubeb_channel_layout in,
                uint32_t out_channels,
                cubeb_channel_layout out)
     : _format(f)
     , _in_ch_layout(cubeb_channel_layout_check(in, in_channels))