aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/intmath.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-01-07 19:59:03 -0300
committerJames Almer <jamrial@gmail.com>2016-01-07 20:04:24 -0300
commit28d5a3a74aee33786673925a46a310c773e94748 (patch)
tree7aefda60e72e310798accd4f9ccda8a9218de686 /libavutil/intmath.h
parenta1136ca973e3b216804d05bbf64fcc19ad0f14da (diff)
downloadffmpeg-28d5a3a74aee33786673925a46a310c773e94748.tar.gz
lavu: rename and move ff_parity to av_parity
av_popcount is not defined in intmath.h. Reviewed-by: ubitux Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/intmath.h')
-rw-r--r--libavutil/intmath.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/libavutil/intmath.h b/libavutil/intmath.h
index 17c4f1b48a..9573109e9d 100644
--- a/libavutil/intmath.h
+++ b/libavutil/intmath.h
@@ -153,16 +153,10 @@ static av_always_inline av_const unsigned ff_clz_c(unsigned x)
}
#endif
-#ifndef ff_parity
-#define ff_parity ff_parity_c
-static av_always_inline av_const int ff_parity_c(uint32_t v)
-{
-#if HAVE_PARITY
- return __builtin_parity(v);
-#else
- return av_popcount(v) & 1;
+#if AV_GCC_VERSION_AT_LEAST(3,4)
+#ifndef av_parity
+#define av_parity __builtin_parity
#endif
-}
#endif
/**