[GEM-dev] [pix_video]: issue with swapped colors

Roman Haefeli reduzierer at yahoo.de
Thu May 10 01:21:45 CEST 2007


On Wed, 2007-05-09 at 19:58 +0200, IOhannes m zmoelnig wrote:
> Roman Haefeli wrote:
> > On Wed, 2007-05-09 at 09:01 +0200, IOhannes m zmoelnig wrote:
> > 
> >>> is it possible to _slightly_ change the source code of [pix_video], so
> >>> that R- and G-subpixels are swapped?
> >> the change is trivial and has been done a lot of times, until it was
> >> confirmed that it is just the detection of the device's colorspace that
> >> is wrong.
> > 
> > if it is only one line, can you tell me what i have to change? it was
> > only meant to have it different locally, not to be changed in the gem
> > source code.
> 
> 
> several ways:
> the most efficient would be to decode the video correctly directly;
> i don't know exactly which colorspace gets detected by Gem for your
> device, but try changing one (or all) of the following:
> videoV4L.cpp:158 change to fromYUV420P() to fromYU12()
> videoV4L.cpp:160 change to fromBGR() to fromRGB()
> videoV4L.cpp:161 change to fromBGRA() to fromRGBA()
> videoV4L.cpp:162 change fromYVYU() to fromYUY2()

i'll try these

> OR
> 
> another way (less efficient, and wrong if matju is right):
> videoV4L.cpp:173: add "m_image.image.swapRedBlue();"
> 
> > 
> > sorry for the confusion, i didn't meant it as a feature request or as
> > something you you ae asked to implement in gem. i am not a c coder nor
> > did i write an external for pd yet, but i hoped, i could copy the file
> > pix_video.c to pix_videoLOCAL.c, which is slightly modified, so that i
> > have two [pix_video] objects on (only) my box. if it's only the work of
> > changing some strings from pix_video  to pix_videoLOCAL o similar, i'd
> > like to do it, but i don't know, if adding a new object to gem is that
> > simple. 
> 
> adding a new object to gem is as simple as putting a .cpp file into one
> of the directories; configure/make will automatically add this to the
> build-system; voila

good to know that. i thought first, i need to modify the file
pix_videoLINUX.cpp, so that i could have both, the orignal and the
modified [pix_video], but since videoV4L.cpp is modified, it wouldn't
make sense to have two different [pix_video]s, right?

thank you very much for your help

roman




	
		
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de





More information about the GEM-dev mailing list