[FFmpeg-devel] libx264 (no-)mbtree parameter

Erik Slagter erik
Fri Dec 4 14:09:47 CET 2009

Currently ffmpeg/libavcodec does not an interface to the mbtree
parameter of libx264. It's probably a few minutes work (even for me ;-))
to produce it, the question is, how would you like to see this

- enabling b-pyramid disables mbtree automatically (and vv) (dodgy but
- an extra bit in one of the flags
- "mis"-use one of the existing avcontext fields that aren't used by
libx264, e.g. prediction_order_method (I really don't know the semantics
of this field in other codecs, just a wild guess)
- ignore the issue completely and wait for libx264 to implement
b-pyramid-compatible mbtree semantics and guess that would obsolete

A similar issue is with autoquality options, although I have a feeling
that the default actually suits most of the users.

Other options in libx264_param_t not set by ffmpeg (mostly for my own

i_aq_mode;      /* psy adaptive QP. (X264_AQ_*) */
b_deterministic /* whether to allow non-deterministic optimizations when
threaded */
i_sync_lookahead; /* threaded lookahead buffer */
i_mv_range; /* maximum length of a mv (in pixels). -1 = auto, based on
level */
i_mv_range_thread; /* minimum space between threads. -1 = auto, based on
number of
threads. */
f_psy_rd; /* Psy RD strength */
f_psy_trellis; /* Psy trellis strength */
b_psy; /* Toggle all psy optimizations */
i_luma_deadzone[2]; /* {inter, intra} */
b_ssim;    /* compute and print SSIM stats */

Less interesting (imho):

intra;     /* intra partitions */
inter;     /* inter partitions */i_rc_method
b_dct_decimate; /* transform coefficient thresholding on P-frames */
int b_annexb;               /* if set, place start codes (4 bytes)
before NAL units,
i_sps_id;               /* SPS and PPS id number */
i_slice_max_size;    /* Max size per slice in bytes; includes estimated
NAL overhead. */
i_slice_max_mbs;     /* Max number of MBs per slice; overrides
i_slice_count. */
i_slice_count;       /* Number of slices per frame: forces rectangular
slices. */
i_frame_total; /* number of frames to encode if known, else 0 */

i_bframe_pyramid only allows setting of X264_B_PYRAMID_NORMAL or

More information about the ffmpeg-devel mailing list