[vlc-devel] [PATCH] swscale: Fix pixel format for VLC_CODEC_RGBA

Florian Albrechtskirchinger falbrechtskirchinger at gmail.com
Thu Dec 20 23:02:06 CET 2012


On 12/20/2012 09:14 PM, Rémi Denis-Courmont wrote:
 > I would love to see a patch to separating RGB and BGR codecs, and
 > then eliminating the masks from video formats. But I am not
 > volunteering to write it.
How about taking it one step at a time:
1) Rename all occurrences of VLC_CODEC_RGB(8|15|16|24|32) to 
VLC_CODEC_RGB(8|15|16|24|32)_OLD.
2) Introduce mask-less VLC_CODEC_RGB(15|16|24|32), 
VLC_CODEC_BGR(15|16|24|32).
3) Gradually port the existing code over to the new codecs.
4) Remove the old codecs.

What about the FourCCs? Are RV24, RV32, etc. globally used or are they 
VLC-internal? Assuming they are internal and can be renamed without 
consequence, here's a simple idea: RGB4 = 32bit, RGB3 = 24bit, RGB2 = 
16bit, RGB1 = 15bit; BGR analogous.

RGB8 = GREY?

VLC_CODEC_RGBA16 should be removed.
 > $ grep -r VLC_CODEC_RGBA16 .
 > ./include/vlc_fourcc.h:#define VLC_CODEC_RGBA16 
VLC_FOURCC('A','V','1','6')
 > ./modules/video_output/xcb/xvideo.c:                    return 
VLC_CODEC_RGBA16;
 > ./src/misc/fourcc.c:    B(VLC_CODEC_RGBA16, "16 bits RGBA"),
 > ./src/misc/fourcc.c:        VLC_CODEC_RGBA16, 0 },

Does that sound doable/reasonable to you?
I'd be willing to complete steps 1) and 2) and start step 3) to the 
extent I'm immediately concerned with, i.e. XCB screen capture and 
related code paths. I might contribute more to this end in the future, 
starting with V4L2, but I'm not promising anything.

Florian




More information about the vlc-devel mailing list