[XviD-devel] inter48x48

Marc FD xvid-devel@xvid.org
Fri, 26 Jul 2002 21:48:35 +0200


> The problem in your case is, that the _internal copy_ of a frame is
> _not_ 100% identical to the new frame that is to be encoded, because it's
> motion compensated, iDCTed etc.

it think it's an motion estimation problem. internally, 2 identicall frames
_should_ be the same. maybe some little adds could fix that ???

> Of course, you could do image based MAD between internal and new frame,
> but where do you put the threshhold? It can't be too low, because it
> should cover differences between internal and new pic, but if you put it
> higher, frame which hardly differ except for a small region (japanimation
> where only moving mouths...) will completely be skiped.

mad = mean absolute difference ??
i see the pb. XviD can't see that the two frames are the same because it
compares
frames from the last already encoded frames. A raw copy would take two much
memory ??

> Please note that it is _wanted_ that you can feed the same frame in the
> codec twice and _not_ have the second one skipped. Think e.g. of high
> quantizers, then after processing the first frame, there will be large
> errors. The second frame (in theory identical frame) will be much closer
> to the internal, so after processing the second step, the internal image
> will match the "real" image much closer, which is good for future ME.

100% agreed. I already thinked of that it's why i wanted "perfect" frames to
be dropped

> If you have a filter anyway that "creates" the identical frames, wouldn't
> it be easier to simply skip them in the application instead of feeding
> them to the codec? Or if that is not wanted because of ratecontrol,
> at least give a flag to the codec, _forcing_ the codec to skip a frame.

I think of something : Creating a totally artificial frames that would be
recognised by XviD as dropp-it
something like a FF00FF00FF00FF00FF00FF00FF00FF00FF00............ patern in
the Y plane for
exemple : should be very easy to recognise BUT the filter should be in last
and it's really a
ugly hack :(

Better, the flag could be a brutal colorspace swap, but i don't think an
AviSynth filter can do it :(

A really interesting method (on the mathematical point) should be to take 1%
of arbitrary/randomly
chosen raw points of every pic : this would be ridiculous small in size but
if we compare the chosen
points to the new ones, the chances that they are ALL the same if the two
frames differs should be
far under 1 for 1'000'000 because of noise and movement.
I really like this method because it's the more elegant. if we want to avoid
an accidental drop,
we could always add a checkbox somewhere, but i think we can easily make a
statistical
99,99...% perfect algo, using the fact that video is always noisy (even
DVD's, even HDTV)
specially on the chroma planes. and it could be disabled

So what do you think ???

Waiting