From: Robert Abel <abel@uni-bielefeld.de>
To: linux-media@vger.kernel.org
Subject: [libv4l] Bytes per Line
Date: Wed, 15 Feb 2012 16:53:46 +0100 [thread overview]
Message-ID: <4F3BD50A.3010608@uni-bielefeld.de> (raw)
Hi,
First off, I hope this is the right mailing list I'm writing to.
Basically, I found that libv4l and its conversion functions usually
choose to ignore v4l2_pix_format.bytesperline, which seems to work out
most of the time.
I'm currently working with the mt9v032 camera on a Gumstix Overo board.
The mt9v032's driver pads output lines to 768 pixels, giving 0x900 bytes
per line. All code in bayer.c (the camera uses raw bayer pattern) is
written to assume bytesperline = width and thus everything goes horribly
wrong.
I patched the issue for bayer => rgbbgr24 and will possibly fix it for
bayer => yuv as well.
However, I am going to run some tests using test patterns comparing
bayer => rgb to bayer => yuv => rgb, where the bayer => yuv part is done
in hardware. Yet, the code for yuv => rgb does also not take
bytesperline into account.
Is there a general understanding that v4l media drivers must not pad
their data, or that libv4l is ignoring padding?
I've worked with some webcams in the past and they all padded their
data, so I'm wondering if assuming bytesperline = width was done on
purpose and by design of out of necessity (speed..?) or if it just
happened to work for most people?
Thanks,
Robert
next reply other threads:[~2012-02-15 15:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 15:53 Robert Abel [this message]
2012-02-15 22:30 ` [libv4l] Bytes per Line Gregor Jasny
2012-02-20 19:42 ` [PATCH][libv4l] Bytes per Line (was: [libv4l] Bytes per Line) Robert Abel
2012-02-25 17:19 ` [PATCH][libv4l] Bytes per Line Gregor Jasny
2012-02-26 12:15 ` Robert Abel
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=4F3BD50A.3010608@uni-bielefeld.de \
--to=abel@uni-bielefeld.de \
--cc=linux-media@vger.kernel.org \
/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