[MPlayer-dev-eng] [RFC][PATCH v2] Add support for 12-bit color?mode.
Diego Biurrun
diego at biurrun.de
Sat Apr 3 17:02:19 CEST 2010
On Sat, Apr 03, 2010 at 04:55:10PM +0200, Janusz Krzysztofik wrote:
> Saturday 03 April 2010 10:54:54 Diego Biurrun wrote:
> > On Fri, Mar 19, 2010 at 01:52:42AM +0100, Janusz Krzysztofik wrote:
> > > The patch extends mplayer with RGB12 aka RGB444 pixel format handling.
> > > It works for me with fbdev and fbdev2, selecting required color
> > > conversion filters automatically. It also works with directfb when
> > > provided with "-vf format=bgr12" option. I wasn't able to get correct
> > > results using sdl, neither with qtopia (incorrect collors) nor fbcon (not
> > > working at all) drivers. I haven't tested the x11 output driver
> > > modifications.
> >
> > If you give detailed testing instructions, perhaps somebody else can.
>
> First, you need a hardware that supports 12-bit graphics mode, I guess. I'm
> not aware of any such machines/graphics adapters except for Amstrad E3
> (Delta), but I may be wrong.
OK, I thought I might be able to help you out with testing, never mind.
> > > --- trunk.orig/libvo/osd.c 2010-02-26 02:40:23.000000000 +0100
> > > +++ trunk/libvo/osd.c 2010-03-19 01:01:29.000000000 +0100
> > > @@ -329,6 +329,38 @@ void vo_draw_alpha_init(void){
> > >
> > > +void vo_draw_alpha_rgb12(int w,int h, unsigned char* src, unsigned char
> > > *srca, int srcstride, unsigned char* dstbase,int dststride){
> > > +}
> > > +
> > > void vo_draw_alpha_rgb15(int w,int h, unsigned char* src, unsigned char
> > > *srca, int srcstride, unsigned char* dstbase,int dststride){
> >
> > vo_draw_alpha_rgb12() looks very similar to vo_draw_alpha_rgb15() and
> > vo_draw_alpha_rgb16(). Ideally this should be refactored in some way.
>
> Sounds like better being addressed by a separate patch. Can I revisit it
> later, when finished with this one?
Yes.
> > > --- trunk.orig/libvo/vo_fbdev.c 2010-03-18 21:43:44.000000000 +0100
> > > +++ trunk/libvo/vo_fbdev.c 2010-03-19 01:01:29.000000000 +0100
> > > @@ -521,6 +521,13 @@ static void set_bpp(struct fb_var_screen
> > > p->green.offset = 5;
> > > p->blue.length = 5;
> > > break;
> > > + case 12:
> > > + p->red.offset = 8;
> > > + p->green.length = 4;
> > > + p->red.length = 4;
> > > + p->green.offset = 4;
> > > + p->blue.length = 4;
> > > + break;
> >
> > Please keep the = vertically aligned like the surrounding code does.
>
> OK.
Umm, you did not change your patch..
>
> > > @@ -700,7 +707,7 @@ static int fb_preinit(int reset)
> > >
> > > if (vo_dbpp) {
> > > - if (vo_dbpp != 15 && vo_dbpp != 16 && vo_dbpp != 24 && vo_dbpp
> > > != 32) { + if (vo_dbpp != 12 && vo_dbpp != 15 && vo_dbpp != 16 &&
> > > vo_dbpp != 24 && vo_dbpp != 32) {
> >
> > Please break overly long lines.
>
> OK.
same here
Diego
More information about the MPlayer-dev-eng
mailing list