RGB using vmem

This forum is about all development around libVLC.
olga.krupina
Blank Cone
Blank Cone
Posts: 21
Joined: 10 May 2011 00:42

RGB using vmem

Postby olga.krupina » 10 May 2011 01:52

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15229
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: RGB using vmem

Postby Rémi Denis-Courmont » 10 May 2011 09:08

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

olga.krupina
Blank Cone
Blank Cone
Posts: 21
Joined: 10 May 2011 00:42

Re: RGB using vmem

Postby olga.krupina » 11 May 2011 00:31

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).


Return to “Development around libVLC”

Who is online

Users browsing this forum: Bing [Bot] and 11 guests