Commit d1cb63d770 for aom
commit d1cb63d770324ad6d9714cf7ee8577d8fa404f40
Author: Lin Zheng <linzhen@google.com>
Date: Fri Nov 13 22:43:52 2026 +0000
Highway: Clean up macro guards in variance_hwy
Remove empty #else macro stubs in variance_hwy.h and guard
FOR_EACH_OBMC_VAR_BLOCK_SIZE, FHIGHBD_CALC_VAR_STAT, and
FHIGHBD_COMP_MASK_PRED directly at their callsites in
variance_hwy_avx512.cc, keeping lowbd and highbd macro invocations
separate.
Change-Id: Ic86f00bf6989797f121193d6e8ab4c4dfcfb7299
diff --git a/aom_dsp/variance_hwy.h b/aom_dsp/variance_hwy.h
index 6ce320ee28..52a9b9a4f4 100644
--- a/aom_dsp/variance_hwy.h
+++ b/aom_dsp/variance_hwy.h
@@ -1030,9 +1030,7 @@ HWY_ATTR HWY_INLINE void HighbdCompMaskPred(uint8_t *comp_pred8,
const uint16_t *src, int stride, int bw, int bh) { \
return HWY_NAMESPACE::HighbdCalcVarianceStat(src, stride, bw, bh); \
}
-#else
-#define FHIGHBD_CALC_VAR_STAT(suffix)
-#endif
+#endif // CONFIG_AV1_HIGHBITDEPTH
#define FCALC_VAR_STAT(suffix) \
extern "C" int64_t aom_calc_variance_stat_##suffix( \
@@ -1040,8 +1038,7 @@ HWY_ATTR HWY_INLINE void HighbdCompMaskPred(uint8_t *comp_pred8,
HWY_ATTR int64_t aom_calc_variance_stat_##suffix( \
const uint8_t *src, int stride, int bw, int bh) { \
return HWY_NAMESPACE::CalcVarianceStat(src, stride, bw, bh); \
- } \
- FHIGHBD_CALC_VAR_STAT(suffix)
+ }
#if !CONFIG_REALTIME_ONLY
#define FOR_EACH_VAR_RECT_BLOCK_SIZE(X, suffix) \
@@ -1166,9 +1163,6 @@ HWY_ATTR HWY_INLINE void HighbdCompMaskPred(uint8_t *comp_pred8,
X(16, 16, suffix) \
X(16, 8, suffix) \
X(16, 4, suffix)
-#else
-#define FOBMC_VAR(W, H, suffix)
-#define FOR_EACH_OBMC_VAR_BLOCK_SIZE(X, suffix)
#endif // !CONFIG_REALTIME_ONLY
#if CONFIG_AV1_HIGHBITDEPTH
@@ -1185,9 +1179,7 @@ HWY_ATTR HWY_INLINE void HighbdCompMaskPred(uint8_t *comp_pred8,
ref_stride, mask, mask_stride, \
invert_mask); \
}
-#else
-#define FHIGHBD_COMP_MASK_PRED(suffix)
-#endif
+#endif // CONFIG_AV1_HIGHBITDEPTH
#define FCOMP_AVG_MASK_PRED(suffix) \
extern "C" void aom_comp_avg_pred_##suffix( \
@@ -1209,8 +1201,7 @@ HWY_ATTR HWY_INLINE void HighbdCompMaskPred(uint8_t *comp_pred8,
int mask_stride, int invert_mask) { \
HWY_NAMESPACE::CompMaskPred(comp_pred, pred, width, height, ref, \
ref_stride, mask, mask_stride, invert_mask); \
- } \
- FHIGHBD_COMP_MASK_PRED(suffix)
+ }
HWY_AFTER_NAMESPACE();
diff --git a/aom_dsp/x86/variance_hwy_avx512.cc b/aom_dsp/x86/variance_hwy_avx512.cc
index fd88856721..6a21d88f14 100644
--- a/aom_dsp/x86/variance_hwy_avx512.cc
+++ b/aom_dsp/x86/variance_hwy_avx512.cc
@@ -18,9 +18,18 @@ FOR_EACH_VAR_BLOCK_SIZE(FVAR, avx512)
FMSE16X16(avx512)
FGET_BLK_SSE_SUM(avx512)
FCALC_VAR_STAT(avx512)
+#if CONFIG_AV1_HIGHBITDEPTH
+FHIGHBD_CALC_VAR_STAT(avx512)
+#endif // CONFIG_AV1_HIGHBITDEPTH
FOR_EACH_SUBPIX_VAR_32XH(FSUBPIX_VAR_32XH, avx512)
FOR_EACH_SUBPIX_VAR_64_128(FSUBPIX_VAR_64_128, avx512)
+#if !CONFIG_REALTIME_ONLY
FOR_EACH_OBMC_VAR_BLOCK_SIZE(FOBMC_VAR, avx512)
+#endif // !CONFIG_REALTIME_ONLY
+
FCOMP_AVG_MASK_PRED(avx512)
+#if CONFIG_AV1_HIGHBITDEPTH
+FHIGHBD_COMP_MASK_PRED(avx512)
+#endif // CONFIG_AV1_HIGHBITDEPTH