[XviD-devel] BFRAMES
elcabesa
elcabesa at inwind.it
Mon Jun 16 15:21:49 CEST 2003
> 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
thank you
i found it in code and look them
while i was waiting for a reply i hacked a little xvid code and found
something i can't undertand
before explain what i don't understan i need some help
MODE_FORWARD or MODE_BACKWARD are one direction prediction
MODE INPTERPOLATE is 2 direction prediction frame i = (frame i-1 + frame
i+1)/2
am i right??
what is MODE_DIRECT?
now this is the result i found in a 140 s encode
70855 mblock encoded as b (20MacroBlock /frame is tipe B) (image size
640*272 -> 40*17 macroblock = 640) (only 3% of mb are B block)
32 MB of type MODE_INTERPOLATE (only 0.045%)
12960 of type MODE FORWARD (18%)
6409 of type MODE_BACKWARD (9%)
and
51451 of type MODE_DIRECT (72.5%)
isn't mode direct to used?? and mode_interpolate not too used..
another question thast came to my mind now
somedays ago i was talking with gomgom and he told me that using
DIVX_compatiblity you have not bframe problem couse it add p frames before
each I frame
but a good working b frame should notice (NOTICE ==found a high SAD) that
using the I frame (scene change) for B frame prediction is not good and use
only n-1 frame for his prediciton changing it to MODE_FORWARD OR BACKWARD ..
i don't know the right one
this is what i mena
PBBI
1234
frame 4 should be tipe b but refer only to frame 1 , or almost all his MB
should refer only to frame 1 and not to frame 4
am i totally wrong??
More information about the XviD-devel
mailing list