~ubuntu-branches/ubuntu/intrepid/gstreamer0.10-ffmpeg/intrepid

« back to all changes in this revision

Viewing changes to gst-libs/ext/ffmpeg/libavutil/mathematics.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-12-17 23:59:34 UTC
  • Revision ID: james.westby@ubuntu.com-20051217235934-qu7f84arvb9r3id3
Tags: upstream-0.10.0
ImportĀ upstreamĀ versionĀ 0.10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef MATHEMATICS_H
 
2
#define MATHEMATICS_H
 
3
 
 
4
#include "rational.h"
 
5
 
 
6
enum AVRounding {
 
7
    AV_ROUND_ZERO     = 0, ///< round toward zero
 
8
    AV_ROUND_INF      = 1, ///< round away from zero
 
9
    AV_ROUND_DOWN     = 2, ///< round toward -infinity
 
10
    AV_ROUND_UP       = 3, ///< round toward +infinity
 
11
    AV_ROUND_NEAR_INF = 5, ///< round to nearest and halfway cases away from zero
 
12
};
 
13
 
 
14
/**
 
15
 * rescale a 64bit integer with rounding to nearest.
 
16
 * a simple a*b/c isn't possible as it can overflow
 
17
 */
 
18
int64_t av_rescale(int64_t a, int64_t b, int64_t c);
 
19
 
 
20
/**
 
21
 * rescale a 64bit integer with specified rounding.
 
22
 * a simple a*b/c isn't possible as it can overflow
 
23
 */
 
24
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding);
 
25
 
 
26
/**
 
27
 * rescale a 64bit integer by 2 rational numbers.
 
28
 */
 
29
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq);
 
30
 
 
31
#endif /* MATHEMATICS_H */