(V4L2_PIX_FMT_SBGGR8) wierd behavior trying to get image from buffer!

2009-10-14 Thread Guilherme Longo
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





--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


libv4l does not work!

2009-10-14 Thread Guilherme Longo

Do we need include any other header file than

libv4l2.h
libv4lconvert.h

to get libv4l working?

I read Hans saying that:

Just replace open("dev/video0", ...) with v4l2_open("dev/video0", ...), 
ioctl with v4l2_ioctl, etc. libv4l2 will then do conversion of any known 
(webcam) pixelformats to bgr24 or yuv420.


But I am getting undefined reference to 'v4l2_open' and 'v4l2_ioctl'.
Can I get some help?

regards!
Guilherme Longo
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Looking for libv4l documentation!

2009-10-14 Thread Guilherme Longo

Just a little observation,

I am looking for this library because my webcan has a sn9c10x chipset 
and I can´t find how sn9c10x pixelformat is captured.


There are a huge list of pixelformats in v4l2 spec but there is just a 
reserved word for this format. They say it exist but I can´t find how it 
is captured.


If someone could tell me where to find such documentation, plz, it would 
be better than converting the pixelformat.


Great Regards
Guilherme Longo

Guilherme Longo escreveu:
Hi, I been searching for a tutorial or a documentation for libv4l to 
convert the pixelformat supported by my webcan but I can´t find any.


I found a article saying that I only should open my device using 
v4l_open(/dev/video0) instead of open(/dev/video0) and the lib should 
do the conversion, but it sound a bit odd for me since I believe it 
should need a more sofisticated threatment.


Does anyone could point to me any reference to such a documentation??

Great regards!
Guilherme Longo


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Looking for libv4l documentation!

2009-10-14 Thread Guilherme Longo
Hi, I been searching for a tutorial or a documentation for libv4l to 
convert the pixelformat supported by my webcan but I can´t find any.


I found a article saying that I only should open my device using 
v4l_open(/dev/video0) instead of open(/dev/video0) and the lib should do 
the conversion, but it sound a bit odd for me since I believe it should 
need a more sofisticated threatment.


Does anyone could point to me any reference to such a documentation??

Great regards!
Guilherme Longo
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


test

2009-09-14 Thread Guilherme Longo

just a test.

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html