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

Function rms

libavcodec/ra144.c:160–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160static unsigned int rms(const int *data)
161{
162 int i;
163 unsigned int res = 0x10000;
164 int b = 10;
165
166 for (i=0; i < 10; i++) {
167 res = (((0x1000000 - data[i]*data[i]) >> 12) * res) >> 12;
168
169 if (res == 0)
170 return 0;
171
172 while (res <= 0x3fff) {
173 b++;
174 res <<= 2;
175 }
176 }
177
178 return t_sqrt(res) >> b;
179}
180
181static void do_output_subblock(RA144Context *ractx, const uint16_t *lpc_coefs,
182 int gval, GetBitContext *gb)

Callers 2

interpFunction · 0.85
ra144_decode_frameFunction · 0.85

Calls 1

t_sqrtFunction · 0.85

Tested by

no test coverage detected