From f11bf3aa7139b8dfeeb087f10dc0cd1176117b0a Mon Sep 17 00:00:00 2001 From: tth Date: Wed, 25 Sep 2019 16:48:34 +0200 Subject: [PATCH] killin a nasty workaround --- v4l2/grabvidseq.c | 4 ---- v4l2/rgb2fimg.c | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/v4l2/grabvidseq.c b/v4l2/grabvidseq.c index 00c577f..e1b2a4a 100644 --- a/v4l2/grabvidseq.c +++ b/v4l2/grabvidseq.c @@ -315,10 +315,6 @@ if (to_gray) { // save cumul to file if (verbosity) fprintf(stderr, "saving to '%s'\n", outfile); -if (upscaling) { /* nasty workaround */ - cumul.count /= 4; /* WTF ? */ - } - foo = fimg_save_as_pnm(&cumul, outfile, 1); // free buffers diff --git a/v4l2/rgb2fimg.c b/v4l2/rgb2fimg.c index 79bdb7b..f9a7237 100644 --- a/v4l2/rgb2fimg.c +++ b/v4l2/rgb2fimg.c @@ -47,7 +47,9 @@ for (y=0; ycount++; /* one more frame in the accumulator */ +if ( ! (modz & 0x03)) { + d->count++; /* one more frame in the accumulator */ + } return -1; }