| 479 | } |
| 480 | |
| 481 | static 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 | |
| 495 | static void put_codebook_header(PutBitContext *pb, vorbis_enc_codebook *cb) |
| 496 | { |
no test coverage detected