diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2011-04-29 14:13:19 -0700 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2011-04-29 18:44:59 -0700 |
commit | 97dc86b793efb9c6ac604cdfff4027fe27efa12c (patch) | |
tree | b92f599d90d670eb5f1188e63ab25053109d1c98 | |
parent | be315a3232d96a2704e276f1ebe870a4d249d090 (diff) | |
download | ffmpeg-97dc86b793efb9c6ac604cdfff4027fe27efa12c.tar.gz |
In libx264 wrapper, change wpredp to a codec specific option.
-rw-r--r-- | libavcodec/libx264.c | 5 | ||||
-rw-r--r-- | libavcodec/options.c | 1 |
2 files changed, 4 insertions, 2 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 }, }; diff --git a/libavcodec/options.c b/libavcodec/options.c index 2a70b1b21b..05af313848 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -120,7 +120,6 @@ 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}, {"ps", "rtp payload size in bytes", 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}, {"header_bits", NULL, OFFSET(header_bits), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX}, |