[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
implemented:

- enabling b-pyramid disables mbtree automatically (and vv) (dodgy but
quick)
- 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
no-mbtree.

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
documentation):

i_aq_mode;      /* psy adaptive QP. (X264_AQ_*) */
f_aq_strength;
b_deterministic /* whether to allow non-deterministic optimizations when
threaded */
i_lookahead
i_sync_lookahead; /* threaded lookahead buffer */
b_visualize
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):

i_cabac_init_idc
b_constrained_intra
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 */

Note:
i_bframe_pyramid only allows setting of X264_B_PYRAMID_NORMAL or
X264_B_PYRAMID_NONE, not X264_B_PYRAMID_STRICT




More information about the ffmpeg-devel mailing list