diff options
author | trav90 <travawine@palemoon.org> | 2018-10-18 06:04:57 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-18 06:04:57 -0500 |
commit | 7369c7d7a5eed32963d8af37658286617919f91c (patch) | |
tree | 5397ce7ee9bca1641118fdc3187bd9e2b24fdc9c /third_party/aom/aom_dsp/aom_dsp_common.h | |
parent | 77887af9c4ad1420bbdb33984af4f74b55ca59db (diff) | |
download | UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar.gz UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar.lz UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar.xz UXP-7369c7d7a5eed32963d8af37658286617919f91c.zip |
Update aom to commit id f5bdeac22930ff4c6b219be49c843db35970b918
Diffstat (limited to 'third_party/aom/aom_dsp/aom_dsp_common.h')
-rw-r--r-- | third_party/aom/aom_dsp/aom_dsp_common.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/third_party/aom/aom_dsp/aom_dsp_common.h b/third_party/aom/aom_dsp/aom_dsp_common.h index 82f9a95e9..5b104321b 100644 --- a/third_party/aom/aom_dsp/aom_dsp_common.h +++ b/third_party/aom/aom_dsp/aom_dsp_common.h @@ -31,8 +31,6 @@ extern "C" { #define AOMMIN(x, y) (((x) < (y)) ? (x) : (y)) #define AOMMAX(x, y) (((x) > (y)) ? (x) : (y)) -#define NELEMENTS(x) (sizeof((x)) / sizeof((x)[0])) - #define IMPLIES(a, b) (!(a) || (b)) // Logical 'a implies b' (or 'a -> b') #define IS_POWER_OF_TWO(x) (((x) & ((x)-1)) == 0) @@ -54,16 +52,9 @@ extern "C" { #define UNLIKELY(v) (v) #endif -#define AOM_SWAP(type, a, b) \ - do { \ - type c = (b); \ - b = a; \ - a = c; \ - } while (0) - #if CONFIG_AOM_QM typedef uint16_t qm_val_t; -#define AOM_QM_BITS 6 +#define AOM_QM_BITS 5 #endif #if CONFIG_HIGHBITDEPTH // Note: @@ -87,11 +78,14 @@ static INLINE int clamp(int value, int low, int high) { return value < low ? low : (value > high ? high : value); } +static INLINE int64_t clamp64(int64_t value, int64_t low, int64_t high) { + return value < low ? low : (value > high ? high : value); +} + static INLINE double fclamp(double value, double low, double high) { return value < low ? low : (value > high ? high : value); } -#if CONFIG_HIGHBITDEPTH static INLINE uint16_t clip_pixel_highbd(int val, int bd) { switch (bd) { case 8: @@ -100,7 +94,6 @@ static INLINE uint16_t clip_pixel_highbd(int val, int bd) { case 12: return (uint16_t)clamp(val, 0, 4095); } } -#endif // CONFIG_HIGHBITDEPTH #ifdef __cplusplus } // extern "C" |