summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libavutil/mathematics.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavutil/mathematics.h')
-rw-r--r--chromium/third_party/ffmpeg/libavutil/mathematics.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/chromium/third_party/ffmpeg/libavutil/mathematics.h b/chromium/third_party/ffmpeg/libavutil/mathematics.h
index 71f0392218d..88739e80b8f 100644
--- a/chromium/third_party/ffmpeg/libavutil/mathematics.h
+++ b/chromium/third_party/ffmpeg/libavutil/mathematics.h
@@ -45,6 +45,9 @@
#ifndef M_PI
#define M_PI 3.14159265358979323846 /* pi */
#endif
+#ifndef M_PI_2
+#define M_PI_2 1.57079632679489661923 /* pi/2 */
+#endif
#ifndef M_SQRT1_2
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
#endif
@@ -133,14 +136,28 @@ 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 in_tb Input timebase
* @param fs_tb Duration and *last timebase
* @param duration duration till the next call
- * @param out_tb Output timesbase
+ * @param out_tb Output timebase
*/
int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb);
/**
+ * Add a value to a timestamp.
+ *
+ * This function gurantees that when the same value is repeatly added that
+ * no accumulation of rounding errors occurs.
+ *
+ * @param ts Input timestamp
+ * @param ts_tb Input timestamp timebase
+ * @param inc value to add to ts
+ * @param inc_tb inc timebase
+ */
+int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc);
+
+
+ /**
* @}
*/