blob: 22d5587b8e4d61bc2304d12c1e81726afaa9deef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef _UTIL_H_
#define _UTIL_H_
#include <stdint.h>
static inline void
pswap(void **p1, void **p2)
{
void *tmp;
tmp = *p1;
*p1 = *p2;
*p2 = tmp;
}
int
pgm_read(char *filename, unsigned char **buf, int *xsize, int *ysize);
int
pgm_save(unsigned char *buf, int wrap, int xsize, int ysize, char *filename);
/* Store half of frame_a and half of frame_b in frame_a */
void
frame_mix(struct video_frame *frame_a, struct video_frame *frame_b);
double
frame_diff(struct video_frame *frame_a, struct video_frame *frame_b);
double
frame_average(struct video_frame *frame);
void
print_time(int64_t msec);
int
sobel(struct video_frame *frame, unsigned char **d);
#endif /* _UTIL_H_ */
|