FFmpeg  4.0
Macros | Functions
mpeg12framerate.c File Reference
#include "libavcodec/mpeg12.h"
#include "libavcodec/mpeg12data.h"

Go to the source code of this file.

Macros

#define TEST_MATCH(frame_rate, code, ext_n, ext_d)
 
#define TEST_EXACT(frn, frd)
 

Functions

int main (void)
 

Macro Definition Documentation

◆ TEST_MATCH

#define TEST_MATCH (   frame_rate,
  code,
  ext_n,
  ext_d 
)
Value:
do { \
AVRational fr = frame_rate; \
int c, n, d; \
ff_mpeg12_find_best_frame_rate(fr, &c, &n, &d, 0); \
if (c != code || n != ext_n || d != ext_d) { \
av_log(NULL, AV_LOG_ERROR, "Failed to match %d/%d: " \
"code = %d, ext_n = %d, ext_d = %d.\n", \
fr.num, fr.den, c, n, d); \
return 1; \
} \
} while (0)
#define NULL
Definition: coverity.c:32
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
int n
Definition: avisynth_c.h:684
static double c[64]

Referenced by main().

◆ TEST_EXACT

#define TEST_EXACT (   frn,
  frd 
)
Value:
do { \
AVRational fr = (AVRational) { frn, frd }; \
int c, n, d; \
ff_mpeg12_find_best_frame_rate(fr, &c, &n, &d, 0); \
(AVRational) { n + 1, d + 1 })) != 0) { \
av_log(NULL, AV_LOG_ERROR, "Failed to find exact %d/%d: " \
"code = %d, ext_n = %d, ext_d = %d.\n", \
fr.num, fr.den, c, n, d); \
return 1; \
} \
} while (0)
#define NULL
Definition: coverity.c:32
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
int n
Definition: avisynth_c.h:684
Rational number (pair of numerator and denominator).
Definition: rational.h:58
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
Definition: rational.h:89
static double c[64]
const AVRational ff_mpeg12_frame_rate_tab[16]
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
Definition: rational.c:80

Referenced by main().

Function Documentation

◆ main()

int main ( void  )

Definition at line 22 of file mpeg12framerate.c.