[FFmpeg-cvslog] r20774 - in trunk: ffpresets/libx264-baseline.ffpreset ffpresets/libx264-default.ffpreset ffpresets/libx264-fastfirstpass.ffpreset ffpresets/libx264-hq.ffpreset ffpresets/libx264-ipod320.ffpreset f...
Stefano Sabatini
stefano.sabatini-lala
Tue Dec 8 21:12:32 CET 2009
On date Tuesday 2009-12-08 21:01:46 +0100, darkshikari wrote:
> Author: darkshikari
> Date: Tue Dec 8 21:01:46 2009
> New Revision: 20774
>
> Log:
> Add MBtree support for libx264
> Patch by Eric Slagter
>
> Modified:
> trunk/ffpresets/libx264-baseline.ffpreset
> trunk/ffpresets/libx264-default.ffpreset
> trunk/ffpresets/libx264-fastfirstpass.ffpreset
> trunk/ffpresets/libx264-hq.ffpreset
> trunk/ffpresets/libx264-ipod320.ffpreset
> trunk/ffpresets/libx264-ipod640.ffpreset
> trunk/ffpresets/libx264-lossless_fast.ffpreset
> trunk/ffpresets/libx264-lossless_max.ffpreset
> trunk/ffpresets/libx264-lossless_medium.ffpreset
> trunk/ffpresets/libx264-lossless_slow.ffpreset
> trunk/ffpresets/libx264-lossless_slower.ffpreset
> trunk/ffpresets/libx264-lossless_ultrafast.ffpreset
> trunk/ffpresets/libx264-main.ffpreset
> trunk/ffpresets/libx264-max.ffpreset
> trunk/ffpresets/libx264-normal.ffpreset
> trunk/ffpresets/libx264-slowfirstpass.ffpreset
> trunk/libavcodec/avcodec.h
> trunk/libavcodec/libx264.c
> trunk/libavcodec/options.c
[...]
> Modified: trunk/libavcodec/avcodec.h
> ==============================================================================
> --- trunk/libavcodec/avcodec.h Tue Dec 8 20:20:36 2009 (r20773)
> +++ trunk/libavcodec/avcodec.h Tue Dec 8 21:01:46 2009 (r20774)
> @@ -580,6 +580,7 @@ typedef struct RcOverride{
> #define CODEC_FLAG2_CHUNKS 0x00008000 ///< Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries.
> #define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000 ///< Use MPEG-2 nonlinear quantizer.
> #define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible
> +#define CODEC_FLAG2_MBTREE 0x00040000 ///< Use macroblock tree ratecontrol (x264 only)
>
> /* Unsupported options :
> * Syntax Arithmetic coding (SAC)
>
> Modified: trunk/libavcodec/libx264.c
> ==============================================================================
> --- trunk/libavcodec/libx264.c Tue Dec 8 20:20:36 2009 (r20773)
> +++ trunk/libavcodec/libx264.c Tue Dec 8 21:01:46 2009 (r20774)
> @@ -266,6 +266,7 @@ static av_cold int X264_init(AVCodecCont
> } else
> x4->params.rc.f_vbv_buffer_init = 0.9;
>
> + x4->params.rc.b_mb_tree = !!(avctx->flags2 & CODEC_FLAG2_MBTREE);
> x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor);
> x4->params.rc.f_pb_factor = avctx->b_quant_factor;
> x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
>
> Modified: trunk/libavcodec/options.c
> ==============================================================================
> --- trunk/libavcodec/options.c Tue Dec 8 20:20:36 2009 (r20773)
> +++ trunk/libavcodec/options.c Tue Dec 8 21:01:46 2009 (r20774)
> @@ -391,6 +391,7 @@ static const AVOption options[]={
> {"request_channels", "set desired number of audio channels", OFFSET(request_channels), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, A|D},
> {"drc_scale", "percentage of dynamic range compression to apply", OFFSET(drc_scale), FF_OPT_TYPE_FLOAT, 1.0, 0.0, 1.0, A|D},
> {"reservoir", "use bit reservoir", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_BIT_RESERVOIR, INT_MIN, INT_MAX, A|E, "flags2"},
> +{"mbtree", "use macroblock tree ratecontrol (x264 only)", 0, FF_OPT_TYPE_CONST, CODEC_FLAG2_MBTREE, INT_MIN, INT_MAX, V|E, "flags2"},
> {"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
> {"channel_layout", NULL, OFFSET(channel_layout), FF_OPT_TYPE_INT64, DEFAULT, 0, INT64_MAX, A|E|D, "channel_layout"},
> {"request_channel_layout", NULL, OFFSET(request_channel_layout), FF_OPT_TYPE_INT64, DEFAULT, 0, INT64_MAX, A|D, "request_channel_layout"},
IMO this requires a minor bump, and an APIChanges entry as well, since
it's extending the FFmpeg external interface.
Regards.
More information about the ffmpeg-cvslog
mailing list