Disable MSVC forceinline only in cdef_block_simd.h

The files that cause MSVC x86 release build to run out of heap space are
cdef_block_avx2.c, cdef_block_sse4.c etc. These files all include
cdef_block_simd.h as a template file, and cdef_block_simd.h shows up in
some of the MSVC error messages. So we only need to disable MSVC x86
forceinline in cdef_block_simd.h. In addition, the two longest functions
in cdef_block_simd.h are filter_block_4x4() and filter_block_8x8().
Experiments showed it suffices to disable forceinline on just those two
functions and constrain16().

The compiler out of heap space errors have also been observed with
Visual Studio 2022 version 17.4.4. Update the _MSC_VER check
accordingly.

Bug: aomedia:3310
Change-Id: I17851702553224c19f2633f3cc44b8aa6813d356
diff --git a/aom/aom_integer.h b/aom/aom_integer.h
index 085157d..d9bba09 100644
--- a/aom/aom_integer.h
+++ b/aom/aom_integer.h
@@ -15,13 +15,7 @@
 #include <stddef.h>
 
 #if defined(_MSC_VER)
-// Work around compiler out of memory issues with Win32 builds. This issue has
-// been observed with Visual Studio 2017 & 2019.
-#if defined(_M_IX86) && _MSC_VER < 1930
-#define AOM_FORCE_INLINE __inline
-#else
 #define AOM_FORCE_INLINE __forceinline
-#endif
 #define AOM_INLINE __inline
 #else
 #define AOM_FORCE_INLINE __inline__ __attribute__((always_inline))
diff --git a/av1/common/cdef_block_simd.h b/av1/common/cdef_block_simd.h
index b0315dd..aef1a74 100644
--- a/av1/common/cdef_block_simd.h
+++ b/av1/common/cdef_block_simd.h
@@ -197,8 +197,16 @@
   return best_dir;
 }
 
+// Work around compiler out of memory issues with Win32 builds. This issue has
+// been observed with Visual Studio 2017, 2019, and 2022 (version 17.4).
+#if defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER < 1940
+#define CDEF_INLINE static INLINE
+#else
+#define CDEF_INLINE SIMD_INLINE
+#endif
+
 // sign(a-b) * min(abs(a-b), max(0, threshold - (abs(a-b) >> adjdamp)))
-SIMD_INLINE v256 constrain16(v256 a, v256 b, unsigned int threshold,
+CDEF_INLINE v256 constrain16(v256 a, v256 b, unsigned int threshold,
                              unsigned int adjdamp) {
   v256 diff = v256_sub_16(a, b);
   const v256 sign = v256_shr_n_s16(diff, 15);
@@ -262,7 +270,7 @@
   return max;
 }
 
-SIMD_INLINE void filter_block_4x4(const int is_lowbd, void *dest, int dstride,
+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,
                                   int sec_damping, int coeff_shift, int height,
@@ -454,7 +462,7 @@
   }
 }
 
-SIMD_INLINE void filter_block_8x8(const int is_lowbd, void *dest, int dstride,
+CDEF_INLINE void filter_block_8x8(const int is_lowbd, void *dest, int dstride,
                                   const uint16_t *in, int pri_strength,
                                   int sec_strength, int dir, int pri_damping,
                                   int sec_damping, int coeff_shift, int height,
@@ -821,4 +829,6 @@
   }
 }
 
+#undef CDEF_INLINE
+
 #endif  // AOM_AV1_COMMON_CDEF_BLOCK_SIMD_H_