Updated build of ffmpeg library (v 2.0.2). Builded with mingw (gcc 4.6.1) with
folowing additional options: --enable-w32threads, --arch=i686 (for 32-bit library, workaround for http://trac.ffmpeg.org/ticket/2363)
This commit is contained in:
31
3rdparty/include/ffmpeg_/libavutil/mathematics.h
vendored
31
3rdparty/include/ffmpeg_/libavutil/mathematics.h
vendored
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>
|
||||
* copyright (c) 2005-2012 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <math.h>
|
||||
#include "attributes.h"
|
||||
#include "rational.h"
|
||||
#include "intfloat.h"
|
||||
|
||||
#ifndef M_E
|
||||
#define M_E 2.7182818284590452354 /* e */
|
||||
@@ -51,10 +52,10 @@
|
||||
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
|
||||
#endif
|
||||
#ifndef NAN
|
||||
#define NAN (0.0/0.0)
|
||||
#define NAN av_int2float(0x7fc00000)
|
||||
#endif
|
||||
#ifndef INFINITY
|
||||
#define INFINITY (1.0/0.0)
|
||||
#define INFINITY av_int2float(0x7f800000)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -69,6 +70,7 @@ enum AVRounding {
|
||||
AV_ROUND_DOWN = 2, ///< Round toward -infinity.
|
||||
AV_ROUND_UP = 3, ///< Round toward +infinity.
|
||||
AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero.
|
||||
AV_ROUND_PASS_MINMAX = 8192, ///< Flag to pass INT64_MIN/MAX through instead of rescaling, this avoids special cases for AV_NOPTS_VALUE
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -87,6 +89,9 @@ int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const;
|
||||
/**
|
||||
* Rescale a 64-bit integer with specified rounding.
|
||||
* A simple a*b/c isn't possible as it can overflow.
|
||||
*
|
||||
* @return rescaled value a, or if AV_ROUND_PASS_MINMAX is set and a is
|
||||
* INT64_MIN or INT64_MAX then a is passed through unchanged.
|
||||
*/
|
||||
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const;
|
||||
|
||||
@@ -95,6 +100,15 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_cons
|
||||
*/
|
||||
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const;
|
||||
|
||||
/**
|
||||
* Rescale a 64-bit integer by 2 rational numbers with specified rounding.
|
||||
*
|
||||
* @return rescaled value a, or if AV_ROUND_PASS_MINMAX is set and a is
|
||||
* INT64_MIN or INT64_MAX then a is passed through unchanged.
|
||||
*/
|
||||
int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq,
|
||||
enum AVRounding) av_const;
|
||||
|
||||
/**
|
||||
* Compare 2 timestamps each in its own timebases.
|
||||
* The result of the function is undefined if one of the timestamps
|
||||
@@ -115,6 +129,17 @@ int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
|
||||
*/
|
||||
int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);
|
||||
|
||||
/**
|
||||
* Rescale a timestamp while preserving known durations.
|
||||
*
|
||||
* @param in_ts Input timestamp
|
||||
* @param in_tb Input timesbase
|
||||
* @param fs_tb Duration and *last timebase
|
||||
* @param duration duration till the next call
|
||||
* @param out_tb Output timesbase
|
||||
*/
|
||||
int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user