Bug 1342732: Adjust ANY11P16 r=sotaro
authorRandell Jesup <rjesup@jesup.org>
Tue, 28 Feb 2017 23:31:47 -0500
changeset 394247 dabb9120d849fec9dd6946ee4c43d15d0b9679ae
parent 394246 f29dad38621ed4462b4416ffa090d25e9c017cde
child 394248 f985ae4754e011848afe468dfd6d026a31b06347
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1342732
milestone54.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 1342732: Adjust ANY11P16 r=sotaro MozReview-Commit-ID: ARnj1K5o2LM
media/libyuv/libyuv/source/row_any.cc
media/libyuv/row_any.patch
media/libyuv/update.py
--- a/media/libyuv/libyuv/source/row_any.cc
+++ b/media/libyuv/libyuv/source/row_any.cc
@@ -702,18 +702,18 @@ ANY11P(ARGBShuffleRow_Any_NEON, ARGBShuf
 ANY11P(ARGBShuffleRow_Any_MSA, ARGBShuffleRow_MSA, const uint8*, 4, 4, 7)
 #endif
 #undef ANY11P
 
 // Any 1 to 1 with parameter and shorts.  BPP measures in shorts.
 #define ANY11P16(NAMEANY, ANY_SIMD, T, SBPP, BPP, MASK)            \
   void NAMEANY(const uint16* src_ptr, uint16* dst_ptr, T shuffler, \
                int width) {                                        \
-    SIMD_ALIGNED(uint16 temp[32 * 2]);                             \
-    memset(temp, 0, 64); /* for msan */                            \
+    SIMD_ALIGNED(uint16 temp[64 * 2]);                             \
+    memset(temp, 0, 64*sizeof(uint16)); /* for msan */             \
     int r = width & MASK;                                          \
     int n = width & ~MASK;                                         \
     if (n > 0) {                                                   \
       ANY_SIMD(src_ptr, dst_ptr, shuffler, n);                     \
     }                                                              \
     memcpy(temp, src_ptr + n * SBPP, r * SBPP);                    \
     ANY_SIMD(temp, temp + 64, shuffler, MASK + 1);                 \
     memcpy(dst_ptr + n * BPP, temp + 64, r * BPP);                 \
new file mode 100644
--- /dev/null
+++ b/media/libyuv/row_any.patch
@@ -0,0 +1,24 @@
+diff --git a/media/libyuv/libyuv/source/row_any.cc b/media/libyuv/libyuv/source/row_any.cc
+--- a/media/libyuv/libyuv/source/row_any.cc
++++ b/media/libyuv/libyuv/source/row_any.cc
+@@ -702,18 +702,18 @@ ANY11P(ARGBShuffleRow_Any_NEON, ARGBShuf
+ ANY11P(ARGBShuffleRow_Any_MSA, ARGBShuffleRow_MSA, const uint8*, 4, 4, 7)
+ #endif
+ #undef ANY11P
+ 
+ // Any 1 to 1 with parameter and shorts.  BPP measures in shorts.
+ #define ANY11P16(NAMEANY, ANY_SIMD, T, SBPP, BPP, MASK)            \
+   void NAMEANY(const uint16* src_ptr, uint16* dst_ptr, T shuffler, \
+                int width) {                                        \
+-    SIMD_ALIGNED(uint16 temp[32 * 2]);                             \
+-    memset(temp, 0, 64); /* for msan */                            \
++    SIMD_ALIGNED(uint16 temp[64 * 2]);                             \
++    memset(temp, 0, 64*sizeof(uint16)); /* for msan */             \
+     int r = width & MASK;                                          \
+     int n = width & ~MASK;                                         \
+     if (n > 0) {                                                   \
+       ANY_SIMD(src_ptr, dst_ptr, shuffler, n);                     \
+     }                                                              \
+     memcpy(temp, src_ptr + n * SBPP, r * SBPP);                    \
+     ANY_SIMD(temp, temp + 64, shuffler, MASK + 1);                 \
+     memcpy(dst_ptr + n * BPP, temp + 64, r * BPP);                 \
--- a/media/libyuv/update.py
+++ b/media/libyuv/update.py
@@ -34,16 +34,20 @@ def apply_patches():
     # Patch to make mjpeg printfs optional at build time
     os.system("patch -p3 < make_mjpeg_printfs_optional.patch")
     # Patch to allow disabling of inline ASM and AVX2 code
     os.system("patch -p3 < allow_disabling_asm_avx2.patch")
     # Patch to add H444ToARGB() variant
     os.system("patch -p3 < add_H444ToARGB.patch")
     # Patch for bug 1342730
     os.system("patch -p3 < cpu_id.patch")
+    # Patch for bug 1342730
+    os.system("patch -p3 < cpu_id.patch")
+    # Patch for bug 1342732
+    os.system("patch -p3 < row_any.patch")
 
 def update_readme(commit):
     with open('README_MOZILLA') as f:
         readme = f.read()
 
     if 'The git commit ID last used to import was ' in readme:
         new_readme = re.sub('The git commit ID last used to import was [v\.a-f0-9]+',
             'The git commit ID last used to import was %s' % commit, readme)