Page 1 of 1

RGB using vmem

Posted: 10 May 2011 01:52
by olga.krupina
I am trying to use vmem to show the video. For both versions: 1.1.1++ and 1.0.* it seems to work, with the changes that the older versions used the options for vmem, and the current versions use the function libvlc_video_set_callbacks and libvlc_video_set_format.
The only problem that I am facing is that the new version gives me the data in BGR instead of RGB (from my understanding) since the blue colors are shown in red. The previous versions(1.0*) show the video right. Again, I am just following the example (using same RV16) http://wiki.videolan.org/LibVLC_SampleCode_SDL.
Any explanations? Thanks.

Re: RGB using vmem

Posted: 10 May 2011 09:08
by RĂ©mi Denis-Courmont
The bit mask orders set in the vmem output have not changed since the plugin has been created (2008). For some reasons, that's RGB for RV24 and RV32, BGR for RV15 and RV16. That's host byte order, so it's actually reversed on little-endian.

But point is, they should be the same in all versions.

Re: RGB using vmem

Posted: 11 May 2011 00:31
by olga.krupina
Yes, I see that from the source code, but I do not understand why the output is reverted for the older versions(tested on both Linux and Windows).