summaryrefslogtreecommitdiffstats
path: root/libavcodec/mathops.h
diff options
context:
space:
mode:
authorZhouXiaoyong <zhouxiaoyong@loongson.cn>2015-04-16 14:42:44 +0800
committerMichael Niedermayer <michaelni@gmx.at>2015-04-27 02:25:12 +0200
commit0ace686ae8543750165d423adfe9249f3ce4c235 (patch)
tree356a866bea9a5b07832dbdfa071d19e3fedc3fd5 /libavcodec/mathops.h
parent4b8a8194964415022667099b502e60989f4d3134 (diff)
downloadffmpeg-streaming-0ace686ae8543750165d423adfe9249f3ce4c235.zip
ffmpeg-streaming-0ace686ae8543750165d423adfe9249f3ce4c235.tar.gz
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 <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mathops.h')
-rw-r--r--libavcodec/mathops.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 87d110b..46283ca 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)
{
OpenPOWER on IntegriCloud