[MPlayer-dev-eng] What is the format of 4bpp? (postproc/yuv2rgb

Michael Niedermayer michaelni at gmx.at
Thu Jan 30 02:39:57 CET 2003


Hi

On Thursday 30 January 2003 01:07, Arpi wrote:
> Hi,
>
> > of being messy hack ...
> > but if we have to choose simplicity+performance vs. nice code, i vote for
> > the former. so take BGR7
> >
> > we could also try things like ('BGR'<<8)|(8|128) (use the most sign. bit
> > as a flag) but it may cause trouble for if(BGR_DEPTH(fmt)<24) type
> > checks. hmm, maybe not, if we change BGR_DEPTH macro...
>
> yes it's definitly a good idea :)
>
> ('BGR'<<8)|(4|128)
> ->
> #define IMGFMT_RGB4  (IMGFMT_RGB|4)
> #define IMGFMT_RG4B  (IMGFMT_RGB|4|128)
> #define IMGFMT_RGB1  (IMGFMT_RGB|1)
> #define IMGFMT_RG1B  (IMGFMT_RGB|1|128)
>
> and change depth macros to:
> #define IMGFMT_RGB_DEPTH(fmt) ((fmt)&0x3F)
>
> so we saved bits 6 and 7 for special purposes.
ok, done, patch attached (i dont really know enough about libmpcodecs to dare 
to commit it during a code freeze ...)

btw the 2 pixel per byte modes are untested 

[...]

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgb4-patch
Type: text/x-diff
Size: 11952 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030130/a8917ffd/attachment.diff>


More information about the MPlayer-dev-eng mailing list