[Scummvm-devel] DXA file format for videos

Gregory Montoir cyx at users.sourceforge.net
Sat Apr 29 08:34:02 CEST 2006


Max Horn wrote:
> 
> Am 29.04.2006 um 17:03 schrieb Eugene Sandulenko:
> 
>> On Sat, 29 Apr 2006 15:21:20 +0200
>> Gregory Montoir <cyx at users.sourceforge.net> wrote:
>>
>>> The files produced with the encode_dxa tool in the SVN repository
>>> doesn't seem to allow that, though. It seems it encodes the first
>>> frame as an intra frame and the others frames as difference.
>>
>> It's just the matter of adding couple lines of code, something like
>> this:
>>
>> instead of
>>
>>           if (_framecount == 0)
>>             compType = 2;
>>         else
>>             compType = 3;
>>
>> write
>>
>>         if (_framecount % 120 == 0)
>>             compType = 2;
>>         else
>>             compType = 3;
>>
>> That will make a keyframe each 120 frames. compType 2 is a keyframe  and
>> compType 3 is a XOR frame.
> 
> Since we don't really need to do seeking, another approach might be  
> interesting, too: For each frame, compute both the result of encoding  
> it as an inter AND as an intra frame. Then use whichever is smaller.

And that's probably how the original encoder did it as well. If you look
at some .dxa files, there's often a bunch of intra frames following each
other in the stream.

Gregory




More information about the Scummvm-devel mailing list