[MPlayer-dev-eng] [PATCH] tga loader for libmpcodecs

Tilman Sauerbeck tsauerbeck at users.sourceforge.net
Fri Sep 13 18:09:27 CEST 2002


On Tue, 10 Sep 2002 23:02:16 +0200 Arpi <arpi at thot.banki.hu> wrote:

> anyway, you've added BGR24 to codecs.conf too, but your code doesn't seem to
> support 24bpp output:
>
>                     *final++ = chans.a = (info.bpp == 32) ? *data++ : 255;
> 
> the 4th write to final[] should not be done if mpi->bpp==24
> for now i've removed BGR24 from codecs.conf.
> 
> anyway the code could be optimized a lot, by doing memcpy() for the cases
> when input and output bpp matches.

Alright, I speeded up the code. I switched back to BGR, so I can directly copy input to output. However, I still don't know how to really set the format of the output data. I implemented the VDCTRL_QUERY_FORMAT stuff in control().

If I understand that correctly, VDCTRL_QUERY_FORMAT gives information about the supported formats... So I return CONTROL_TRUE when the tga decoder is queried for IMGFMT_BGR24 or IMGFMT_BGR32. Basically, I just want to use BGR24 for 24bpp TGA files and BGR32 for 32bpp TGA files at the moment (that way I can decode quite fast). Is it possible to do so?

Regards,
Tilman



More information about the MPlayer-dev-eng mailing list