mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-12-24 11:52:06 +08:00
switch to native time bases
Originally committed as revision 4168 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -17,7 +17,7 @@ extern "C" {
|
||||
|
||||
#define FFMPEG_VERSION_INT 0x000409
|
||||
#define FFMPEG_VERSION "0.4.9-pre1"
|
||||
#define LIBAVCODEC_BUILD 4753
|
||||
#define LIBAVCODEC_BUILD 4754
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
|
||||
#define LIBAVCODEC_VERSION FFMPEG_VERSION
|
||||
@@ -28,6 +28,7 @@ extern "C" {
|
||||
|
||||
#define AV_NOPTS_VALUE int64_t_C(0x8000000000000000)
|
||||
#define AV_TIME_BASE 1000000
|
||||
#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
|
||||
|
||||
enum CodecID {
|
||||
CODEC_ID_NONE,
|
||||
@@ -442,8 +443,8 @@ typedef struct AVPanScan{
|
||||
int pict_type;\
|
||||
\
|
||||
/**\
|
||||
* presentation timestamp in AV_TIME_BASE (=micro seconds currently) (time when frame should be shown to user)\
|
||||
* if AV_NOPTS_VALUE then the frame_rate will be used as reference\
|
||||
* presentation timestamp in time_base units (time when frame should be shown to user)\
|
||||
* if AV_NOPTS_VALUE then frame_rate = 1/time_base will be assumed\
|
||||
* - encoding: MUST be set by user\
|
||||
* - decoding: set by lavc\
|
||||
*/\
|
||||
@@ -721,13 +722,11 @@ typedef struct AVCodecContext {
|
||||
|
||||
/* video only */
|
||||
/**
|
||||
* frames per sec multiplied by frame_rate_base.
|
||||
* for variable fps this is the precission, so if the timestamps
|
||||
* can be specified in msec precssion then this is 1000*frame_rate_base
|
||||
* time base in which the timestamps are specified.
|
||||
* - encoding: MUST be set by user
|
||||
* - decoding: set by lavc. 0 or the frame_rate if available
|
||||
* - decoding: set by lavc.
|
||||
*/
|
||||
int frame_rate;
|
||||
AVRational time_base;
|
||||
|
||||
/**
|
||||
* picture width / height.
|
||||
@@ -1420,15 +1419,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
int me_range;
|
||||
|
||||
/**
|
||||
* frame_rate_base.
|
||||
* for variable fps this is 1
|
||||
* - encoding: set by user.
|
||||
* - decoding: set by lavc.
|
||||
* @todo move this after frame_rate
|
||||
*/
|
||||
|
||||
int frame_rate_base;
|
||||
/**
|
||||
* intra quantizer bias.
|
||||
* - encoding: set by user.
|
||||
@@ -2244,6 +2234,11 @@ int64_t av_rescale(int64_t a, int64_t b, int64_t c);
|
||||
*/
|
||||
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding);
|
||||
|
||||
/**
|
||||
* rescale a 64bit integer by 2 rational numbers.
|
||||
*/
|
||||
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq);
|
||||
|
||||
/* frame parsing */
|
||||
typedef struct AVCodecParserContext {
|
||||
void *priv_data;
|
||||
|
||||
Reference in New Issue
Block a user