| | |
| | | } |
| | | */ |
| | | |
| | | inline unsigned int random_gen() |
| | | { |
| | | unsigned int Num = 0; |
| | | rand_s(&Num); |
| | | return Num; |
| | | } |
| | | |
| | | char **get_random_paths(char **paths, int n, int m) |
| | | { |
| | | char **random_paths = calloc(n, sizeof(char*)); |
| | |
| | | int dw = (ow*jitter); |
| | | int dh = (oh*jitter); |
| | | |
| | | int pleft = rand_uniform(-dw, dw); |
| | | int pright = rand_uniform(-dw, dw); |
| | | int ptop = rand_uniform(-dh, dh); |
| | | int pbot = rand_uniform(-dh, dh); |
| | | int pleft = rand_uniform_strong(-dw, dw); |
| | | int pright = rand_uniform_strong(-dw, dw); |
| | | int ptop = rand_uniform_strong(-dh, dh); |
| | | int pbot = rand_uniform_strong(-dh, dh); |
| | | |
| | | int swidth = ow - pleft - pright; |
| | | int sheight = oh - ptop - pbot; |
| | |
| | | |
| | | void *load_thread(void *ptr) |
| | | { |
| | | srand(time(0)); |
| | | //srand(time(0)); |
| | | //printf("Loading data: %d\n", random_gen()); |
| | | load_args a = *(struct load_args*)ptr; |
| | | if(a.exposure == 0) a.exposure = 1; |
| | |
| | | |
| | | void *load_threads(void *ptr) |
| | | { |
| | | srand(time(0)); |
| | | //srand(time(0)); |
| | | int i; |
| | | load_args args = *(load_args *)ptr; |
| | | if (args.threads == 0) args.threads = 1; |