[FFmpeg-devel] [PATCH] TXD demuxer and decoder

Ivo ivop
Fri May 4 17:32:10 CEST 2007


The following patch implements a demuxer and decoder for .txd files, used by 
various games that use the Renderware engine, like Grand Theft Auto. See 
http://wiki.multimedia.cx/index.php?title=TXD for details.

I decided to place the S3TC decoding functions in a separate file as they 
are pretty generic and used in other (Microsoft) formats too, like 
DirectShow Surfaces. This way they can easily be re-used in the future.

Currently, the code demuxes and decodes all GTA:SA files I have tested 
correctly, except for one problem with mid-stream dimension changes which I 
described here:

Message-Id: <200705040110.13009.ivop at euronet.nl>
Subject: [FFmpeg-devel] Multiple frame dimensions in a single stream

I have traced the problem back to ffmpeg.c which sets the output 
AVCodecContext parameters once at the beginning, based on the input 
context, which is based on the first frame in the TXD case. It does not 
handle changes of the input context. Fixing that is non-trivial because of 
potential padding/cropping/scaling of the frames and is also outside the 
scope of this patch. But I will look into it as it affects other codecs 
that support multiple dimensions in one stream as well.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: txd.patch
Type: text/x-diff
Size: 18063 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070504/77cef41f/attachment.patch>

More information about the ffmpeg-devel mailing list