[XviD-devel] basic gmc decoding

peter ross xvid-devel@xvid.org
Mon, 04 Nov 2002 21:21:02 +1100


>From: Christoph Lampert <chl@math.uni-bonn.de>

>Great! If it also handles two warp points when second point is (0,0)
>(as done by DivX5 and my XVID encoding) then it should be sufficient for
>a while.

the second point is simply ignored. it decodes xvid and divx502 gmc
bitstreams.

> > michaeln, ive borrowed your trajectory value code. for encoding,
> > christoph has used a rather large lookup table, but your method is
> > much more elegant.
> > if ((x >> (length - 1)) == 0) /* if MSB not set it is negative*/
> >      x = - (x ^ ((1 << length) - 1));
>
>Yes, for decoding this is easy (because length is known). For encoding I
>would have had to use a longer if-table to check for bounds of intervals
>and I thought a table would be the easiest way.
>
>Maybe it can be done easier, I never tried to do VLC before.
>
>gruel
>
>P.S. Btw. there is are two lookup tables with 512K entries in vlc_codes.h
>Are those really used?

iam not sure, since i really dont know much about the vlc stuff.
it would be great if we had a simplified (generic) vlc reader/writer
engine.

for sprite trajectory length reading, ive used a very simple vlc loop
check.m it could be done faster using autogenerated lookup tables.

-- pete

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963