|
FFmpeg
|
64-bit extension of AVRational More...
Data Structures | |
| struct | AVRational64 |
| 64-bit Rational number (pair of numerator and denominator). More... | |
Functions | |
| static AVRational64 | av_make_q64 (int64_t num, int64_t den) |
| Create an AVRational64. More... | |
| int | av_cmp_q64 (AVRational64 a, AVRational64 b) |
| Compare two 64-bit rationals. More... | |
| static double | av_q2d_64 (AVRational64 a) |
Convert an AVRational64 to a double. More... | |
| AVRational64 | av_mul_q64 (AVRational64 b, AVRational64 c) av_const |
| Multiply two 64-bit rationals. More... | |
| AVRational64 | av_div_q64 (AVRational64 b, AVRational64 c) av_const |
| Divide one 64-bit rational by another. More... | |
| AVRational64 | av_add_q64 (AVRational64 b, AVRational64 c) av_const |
| Add two 64-bit rationals. More... | |
| AVRational64 | av_sub_q64 (AVRational64 b, AVRational64 c) av_const |
| Subtract one 64-bit rational from another. More... | |
| static av_always_inline AVRational64 | av_inv_q64 (AVRational64 q) |
| Invert a 64-bit rational. More... | |
| AVRational64 | av_gcd_q64 (AVRational64 a, AVRational64 b, int max_den, AVRational64 def) |
| Return the best rational so that a and b are multiple of it. More... | |
64-bit extension of AVRational
Offers a 64-bit extended version of AVRational. This is less efficient (and may revolve around emulated 128-bit multiplications internally), but allows to represent a much larger range of rational numbers without overflow.
|
inlinestatic |
Create an AVRational64.
Useful for compilers that do not support compound literals.
Definition at line 64 of file rational64.h.
Referenced by ff_sws_apply_op_q().
| int av_cmp_q64 | ( | AVRational64 | a, |
| AVRational64 | b | ||
| ) |
Compare two 64-bit rationals.
| a | First rational |
| b | Second rational |
a == ba > ba < bINT_MIN if one of the values is of the form 0 / 0 Definition at line 108 of file rational64.c.
Referenced by av_max_q64(), av_min_q64(), extract_scalar(), ff_sws_linear_mask(), ff_sws_op_list_optimize(), ff_sws_op_list_update_comps(), main(), and op_commute_swizzle().
|
inlinestatic |
Convert an AVRational64 to a double.
| a | AVRational64 to convert |
a in floating-point form Definition at line 90 of file rational64.h.
| AVRational64 av_mul_q64 | ( | AVRational64 | b, |
| AVRational64 | c | ||
| ) | const |
Multiply two 64-bit rationals.
| b | First multiplicant |
| c | Second multiplicant |
Definition at line 124 of file rational64.c.
Referenced by apply_filter_weights(), av_div_q64(), ff_sws_apply_op_q(), ff_sws_op_list_optimize(), ff_sws_op_list_update_comps(), and main().
| AVRational64 av_div_q64 | ( | AVRational64 | b, |
| AVRational64 | c | ||
| ) | const |
Divide one 64-bit rational by another.
| b | Dividend |
| c | Divisor |
Definition at line 130 of file rational64.c.
Referenced by main().
| AVRational64 av_add_q64 | ( | AVRational64 | b, |
| AVRational64 | c | ||
| ) | const |
Add two 64-bit rationals.
| b | First addend |
| c | Second addend |
Definition at line 135 of file rational64.c.
Referenced by apply_filter_weights(), ff_sws_apply_op_q(), ff_sws_op_list_optimize(), ff_sws_op_list_update_comps(), and main().
| AVRational64 av_sub_q64 | ( | AVRational64 | b, |
| AVRational64 | c | ||
| ) | const |
Subtract one 64-bit rational from another.
| b | Minuend |
| c | Subtrahend |
Definition at line 141 of file rational64.c.
Referenced by main().
|
static |
Invert a 64-bit rational.
| q | value |
Definition at line 131 of file rational64.h.
Referenced by av_div_q64().
| AVRational64 av_gcd_q64 | ( | AVRational64 | a, |
| AVRational64 | b, | ||
| int | max_den, | ||
| AVRational64 | def | ||
| ) |
Return the best rational so that a and b are multiple of it.
If the resulting denominator is larger than max_den, return def.
1.8.17