From 0ace686ae8543750165d423adfe9249f3ce4c235 Mon Sep 17 00:00:00 2001 From: ZhouXiaoyong Date: Thu, 16 Apr 2015 14:42:44 +0800 Subject: avcodec: optimize mathops for Loongson-3 v1 HAVE_LOONGSON is replaced by HAVE_LOONGSON3. Even Loongson-2E and 2F support Loongson SIMD instructs but have low performance for decoding. We plan to focus on optimizing Loongson-3A1000, 3B1500 and 3A1500, and modify the configure file to support Loongson-2 series later by adding HAVE_LOONGSON2. Signed-off-by: Michael Niedermayer --- libavcodec/mathops.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavcodec/mathops.h') diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h index 87d110b457..46283ca444 100644 --- a/libavcodec/mathops.h +++ b/libavcodec/mathops.h @@ -211,6 +211,8 @@ if ((y) < (x)) {\ # define FASTDIV(a,b) ((uint32_t)((((uint64_t)a) * ff_inverse[b]) >> 32)) #endif /* FASTDIV */ +#ifndef ff_sqrt +#define ff_sqrt ff_sqrt static inline av_const unsigned int ff_sqrt(unsigned int a) { unsigned int b; @@ -230,6 +232,7 @@ static inline av_const unsigned int ff_sqrt(unsigned int a) return b - (a < b * b); } +#endif static inline int8_t ff_u8_to_s8(uint8_t a) { -- cgit v1.2.3