From: Guilherme Longo <grlongo.ireland@gmail.com>
To: "Onur Küçük" <onur@delipenguen.net>, linux-media@vger.kernel.org
Subject: (V4L2_PIX_FMT_SBGGR8) wierd behavior trying to get image from buffer!
Date: Wed, 14 Oct 2009 13:38:10 -0300 [thread overview]
Message-ID: <4AD5FE72.80803@gmail.com> (raw)
In-Reply-To: <20091014185733.45a84258.onur@delipenguen.net>
You guys with more experience could tell me why this strange behavior
with my app.
First of all, I built my app from a code well known in the Video For
Linux spec. It is a capture example.
1º - Why is this /* Buggy driver paranoia. */?
min = fmt.fmt.pix.width * 2;
if (fmt.fmt.pix.bytesperline < min)
fmt.fmt.pix.bytesperline = min;
min = fmt.fmt.pix.bytesperline * fmt.fmt.pix.height;
if (fmt.fmt.pix.sizeimage < min)
fmt.fmt.pix.sizeimage = min;
2º - I am using libv4l, and using the V4L2_PIX_FMT_SBGGR8 pixelformat in order
to get 640x480 of resolution. Otherwise I get only 160x120!
This is where the problem lies, I can´t get a good image, I am actually
getting no more than fuzzy image. So I presumed that I am geting smth else
from the buffer instead of the data I should get. I started checking the parameters and plz,
have a look at this wierd response:
fmt.fmt.pix.width: 640 <- Fine
fmt.fmt.pix.height: 480 <- Fine
fmt.fmt.pix.bytesperline: 1920 <- How comes ? It is 3 times more, in the SBGGR8 pixelformat each pixel is 1 byte!
fmt.fmt.pix.sizeimage: 921600 <- The image is (fmt.fmt.pix.bytesperline * fmt.fmt.pix.height)
I believe that this sizeimage should be set to 307200, representing 640 * 480.
Is there someone familiar with this problem and how to solve it??
Great regards.
Guilherme Longo
prev parent reply other threads:[~2009-10-14 16:39 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 14:33 Hauppage WinTV-HVR-900H Ali Abdallah
2009-10-08 12:45 ` Michael Krufky
2009-10-08 15:01 ` Ali Abdallah
2009-10-08 14:45 ` Devin Heitmueller
2009-10-08 18:20 ` Ali Abdallah
2009-10-08 16:28 ` Devin Heitmueller
2009-10-08 16:46 ` Markus Rechberger
2009-10-09 7:59 ` Simon Kenyon
2009-10-09 8:21 ` Markus Rechberger
2009-10-09 21:58 ` Simon Kenyon
2009-10-09 22:24 ` Markus Rechberger
2009-10-10 11:56 ` Mauro Carvalho Chehab
2009-10-10 12:05 ` Markus Rechberger
2009-10-10 12:24 ` Mauro Carvalho Chehab
2009-10-11 0:03 ` hermann pitton
2009-10-13 23:52 ` Bill Davidsen
2009-10-14 9:48 ` Simon Kenyon
2009-10-14 12:47 ` James Peters
2009-10-14 15:42 ` Simon Kenyon
2009-10-14 15:53 ` James Peters
2009-10-14 19:22 ` Bill Davidsen
2009-10-15 15:37 ` Simon Kenyon
2009-10-08 18:37 ` Ali Abdallah
2009-10-09 9:34 ` Ali Abdallah
2009-10-09 13:29 ` Devin Heitmueller
2009-10-09 15:35 ` Ali Abdallah
2009-10-09 17:22 ` Ali Abdallah
2009-10-09 15:26 ` Devin Heitmueller
2009-10-09 17:31 ` Ali Abdallah
2009-10-14 13:45 ` Ali Abdallah
2009-10-14 12:30 ` Mauro Carvalho Chehab
2009-10-14 15:30 ` Ali Abdallah
2009-10-14 15:02 ` libv4l does not work! Guilherme Longo
2009-10-14 15:57 ` Onur Küçük
2009-10-14 16:38 ` Guilherme Longo [this message]
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=4AD5FE72.80803@gmail.com \
--to=grlongo.ireland@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=onur@delipenguen.net \
/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;
as well as URLs for NNTP newsgroup(s).