Skip to content

Commit

Permalink
Limit detection rate to 3fps, small setup_mode fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoergWeber authored and JoergWeber committed Sep 30, 2008
1 parent 1b80e57 commit a8f0a5b
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 112 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Features
possible combinations. (Joerg Weber)
* Get rid of ffmpeg-config in configure.in for debian. (Angel Carpintero)
* Implement 'gapless' event mode to allow for recording of movies without 'holes'. (Joerg Weber)
* Limit detection rate to 3fps at framerates above 5fps, to reduce CPU load. (Joerg Weber)

Bugfixes
* Fix Problem Encoding 1280x1024 resolution videos
Expand Down
1 change: 1 addition & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,7 @@ Joerg Weber
* Split locate_motion into separate 'mode' and 'style' option to allow all
possible combinations.
* Gapless_event mode.
* Limit detection rate to 3fps at framerates above 5fps, to reduce CPU load.

Dirk Wesenberg
* Track pan/tilt support for uvcvideo ( Michal Licko ,Dirk Wesenberg and Angel Carpintero )
Expand Down
8 changes: 4 additions & 4 deletions alg.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,15 @@ void alg_locate_center_size(struct images *imgs, int width, int height, struct c


/* draw a box around the movement */
void alg_draw_location(struct coord *cent, struct images *imgs, int width, unsigned char *new, int style, int mode)
void alg_draw_location(struct coord *cent, struct images *imgs, int width, unsigned char *new, int style, int mode, int process_thisframe)
{
unsigned char *out = imgs->out;
int x, y;

out = imgs->out;

/* debug image always gets a 'normal' box */
if (mode == LOCATE_BOTH) {
if ((mode == LOCATE_BOTH) && process_thisframe) {
int width_miny = width * cent->miny;
int width_maxy = width * cent->maxy;

Expand Down Expand Up @@ -223,7 +223,7 @@ void alg_draw_location(struct coord *cent, struct images *imgs, int width, unsig


/* draw a RED box around the movement */
void alg_draw_red_location(struct coord *cent, struct images *imgs, int width, unsigned char *new, int style, int mode)
void alg_draw_red_location(struct coord *cent, struct images *imgs, int width, unsigned char *new, int style, int mode, int process_thisframe)
{
unsigned char *out = imgs->out;
unsigned char *new_u, *new_v;
Expand All @@ -238,7 +238,7 @@ void alg_draw_red_location(struct coord *cent, struct images *imgs, int width, u
new_v = new + v;

/* debug image always gets a 'normal' box */
if (mode == LOCATE_BOTH) {
if ((mode == LOCATE_BOTH) && process_thisframe) {
int width_miny = width * cent->miny;
int width_maxy = width * cent->maxy;

Expand Down
4 changes: 2 additions & 2 deletions alg.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ struct segment {
};

void alg_locate_center_size(struct images *, int width, int height, struct coord *);
void alg_draw_location(struct coord *, struct images *, int width, unsigned char *, int, int);
void alg_draw_red_location(struct coord *, struct images *, int width, unsigned char *, int, int);
void alg_draw_location(struct coord *, struct images *, int width, unsigned char *, int, int, int);
void alg_draw_red_location(struct coord *, struct images *, int width, unsigned char *, int, int, int);
int alg_diff(struct context *, unsigned char *);
int alg_diff_standard(struct context *, unsigned char *);
int alg_lightswitch(struct context *, int diffs);
Expand Down
Loading

0 comments on commit a8f0a5b

Please sign in to comment.