Mercurial > libavutil.hg
comparison intfloat_readwrite.c @ 92:79e95d74ce85 libavutil
use C99 standard constant, thanks to Foxy Shadis
| author | bcoudurier |
|---|---|
| date | Fri, 11 Aug 2006 21:39:09 +0000 |
| parents | 4d0fe18e5ce3 |
| children | d76a36742464 |
comparison
equal
deleted
inserted
replaced
| 91:04f62b676170 | 92:79e95d74ce85 |
|---|---|
| 25 | 25 |
| 26 #include "common.h" | 26 #include "common.h" |
| 27 #include "intfloat_readwrite.h" | 27 #include "intfloat_readwrite.h" |
| 28 | 28 |
| 29 double av_int2dbl(int64_t v){ | 29 double av_int2dbl(int64_t v){ |
| 30 if(v+v > 0xFFELLU<<52) | 30 if(v+v > 0xFFEULL<<52) |
| 31 return 0.0/0.0; | 31 return 0.0/0.0; |
| 32 return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075); | 32 return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075); |
| 33 } | 33 } |
| 34 | 34 |
| 35 float av_int2flt(int32_t v){ | 35 float av_int2flt(int32_t v){ |
