diff options
author | Nicolas George <george@nsup.org> | 2020-04-16 21:36:00 +0200 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2020-05-23 15:51:44 +0200 |
commit | 6b65c4ec54511871f345cfa76a499fa65d94c0b8 (patch) | |
tree | 189dc349ae343acf78b1b05de630a0bfb200b545 /libavutil/rational.h | |
parent | beb98c0181b70c0d32cf19efe2a78d2c397b2508 (diff) | |
download | ffmpeg-6b65c4ec54511871f345cfa76a499fa65d94c0b8.tar.gz |
lavu: add av_gcd_q().
Diffstat (limited to 'libavutil/rational.h')
-rw-r--r-- | libavutil/rational.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/rational.h b/libavutil/rational.h index 5c6b67b4e9..cbb08a0baf 100644 --- a/libavutil/rational.h +++ b/libavutil/rational.h @@ -208,6 +208,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); + +/** * @} */ |