summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/codecs/demac/libdemac/filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/codecs/demac/libdemac/filter.c b/apps/codecs/demac/libdemac/filter.c
index 4a3eb74744..df17d357c0 100644
--- a/apps/codecs/demac/libdemac/filter.c
+++ b/apps/codecs/demac/libdemac/filter.c
@@ -95,12 +95,12 @@ struct filter_t {
95/* Convert from (32-FRACBITS).FRACBITS fixed-point format to an 95/* Convert from (32-FRACBITS).FRACBITS fixed-point format to an
96 integer (rounding to nearest). */ 96 integer (rounding to nearest). */
97#define FP_HALF (1 << (FRACBITS - 1)) /* 0.5 in fixed-point format. */ 97#define FP_HALF (1 << (FRACBITS - 1)) /* 0.5 in fixed-point format. */
98#define FP_TO_INT(x) ((x + FP_HALF) >> FRACBITS); /* round(x) */ 98#define FP_TO_INT(x) ((x + FP_HALF) >> FRACBITS) /* round(x) */
99 99
100#if defined(CPU_ARM) && (ARM_ARCH >= 6) 100#if defined(CPU_ARM) && (ARM_ARCH >= 6)
101#define SATURATE(x) ({int __res; asm("ssat %0, #16, %1" : "=r"(__res) : "r"(x)); __res; }) 101#define SATURATE(x) ({int __res; asm("ssat %0, #16, %1" : "=r"(__res) : "r"(x)); __res; })
102#else 102#else
103#define SATURATE(x) (LIKELY((x) == (int16_t)(x)) ? (x) : ((x) >> 31) ^ 0x7FFF); 103#define SATURATE(x) (LIKELY((x) == (int16_t)(x)) ? (x) : ((x) >> 31) ^ 0x7FFF)
104#endif 104#endif
105 105
106/* Apply the filter with state f to count entries in data[] */ 106/* Apply the filter with state f to count entries in data[] */