ffmpeg.libavutil.mathematics

Undocumented in source.

Members

Enums

AVRounding
enum AVRounding

@addtogroup lavu_math @{

Functions

av_add_stable
int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc)

Add a value to a timestamp.

av_compare_mod
int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod)

Compare 2 integers modulo mod. That is we compare integers a and b for which only the least significant log2(mod) bits are known.

av_compare_ts
int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b)

Compare 2 timestamps each in its own timebases. The result of the function is undefined if one of the timestamps is outside the int64_t range when represented in the others timebase. @return -1 if ts_a is before ts_b, 1 if ts_a is after ts_b or 0 if they represent the same position

av_gcd
int64_t av_gcd(int64_t a, int64_t b)

Compute the greatest common divisor of a and b.

av_rescale
int64_t av_rescale(int64_t a, int64_t b, int64_t c)

Rescale a 64-bit integer with rounding to nearest. A simple a*b/c isn't possible as it can overflow.

av_rescale_delta
int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t* last, AVRational out_tb)

Rescale a timestamp while preserving known durations.

av_rescale_q
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)

Rescale a 64-bit integer by 2 rational numbers.

av_rescale_q_rnd
int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq, AVRounding )

Rescale a 64-bit integer by 2 rational numbers with specified rounding.

av_rescale_rnd
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, AVRounding )

Rescale a 64-bit integer with specified rounding. A simple a*b/c isn't possible as it can overflow.

Manifest constants

INFINITY
enum INFINITY;
Undocumented in source.
M_E
enum M_E;
Undocumented in source.
M_LN10
enum M_LN10;
Undocumented in source.
M_LN2
enum M_LN2;
Undocumented in source.
M_LOG2_10
enum M_LOG2_10;
Undocumented in source.
M_PHI
enum M_PHI;
Undocumented in source.
M_PI
enum M_PI;
Undocumented in source.
M_PI_2
enum M_PI_2;
Undocumented in source.
M_SQRT1_2
enum M_SQRT1_2;
Undocumented in source.
M_SQRT2
enum M_SQRT2;
Undocumented in source.
NAN
enum NAN;
Undocumented in source.

Meta