Go to the documentation of this file.
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)) {
static void error(const char *err)
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...
Rational number (pair of numerator and denominator).
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some it can consider them to be part of the FIFO and delay acknowledging a status change accordingly Example code
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
static void test(const char *pattern, const char *host)
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
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)