[Libav-user] ffmpeg wrapper for x264, how to use mb_info
nikitos1550 at yandex.ru
Fri Jun 20 17:59:31 CEST 2014
In x264.h I have found:
/* In: optional array of flags for each macroblock.
* Allows specifying additional information for the encoder such as which macroblocks
* remain unchanged. Usable flags are listed below.
* x264_param_t.analyse.b_mb_info must be set to use this, since x264 needs to track
* extra data internally to make full use of this information.
* Out: if b_mb_info_update is set, x264 will update this array as a result of encoding.
* For "MBINFO_CONSTANT", it will remove this flag on any macroblock whose decoded
* pixels have changed. This can be useful for e.g. noting which areas of the
* frame need to actually be blitted. Note: this intentionally ignores the effects
* of deblocking for the current frame, which should be fine unless one needs exact
* pixel-perfect accuracy.
* Results for MBINFO_CONSTANT are currently only set for P-frames, and are not
* guaranteed to enumerate all blocks which haven't changed. (There may be false
* negatives, but no false positives.)
/* In: optional callback to free mb_info when used. */
void (*mb_info_free)( void* );
/* The macroblock is constant and remains unchanged from the previous frame. */
#define X264_MBINFO_CONSTANT (1<<0)
/* More flags may be added in the future. */
As I understand this is ability to say encoder, what MB are not changed.
How to use this feature via ffmpeg C API ?
More information about the Libav-user