Bug 140528 - Video palette conversion error with pwc webcam
Summary: Video palette conversion error with pwc webcam
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: Audio/Video Plugin (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-24 05:38 UTC by Chuan-kai Lin
Modified: 2007-06-09 03:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch for palette conversion error (2.20 KB, patch)
2007-01-24 05:39 UTC, Chuan-kai Lin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chuan-kai Lin 2007-01-24 05:38:07 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

Kopete (latest KDE 3.5 SVN version) does not work with my Philips SPC-900NC webcam using the pwc driver.  The preview in the configuration window shows a black rectangle instead of images taken from the webcam.  I tracked the problem down to incorrect constant conversion in the avdevice library, and the attached patch fixes the problem.
Comment 1 Chuan-kai Lin 2007-01-24 05:39:04 UTC
Created attachment 19393 [details]
Patch for palette conversion error
Comment 2 Matt Rogers 2007-01-25 05:40:07 UTC
Thanks! Nice patch. :)

Can somebody from the kopete-devel team commit this? I don't have enough working hardware to be able to ATM. It needs to go into the 3.5 branch and trunk.
Comment 3 Werner Hartnagel 2007-03-11 18:18:08 UTC
I did apply the patch to svn but it didn't help :(
I have still a black screen with my Phillips Vesta Pro Webcam using pwc driver snapshot. Kopete with pwc Webcam Driver is already broken since many years, there's something wrong with the initialization - because i can count over 10 application working fine with pwc it looks like the a Kopete Bug. I haven't the skills to track down the Bug and submit a patch but i can provide testing.

Comment 4 Giacomo Lozito 2007-04-19 17:07:37 UTC
The patch worked for me, even if I had to apply it manually since libkopete/avdevice/videodevice.cpp from kopete 0.12.4 is a bit different.
Other people has been having this bug, for more information see:
http://bugs.kde.org/show_bug.cgi?id=143376
(and if you google a bit, you'll find other people asking about the issue in web boards and such).
Comment 5 Guillaume Duveau 2007-05-11 11:14:11 UTC
Chuan-kai's patch seems to resolve this bug and also this one : https://bugs.kde.org/show_bug.cgi?id=143376

I suggest to stop reporting this bug, use the other one (it already has 140 vote, this one 60 and it's best not to vote for the 2 bugs as it seems to be the same).
Comment 6 Jonas Kvinge 2007-05-21 20:59:07 UTC
Kopete does not work with cams using the R5U870 driver either, please see: http://lsb.blogdns.net/ry5u870/ . I also tested Kopete with a Creative NX, and it had the same problems as the Logitech cam.
Comment 7 Guillaume Duveau 2007-06-01 00:49:07 UTC
I applied Chuan-kai's patch and I compiled, now Kopete 0.12.4 from KDE 3.5.6 works very well with my Quickcam Zoom on my Ubuntu Feisty box (i386). Here's a .deb : http://guillaume.duveau.free.fr/public/f/deb/kopete_3.5.6-0ubuntu9_i386.deb

Could the Kopete developpers apply this patch to the code if it doesn't break any other things ?
Comment 8 Matt Rogers 2007-06-09 03:28:02 UTC
SVN commit 673109 by mattr:

fix bugs 140528 and 143376.

BUGS: 140528, 143376



 M  +4 -2      videodevice.cpp  


--- branches/KDE/3.5/kdenetwork/kopete/libkopete/avdevice/videodevice.cpp #673108:673109
@@ -1604,7 +1604,8 @@
 				case VIDEO_PALETTE_RGB32	: return PIXELFORMAT_RGB32;	break;
 				case VIDEO_PALETTE_YUYV		: return PIXELFORMAT_YUYV;	break;
 				case VIDEO_PALETTE_UYVY		: return PIXELFORMAT_UYVY;	break;
-				case VIDEO_PALETTE_YUV420	: return PIXELFORMAT_YUV420P;	break;
+				case VIDEO_PALETTE_YUV420	:
+				case VIDEO_PALETTE_YUV420P	: return PIXELFORMAT_YUV420P;	break;
 				case VIDEO_PALETTE_YUV422P	: return PIXELFORMAT_YUV422P;	break;
 			}
 			break;
@@ -1758,7 +1759,8 @@
 				case VIDEO_PALETTE_RGB32	: returnvalue = pixelFormatName(PIXELFORMAT_RGB32);	break;
 				case VIDEO_PALETTE_YUYV		: returnvalue = pixelFormatName(PIXELFORMAT_YUYV);	break;
 				case VIDEO_PALETTE_UYVY		: returnvalue = pixelFormatName(PIXELFORMAT_UYVY);	break;
-				case VIDEO_PALETTE_YUV420	: returnvalue = pixelFormatName(PIXELFORMAT_YUV420P);	break;
+				case VIDEO_PALETTE_YUV420	:
+				case VIDEO_PALETTE_YUV420P	: returnvalue = pixelFormatName(PIXELFORMAT_YUV420P);	break;
 				case VIDEO_PALETTE_YUV422P	: returnvalue = pixelFormatName(PIXELFORMAT_YUV422P);	break;
 			}
 			break;