mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Update Windows ffmpeg to 3.2.4
This commit is contained in:
21
Externals/ffmpeg/include/libavutil/common.h
vendored
21
Externals/ffmpeg/include/libavutil/common.h
vendored
@ -54,9 +54,12 @@
|
||||
#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
|
||||
/* assume b>0 */
|
||||
#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
|
||||
/* assume a>0 and b>0 */
|
||||
#define FF_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
|
||||
/* Fast a/(1<<b) rounded toward +inf. Assume a>=0 and b>=0 */
|
||||
#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
|
||||
: ((a) + (1<<(b)) - 1) >> (b))
|
||||
/* Backwards compat. */
|
||||
#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT
|
||||
|
||||
#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
|
||||
#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))
|
||||
|
||||
@ -211,7 +214,7 @@ static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
|
||||
*/
|
||||
static av_always_inline av_const int av_clip_intp2_c(int a, int p)
|
||||
{
|
||||
if ((a + (1 << p)) & ~((2 << p) - 1))
|
||||
if (((unsigned)a + (1 << p)) & ~((2 << p) - 1))
|
||||
return (a >> 31) ^ ((1 << p) - 1);
|
||||
else
|
||||
return a;
|
||||
@ -331,6 +334,11 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x)
|
||||
return av_popcount((uint32_t)x) + av_popcount((uint32_t)(x >> 32));
|
||||
}
|
||||
|
||||
static av_always_inline av_const int av_parity_c(uint32_t v)
|
||||
{
|
||||
return av_popcount(v) & 1;
|
||||
}
|
||||
|
||||
#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
|
||||
#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
|
||||
|
||||
@ -351,13 +359,13 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x)
|
||||
* to prevent undefined results.
|
||||
*/
|
||||
#define GET_UTF8(val, GET_BYTE, ERROR)\
|
||||
val= GET_BYTE;\
|
||||
val= (GET_BYTE);\
|
||||
{\
|
||||
uint32_t top = (val & 128) >> 1;\
|
||||
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
|
||||
ERROR\
|
||||
while (val & top) {\
|
||||
int tmp= GET_BYTE - 128;\
|
||||
int tmp= (GET_BYTE) - 128;\
|
||||
if(tmp>>6)\
|
||||
ERROR\
|
||||
val= (val<<6) + tmp;\
|
||||
@ -517,3 +525,6 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x)
|
||||
#ifndef av_popcount64
|
||||
# define av_popcount64 av_popcount64_c
|
||||
#endif
|
||||
#ifndef av_parity
|
||||
# define av_parity av_parity_c
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user