26 #define TEST_MATCH(frame_rate, code, ext_n, ext_d) do { \ 27 AVRational fr = frame_rate; \ 29 ff_mpeg12_find_best_frame_rate(fr, &c, &n, &d, 0); \ 30 if (c != code || n != ext_n || d != ext_d) { \ 31 av_log(NULL, AV_LOG_ERROR, "Failed to match %d/%d: " \ 32 "code = %d, ext_n = %d, ext_d = %d.\n", \ 33 fr.num, fr.den, c, n, d); \ 37 #define TEST_EXACT(frn, frd) do { \ 38 AVRational fr = (AVRational) { frn, frd }; \ 40 ff_mpeg12_find_best_frame_rate(fr, &c, &n, &d, 0); \ 41 if (av_cmp_q(fr, av_mul_q(ff_mpeg12_frame_rate_tab[c], \ 42 (AVRational) { n + 1, d + 1 })) != 0) { \ 43 av_log(NULL, AV_LOG_ERROR, "Failed to find exact %d/%d: " \ 44 "code = %d, ext_n = %d, ext_d = %d.\n", \ 45 fr.num, fr.den, c, n, d); \ 51 for (i = 1; i <= 8; i++)
57 for (i = 1; i <= 8; i++) {
79 for (i = 240; i < 1000; i += 10)
83 for (i = 74; i > 0; i--)
#define TEST_EXACT(frn, frd)
#define TEST_MATCH(frame_rate, code, ext_n, ext_d)
AVRational av_sub_q(AVRational b, AVRational c)
Subtract one rational from another.
Rational number (pair of numerator and denominator).
AVRational av_add_q(AVRational b, AVRational c)
Add two rationals.
const AVRational ff_mpeg12_frame_rate_tab[16]