Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] patch OSD color on linuxppc



Jean Martin writes:
 > --- dvb.c	Sat Apr 13 00:01:13 2002
 > +++ dvbmodppc.c	Sat Apr 13 00:01:04 2002
 > 
 > @@ -1899,9 +1899,15 @@
 >                  if (copy_from_user(colors, dc->data, sizeof(colors)))
 >                          return -EFAULT;
 >                  for (i=0; i<len; i++)
 > -                        OSDSetColor(dvb, dc->color+i,
 > +#ifndef __powerpc__
 > +                       OSDSetColor(dvb, dc->color+i,
 >                                      colors[i*4]  , colors[i*4+1],
 >                                      colors[i*4+2], colors[i*4+3]);
 > +#else
 > +                       OSDSetColor(dvb, dc->color+i,
 > +                                    colors[i*4+3]  ,colors[i*4+2],
 > +                                    colors[i*4+1], colors[i*4+0]);
 > +#endif
 >                  return 0;
 >          }
 >          case OSD_SetTrans:


No, this only seems to be necessary because VDR treats the palette as an array 
of u32 (or enums to be specific) but it is defined as an array of u8. 
VDR uses enum entries with ABGR ABGR ... which translate to 
R G B A R G B A ... on little-endian but A B G R A B G R ...
on big-endian when casting u32* to u8*. It should use u8 arrays 
with the right order instead.


Ralph 




-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.


Home | Main Index | Thread Index