X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Frational.h;h=cbb08a0baf16d28c924826bd7e2af9ed18a46866;hb=3f27021143f1bc6a55be5bac37f4c2d3c742e023;hp=5c6b67b4e9f843ea93fc7ba305ff54a3062f4ea5;hpb=0084eed5bffebd7f3915bc0f9eba7350e8bc0ef7;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); + /** * @} */