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

Function put_float

libavcodec/vorbisenc.c:481–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481static void put_float(PutBitContext *pb, float f)
482{
483 int exp, mant;
484 uint32_t res = 0;
485 mant = (int)ldexp(frexp(f, &exp), 20);
486 exp += 788 - 20;
487 if (mant < 0) {
488 res |= (1U << 31);
489 mant = -mant;
490 }
491 res |= mant | (exp << 21);
492 put_bits32(pb, res);
493}
494
495static void put_codebook_header(PutBitContext *pb, vorbis_enc_codebook *cb)
496{

Callers 1

put_codebook_headerFunction · 0.85

Calls 1

put_bits32Function · 0.85

Tested by

no test coverage detected