[MPlayer-dev-eng] Re: [Mplayer-cvslog] CVS: main/libmpcodecs vd_qtrpza.c,1.1,1.2

Roberto Togni rtogni at bresciaonline.it
Wed Mar 6 23:21:28 CET 2002


On 2002.03.06 22:47 Arpi wrote:
> Hi,
> 
> > > -	((mpi->imgfmt&255)+7)/8);
> > > +	mpi->bpp/8);
> > I think it can give problems with BGR15 modes: 15/8 = 1, while BGR15
> 
> > takes 2 bytes.
> > It should be (mpi->bpp+7)/8. Probably adding 1 would be enough, but
> 7
> > is worst case.
> 
> RTFS :)
ops...

> mpi->bpp is already rounded up value... so it's 16 for 15bpp modes.
> it's the number of bits allocated in memory for a single pixel.
> as in 15bpp modes a pixel uses 16 bits of memory it's 16.
> it's always n*8 for packed (RGB/YUV) modes, and it's 12 for planar yuv
> 4:2:0
> 
While looking at it I found a bug in rpza: it assumes 2 bytes per pixel 
== BGR15. It works now, since BGR16 is not listed in codecs.conf (it 
supports BGR32,24,15), but I'll have to fix it when new output mode 
selection code is in place.

> 
> A'rpi / Astral & ESP-team
> 
Ciao,
  Roberto



More information about the MPlayer-dev-eng mailing list