29 static const int64_t numlist[] = {
30 INT64_MIN, INT64_MIN+1, INT64_MAX, INT32_MIN, INT32_MAX, 1,0,-1,
31 123456789, INT32_MAX-1, INT32_MAX+1LL, UINT32_MAX-1, UINT32_MAX, UINT32_MAX+1LL
42 else if (d < 0) d = -1;
43 else if (d != d) d = INT_MIN;
56 int64_t a = numlist[i];
59 int64_t b = numlist[j];
63 int64_t
c = numlist[k];
101 for (start = 0; start < 10 ; start++) {
105 for (i = 0; i<100; i++) {
108 if (
FFABS(acc - exact) > 2) {
120 for (a.
den = 1; a.
den < 0x100000000U/3; a.
den*=3) {
121 for (a.
num = -1; a.
num < (1<<27); a.
num += 1 + a.
num/100) {
124 if (fabs(f - f2) > fabs(f)/5000000) {
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
Rescale a 64-bit integer with specified rounding.
static av_always_inline float av_int2float(uint32_t i)
Reinterpret a 32-bit integer as a float.
uint32_t av_q2intfloat(AVRational q)
Converts a AVRational to a IEEE 32bit float.
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
static double av_q2d(AVRational a)
Convert rational to double.
int64_t av_i2int(AVInteger a)
Convert the given AVInteger to an int64_t.
AVRational av_add_q(AVRational b, AVRational c)
Add two rationals.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
AVInteger av_int2i(int64_t a)
Convert the given int64_t to an AVInteger.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVInteger av_mul_i(AVInteger a, AVInteger b)
int64_t av_gcd(int64_t a, int64_t b)
Compute the greatest common divisor of a and b.
AVRational av_sub_q(AVRational b, AVRational c)
Subtract one rational from another.
int av_cmp_i(AVInteger a, AVInteger b)
Return 0 if a==b, 1 if a>b and -1 if a<b.
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
#define FF_ARRAY_ELEMS(a)
rational number numerator/denominator
arbitrary precision integers
int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc)
Add a value to a timestamp.
AVInteger av_div_i(AVInteger a, AVInteger b)
Return a/b.