[FFmpeg-cvslog] r22042 - in branches/0.5: configure ffpresets/libx264-baseline.ffpreset ffpresets/libx264-default.ffpreset ffpresets/libx264-fastfirstpass.ffpreset ffpresets/libx264-hq.ffpreset ffpresets/libx264-i...
siretart
subversion
Wed Feb 24 23:40:10 CET 2010
Author: siretart
Date: Wed Feb 24 23:40:10 2010
New Revision: 22042
Log:
backport libx264.c from trunk
now compiles with x264 API versions 65 up to 85
patch prepared by darkshikari
Modified:
branches/0.5/configure
branches/0.5/ffpresets/libx264-baseline.ffpreset
branches/0.5/ffpresets/libx264-default.ffpreset
branches/0.5/ffpresets/libx264-fastfirstpass.ffpreset
branches/0.5/ffpresets/libx264-hq.ffpreset
branches/0.5/ffpresets/libx264-ipod320.ffpreset
branches/0.5/ffpresets/libx264-ipod640.ffpreset
branches/0.5/ffpresets/libx264-lossless_fast.ffpreset
branches/0.5/ffpresets/libx264-lossless_max.ffpreset
branches/0.5/ffpresets/libx264-lossless_medium.ffpreset
branches/0.5/ffpresets/libx264-lossless_slow.ffpreset
branches/0.5/ffpresets/libx264-lossless_slower.ffpreset
branches/0.5/ffpresets/libx264-lossless_ultrafast.ffpreset
branches/0.5/ffpresets/libx264-main.ffpreset
branches/0.5/ffpresets/libx264-max.ffpreset
branches/0.5/ffpresets/libx264-normal.ffpreset
branches/0.5/ffpresets/libx264-slowfirstpass.ffpreset
branches/0.5/libavcodec/avcodec.h
branches/0.5/libavcodec/libx264.c
branches/0.5/libavcodec/options.c
Modified: branches/0.5/configure
==============================================================================
--- branches/0.5/configure Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/configure Wed Feb 24 23:40:10 2010 (r22042)
@@ -2017,7 +2017,7 @@ enabled libschroedinger && add_cflags $(
enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg
enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
-enabled libx264 && require libx264 x264.h x264_encoder_open -lx264 -lm &&
+enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm &&
{ check_cpp_condition x264.h "X264_BUILD >= 65" ||
die "ERROR: libx264 version must be >= 0.65."; }
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
Modified: branches/0.5/ffpresets/libx264-baseline.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-baseline.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-baseline.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -1,3 +1,4 @@
coder=0
bf=0
-flags2=-wpred-dct8x8
+flags2=-wpred-dct8x8+mbtree
+wpredp=0
Modified: branches/0.5/ffpresets/libx264-default.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-default.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-default.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -3,7 +3,7 @@ flags=+loop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
-subq=6
+subq=7
me_range=16
g=250
keyint_min=25
@@ -14,5 +14,9 @@ qcomp=0.6
qmin=10
qmax=51
qdiff=4
+bf=3
+refs=3
directpred=1
-flags2=+fastpskip
+trellis=1
+flags2=+mixed_refs+wpred+dct8x8+fastpskip+mbtree
+wpredp=2
Modified: branches/0.5/ffpresets/libx264-fastfirstpass.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-fastfirstpass.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-fastfirstpass.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -3,7 +3,7 @@ flags=+loop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8
me_method=dia
-subq=1
+subq=2
me_range=16
g=250
keyint_min=25
@@ -14,8 +14,9 @@ qcomp=0.6
qmin=10
qmax=51
qdiff=4
-bf=4
+bf=3
refs=1
directpred=3
trellis=0
-flags2=-bpyramid-wpred-mixed_refs-dct8x8+fastpskip
+flags2=-bpyramid-wpred-mixed_refs-dct8x8+fastpskip+mbtree
+wpredp=2
Modified: branches/0.5/ffpresets/libx264-hq.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-hq.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-hq.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -14,8 +14,9 @@ qcomp=0.6
qmin=10
qmax=51
qdiff=4
-bf=4
+bf=3
refs=4
directpred=3
trellis=1
-flags2=+bpyramid+wpred+mixed_refs+dct8x8+fastpskip
+flags2=+wpred+mixed_refs+dct8x8+fastpskip+mbtree
+wpredp=2
Modified: branches/0.5/ffpresets/libx264-ipod320.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-ipod320.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-ipod320.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -1,6 +1,7 @@
coder=0
bf=0
-flags2=-wpred-dct8x8
+flags2=-wpred-dct8x8+mbtree
level=13
maxrate=768000
bufsize=3000000
+wpredp=0
Modified: branches/0.5/ffpresets/libx264-ipod640.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-ipod640.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-ipod640.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -1,7 +1,8 @@
coder=0
bf=0
refs=1
-flags2=-wpred-dct8x8
+flags2=-wpred-dct8x8+mbtree
level=30
maxrate=10000000
bufsize=10000000
+wpredp=0
Modified: branches/0.5/ffpresets/libx264-lossless_fast.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-lossless_fast.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-lossless_fast.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -15,5 +15,6 @@ qmin=10
qmax=51
qdiff=4
directpred=1
-flags2=+fastpskip
+flags2=+fastpskip+mbtree
cqp=0
+wpredp=0
Modified: branches/0.5/ffpresets/libx264-lossless_max.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-lossless_max.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-lossless_max.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -16,5 +16,6 @@ qmax=51
qdiff=4
refs=16
directpred=1
-flags2=+mixed_refs+dct8x8+fastpskip
+flags2=+mixed_refs+dct8x8+fastpskip+mbtree
cqp=0
+wpredp=2
Modified: branches/0.5/ffpresets/libx264-lossless_medium.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-lossless_medium.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-lossless_medium.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -15,5 +15,6 @@ qmin=10
qmax=51
qdiff=4
directpred=1
-flags2=+fastpskip
+flags2=+fastpskip+mbtree
cqp=0
+wpredp=2
Modified: branches/0.5/ffpresets/libx264-lossless_slow.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-lossless_slow.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-lossless_slow.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -16,5 +16,6 @@ qmax=51
qdiff=4
refs=2
directpred=1
-flags2=+dct8x8+fastpskip
+flags2=+dct8x8+fastpskip+mbtree
cqp=0
+wpredp=2
Modified: branches/0.5/ffpresets/libx264-lossless_slower.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-lossless_slower.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-lossless_slower.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -16,5 +16,6 @@ qmax=51
qdiff=4
refs=4
directpred=1
-flags2=+mixed_refs+dct8x8+fastpskip
+flags2=+mixed_refs+dct8x8+fastpskip+mbtree
cqp=0
+wpredp=2
Modified: branches/0.5/ffpresets/libx264-lossless_ultrafast.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-lossless_ultrafast.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-lossless_ultrafast.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -15,5 +15,5 @@ qmin=10
qmax=51
qdiff=4
directpred=1
-flags2=+fastpskip
+flags2=+fastpskip+mbtree
cqp=0
Modified: branches/0.5/ffpresets/libx264-main.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-main.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-main.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -1 +1 @@
-flags2=-dct8x8
+flags2=-dct8x8+mbtree
Modified: branches/0.5/ffpresets/libx264-max.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-max.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-max.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -3,8 +3,8 @@ flags=+loop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8
me_method=tesa
-subq=9
-me_range=32
+subq=10
+me_range=24
g=250
keyint_min=25
sc_threshold=40
@@ -14,8 +14,9 @@ qcomp=0.6
qmin=10
qmax=51
qdiff=4
-bf=4
+bf=3
refs=16
directpred=3
trellis=2
-flags2=+bpyramid+wpred+mixed_refs+dct8x8-fastpskip
+flags2=+wpred+mixed_refs+dct8x8-fastpskip+mbtree
+wpredp=2
Modified: branches/0.5/ffpresets/libx264-normal.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-normal.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-normal.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -14,8 +14,9 @@ qcomp=0.6
qmin=10
qmax=51
qdiff=4
-bf=4
+bf=3
refs=2
directpred=3
trellis=0
-flags2=+bpyramid+wpred+dct8x8+fastpskip
+flags2=+wpred+dct8x8+fastpskip+mbtree
+wpredp=2
Modified: branches/0.5/ffpresets/libx264-slowfirstpass.ffpreset
==============================================================================
--- branches/0.5/ffpresets/libx264-slowfirstpass.ffpreset Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/ffpresets/libx264-slowfirstpass.ffpreset Wed Feb 24 23:40:10 2010 (r22042)
@@ -14,8 +14,9 @@ qcomp=0.6
qmin=10
qmax=51
qdiff=4
-bf=4
+bf=3
refs=1
directpred=3
trellis=0
-flags2=+bpyramid+wpred+dct8x8+fastpskip
+flags2=+wpred+dct8x8+fastpskip+mbtree
+wpredp=2
Modified: branches/0.5/libavcodec/avcodec.h
==============================================================================
--- branches/0.5/libavcodec/avcodec.h Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/libavcodec/avcodec.h Wed Feb 24 23:40:10 2010 (r22042)
@@ -501,6 +501,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)
@@ -2332,6 +2333,16 @@ typedef struct AVCodecContext {
* Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
*/
int ticks_per_frame;
+
+ /**
+ * explicit P-frame weighted prediction analysis method
+ * 0: off
+ * 1: fast blind weighting (one reference duplicate with -1 offset)
+ * 2: smart weighting (full fade detection analysis)
+ * - encoding: Set by user.
+ * - decoding: unused
+ */
+ int weighted_p_pred;
} AVCodecContext;
/**
Modified: branches/0.5/libavcodec/libx264.c
==============================================================================
--- branches/0.5/libavcodec/libx264.c Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/libavcodec/libx264.c Wed Feb 24 23:40:10 2010 (r22042)
@@ -30,6 +30,8 @@ typedef struct X264Context {
x264_param_t params;
x264_t *enc;
x264_picture_t pic;
+ uint8_t *sei;
+ int sei_size;
AVFrame out_pic;
} X264Context;
@@ -48,21 +50,66 @@ static void X264_log(void *p, int level,
av_vlog(p, level_map[level], fmt, args);
}
-
-static int encode_nals(uint8_t *buf, int size, x264_nal_t *nals, int nnal)
+#if X264_BUILD >= 76
+static int encode_nals(AVCodecContext *ctx, uint8_t *buf, int size,
+ x264_nal_t *nals, int nnal, int skip_sei)
{
+ X264Context *x4 = ctx->priv_data;
uint8_t *p = buf;
int i;
+ /* Write the SEI as part of the first frame. */
+ if (x4->sei_size > 0 && nnal > 0) {
+ memcpy(p, x4->sei, x4->sei_size);
+ p += x4->sei_size;
+ x4->sei_size = 0;
+ }
+
+ for (i = 0; i < nnal; i++){
+ /* Don't put the SEI in extradata. */
+ if (skip_sei && nals[i].i_type == NAL_SEI) {
+ x4->sei_size = nals[i].i_payload;
+ x4->sei = av_malloc(x4->sei_size);
+ memcpy(x4->sei, nals[i].p_payload, nals[i].i_payload);
+ continue;
+ }
+ memcpy(p, nals[i].p_payload, nals[i].i_payload);
+ p += nals[i].i_payload;
+ }
+
+ return p - buf;
+}
+#else
+static int encode_nals(AVCodecContext *ctx, uint8_t *buf, int size, x264_nal_t *nals, int nnal, int skip_sei)
+{
+ X264Context *x4 = ctx->priv_data;
+ uint8_t *p = buf;
+ int i, s;
+
+ /* Write the SEI as part of the first frame. */
+ if (x4->sei_size > 0 && nnal > 0) {
+ memcpy(p, x4->sei, x4->sei_size);
+ p += x4->sei_size;
+ x4->sei_size = 0;
+ }
+
for (i = 0; i < nnal; i++) {
- int s = x264_nal_encode(p, &size, 1, nals + i);
- if(s < 0)
+ /* Don't put the SEI in extradata. */
+ if (skip_sei && nals[i].i_type == NAL_SEI) {
+ x4->sei = av_malloc( 5 + nals[i].i_payload * 4 / 3 );
+ if(x264_nal_encode(x4->sei, &x4->sei_size, 1, nals + i) < 0)
+ return -1;
+ continue;
+ }
+ s = x264_nal_encode(p, &size, 1, nals + i);
+ if (s < 0)
return -1;
p += s;
}
return p - buf;
}
+#endif
static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
int bufsize, void *data)
@@ -86,15 +133,14 @@ static int X264_frame(AVCodecContext *ct
x4->pic.i_type = X264_TYPE_AUTO;
}
- if (x264_encoder_encode(x4->enc, &nal, &nnal, frame? &x4->pic: NULL,
- &pic_out))
+ if (x264_encoder_encode(x4->enc, &nal, &nnal, frame? &x4->pic: NULL, &pic_out) < 0)
return -1;
- bufsize = encode_nals(buf, bufsize, nal, nnal);
+ bufsize = encode_nals(ctx, buf, bufsize, nal, nnal, 0);
if (bufsize < 0)
return -1;
- /* FIXME: dts */
+ /* FIXME: libx264 now provides DTS, but AVFrame doesn't have a field for it. */
x4->out_pic.pts = pic_out.i_pts;
switch (pic_out.i_type) {
@@ -111,7 +157,11 @@ static int X264_frame(AVCodecContext *ct
break;
}
+#if X264_BUILD < 82
x4->out_pic.key_frame = pic_out.i_type == X264_TYPE_IDR;
+#else
+ x4->out_pic.key_frame = pic_out.b_keyframe;
+#endif
x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
return bufsize;
@@ -122,6 +172,7 @@ static av_cold int X264_close(AVCodecCon
X264Context *x4 = avctx->priv_data;
av_freep(&avctx->extradata);
+ av_free(x4->sei);
if (x4->enc)
x264_encoder_close(x4->enc);
@@ -133,6 +184,7 @@ static av_cold int X264_init(AVCodecCont
{
X264Context *x4 = avctx->priv_data;
+ x4->sei_size = 0;
x264_param_default(&x4->params);
x4->params.pf_log = X264_log;
@@ -164,7 +216,11 @@ static av_cold int X264_init(AVCodecCont
x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
x4->params.i_bframe_adaptive = avctx->b_frame_strategy;
x4->params.i_bframe_bias = avctx->bframebias;
+#if X264_BUILD >= 78
+ x4->params.i_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID ? X264_B_PYRAMID_NORMAL : X264_B_PYRAMID_NONE;
+#else
x4->params.b_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID;
+#endif
avctx->has_b_frames = avctx->flags2 & CODEC_FLAG2_BPYRAMID ? 2 : !!avctx->max_b_frames;
x4->params.i_keyint_min = avctx->keyint_min;
@@ -191,8 +247,10 @@ static av_cold int X264_init(AVCodecCont
x4->params.i_height = avctx->height;
x4->params.vui.i_sar_width = avctx->sample_aspect_ratio.num;
x4->params.vui.i_sar_height = avctx->sample_aspect_ratio.den;
- x4->params.i_fps_num = avctx->time_base.den;
- x4->params.i_fps_den = avctx->time_base.num;
+#if X264_BUILD >= 81
+ x4->params.i_fps_num = x4->params.i_timebase_den = avctx->time_base.den;
+ x4->params.i_fps_den = x4->params.i_timebase_num = avctx->time_base.num;
+#endif
x4->params.analyse.inter = 0;
if (avctx->partitions) {
@@ -211,6 +269,9 @@ static av_cold int X264_init(AVCodecCont
x4->params.analyse.i_direct_mv_pred = avctx->directpred;
x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED;
+#if X264_BUILD >= 79
+ x4->params.analyse.i_weighted_pred = avctx->weighted_p_pred;
+#endif
if (avctx->me_method == ME_EPZS)
x4->params.analyse.i_me_method = X264_ME_DIA;
@@ -248,6 +309,9 @@ static av_cold int X264_init(AVCodecCont
} else
x4->params.rc.f_vbv_buffer_init = 0.9;
+#if X264_BUILD >= 69
+ x4->params.rc.b_mb_tree = !!(avctx->flags2 & CODEC_FLAG2_MBTREE);
+#endif
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;
@@ -270,8 +334,19 @@ static av_cold int X264_init(AVCodecCont
avctx->coded_frame = &x4->out_pic;
+#if X264_BUILD >= 76
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
x264_nal_t *nal;
+ int nnal, s;
+
+ s = x264_encoder_headers(x4->enc, &nal, &nnal);
+
+ avctx->extradata = av_malloc(s);
+ avctx->extradata_size = encode_nals(avctx, avctx->extradata, s, nal, nnal, 1);
+ }
+#else
+ if(avctx->flags & CODEC_FLAG_GLOBAL_HEADER){
+ x264_nal_t *nal;
int nnal, i, s = 0;
x264_encoder_headers(x4->enc, &nal, &nnal);
@@ -281,8 +356,9 @@ static av_cold int X264_init(AVCodecCont
s += 5 + nal[i].i_payload * 4 / 3;
avctx->extradata = av_malloc(s);
- avctx->extradata_size = encode_nals(avctx->extradata, s, nal, nnal);
+ avctx->extradata_size = encode_nals(avctx, avctx->extradata, s, nal, nnal, 1);
}
+#endif
return 0;
}
@@ -296,6 +372,6 @@ AVCodec libx264_encoder = {
.encode = X264_frame,
.close = X264_close,
.capabilities = CODEC_CAP_DELAY,
- .pix_fmts = (enum PixelFormat[]) { PIX_FMT_YUV420P, PIX_FMT_NONE },
+ .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_YUV420P, PIX_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
};
Modified: branches/0.5/libavcodec/options.c
==============================================================================
--- branches/0.5/libavcodec/options.c Wed Feb 24 23:13:20 2010 (r22041)
+++ branches/0.5/libavcodec/options.c Wed Feb 24 23:40:10 2010 (r22042)
@@ -122,6 +122,7 @@ static const AVOption options[]={
{"b_qfactor", "qp factor between p and b frames", OFFSET(b_quant_factor), FF_OPT_TYPE_FLOAT, 1.25, -FLT_MAX, FLT_MAX, V|E},
{"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
{"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), FF_OPT_TYPE_INT, 0, INT_MIN, INT_MAX, V|E},
+{"wpredp", "weighted prediction analysis method", OFFSET(weighted_p_pred), FF_OPT_TYPE_INT, 0, INT_MIN, INT_MAX, V|E},
{"hurry_up", NULL, OFFSET(hurry_up), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|D},
{"ps", "rtp payload size in bits", OFFSET(rtp_payload_size), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
{"mv_bits", NULL, OFFSET(mv_bits), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
@@ -388,6 +389,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"},
More information about the ffmpeg-cvslog
mailing list