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

Function l2_unscale_group

libavcodec/mpegaudiodec.c:178–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178static inline int l2_unscale_group(int steps, int mant, int scale_factor)
179{
180 int shift, mod, val;
181
182 shift = scale_factor_modshift[scale_factor];
183 mod = shift & 3;
184 shift >>= 2;
185
186 val = (mant - (steps >> 1)) * scale_factor_mult2[steps >> 2][mod];
187 /* NOTE: at this point, 0 <= shift <= 21 */
188 if (shift > 0)
189 val = (val + (1 << (shift - 1))) >> shift;
190 return val;
191}
192
193/* compute value^(4/3) * 2^(exponent/4). It normalized to FRAC_BITS */
194static inline int l3_unscale(int value, int exponent)

Callers 1

mp_decode_layer2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected