cdef: Disable MSVC optimizations for filter_block
This brings build time to 1m44s in my Ryzen 7 2700x, from >15m per file.
BUG: aomedia:3395
Change-Id: Ie53dc51dfe1f8823fc36ee8656b2d6038c7c98ab
diff --git a/av1/common/cdef_block_simd.h b/av1/common/cdef_block_simd.h
index aef1a74..5c62201 100644
--- a/av1/common/cdef_block_simd.h
+++ b/av1/common/cdef_block_simd.h
@@ -270,6 +270,12 @@
return max;
}
+// MSVC takes far too much time optimizing these.
+// https://bugs.chromium.org/p/aomedia/issues/detail?id=3395
+#if defined(_MSC_VER) && !defined(__clang__)
+#pragma optimize("", off)
+#endif
+
CDEF_INLINE void filter_block_4x4(const int is_lowbd, void *dest, int dstride,
const uint16_t *in, int pri_strength,
int sec_strength, int dir, int pri_damping,
@@ -617,6 +623,10 @@
}
}
+#if defined(_MSC_VER) && !defined(__clang__)
+#pragma optimize("", on)
+#endif
+
SIMD_INLINE void copy_block_4xh(const int is_lowbd, void *dest, int dstride,
const uint16_t *in, int height) {
uint8_t *dst8 = (uint8_t *)dest;