* Quantize one coefficient. * @return absolute value of the quantized coefficient * @see 3GPP TS26.403 5.6.2 "Scalefactor determination" */
| 60 | * @see 3GPP TS26.403 5.6.2 "Scalefactor determination" |
| 61 | */ |
| 62 | static 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 | |
| 68 | static void quantize_bands(int (*out)[2], const float *in, const float *scaled, |
| 69 | int size, float Q34, int is_signed, int maxval) |
no outgoing calls
no test coverage detected