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

Function ff_log2

libavcodec/celp_math.c:179–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177};
178
179int ff_log2(uint32_t value)
180{
181 uint8_t power_int;
182 uint8_t frac_x0;
183 uint16_t frac_dx;
184
185 // Stripping zeros from beginning
186 power_int = av_log2(value);
187 value <<= (31 - power_int);
188
189 // b31 is always non-zero now
190 frac_x0 = (value & 0x7c000000) >> 26; // b26-b31 and [32..63] -> [0..31]
191 frac_dx = (value & 0x03fff800) >> 11;
192
193 value = tab_log2[frac_x0];
194 value += (frac_dx * (tab_log2[frac_x0+1] - tab_log2[frac_x0])) >> 15;
195
196 return (power_int << 15) + value;
197}
198
199float ff_dot_productf(const float* a, const float* b, int length)
200{

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected