Compile fix

pull/7577/head
AlexeyAB 6 years ago
parent 13f064f1be
commit 3aa2e45ad3
  1. 8
      src/data.c
  2. 3
      src/utils.h

@ -1076,11 +1076,11 @@ data load_data_detection(int n, char **paths, int m, int w, int h, int c, int bo
pright = tmp; pright = tmp;
} }
const int left_shift = min(cut_x[i], max(0, (-pleft*w / ow))); const int left_shift = min_val_cmp(cut_x[i], max_val_cmp(0, (-pleft*w / ow)));
const int top_shift = min(cut_y[i], max(0, (-ptop*h / oh))); const int top_shift = min_val_cmp(cut_y[i], max_val_cmp(0, (-ptop*h / oh)));
const int right_shift = min((w - cut_x[i]), max(0, (-pright*w / ow))); const int right_shift = min_val_cmp((w - cut_x[i]), max_val_cmp(0, (-pright*w / ow)));
const int bot_shift = min(h - cut_y[i], max(0, (-pbot*h / oh))); const int bot_shift = min_val_cmp(h - cut_y[i], max_val_cmp(0, (-pbot*h / oh)));
int k, x, y; int k, x, y;

@ -83,6 +83,9 @@ int max_int_index(int *a, int n);
boxabs box_to_boxabs(const box* b, const int img_w, const int img_h, const int bounds_check); boxabs box_to_boxabs(const box* b, const int img_w, const int img_h, const int bounds_check);
int make_directory(char *path, int mode); int make_directory(char *path, int mode);
#define max_val_cmp(a,b) (((a) > (b)) ? (a) : (b))
#define min_val_cmp(a,b) (((a) < (b)) ? (a) : (b))
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

Loading…
Cancel
Save