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

Function float2half

libavutil/float2half.h:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36void ff_init_float2half_tables(Float2HalfTables *t);
37
38static inline uint16_t float2half(uint32_t f, const Float2HalfTables *t)
39{
40#if HAVE_FAST_FLOAT16
41 union {
42 _Float16 f;
43 uint16_t i;
44 } u;
45 u.f = av_int2float(f);
46 return u.i;
47#else
48 uint16_t h;
49
50 h = t->basetable[(f >> 23) & 0x1ff] + ((f & 0x007fffff) >> t->shifttable[(f >> 23) & 0x1ff]);
51
52 return h;
53#endif
54}
55
56#endif /* AVUTIL_FLOAT2HALF_H */

Callers 6

dwa_uncompressFunction · 0.85
decode_initFunction · 0.85
pnm_encode_frameFunction · 0.85
encode_scanline_rleFunction · 0.85
encode_scanline_zipFunction · 0.85
encode_frameFunction · 0.85

Calls 1

av_int2floatFunction · 0.85

Tested by

no test coverage detected