[XviD-devel] rescricted SKIP mode for P-VOP after B-VOP

Christoph Lampert xvid-devel@xvid.org
Thu, 25 Jul 2002 09:51:25 +0200 (CEST)


Hi,

because of the B-frame SKIP-flaw in MPEG-4, we will have to modify 
current algorith for P-frames, too :-( 
Before a INTER mb with cbp==0, mv==zeroMV etc. can be marked as 
"SKIP", the co-located block in previous B-frames (in playing order) 
must be checked, if the are close enough to be skipped, too. 
That's only one SAD calculation per B-frame, but the problem is
that at the moment, P-frame routines don't care if there are B-frames
at all and don't get image pointers for them. 

Maybe someone who knows the ENCODER structure well enough can patch a
small check into xvidcore/bitstream/mbcoding.c: MBCoding()  

Something like 

  for all B-frames between current P and previous P: 
    if SAD(curr-MB,Bframe-co-located-MB) > THRESHSHOLD
	{ goto don't skip }
  endfor 

skip:
  skip block
  return;

don't skip:
  ...

This is of course only needed if the P-block is supposed to be skipped
at all. 

gruel

-- 
Christoph H. Lampert chl@math.uni-bonn.de | Diese Signature wurde maschi-     
Beringstr. 6, Raum 14 Tel. (0228) 73-2948 | nell erstellt und bedarf
Sprechstunden: keine, aber meistens da    | keiner Unterschrift. AZ 27B-6