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

Function check_diff

libavcodec/fft-test.c:179–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179static void check_diff(float *tab1, float *tab2, int n, double scale)
180{
181 int i;
182 double max= 0;
183 double error= 0;
184
185 for (i = 0; i < n; i++) {
186 double e= fabsf(tab1[i] - (tab2[i] / scale));
187 if (e >= 1e-3) {
188 av_log(NULL, AV_LOG_ERROR, "ERROR %d: %f %f\n",
189 i, tab1[i], tab2[i]);
190 }
191 error+= e*e;
192 if(e>max) max= e;
193 }
194 av_log(NULL, AV_LOG_INFO, "max:%f e:%g\n", max, sqrt(error)/n);
195}
196
197
198static void help(void)

Callers 1

mainFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected