~ubuntu-branches/ubuntu/trusty/ffmpeg-debian/trusty

« back to all changes in this revision

Viewing changes to libavutil/softfloat.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-02-05 21:22:01 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090205212201-hjhtybuxtm90cbjy
Tags: 3:0.svn20090204-2ubuntu1
* merge from debian. Remaining changes:
  - don't build depend on libfaad-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
}
73
73
 
74
74
/**
75
 
 *
76
 
 * @return will not be more denormalized then a+b, so if either input is
77
 
 *         normalized then the output will not be worse then the other input
78
 
 *         if both are normalized then the output will be normalized
 
75
 * @return Will not be more denormalized than a+b. So if either input is
 
76
 *         normalized, then the output will not be worse then the other input.
 
77
 *         If both are normalized, then the output will be normalized.
79
78
 */
80
79
static inline av_const SoftFloat av_mul_sf(SoftFloat a, SoftFloat b){
81
80
    a.exp += b.exp;
84
83
}
85
84
 
86
85
/**
87
 
 *
88
 
 * b has to be normalized and not zero
89
 
 * @return will not be more denormalized then a
 
86
 * b has to be normalized and not zero.
 
87
 * @return Will not be more denormalized than a.
90
88
 */
91
89
static av_const SoftFloat av_div_sf(SoftFloat a, SoftFloat b){
92
90
    a.exp -= b.exp+1;
117
115
}
118
116
 
119
117
/**
120
 
 *
121
 
 * rounding is to -inf
 
118
 * Rounding is to -inf.
122
119
 */
123
120
static inline av_const int av_sf2int(SoftFloat v, int frac_bits){
124
121
    v.exp += frac_bits - ONE_BITS;