Warning, /graphics/krita/3rdparty/ext_heif/0001-cdef-Disable-MSVC-optimizations-for-filter_block.patch is written in an unsupported language. File is not indexed.
0001 From ad8c7acc1ab3cf784a19a808dc86627c2ef94cfc Mon Sep 17 00:00:00 2001 0002 From: "L. E. Segovia" <amy@amyspark.me> 0003 Date: Sat, 22 Apr 2023 22:47:03 -0300 0004 Subject: [PATCH] cdef: Disable MSVC optimizations for filter_block 0005 0006 This brings build time to 1m44s in my Ryzen 7 2700x, from >15m per file. 0007 0008 BUG: aomedia:3395 0009 Change-Id: Ie53dc51dfe1f8823fc36ee8656b2d6038c7c98ab 0010 (cherry picked from commit b07a503eeaac1b1567ba9509b0c15c84f1ee8463) 0011 --- 0012 av1/common/cdef_block_simd.h | 10 ++++++++++ 0013 1 file changed, 10 insertions(+) 0014 0015 diff --git a/av1/common/cdef_block_simd.h b/av1/common/cdef_block_simd.h 0016 index df6787177..c736c9009 100644 0017 --- a/av1/common/cdef_block_simd.h 0018 +++ b/av1/common/cdef_block_simd.h 0019 @@ -270,6 +270,12 @@ SIMD_INLINE v256 get_max_secondary(const int is_lowbd, v256 *tap, v256 max, 0020 return max; 0021 } 0022 0023 +// MSVC takes far too much time optimizing these. 0024 +// https://bugs.chromium.org/p/aomedia/issues/detail?id=3395 0025 +#if defined(_MSC_VER) && !defined(__clang__) 0026 +#pragma optimize("", off) 0027 +#endif 0028 + 0029 CDEF_INLINE void filter_block_4x4(const int is_lowbd, void *dest, int dstride, 0030 const uint16_t *in, int pri_strength, 0031 int sec_strength, int dir, int pri_damping, 0032 @@ -617,6 +623,10 @@ CDEF_INLINE void filter_block_8x8(const int is_lowbd, void *dest, int dstride, 0033 } 0034 } 0035 0036 +#if defined(_MSC_VER) && !defined(__clang__) 0037 +#pragma optimize("", on) 0038 +#endif 0039 + 0040 SIMD_INLINE void copy_block_4xh(const int is_lowbd, void *dest, int dstride, 0041 const uint16_t *in, int height) { 0042 uint8_t *dst8 = (uint8_t *)dest; 0043 -- 0044 2.40.1.windows.1 0045