[XviD-devel] [RFC] kthresholding in 2pass2

Edouard Gomez ed.gomez at free.fr
Mon Dec 1 19:15:27 CET 2003

Christoph Lampert (chl at math.uni-bonn.de) wrote:
> When do such IIIII or IPIPPIPP sequences occur? Is it a "missing feature",
> because XviD detects scenechanges where there isn't one? Or is the image
> content really changing that much and often? 

It's always happening in flashing  situations. Trailers are good at that
as Hollywood uses to do <1s shots of different movie parts to stress the
audience and give a higher rhythm at their Trailer.

However the  first example i  gave is completly theoretical,  the second
one can happen in real cases.

> The only  occurance I found  was a TV  series where from time  to time
> there  were  short shots  with  every  alternate  frame _inverted_  to
> express some telekinetic action that wouldn't have been noticed by the
> viewer  (100  points  to who  can  tell  me  the  series and  who  the
> character/actress  with  telekinetic powers  was,  together with  what
> famous NBC series she stars in  now). So there, the changes were real,
> and spending fewer bits on all but last I-frame would hardly have been
> noticed because of all the flashing.

exactly that ype of sequences, flashes, color inversions, strong cops

> The bigger problem I see if _not_ the sequence is really changing, but
> only XviD creates too many I-VOPs. Because then, the viewer might follow
> some action and concentrate on elements which for real scene changes would
> be masked.
> Could within min_keyframe_interval maybe the percentage of MBs be raised
> which are needed to classify a frame as I-VOP.

For this time, I don't plan any BIG change in twopass, it's just a small
adjustment i would like to do. I think we should simply how to apply bit
allocation reduction with some kind of smart decision (not a simple bits
-= distance*step_reduction, which  IMO is non sense if  we don't look at
the  ivop burst  duration  versus  frame rate,  and  importance of  each
iframe insde the burst)

Moreover, all  this is  very hypothetical and  doesn't happen  so often.

> As far  as I know, even  at scenechanges, I-frames  usually don't save
> bits, anyway, at least not many, but are mainly as keyframes for index
> generation.

<out of topic>
I appreciate  scene changes  ivops because they  are very good  at one
thing: avoid  scene mixage  for the few  frames surrounding  the scene
change. An ivop creates a clear cut.

It's like  some nasty scene mixage  when using bframes  w/o the closed
gov option. When we have this sequence:

In Display order
... whatever frames ... PPBBI...... whatever type of frames
        scene 1             |        scene 2

In this  case, the last bframes  are a ugly  mix of old scene  and new
scene. I had some reports about  that on transcode ML or transcode IRC
channel, i  don't remember exactly.  That's why in the  frontends i've
written for  devapi4^W1.0.0 i  use closed_gop as  default to  insert a
Pframe right before the scene changes so no scene mixage happens.
</out of topic>

Edouard Gomez

More information about the XviD-devel mailing list