[Ffmpeg-devel] [PATCH] V.Flash PTX decoder

Ivo ivop
Sat Apr 28 22:42:32 CEST 2007


On Saturday 28 April 2007 19:41, Mike Melanson wrote:
> Ivo wrote:
> > non-zero bytes might refer to the colorspace or some yet unknown flags.
> > I need more samples.
>
> Nice work. All of the PTX files from the game are now zip'd up in
> spider-man-ptx.zip (42 files):
>
>    http://samples.mplayerhq.hu/game-formats/vdisc/

Thanks!

I have ran them all through my decoder and they all decode fine. They are 
all of similary size (1024x128) and therefore the headers are mostly 
identical. In some cases the last two to four bytes of the header are 
different and I suspect those to be foreground/background colours or 
something. I have no idea if that makes sense in the context in which the 
images/textures are used in the game though :)

As for the 1-bit alpha channel, I think we should just drop it for now (i.e. 
handle the image data as plain RGB555) until there is a more flexible 
pix_fmt system which will make it trivial to add something like ARGB555.

http://ivop.free.fr/ptx/mask.png
http://ivop.free.fr/ptx/alpha_on_black_bg.png
http://ivop.free.fr/ptx/no_alpha.png

no_alpha looks best imho.

I did find another field in the header. Don't know why I overlooked it at 
first. It contains the number of bits per pixel (0x10). BTW I will open a 
new page at the multimedia wiki describing the format.

--Ivo




More information about the ffmpeg-devel mailing list