FFmpeg
Functions
rational64.c File Reference
#include <limits.h>
#include "libavutil/int128.h"
#include "rational64.h"

Go to the source code of this file.

Functions

static av_int128 gcd128 (av_int128 a, av_int128 b)
 
static AVRational64 reduce64 (av_int128 num, av_int128 den)
 
int av_cmp_q64 (AVRational64 a, AVRational64 b)
 Compare two 64-bit rationals. More...
 
AVRational64 av_mul_q64 (AVRational64 b, AVRational64 c)
 Multiply two 64-bit rationals. More...
 
AVRational64 av_div_q64 (AVRational64 b, AVRational64 c)
 Divide one 64-bit rational by another. More...
 
AVRational64 av_add_q64 (AVRational64 b, AVRational64 c)
 Add two 64-bit rationals. More...
 
AVRational64 av_sub_q64 (AVRational64 b, AVRational64 c)
 Subtract one 64-bit rational from another. More...
 

Detailed Description

64-bit rational numbers

Author
Niklas Haas

Definition in file rational64.c.

Function Documentation

◆ gcd128()

static av_int128 gcd128 ( av_int128  a,
av_int128  b 
)
static

Definition at line 34 of file rational64.c.

Referenced by reduce64().

◆ reduce64()

static AVRational64 reduce64 ( av_int128  num,
av_int128  den 
)
static

Definition at line 44 of file rational64.c.

Referenced by av_add_q64(), av_mul_q64(), and av_sub_q64().