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

Function quant

libavcodec/aaccoder.c:62–66  ·  view source on GitHub ↗

* Quantize one coefficient. * @return absolute value of the quantized coefficient * @see 3GPP TS26.403 5.6.2 "Scalefactor determination" */

Source from the content-addressed store, hash-verified

60 * @see 3GPP TS26.403 5.6.2 "Scalefactor determination"
61 */
62static av_always_inline int quant(float coef, const float Q)
63{
64 float a = coef * Q;
65 return sqrtf(a * sqrtf(a)) + 0.4054;
66}
67
68static void quantize_bands(int (*out)[2], const float *in, const float *scaled,
69 int size, float Q34, int is_signed, int maxval)

Callers 2

aaccoder.cFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected