[XviD-devel] Translation or Affine Transform?

Christoph Lampert xvid-devel@xvid.org
Tue, 19 Nov 2002 11:08:50 +0100 (CET)


Hi,

On Tue, 19 Nov 2002, James Hauxwell wrote:
> I was looking through the encoder CVS to see what had been implemented
> for GMC.  I noticed that no_of_sprite_warping_points in the video object
> layer contained the value '2' which signifies Affine transform.  If my
> interpretation of the code is correct the GMC implementation only finds
> a translation at the moment, so why mark the stream as having 2 warping
> points rather than 1.

Compatability with DivX5 which always uses 2 warping points, where second
point is (0,0). 
XVID should get support for 4-parameter GMC in near future, then both
values will be used. 

> On a similar note in the code bitstream.c there is a function
> BitstreamWriteVopHeader()  which pushes the sprite trajectory.  From the
> code it looks like it will always push 4 codes, as there are some odd if
> conditionals if(1) and if(2).  Are these intentional?

Yes and no. As you might have noticed, it's just a "hack" for
compatability. A final version would of course when what kind of movement
is used (static/translational/4-param/affine) and write the header
accordingly. 
But since we don't have really efficient GMC yet, it's just for
development anyway, and then it's easier to have as many decoders as
possible for testing. 

gruel