|
|
|
@ -42,6 +42,7 @@ |
|
|
|
|
#include "attributes.h" |
|
|
|
|
#include "error.h" |
|
|
|
|
#include "macros.h" |
|
|
|
|
#include "version.h" |
|
|
|
|
|
|
|
|
|
#ifdef HAVE_AV_CONFIG_H |
|
|
|
|
# include "config.h" |
|
|
|
@ -122,9 +123,6 @@ |
|
|
|
|
#ifndef av_clip_uintp2 |
|
|
|
|
# define av_clip_uintp2 av_clip_uintp2_c |
|
|
|
|
#endif |
|
|
|
|
#ifndef av_mod_uintp2 |
|
|
|
|
# define av_mod_uintp2 av_mod_uintp2_c |
|
|
|
|
#endif |
|
|
|
|
#ifndef av_sat_add32 |
|
|
|
|
# define av_sat_add32 av_sat_add32_c |
|
|
|
|
#endif |
|
|
|
@ -149,6 +147,9 @@ |
|
|
|
|
#ifndef av_clipd |
|
|
|
|
# define av_clipd av_clipd_c |
|
|
|
|
#endif |
|
|
|
|
#ifndef av_zero_extend |
|
|
|
|
# define av_zero_extend av_zero_extend_c |
|
|
|
|
#endif |
|
|
|
|
#ifndef av_popcount |
|
|
|
|
# define av_popcount av_popcount_c |
|
|
|
|
#endif |
|
|
|
@ -288,11 +289,22 @@ static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p) |
|
|
|
|
* @param p bit position to clip at |
|
|
|
|
* @return clipped value |
|
|
|
|
*/ |
|
|
|
|
static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p) |
|
|
|
|
static av_always_inline av_const unsigned av_zero_extend_c(unsigned a, unsigned p) |
|
|
|
|
{ |
|
|
|
|
return a & ((1U << p) - 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if FF_API_MOD_UINTP2 |
|
|
|
|
#ifndef av_mod_uintp2 |
|
|
|
|
# define av_mod_uintp2 av_mod_uintp2_c |
|
|
|
|
#endif |
|
|
|
|
attribute_deprecated |
|
|
|
|
static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p) |
|
|
|
|
{ |
|
|
|
|
return av_zero_extend_c(a, p); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Add two signed 32-bit values with saturation. |
|
|
|
|
* |
|
|
|
|