Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-08-08 20:13:26 +0400
committerMans Rullgard <mans@mansr.com>2012-08-09 03:58:20 +0400
commitd7a4f8f8b9a4bc309d4d5ab067cfba945e690c0c (patch)
treecdf4e8c5b08c4766669d85ab14f8150b121f3c6c /libavcodec/mathops.h
parent070a402b60cb4ebc6fd2ba59c13758811815bb19 (diff)
Move MASK_ABS macro to libavcodec/mathops.h
This macro is only used in two places, both in libavcodec, so this is a more sensible place for it. Two small tweaks to the macro are made: - removing the trailing semicolon - dropping unnecessary 'volatile' from the x86 asm Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/mathops.h')
-rw-r--r--libavcodec/mathops.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index d6eb98ddac..ab545ef504 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -138,6 +138,13 @@ if ((y) < (x)) {\
}
#endif
+#ifndef MASK_ABS
+#define MASK_ABS(mask, level) do { \
+ mask = level >> 31; \
+ level = (level ^ mask) - mask; \
+ } while (0)
+#endif
+
#ifndef NEG_SSR32
# define NEG_SSR32(a,s) ((( int32_t)(a))>>(32-(s)))
#endif