summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2011-04-29 14:13:19 -0700
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2011-04-29 18:44:59 -0700
commit97dc86b793efb9c6ac604cdfff4027fe27efa12c (patch)
treeb92f599d90d670eb5f1188e63ab25053109d1c98 /libavcodec/libx264.c
parentbe315a3232d96a2704e276f1ebe870a4d249d090 (diff)
In libx264 wrapper, change wpredp to a codec specific option.
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 1b4e88b75b..0dd954d710 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -41,6 +41,7 @@ typedef struct X264Context {
const char *level;
int fastfirstpass;
const char *stats;
+ const char *weightp;
} X264Context;
static void X264_log(void *p, int level, const char *fmt, va_list args)
@@ -252,7 +253,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.i_direct_mv_pred = avctx->directpred;
x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED;
- x4->params.analyse.i_weighted_pred = avctx->weighted_p_pred;
if (avctx->me_method == ME_EPZS)
x4->params.analyse.i_me_method = X264_ME_DIA;
@@ -302,6 +302,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.p_log_private = avctx;
x4->params.i_log_level = X264_LOG_DEBUG;
+ OPT_STR("weightp", x4->weightp);
+
x4->params.b_intra_refresh = avctx->flags2 & CODEC_FLAG2_INTRA_REFRESH;
x4->params.rc.i_bitrate = avctx->bit_rate / 1000;
x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000;
@@ -404,6 +406,7 @@ static const AVOption options[] = {
{"profile", "Set profile restrictions", OFFSET(profile), FF_OPT_TYPE_STRING, 0, 0, 0, VE},
{"level", "Specify level (as defined by Annex A)", OFFSET(level), FF_OPT_TYPE_STRING, 0, 0, 0, VE},
{"passlogfile", "Filename for 2 pass stats", OFFSET(stats), FF_OPT_TYPE_STRING, 0, 0, 0, VE},
+ {"wpredp", "Weighted prediction for P-frames", OFFSET(weightp), FF_OPT_TYPE_STRING, 0, 0, 0, VE},
{ NULL },
};