[XviD-devel] scene change detecting in Bframes mode

Marc FD xvid-devel@xvid.org
Mon, 19 Aug 2002 19:19:51 +0200


> virtualdub's algo appears to work really well, and handles fades ok.
 > ive always wanted to port it to xvid, however i have the feeling the
 > algo is rgb based.
 >

from what i've understood from the code (avery is really not easy to
read...)
VDub's algo is based on luminosity changes (or pattern of luminosity)
if it's based on gamma, yes, it's definitively rgb based, but i think a YUV
4:2:0
or even a Y only detector could work. I've tested the algo...
and it gives not _very good_ results... (vs the complexity)
maybe a scene-change algo with the codec point of view could be the best ...
So, thinking of tweaking/designing/coding/improving a scenedetector, i've
some questions :
it's better for the codec to code an I-frame than an P/B when there very
fast movement,
but it's better to code a P/B frame when the movement is easy to estimate
(pans,zooms),
right ? (seems logical)
In this case, a histogram based algo would be a must.
but in scenes with for ex machine-guns in action in a dark area, the algo
will turn mad and
will create big rows of I-frames... so i come to the next question :
Is it better to encode a P/B frame or an I-frame when only a part of the
frame change ?
Why a I-frame can be better than a P/B-frame ? due to the P/B-frame motion
vectors size ??
would it be possible to code a false-I-frame? i mean a P-frame who keeps the
background and
adds a static image on it, instead of trying to estimate an non-existing
movement.
->This would be very usefull to avoid I-frames rows, while keeping a good
quality.
How many frame can XviD acces ? (to do sceneschange tests)
because the more frames you scan, the more acurate the algo is.
if you could scan the n+1,n+2 or even n+3 frames, it's possible to do a
_very_ accurate algo.
of course it's very important to have some rememberance too. VDub's algo use
it to detect
faded scenes-changes. with only a current and a reference frame, you can
only make a
_very_ dumb algo :(

Still puzzled,
MarcFD  marc.fd@libertysurf.fr