45 int *
code,
int *ext_n,
int *ext_d,
48 int mpeg2 = ext_n && ext_d;
49 int max_code = nonstandard ? 12 : 8;
50 int c, n, d, best_c, best_n, best_d;
57 for (
c = 1;
c <= max_code;
c++) {
64 for (
c = 1;
c <= max_code;
c++) {
65 for (n = 1; n <= (mpeg2 ? 4 : 1); n++) {
66 for (d = 1; d <= (mpeg2 ? 32 : 1); d++) {
87 if (
cmp < 0 || (
cmp == 0 && n == 1 && d == 1)) {
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
AVRational av_div_q(AVRational b, AVRational c)
Divide one rational by another.
static av_always_inline int cmp(MpegEncContext *s, const int x, const int y, const int subx, const int suby, const int size, const int h, int ref_index, int src_index, me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags)
compares a block (either a full macroblock or a partition thereof) against a proposed motion-compensa...
const AVRational ff_mpeg12_frame_rate_tab[16]
void ff_mpeg12_find_best_frame_rate(AVRational frame_rate, int *code, int *ext_n, int *ext_d, int nonstandard)
static void test(const char *pattern, const char *host)
Utilties for rational number calculation.
Rational number (pair of numerator and denominator).
static void error(const char *err)