All of lore.kernel.org
 help / color / mirror / Atom feed
* libv4l: problem with 2x downscaling + Labtec Webcam 2200
@ 2009-08-15  6:53 Németh Márton
  2009-08-15  9:05 ` Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Németh Márton @ 2009-08-15  6:53 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Jean-François Moine, linux-media

Hello Hans,

I am using your libv4l 0.6.0 [1] together with the driver gspca_pac7311
from Linux kernel 2.6.31-rc4 and with Labtec Webcam 2200 hardware [2]. I
am using the svv.c [3] to display the webcam image.

When I'm using the webcam in 640x480 the image is displayed correctly.
However, when I set the resolution to 320x240, the image is not correct:
the image contains horizontal lines and doubled vertically. I guess the
conversion from 640x480 is not done just the pixels are shown as it would
be 320x240.

$ ./svv -f 320x240
raw pixfmt: PJPG 640x480
pixfmt: RGB3 320x240
mmap method

What do you think the problem could be?

References:
[1] libv4l
http://freshmeat.net/projects/libv4l

[2] Labtec Webcam 2200
http://labtec.com/index.cfm/service/listing/EUR/EN,crid=68,crid2=1764

[3] svv.c
http://moinejf.free.fr/svv.c


$ v4l-info

### v4l2 device info [/dev/video0] ###
general info
    VIDIOC_QUERYCAP
        driver                  : "pac7311"
        card                    : "USB Camera (093a:2626)"
        bus_info                : "usb-0000:00:10.1-1"
        version                 : 2.6.0
        capabilities            : 0x5000001 [VIDEO_CAPTURE,READWRITE,STREAMING]

standards

inputs
    VIDIOC_ENUMINPUT(0)
        index                   : 0
        name                    : "pac7311"
        type                    : CAMERA
        audioset                : 0
        tuner                   : 0
        std                     : 0x0 []
        status                  : 0x0 []

video capture
    VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
        index                   : 0
        type                    : VIDEO_CAPTURE
        flags                   : 0
        description             : "PJPG"
        pixelformat             : 0x47504a50 [PJPG]
    VIDIOC_G_FMT(VIDEO_CAPTURE)
        type                    : VIDEO_CAPTURE
        fmt.pix.width           : 640
        fmt.pix.height          : 480
        fmt.pix.pixelformat     : 0x47504a50 [PJPG]
        fmt.pix.field           : NONE
        fmt.pix.bytesperline    : 640
        fmt.pix.sizeimage       : 115790
        fmt.pix.colorspace      : JPEG
        fmt.pix.priv            : 0

controls
    VIDIOC_QUERYCTRL(BASE+0)
        id                      : 9963776
        type                    : INTEGER
        name                    : "Brightness"
        minimum                 : 0
        maximum                 : 32
        step                    : 1
        default_value           : 16
        flags                   : 0
    VIDIOC_QUERYCTRL(BASE+1)
        id                      : 9963777
        type                    : INTEGER
        name                    : "Contrast"
        minimum                 : 0
        maximum                 : 255
        step                    : 1
        default_value           : 127
        flags                   : 0
    VIDIOC_QUERYCTRL(BASE+2)
        id                      : 9963778
        type                    : INTEGER
        name                    : "Saturation"
        minimum                 : 0
        maximum                 : 255
        step                    : 1
        default_value           : 127
        flags                   : 0

### video4linux device info [/dev/video0] ###
general info
    VIDIOCGCAP
        name                    : "USB Camera (093a:2626)"
        type                    : 0x1 [CAPTURE]
        channels                : 1
        audios                  : 0
        maxwidth                : 640
        maxheight               : 480
        minwidth                : 48
        minheight               : 32

channels
    VIDIOCGCHAN(0)
        channel                 : 0
        name                    : "pac7311"
        tuners                  : 0
        flags                   : 0x0 []
        type                    : CAMERA
        norm                    : 0

tuner
ioctl VIDIOCGTUNER: Invalid argument

audio
    VIDIOCGAUDIO
        audio                   : 0
        volume                  : 0
        bass                    : 0
        treble                  : 0

picture
    VIDIOCGPICT
        brightness              : 32768
        hue                     : 0
        colour                  : 32639
        contrast                : 32639
        whiteness               : 0
        depth                   : 8
        palette                 : unknown

buffer
ioctl VIDIOCGFBUF: Invalid argument

window
    VIDIOCGWIN
        x                       : 0
        y                       : 0
        width                   : 640
        height                  : 480
        chromakey               : 0
        flags                   : 0

Regards,

	Márton Németh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libv4l: problem with 2x downscaling + Labtec Webcam 2200
  2009-08-15  6:53 libv4l: problem with 2x downscaling + Labtec Webcam 2200 Németh Márton
@ 2009-08-15  9:05 ` Hans de Goede
  2009-08-16  5:25   ` Németh Márton
  0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2009-08-15  9:05 UTC (permalink / raw)
  To: Németh Márton; +Cc: Jean-François Moine, linux-media

On 08/15/2009 08:53 AM, Németh Márton wrote:
> Hello Hans,
>
> I am using your libv4l 0.6.0 [1] together with the driver gspca_pac7311
> from Linux kernel 2.6.31-rc4 and with Labtec Webcam 2200 hardware [2]. I
> am using the svv.c [3] to display the webcam image.
>
> When I'm using the webcam in 640x480 the image is displayed correctly.
> However, when I set the resolution to 320x240, the image is not correct:
> the image contains horizontal lines and doubled vertically. I guess the
> conversion from 640x480 is not done just the pixels are shown as it would
> be 320x240.
>

Hi,

This is a known problem in 0.6.0 fixed by this commit:
http://linuxtv.org/hg/~hgoede/libv4l/rev/89fba654c7ea

You can get a snapshot of what will eventually
(soonish) become 0.6.1 here:
http://people.atrpms.net/~hdegoede/libv4l-0.6.1-test.tar.gz

Upgrading to this should fix your problems.

Regards,

Hans

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libv4l: problem with 2x downscaling + Labtec Webcam 2200
  2009-08-15  9:05 ` Hans de Goede
@ 2009-08-16  5:25   ` Németh Márton
  0 siblings, 0 replies; 3+ messages in thread
From: Németh Márton @ 2009-08-16  5:25 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Jean-François Moine, linux-media

Hello Hans,

Hans de Goede wrote:
> On 08/15/2009 08:53 AM, Németh Márton wrote:
>> I am using your libv4l 0.6.0 [1] together with the driver gspca_pac7311
>> from Linux kernel 2.6.31-rc4 and with Labtec Webcam 2200 hardware [2]. I
>> am using the svv.c [3] to display the webcam image.
>>
>> When I'm using the webcam in 640x480 the image is displayed correctly.
>> However, when I set the resolution to 320x240, the image is not correct:
>> the image contains horizontal lines and doubled vertically. I guess the
>> conversion from 640x480 is not done just the pixels are shown as it would
>> be 320x240.
> 
> This is a known problem in 0.6.0 fixed by this commit:
> http://linuxtv.org/hg/~hgoede/libv4l/rev/89fba654c7ea
> 
> You can get a snapshot of what will eventually
> (soonish) become 0.6.1 here:
> http://people.atrpms.net/~hdegoede/libv4l-0.6.1-test.tar.gz
> 
> Upgrading to this should fix your problems.

Thanks, the libv4l 0.6.1-test fixed the problem for me.

Regards,

	Márton Németh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-16  5:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-15  6:53 libv4l: problem with 2x downscaling + Labtec Webcam 2200 Németh Márton
2009-08-15  9:05 ` Hans de Goede
2009-08-16  5:25   ` Németh Márton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.