issue #42, issue #116

This commit is contained in:
c0ntrol
2016-05-25 20:45:03 +02:00
parent 87fa4fe116
commit 10c818e13b
2 changed files with 4 additions and 6 deletions

View File

@@ -1313,7 +1313,7 @@ int v4l2_pull_frame(void *vv,VJFrame *dst)
v4l2info *v = (v4l2info*) vv;
if( (dst == NULL || v->rw == 1 && v->pause_read ) || (v->rw == 0 && !v->is_streaming) )
if( (dst == NULL) || ( v->rw == 1 && v->pause_read ) || (v->rw == 0 && !v->is_streaming) )
return 0;
if( v->scaler == NULL ) {

View File

@@ -291,11 +291,9 @@ static int32_t motionmap_activity_level( uint8_t *I, int width, int height )
{
const unsigned int len = (width * height);
int32_t level = 0;
int r,c;
for (r = 0; r < len; r += width) {
for ( c = 0; c < width; c ++ ) {
level += I[r + c];
}
unsigned int i;
for( i = 0; i < len; i ++ ) {
level += I[i];
}
return (level>>8);
}