FastLED 3.9.15
Loading...
Searching...
No Matches

◆ ilog()

static int32_t fl::third_party::vorbis::ilog ( int32 n)
static

Definition at line 761 of file stb_vorbis.cpp.hpp.

762{
763 static signed char log2_4[16] = { 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4 };
764
765 if (n < 0) return 0; // signed n returns 0
766
767 // 2 compares if n < 16, 3 compares otherwise (4 if signed or n > 1<<29)
768 if (n < (1 << 14))
769 if (n < (1 << 4)) return 0 + log2_4[n ];
770 else if (n < (1 << 9)) return 5 + log2_4[n >> 5];
771 else return 10 + log2_4[n >> 10];
772 else if (n < (1L << 24))
773 if (n < (1L << 19)) return 15 + log2_4[n >> 15];
774 else return 20 + log2_4[n >> 20];
775 else if (n < (1L << 29)) return 25 + log2_4[n >> 25];
776 else return 30 + log2_4[n >> 30];
777}

References FL_NOEXCEPT.

Referenced by compute_bitreverse(), inverse_mdct(), peek_decode_initial(), start_decoder(), vorbis_decode_initial(), and vorbis_decode_packet_rest().

+ Here is the caller graph for this function: