diff options
author | trav90 <travawine@protonmail.ch> | 2018-04-26 16:49:15 -0500 |
---|---|---|
committer | trav90 <travawine@protonmail.ch> | 2018-04-26 16:49:15 -0500 |
commit | 8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298 (patch) | |
tree | c37da5241afd7cda6f92d394e14cef7d5dcbb4e5 /media/ffvpx/libavcodec/mathops.h | |
parent | 56a2df6b25bc93ea9a59b8e0bf8029f752f68573 (diff) | |
download | uxp-8b37a1bc306c1d5a3cc92e9dc04fb95d5d9a0298.tar.gz |
[ffvpx] Update ffvp9/ffvp8 to 3.4.2-release
Structure of code was slightly modified so that it should be no longer necessary to re-generate the config_*.h files, greatly simplifying the resync process in the future.
Diffstat (limited to 'media/ffvpx/libavcodec/mathops.h')
-rw-r--r-- | media/ffvpx/libavcodec/mathops.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/media/ffvpx/libavcodec/mathops.h b/media/ffvpx/libavcodec/mathops.h index 5168dc2ce0..1c35664318 100644 --- a/media/ffvpx/libavcodec/mathops.h +++ b/media/ffvpx/libavcodec/mathops.h @@ -25,6 +25,7 @@ #include <stdint.h> #include "libavutil/common.h" +#include "libavutil/reverse.h" #include "config.h" #define MAX_NEG_CROP 1024 @@ -96,15 +97,6 @@ static av_always_inline unsigned UMULH(unsigned a, unsigned b){ #define mid_pred mid_pred static inline av_const int mid_pred(int a, int b, int c) { -#if 0 - int t= (a-b)&((a-b)>>31); - a-=t; - b+=t; - b-= (b-c)&((b-c)>>31); - b+= (a-b)&((a-b)>>31); - - return b; -#else if(a>b){ if(c>b){ if(c>a) b=a; @@ -117,7 +109,6 @@ static inline av_const int mid_pred(int a, int b, int c) } } return b; -#endif } #endif @@ -249,4 +240,12 @@ static inline int8_t ff_u8_to_s8(uint8_t a) return b.s8; } +static av_always_inline uint32_t bitswap_32(uint32_t x) +{ + return (uint32_t)ff_reverse[ x & 0xFF] << 24 | + (uint32_t)ff_reverse[(x >> 8) & 0xFF] << 16 | + (uint32_t)ff_reverse[(x >> 16) & 0xFF] << 8 | + (uint32_t)ff_reverse[ x >> 24]; +} + #endif /* AVCODEC_MATHOPS_H */ |