[XviD-devel] BFRAMES
Radek Czyz
radoslaw at syskin.cjb.net
Mon Jun 16 22:07:47 CEST 2003
Hello,
elcabesa wrote:
> i'm looking inside code but i can't understand how XVID choose between
> BFRAMES encoding type
> i doesn't understand how it choose how to code a b-frame mblock.. how it
> chhose between MODE_DIRECT MODE_FORWARD MODE_BACKWARD or MODE INTERPOLATE
> can you help me find it??
Sure :)
It's being done after each motion search step - in the last lines of
SearchBF() and SearchInterpolate(). The code compares the best SAD
found in current search against "best_sad" variable. If "bast_sad" is
higher (== worse), it updates MACROBLOCK information with new data
(new mode, motion vectors etc), and also updates best_sad with new
value.
If best_sad was better, nothing happens.
SearchDirect() is first, so we don't do this, it just updates the
macroblock info with "direct" mode.
Regards,
Radek
More information about the XviD-devel
mailing list