From 279db4fbc92aab6eb3d1c3e6a31ca23aea7d4ba6 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 1 Feb 2013 08:20:48 +0100 Subject: Put frame_diff and pswap into util --- src/util.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 5921a86..bc926b6 100644 --- a/src/util.h +++ b/src/util.h @@ -3,6 +3,16 @@ #include +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); @@ -13,6 +23,9 @@ pgm_save(unsigned char *buf, int wrap, int xsize, int ysize, char *filename); 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); + void print_time(int64_t msec); -- cgit