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

Function quantize_bands

libavcodec/aaccoder.c:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)
70{
71 int i;
72 double qc;
73 for (i = 0; i < size; i++) {
74 qc = scaled[i] * Q34;
75 out[i][0] = (int)FFMIN(qc, (double)maxval);
76 out[i][1] = (int)FFMIN(qc + 0.4054, (double)maxval);
77 if (is_signed && in[i] < 0.0f) {
78 out[i][0] = -out[i][0];
79 out[i][1] = -out[i][1];
80 }
81 }
82}
83
84static void abs_pow34_v(float *out, const float *in, const int size)
85{

Callers 1

aaccoder.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected