FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
rational.c File Reference

rational numbers More...

#include "avassert.h"
#include <limits.h>
#include "common.h"
#include "mathematics.h"
#include "rational.h"

Go to the source code of this file.

Macros

#define LOG2   0.69314718055994530941723212145817656807550013436025
 

Functions

int av_reduce (int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
 Reduce a fraction.
 
AVRational av_mul_q (AVRational b, AVRational c)
 Multiply two rationals.
 
AVRational av_div_q (AVRational b, AVRational c)
 Divide one rational by another.
 
AVRational av_add_q (AVRational b, AVRational c)
 Add two rationals.
 
AVRational av_sub_q (AVRational b, AVRational c)
 Subtract one rational from another.
 
AVRational av_d2q (double d, int max)
 Convert a double precision floating point number to a rational.
 
int av_nearer_q (AVRational q, AVRational q1, AVRational q2)
 
int av_find_nearest_q_idx (AVRational q, const AVRational *q_list)
 Find the nearest value in q_list to q.
 

Detailed Description

rational numbers

Author
Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at

Definition in file rational.c.

Macro Definition Documentation

#define LOG2   0.69314718055994530941723212145817656807550013436025

Referenced by av_d2q().