MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / av_ext2dbl

Function av_ext2dbl

libavutil/intfloat_readwrite.c:44–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44double av_ext2dbl(const AVExtFloat ext){
45 uint64_t m = 0;
46 int e, i;
47
48 for (i = 0; i < 8; i++)
49 m = (m<<8) + ext.mantissa[i];
50 e = (((int)ext.exponent[0]&0x7f)<<8) | ext.exponent[1];
51 if (e == 0x7fff && m)
52 return 0.0/0.0;
53 e -= 16383 + 63; /* In IEEE 80 bits, the whole (i.e. 1.xxxx)
54 * mantissa bit is written as opposed to the
55 * single and double precision formats. */
56 if (ext.exponent[0]&0x80)
57 m= -m;
58 return ldexp(m, e);
59}
60
61int64_t av_dbl2int(double d){
62 int e;

Callers 1

get_aiff_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected