1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

lavu: add av_gcd_q().

This commit is contained in:
Nicolas George
2020-04-16 21:36:00 +02:00
parent beb98c0181
commit 6b65c4ec54
4 changed files with 20 additions and 2 deletions

View File

@@ -207,6 +207,12 @@ int av_find_nearest_q_idx(AVRational q, const AVRational* q_list);
*/
uint32_t av_q2intfloat(AVRational q);
/**
* Return the best rational so that a and b are multiple of it.
* If the resulting denominator is larger than max_den, return def.
*/
AVRational av_gcd_q(AVRational a, AVRational b, int max_den, AVRational def);
/**
* @}
*/