recent image issues

0 views
Skip to first unread message

Brian Johnson

unread,
Aug 24, 2008, 9:16:40 AM8/24/08
to micr...@googlegroups.com
OK I'm starting a new thread for the image issues some people seem to
be having with the current git driver.

I can see two possible causes for the issues. One the bridge registers
for setting the resolution are not being set correctly, this should
only effect resolutions less then 640x480. Second there could be a
problem with some of the decode routines in microdia-decoder.c

So I'm going to ask that those having these image issues try some of
the following things and report back on this thread. First make sure
you turn on debugging messages which is described here:
http://groups.google.com/group/microdia/web/testing-microdia-driver-draft
(Read the section on debugfs)

Once you have done that start up video streaming using skype and find
out what resolution and format it is using by looking at the debugging
information that is logged to your syslog. This should info should be
part of the last logged VIDIOC_S_FMT call before the VIDIOC_STREAMON
call.

Example:
Aug 24 08:44:16 ubuntu kernel: [247383.736813] Microdia USB Video
Camera: v4l2 ioctl VIDIOC_S_FMT, dir=rw (0xc0cc5605)
Aug 24 08:44:16 ubuntu kernel: [247383.736816] Microdia USB Video
Camera: type=video-cap
Aug 24 08:44:16 ubuntu kernel: [247383.736820] Microdia USB Video
Camera: width=320, height=240, format=YU12, field=interlaced,
bytesperline=0 sizeimage=0, colorspace=0

Now that you have determined the resolution and format information use
the debugfs system to find the current value of the value 6 registers:
0x10fb-0x10ff and 0x1189. Now check to see if they match the following
list of values for the resolution being used and if not set them to
the correct values using debugfs. Register 0x1189 only uses bits 5 and
4 (I'm counting uses 0 as the first bit) so rather then give a
specific value for that register i'll give the values of just those
two bits. so for example if the current value of 1189 is 0x80 and the
resolution being used is 320x240 you would set it to 0x90.

640x480:
0x10fb: 0x00
0x10fc: 0xa0
0x10fd: 0x00
0x10fe: 0xf0
0x10ff: 0x00
0x1189[5:4]: 0 0

320x240:
0x10fb: 0x00
0x10fc: 0x50
0x10fd: 0x00
0x10fe: 0x78
0x10ff: 0x00
0x1189[5:4]: 0 1

160x120:
0x10fb: 0x00
0x10fc: 0x28
0x10fd: 0x00
0x10fe: 0x3c
0x10ff: 0x00
0x1189[5:4]: 1 0

When those values are set correctly hopefully the image will now look
correct. If not it is likely then an issue with the function used to
decode the image for your webcam model.

In replies to this plese make sure you include the following:
webcam model
format and resolution skype is using.
The value of the 6 mentioned registers and if setting them manually to
the specified value fixes things.

QuasiMod

unread,
Aug 25, 2008, 8:44:59 AM8/25/08
to microdia
Hi, i seem to have issue like this.
when i play with mplayer:
mplayer tv:// -tv
noaudio:driver=v4l2:width=320:height=240:outfmt=yuy2:device=/dev/
video0:fps=30
I get green distorted picture, unstable, same in Skype or Ekiga.
with mplayer setting to resolution 640:480 picture is good & clear.

the registers seemed to be like mentioned for 640:480 resolution, wile
using in skype or mplayer 320:240.
After changing registers to numbers mentioned in 320:240, i got at
least stable picture, but still with green lines, double images.
webcam is 0c45:6270
Skype uses 320:240 resolution, could'nt find out format found no lines
stating format in logs (enabled debugging messages).

Sorry if not informative enough, this is my first post in google
groups, just want to get this camera working somehow.

Thanks,
Ugnius, (OS: LinuxMint, Elyssa, 32 bit)

On Aug 24, 2:16 pm, "Brian Johnson" <brij...@gmail.com> wrote:
> OK I'm starting a new thread for the image issues some people seem to
> be having with the current git driver.
>
> I can see two possible causes for the issues. One the bridge registers
> for setting the resolution are not being set correctly, this should
> only effect resolutions less then 640x480. Second there could be a
> problem with some of the decode routines in microdia-decoder.c
>
> So I'm going to ask that those having these image issues try some of
> the following things and report back on this thread. First make sure
> you turn on debugging messages which is described here:http://groups.google.com/group/microdia/web/testing-microdia-driver-d...
> (Read the section on debugfs)
>
> Once you have done that start up video streaming usingskypeand find
> format and resolutionskypeis using.
Message has been deleted

Ryan Reich

unread,
Aug 27, 2008, 9:13:08 PM8/27/08
to microdia
On Aug 24, 9:16 am, "Brian Johnson" <brij...@gmail.com> wrote:
> OK I'm starting a new thread for the image issues some people seem to
> be having with the current git driver.
>
> I can see two possible causes for the issues. One the bridge registers
> for setting the resolution are not being set correctly, this should
> only effect resolutions less then 640x480. Second there could be a
> problem with some of the decode routines in microdia-decoder.c
>
> So I'm going to ask that those having these image issues try some of
> the following things and report back on this thread. First make sure
> you turn on debugging messages which is described here:http://groups.google.com/group/microdia/web/testing-microdia-driver-d...
With the latest driver, Skype gives a flickering image crisscrossed
with green lines and a strangely offset image. My testing data:

Camera model: 0c45:6242 (kernel version 2.6.26-gentoo)
Skype resolution: 320x240

The 0x10f? registers were set as for 640x480, and the 0x1189 was set
to 0x8c (in other words, consistent with 320x240). After changing the
0x10f? registers to the values you supplied for 320x240, the picture
became normal.

The debug information that showed up in syslog was not in the format
you described, so I couldn't find the format. It appears to me that
the lines containing the information you want would be (with log_level
set to 0x1e):

Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 00
Aug 27 21:02:59 [kernel] microdia: VIDIOC_QUERYCAP
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 05
Aug 27 21:02:59 [kernel] microdia: SET FMT 1 : 842093913
Aug 27 21:02:59 [kernel] microdia: TRY FMT 1
Aug 27 21:02:59 [kernel] microdia: Set mode [320x240]
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 15
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 16
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 08
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 09
Aug 27 21:02:59 [kernel] microdia: QUERY BUFFERS 0 4
Aug 27 21:02:59 [kernel] microdia: mmap
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 09
Aug 27 21:02:59 [kernel] microdia: QUERY BUFFERS 1 4
Aug 27 21:02:59 [kernel] microdia: mmap
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 09
Aug 27 21:02:59 [kernel] microdia: QUERY BUFFERS 2 4
Aug 27 21:02:59 [kernel] microdia: mmap
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 09
Aug 27 21:02:59 [kernel] microdia: QUERY BUFFERS 3 4
Aug 27 21:02:59 [kernel] microdia: mmap
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 0F
Aug 27 21:02:59 [kernel] microdia: VIDIOC_QBUF
Aug 27 21:02:59 [kernel] microdia: Queuing buffer 0.
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 0F
Aug 27 21:02:59 [kernel] microdia: VIDIOC_QBUF
Aug 27 21:02:59 [kernel] microdia: Queuing buffer 1.
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 0F
Aug 27 21:02:59 [kernel] microdia: VIDIOC_QBUF
Aug 27 21:02:59 [kernel] microdia: Queuing buffer 2.
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 0F
Aug 27 21:02:59 [kernel] microdia: VIDIOC_QBUF
Aug 27 21:02:59 [kernel] microdia: Queuing buffer 3.
Aug 27 21:02:59 [kernel] microdia: v4l_microdia_ioctl 12
Aug 27 21:02:59 [kernel] microdia: VIDIOC_STREAMON

Perhaps the format is 842093913? Whatever that means.

Ryan Reich

unread,
Aug 27, 2008, 9:19:09 PM8/27/08
to microdia
On Aug 27, 9:13 pm, Ryan Reich <ryan.re...@gmail.com> wrote:
> On Aug 24, 9:16 am, "Brian Johnson" <brij...@gmail.com> wrote:
> >
> > OK I'm starting a new thread for the image issues some people seem to
> > be having with the current git driver.

> With the latest driver, Skype gives a flickering image crisscrossed
> with green lines and a strangely offset image.  My testing data:

For what it's worth, I have found that commit
e640339a002215bb119766811937f2201f1cae25 (the one immediately prior to
that in which you introduced the resolution changes) does not exhibit
this problem.

--
Ryan Reich

QuasiMod

unread,
Aug 28, 2008, 6:33:54 AM8/28/08
to microdia
Update,
It seems that register 0x1189 was 0C when running skype, so as it
should be for 320:240, i've mistaken and set it to 1C, but still with
0C, 1C, 14 or 04 in that register (changing values makes no big
difference in image), image is still with green lines, but at least i
can recognize myself in a picture it's not jumping and flickering.

On Aug 24, 2:16 pm, "Brian Johnson" <brij...@gmail.com> wrote:
> OK I'm starting a new thread for the image issues some people seem to
> be having with the current git driver.
>
> I can see two possible causes for the issues. One the bridge registers
> for setting the resolution are not being set correctly, this should
> only effect resolutions less then 640x480. Second there could be a
> problem with some of the decode routines in microdia-decoder.c
>
> So I'm going to ask that those having these image issues try some of
> the following things and report back on this thread. First make sure
> you turn on debugging messages which is described here:http://groups.google.com/group/microdia/web/testing-microdia-driver-d...

JoJo jojo

unread,
Aug 31, 2008, 10:12:45 AM8/31/08
to micr...@googlegroups.com
627b not scaling to 320x240,

I removed all 10fb - 10ff writes from 627b start_stream,
I moved 1189 writes from 627b start_stream to 627b_init

I get a stable image, but still some issues with scaling.(see attached
screenshot).

The Bridge Dump

0x10F0 0F FD 0F FF 00 00 40 09 10 00 C2 00 50 00 78 00
0x1180 01 00 01 00 28 3C 0E 00 86 10 04 0C 1F 1F 1F 1F

Entire bridge dump.
0x1000 38 84 18 03 02 45 40 60 02 FF 41 00 00 00 00 00
0x1010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7C 21
0x1020 26 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1040 A4 79 40 1D 1E 1F 00 00 00 00 00 00 00 00 00 00
0x1050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1060 03 03 00 00 10 00 00 D0 A6 7C 53 29 00 01 20 00
0x1070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10C0 A4 21 00 00 00 00 00 00 23 00 00 00 00 00 00 00
0x10D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10E0 4B 13 00 26 00 07 00 F6 0F D2 0F 38 00 34 00 CF
0x10F0 0F FD 0F FF 00 00 40 09 10 00 C2 00 50 00 78 00
0x1100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1180 01 00 01 00 28 3C 0E 00 86 10 04 0C 1F 1F 1F 1F
0x1190 0A 37 4C 5D 68 75 82 8E 9B A6 B2 BE CA D6 E4 EC
0x11A0 F5 00 08 00 28 01 00 00 02 08 00 05 00 82 11 00
0x11B0 01 03 00 0E 00 00 00 00 B8 04 0B 00 00 03 04 03
0x11C0 00 11 40 04 80 04 00 00 40 44 02 08 08 00 00 90
0x11D0 89 00 01 01 00 00 00 80 00 40 80 E0 00 04 40 02
0x11E0 08 03 02 A0 00 80 00 01 05 22 00 30 00 80 00 02
0x11F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x1189 seems to be some kind of ZOOM, to me it seems to magnify a
portion of the image

-JoJo

Screenshot-MPlayer-320x240.png

JoJo jojo

unread,
Aug 31, 2008, 10:29:27 AM8/31/08
to micr...@googlegroups.com
At the following Resolution 160x120

I get a stable/clear image, but there's some corruption at the bottom.
I guess you were right, this could be an issue with the stream decoder.

The Bridge Dump

0x10F0 0F FD 0F FF 00 00 5F 09 10 00 C2 00 28 00 3C 00
0x1180 01 00 01 00 28 3C 0E 00 86 20 04 0C 1F 1F 1F 1F

0x1000 38 84 18 03 02 45 40 60 02 FF 41 00 00 00 00 00
0x1010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7C 21
0x1020 26 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1040 A4 79 40 1D 1E 1F 00 00 00 00 00 00 00 00 00 00
0x1050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1060 03 03 00 00 10 00 00 D0 A6 7C 53 29 00 01 20 00
0x1070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10C0 A4 21 00 00 00 00 00 00 23 00 00 00 00 00 00 00
0x10D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10E0 4B 13 00 26 00 07 00 F6 0F D2 0F 38 00 34 00 CF

0x10F0 0F FD 0F FF 00 00 5F 09 10 00 C2 00 28 00 3C 00


0x1100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x1180 01 00 01 00 28 3C 0E 00 86 20 04 0C 1F 1F 1F 1F


0x1190 0A 37 4C 5D 68 75 82 8E 9B A6 B2 BE CA D6 E4 EC
0x11A0 F5 00 08 00 28 01 00 00 02 08 00 05 00 82 11 00

0x11B0 01 03 00 0E 00 00 00 00 B8 0C 0B 00 00 03 04 03


0x11C0 00 11 40 04 80 04 00 00 40 44 02 08 08 00 00 90
0x11D0 89 00 01 01 00 00 00 80 00 40 80 E0 00 04 40 02
0x11E0 08 03 02 A0 00 80 00 01 05 22 00 30 00 80 00 02
0x11F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

-JoJo

Screenshot-Mplayer-160x120.png
Reply all
Reply to author
Forward
0 new messages