tests: fix build on os/x
[schroedinger.git] / testsuite / perceptual_curves.c
blob6ef11d587f76cc211699eea514b11048199ca947
2 #ifdef HAVE_CONFIG_H
3 #include "config.h"
4 #endif
6 #include <schroedinger/schro.h>
7 #include <schroedinger/schrowavelet.h>
9 #include <stdio.h>
10 #include <string.h>
11 #include <stdlib.h>
12 #include <math.h>
15 int
16 main (int argc, char *argv[])
18 int i;
19 double ppd_max;
20 double ppd;
22 schro_init();
24 ppd_max = 720 / (2.0*atan(0.5/3.0)*180/M_PI);
26 for(i=0;i<100;i++) {
27 ppd = ppd_max * (i/100.0);
29 printf("%d %g %g %g %g\n",
30 i, ppd,
31 1.0/schro_encoder_perceptual_weight_constant (ppd),
32 1.0/schro_encoder_perceptual_weight_moo (ppd),
33 1.0/schro_encoder_perceptual_weight_ccir959 (ppd));
36 return 0;