summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.h
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2015-11-21 21:28:31 +0100
committerClément Bœsch <clement@stupeflix.com>2015-12-04 15:44:45 +0100
commit60532348d2544a6e32e84a2954b14170208d642d (patch)
tree4b78d5d0fe70b816861132db6f0b5377d45edec3 /libavcodec/mpegvideo.h
parent010caed261ac60671411f2413a50adc9ca67fa0c (diff)
avcodec/mpegvideo: use constants for rc_strategy
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r--libavcodec/mpegvideo.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index df1a13fff6..271ef5e683 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -557,6 +557,12 @@ typedef struct MpegEncContext {
#define FF_MPV_FLAG_NAQ 0x0010
#define FF_MPV_FLAG_MV0 0x0020
+enum rc_strategy {
+ MPV_RC_STRATEGY_FFMPEG,
+ MPV_RC_STRATEGY_XVID,
+ NB_MPV_RC_STRATEGY
+};
+
#ifndef FF_MPV_OFFSET
#define FF_MPV_OFFSET(x) offsetof(MpegEncContext, x)
#endif
@@ -592,7 +598,9 @@ typedef struct MpegEncContext {
{"lmax", "maximum Lagrange factor (VBR)", FF_MPV_OFFSET(lmax), AV_OPT_TYPE_INT, {.i64 = 31*FF_QP2LAMBDA }, 0, INT_MAX, FF_MPV_OPT_FLAGS }, \
{"ibias", "intra quant bias", FF_MPV_OFFSET(intra_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
{"pbias", "inter quant bias", FF_MPV_OFFSET(inter_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
-{"rc_strategy", "ratecontrol method", FF_MPV_OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS }, \
+{"rc_strategy", "ratecontrol method", FF_MPV_OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = MPV_RC_STRATEGY_FFMPEG }, 0, NB_MPV_RC_STRATEGY-1, FF_MPV_OPT_FLAGS, "rc_strategy" }, \
+ { "ffmpeg", "default native rate control", 0, AV_OPT_TYPE_CONST, { .i64 = MPV_RC_STRATEGY_FFMPEG }, 0, 0, FF_MPV_OPT_FLAGS, "rc_strategy" }, \
+ { "xvid", "libxvid (2 pass only)", 0, AV_OPT_TYPE_CONST, { .i64 = MPV_RC_STRATEGY_XVID }, 0, 0, FF_MPV_OPT_FLAGS, "rc_strategy" }, \
{"motion_est", "motion estimation algorithm", FF_MPV_OFFSET(motion_est), AV_OPT_TYPE_INT, {.i64 = FF_ME_EPZS }, FF_ME_ZERO, FF_ME_XONE, FF_MPV_OPT_FLAGS, "motion_est" }, \
{ "zero", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ZERO }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \
{ "epzs", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_EPZS }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \