X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Frational.h;h=cbb08a0baf16d28c924826bd7e2af9ed18a46866;hb=cb9dbc60db1847fcb594684b92334da54ea8757e;hp=5c6b67b4e9f843ea93fc7ba305ff54a3062f4ea5;hpb=ce265b0bf5d0c77a092a1f5fbeb652c7cdea5fc7;p=ffmpeg diff --git a/libavutil/rational.h b/libavutil/rational.h index 5c6b67b4e9f..cbb08a0baf1 100644 --- a/libavutil/rational.h +++ b/libavutil/rational.h @@ -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); + /** * @} */