Go to the documentation of this file.
29 #define TEST_MATCH(frame_rate, code, ext_n, ext_d) do { \
30 AVRational fr = frame_rate; \
32 ff_mpeg12_find_best_frame_rate(fr, &c, &n, &d, 0); \
33 if (c != code || n != ext_n || d != ext_d) { \
34 av_log(NULL, AV_LOG_ERROR, "Failed to match %d/%d: " \
35 "code = %d, ext_n = %d, ext_d = %d.\n", \
36 fr.num, fr.den, c, n, d); \
40 #define TEST_EXACT(frn, frd) do { \
41 AVRational fr = (AVRational) { frn, frd }; \
43 ff_mpeg12_find_best_frame_rate(fr, &c, &n, &d, 0); \
44 if (av_cmp_q(fr, av_mul_q(ff_mpeg12_frame_rate_tab[c], \
45 (AVRational) { n + 1, d + 1 })) != 0) { \
46 av_log(NULL, AV_LOG_ERROR, "Failed to find exact %d/%d: " \
47 "code = %d, ext_n = %d, ext_d = %d.\n", \
48 fr.num, fr.den, c, n, d); \
54 for (
i = 1;
i <= 8;
i++)
60 for (
i = 1;
i <= 8;
i++) {
82 for (
i = 240;
i < 1000;
i += 10)
86 for (
i = 74;
i > 0;
i--)
AVRational av_sub_q(AVRational b, AVRational c)
Subtract one rational from another.
Rational number (pair of numerator and denominator).
#define TEST_EXACT(frn, frd)
#define TEST_MATCH(frame_rate, code, ext_n, ext_d)
#define i(width, name, range_min, range_max)
AVRational av_add_q(AVRational b, AVRational c)
Add two rationals.
const AVRational ff_mpeg12_frame_rate_tab[16]