mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-14 20:00:01 +01:00
@@ -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 ) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user