[Mplayer-cvslog] CVS: main/libmpcodecs ve_lavc.c,1.10,1.11
Michael Niedermayer
michael at mplayerhq.hu
Sun Apr 21 23:38:57 CEST 2002
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv8162
Modified Files:
ve_lavc.c
Log Message:
support for new stuff (lavc internal 2pass, ...)
Index: ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ve_lavc.c 18 Apr 2002 15:23:34 -0000 1.10
+++ ve_lavc.c 21 Apr 2002 21:38:53 -0000 1.11
@@ -33,6 +33,10 @@
#include "libavcodec/avcodec.h"
#endif
+#if LIBAVCODEC_BUILD < 4601
+#error your version of libavcodec is too old, get a newer one, and dont send a bugreport, THIS IS NO BUG
+#endif
+
extern int avcodec_inited;
/* video options */
@@ -48,8 +52,12 @@
static int lavc_param_vqdiff = 3;
static float lavc_param_vqcompress = 0.5;
static float lavc_param_vqblur = 0.5;
+static float lavc_param_vb_qfactor = 2.0;
static int lavc_param_vmax_b_frames = 0;
static int lavc_param_keyint = -1;
+static int lavc_param_vpass = 0;
+static int lavc_param_vrc_strategy = 2;
+static int lavc_param_vb_strategy = 0;
#include "cfgparser.h"
@@ -67,7 +75,11 @@
{"vqdiff", &lavc_param_vqdiff, CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL},
{"vqcomp", &lavc_param_vqcompress, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 1.0, NULL},
{"vqblur", &lavc_param_vqblur, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 1.0, NULL},
+ {"vb_qfactor", &lavc_param_vb_qfactor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 31.0, NULL},
{"vmax_b_frames", &lavc_param_vmax_b_frames, CONF_TYPE_INT, CONF_RANGE, 0, FF_MAX_B_FRAMES, NULL},
+ {"vpass", &lavc_param_vpass, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
+ {"vrc_strategy", &lavc_param_vrc_strategy, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
+ {"vb_strategy", &lavc_param_vb_strategy, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL},
{"keyint", &lavc_param_keyint, CONF_TYPE_INT, 0, 0, 0, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL}
};
@@ -112,6 +124,10 @@
lavc_venc_context.qcompress= lavc_param_vqcompress;
lavc_venc_context.qblur= lavc_param_vqblur;
lavc_venc_context.max_b_frames= lavc_param_vmax_b_frames;
+ lavc_venc_context.b_quant_factor= lavc_param_vb_qfactor;
+ lavc_venc_context.rc_strategy= lavc_param_vrc_strategy;
+ lavc_venc_context.b_frame_strategy= lavc_param_vb_strategy;
+
/* keyframe interval */
if (lavc_param_keyint >= 0) /* != -1 */
lavc_venc_context.gop_size = lavc_param_keyint;
@@ -127,6 +143,12 @@
lavc_venc_context.flags = 0;
lavc_venc_context.flags|= lavc_param_v4mv ? CODEC_FLAG_4MV : 0;
+
+ /* lavc internal 2pass bitrate control */
+ if(lavc_param_vpass==1)
+ lavc_venc_context.flags|= CODEC_FLAG_PASS1;
+ else if(lavc_param_vpass==2)
+ lavc_venc_context.flags|= CODEC_FLAG_PASS2;
#ifdef ME_ZERO
// workaround Juanjo's stupid incompatible change:
More information about the MPlayer-cvslog
mailing list