From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: kilgota@banach.math.auburn.edu
Cc: video4linux-list@redhat.com
Subject: Re: Report on time needed for completing v4l Bayer interpolation.
Date: Sun, 23 Nov 2008 10:36:23 +0100 [thread overview]
Message-ID: <49292417.30100@hhs.nl> (raw)
In-Reply-To: <Pine.LNX.4.64.0811211929220.4832@banach.math.auburn.edu>
kilgota@banach.math.auburn.edu wrote:
>
> Hans,
>
> I made your Bayer code to work. It was not terribly difficult, but did
> need a bit of fixing and fooling.
>
> So now the gp_bayer_decode function (in byr2ppm.c)says
>
> int
> gp_bayer_decode (unsigned char *input, int w, int h, unsigned char *output,
> BayerTile tile)
> {
> // gp_bayer_expand (input, w, h, output, tile);
> // gp_bayer_interpolate (output, w, h, tile);
> clock_t time_start=clock();
> fprintf(stderr, "Starting bayer v4l-interpolation\n");
>
>
>
> v4lconvert_bayer_to_rgb24(input,
> output, w, h, tile);
>
> clock_t time_end=clock();
> fprintf(stderr,"Total time of v4l Bayer :\t%i ms\n",
> (int)(time_end-time_start)/1000);
>
>
> return (0);
> }
>
> and the result for the same photo as before is
>
> Total time of v4l Bayer : 0 ms
>
> In other words, the time is reduced by a factor of approximately ten
> from the code in the original libgphoto2/bayer.c (the straight bilinear
> version).
>
Well 10x might be a bit exaggerating, see my comments about clock() precision
below.
> With a larger 640x480 image the time required is variously 0 ms or
> sometimes 10 ms, so again a dramatic improvement.
>
Hmm, if it jumps between 0 and 10 then clock() apparently has a 10 ms
resolution I know the resolution of clock() wasn't all that great, but this is
kinda bad actually.
> What would you suggest to do in order to get a more meaningful
> measurement, at this point? Remove the dividend 1000 completely?
>
That wont help, I advice you to use gettimeofday instead that much much better
precision (sub microsecond on most systems).
> As far as the output image is concerned, the results are as I would
> expect, though. To me, the output appears to be pretty much identical to
> what the unmodified bilinear interpolation gives, which was in the
> "original" libgphoto2/bayer.c. That is, there is lots of zipper effect
> or ladder effect which is visible at vertical and horizontal edges all
> over the photo, and this artifacting can be easily seen even at the
> original 320x240 resolution without doing any magnification.
>
Ack.
> Incidentally, the photo is the "infamous number 23" and you can see the
> same photo on the website, as 023.ppm (now that I got the permissions
> problem fixed). In the paper there are also some magnified views of a
> small portion of the same photo, which show the effects of the three
> different algorithms that show up especially at the edges of the balcony
> railing and at the tops of the buildings in the distance.
>
> Bottom line: I will see if I can figure out anything to get rid of the
> zippering without excessively jacking up the time needed. Probably the
> first thing to test is the accrue functionality, or a modification of that.
Ok and Thanks!
Regards,
Hans
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-11-23 9:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.208512.1227000563.24145.sqcam-devel@lists.sourceforge.net>
[not found] ` <Pine.LNX.4.64.0811181216270.2778@banach.math.auburn.edu>
2008-11-19 0:20 ` [sqcam-devel] Advice wanted on producing an in kernel sq905 driver Adam Baker
2008-11-19 7:46 ` Antonio Ospite
2008-11-19 8:42 ` Hans de Goede
[not found] ` <alpine.LNX.1.10.0811192005020.2980@banach.math.auburn.edu>
2008-11-20 9:38 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811201130410.3570@banach.math.auburn.edu>
2008-11-20 19:37 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811201657020.3763@banach.math.auburn.edu>
2008-11-21 8:37 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811202306360.3930@banach.math.auburn.edu>
2008-11-21 10:54 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811211244120.4475@banach.math.auburn.edu>
2008-11-21 21:25 ` Hans de Goede
[not found] ` <Pine.LNX.4.64.0811211929220.4832@banach.math.auburn.edu>
2008-11-23 9:36 ` Hans de Goede [this message]
[not found] ` <Pine.LNX.4.64.0811231522510.6135@banach.math.auburn.edu>
2008-11-24 8:15 ` Apparent inconsistency in the labels of Bayer tilings Hans de Goede
2008-11-21 21:57 ` [sqcam-devel] Advice wanted on producing an in kernel sq905 driver Adam Baker
2008-11-21 23:39 ` Adam Baker
[not found] ` <Pine.LNX.4.64.0811211658290.4727@banach.math.auburn.edu>
2008-11-22 0:05 ` Adam Baker
[not found] ` <Pine.LNX.4.64.0811211955490.4832@banach.math.auburn.edu>
2008-11-22 21:55 ` The userspace-kernelspace thing. Continuation of sq905 driver discussion Adam Baker
2008-11-24 11:26 ` [sqcam-devel] Advice wanted on producing an in kernel sq905 driver Hans de Goede
[not found] ` <alpine.LNX.1.10.0811191937370.2980@banach.math.auburn.edu>
2008-11-20 7:48 ` Hans de Goede
[not found] ` <492A8E76.3070701@redhat.com>
[not found] ` <Pine.LNX.4.64.0811241446210.6862@banach.math.auburn.edu>
2008-11-25 0:02 ` Adam Baker
[not found] ` <Pine.LNX.4.64.0811241929420.7049@banach.math.auburn.edu>
2008-11-25 20:57 ` Adam Baker
2008-11-25 8:03 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49292417.30100@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=kilgota@banach.math.auburn.edu \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox