[FFmpeg-devel] [RFC] scenechange_score in AVCodecContext?

Stefano Sabatini stefano.sabatini-lala
Tue Nov 13 16:14:22 CET 2007

Hi all,

in many encoding scenarios is useful to be able to evaluate the degree
of "movement" in a video sequence, for example to dynamically adapt
the encoding parameters when encoding real-time a video stream.

libavcodec already implements a system to evaluate the so called
scene_change_score (look for example
libavcodec/mpegvideo_enc.c:encode_picture) when the scene_change_score
computed is used to eventually force the use of an I-frame, and many
others codecs use a similiar system.

So it would be useful to export such information in the
AVCodecContext, like in the attached patch, to make it accessible from

Do you find this request acceptable?

For what regards the proposed solution, it will likely need more
refinement (for example to support more encoders and to manage
properly the case when such scene-change evaluation is not performed),
so it is intended just as a proof of concept to show up what I mean.

Best regards.
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: define-scenechange-score-in-avctx-00.patch
Type: text/x-diff
Size: 1791 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071113/fd6bc84f/attachment.patch>

More information about the ffmpeg-devel mailing list