Mercurial > hg > wm
comparison Meerwald/cmp_dwt.c @ 8:f83ef905a63d
fixing many warnings
increase capacity for coordinates in bruyn
fix some uninit. variables
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Tue, 22 Apr 2008 13:36:05 +0200 |
parents | be303a3f5ea8 |
children |
comparison
equal
deleted
inserted
replaced
7:2b350281f8b0 | 8:f83ef905a63d |
---|---|
24 fprintf(stderr, "\t-v n\t\tverbosity level\n"); | 24 fprintf(stderr, "\t-v n\t\tverbosity level\n"); |
25 exit(0); | 25 exit(0); |
26 } | 26 } |
27 | 27 |
28 void process_subband_var(gray **output, int cols, int rows, Image_tree p, Image_tree q, int type, double min, double max, gray maxval) { | 28 void process_subband_var(gray **output, int cols, int rows, Image_tree p, Image_tree q, int type, double min, double max, gray maxval) { |
29 int i; | |
30 int col, row, startcol, startrow; | 29 int col, row, startcol, startrow; |
31 | 30 |
32 if (!p || !q) return; | 31 if (!p || !q) return; |
33 | 32 |
34 calc_subband_location(cols, rows, type, p->level, &startcol, &startrow); | 33 calc_subband_location(cols, rows, type, p->level, &startcol, &startrow); |
39 output[startrow + row][startcol + col] = PIXELRANGE((double) (diff - min) / (double) (max - min) * maxval); | 38 output[startrow + row][startcol + col] = PIXELRANGE((double) (diff - min) / (double) (max - min) * maxval); |
40 } | 39 } |
41 } | 40 } |
42 | 41 |
43 void process_subband_fixed(gray **output, int cols, int rows, Image_tree p, Image_tree q, int type, double m) { | 42 void process_subband_fixed(gray **output, int cols, int rows, Image_tree p, Image_tree q, int type, double m) { |
44 int i; | |
45 int col, row, startcol, startrow; | 43 int col, row, startcol, startrow; |
46 | 44 |
47 if (!p || !q) return; | 45 if (!p || !q) return; |
48 | 46 |
49 calc_subband_location(cols, rows, type, p->level, &startcol, &startrow); | 47 calc_subband_location(cols, rows, type, p->level, &startcol, &startrow); |
93 gray in_maxval; | 91 gray in_maxval; |
94 int orig_cols, orig_rows, orig_format; | 92 int orig_cols, orig_rows, orig_format; |
95 gray orig_maxval; | 93 gray orig_maxval; |
96 int cols, rows, format; | 94 int cols, rows, format; |
97 gray maxval; | 95 gray maxval; |
98 int col, row; | 96 int row; |
99 | 97 |
100 int no_orig = 0; | 98 int no_orig = 0; |
101 int m = 0; | 99 int m = 0; |
102 int c; | 100 int c; |
103 int maxlevel = 0; | 101 int maxlevel = 0; |
208 exit(1); | 206 exit(1); |
209 } | 207 } |
210 | 208 |
211 print = print_psnr_only ? out : stderr; | 209 print = print_psnr_only ? out : stderr; |
212 | 210 |
213 if (argc == 1 && *argv[0] != '-') | 211 if (argc == 1 && *argv[0] != '-') { |
214 if ((in = fopen(argv[0], "rb")) == NULL) { | 212 if ((in = fopen(argv[0], "rb")) == NULL) { |
215 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 213 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); |
216 exit(1); | 214 exit(1); |
217 } | 215 } |
218 else | 216 else |
219 strcpy(input_name, argv[0]); | 217 strcpy(input_name, argv[0]); |
220 | 218 } |
219 | |
221 if (!orig && !no_orig) { | 220 if (!orig && !no_orig) { |
222 fprintf(stderr, "%s: original image file not specified, using zero image\n", progname); | 221 fprintf(stderr, "%s: original image file not specified, using zero image\n", progname); |
223 strcpy(orig_name, "(zero)"); | 222 strcpy(orig_name, "(zero)"); |
224 no_orig = 1; | 223 no_orig = 1; |
225 } | 224 } |