[x264-devel] Re: Rate control and scene change detection
Måns Rullgård
mru at mru.ath.cx
Sun Jul 11 23:47:59 CEST 2004
Kurosu <kurosu at inforezo.org> writes:
> 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.
I've gathered that much from googling.
> 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.
I was thinking it could be possible to combine the scene change
detection with the regular motion estimation, something like this:
- encode the frame as a P (or B) frame.
- check some statistics collected during the encoding.
- if some condition is met, assume a scene change and re-encode as I
frame.
This would waste the time for the P/B encoding at a scene change, but
save the overhead of separate scene change detection for all other
frames. It could also be more accurate than a simple scene change
detection method.
So, which statistics would be indicative of a scene change? Number of
intra coded MBs? Number of skipped MBs? Perhaps something involving
motion vectors?
--
Måns Rullgård
mru at mru.ath.cx
--
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