[x264-devel] Re: Rate control and scene change detection

Kurosu kurosu at inforezo.org
Sun Jul 11 22:45:38 CEST 2004


On Sun, 11 Jul 2004, Måns Rullgård wrote:
> Does anyone know which parameters are good indicators of a scene
> change?  Is there perhaps something particularly suited for H.264
> encoding?

If you compute the Sum of Absolute Difference or such metrics (Sum of
Squared Errors, for instance) for each 16x16 block of the image, you'll
have a first level of how different the image is from the previous one.

As stated by MfA, this is however an unsufficient method for scene with
rapid motion. You could there make a quick motion search (comparing some
neighbours blocks to the current being inspected). Such a prepass is often
used in encoders to select the frame type, so that probably is the better
solution. The process is as follows:
- do a rapid motion search, ie find the neighbour block with the yields
the lowest SAD; store result
- blocks with too high a SAD are marked as to be encoded as intra
blocks
- if too many blocks are too be encoded as intra (that's probably
the 50% threshold seen in some codecs), the frame must be coded as intra.
Maybe using the average vector length is another solution, but that's
quite risky.

Another approach could be to precompute and store the global SAD for n
frames around the current frame, and normalize the frame's global SAD
corresponding to its neighbour frames' values. Then the intra coding could
be decided on both the normalized and regular global SAD.

-- 
Kurosu (Kurosu (at) inforezo dot org)
Quidquid latine dictum sit, altum viditur

-- 
This is the x264-devel mailing-list
If you are in trouble, please contact <postmaster at videolan.org>



More information about the x264-devel mailing list