~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavutil/intfloat_readwrite.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "intfloat_readwrite.h"
31
31
 
32
32
double av_int2dbl(int64_t v){
33
 
    if(v+v > 0xFFEULL<<52)
 
33
    if((uint64_t)v+v > 0xFFEULL<<52)
34
34
        return NAN;
35
35
    return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075);
36
36
}
37
37
 
38
38
float av_int2flt(int32_t v){
39
 
    if(v+v > 0xFF000000U)
 
39
    if((uint32_t)v+v > 0xFF000000U)
40
40
        return NAN;
41
41
    return ldexp(((v&0x7FFFFF) + (1<<23)) * (v>>31|1), (v>>23&0xFF)-150);
42
42
}