[XviD-devel] Fcode

Radek Czyz syskin at ihug.com.au
Wed Oct 29 21:16:49 CET 2003


Hey :)

GomGom wrote:
> sysKin may be happy to know he introduced a bug even when trying to do
> CodingStyle changes</private joke> :-))))

Indeed, I am NOT surprised at all. Just recently I wrote a simple
4-line code that had like 15 bugs in it, took me 3 days to debug.

Now, about this code: It keeps track of the highest motion range used
in ME and lowers fcode if it can be lowered. Sure, the motion info is
no longer 'R-D optimal' or anything, but it's still better to lower it
than not lower it.
This happens very rarely in p-frames (ME will use any range it's
given, even if there is not such motion) except for cartoons, which
often have (one-frame-moves)->(one frame doesn't)->(and again).
I also use it to lower fcodes in bframes and it works quite well
there. 

Now, I have some questions. I hope you can answer them.
1. (@gruel probably) fcode seems to be used in GME, but I'm not sure
how. Does it limit warp range? Do I have to check warp info before I
can say that we can encode a frame with lower fcode after all?

2. we are guessing the correct fcode by calculating RMS of *coded*
vectors in a frame. Question is, why coded (real - pred)?? Fcode
limits the *real* vector range. Current result is that if there is a
fast panning, fcode gets lowered (because vectors equal to prediction)
while if there is a lot of small random movement, fcode is set higher.
All this doesn't really matter much, fcode has very small effect on
compression at medium and higher bitrates.

3. Why fcode can't be 1 with qpel?? It works very well, and 1 is often
used if given a chance.


I wrote some new fcode stuff, but it's another piece of code waiting
for after-1.0 xvid :)


Ragards,
Radek



More information about the XviD-devel mailing list