summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/en/mplayer.118
-rw-r--r--libmpcodecs/ve_lavc.c13
2 files changed, 30 insertions, 1 deletions
diff --git a/DOCS/en/mplayer.1 b/DOCS/en/mplayer.1
index 26cffc4fd3..286f986192 100644
--- a/DOCS/en/mplayer.1
+++ b/DOCS/en/mplayer.1
@@ -3162,6 +3162,24 @@ Note: vqmin should be 8 or larger.
.IPs umv
unlimited MVs (H.263+ only)
Allow encoding of abritarily long MVs.
+.IPs ibias=<\-256\-256>
+intra quantizer bias (256 == 1.0)
+.br
+mpeg style quantizer default: 96
+.br
+h263 style quantizer default: 0
+.br
+Note: the h263 MMX quantizer cannot handle positive biases (set vfdct=1or2)
+ the mpeg MMX quantizer cannot handle negative biases (set vfdct=1or2)
+.IPs pbias=<\-256\-256>
+inter quantizer bias (256 == 1.0)
+.br
+mpeg style quantizer default: 0
+.br
+h263 style quantizer default: -64
+.br
+Note: the h263 MMX quantizer cannot handle positive biases (set vfdct=1or2)
+ the mpeg MMX quantizer cannot handle negative biases (set vfdct=1or2)
.RE
.
.TP
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index 0b11819605..b7e79a4ed4 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -120,6 +120,10 @@ static int lavc_param_last_pred= 0;
static int lavc_param_pre_me= 1;
static int lavc_param_me_subpel_quality= 8;
static int lavc_param_me_range= 0;
+#if LIBAVCODEC_BUILD >= 4663
+static int lavc_param_ibias= FF_DEFAULT_QUANT_BIAS;
+static int lavc_param_pbias= FF_DEFAULT_QUANT_BIAS;
+#endif
#include "cfgparser.h"
@@ -201,6 +205,10 @@ struct config lavcopts_conf[]={
{"aic", &lavc_param_aic, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_AIC, NULL},
{"umv", &lavc_param_umv, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_UMV, NULL},
#endif
+#if LIBAVCODEC_BUILD >= 4663
+ {"ibias", &lavc_param_ibias, CONF_TYPE_INT, CONF_RANGE, -512, 512, NULL},
+ {"pbias", &lavc_param_pbias, CONF_TYPE_INT, CONF_RANGE, -512, 512, NULL},
+#endif
{NULL, NULL, 0, 0, 0, 0, NULL}
};
#endif
@@ -295,6 +303,10 @@ static int config(struct vf_instance_s* vf,
#if LIBAVCODEC_BUILD >= 4659
lavc_venc_context->me_range= lavc_param_me_range;
#endif
+#if LIBAVCODEC_BUILD >= 4663
+ lavc_venc_context->intra_quant_bias= lavc_param_ibias;
+ lavc_venc_context->inter_quant_bias= lavc_param_pbias;
+#endif
p= lavc_param_rc_override_string;
for(i=0; p; i++){
@@ -556,7 +568,6 @@ static void uninit(struct vf_instance_s* vf){
#if LIBAVCODEC_BUILD >= 4643
if(lavc_param_psnr){
double f= lavc_venc_context->width*lavc_venc_context->height*255.0*255.0;
-
f*= lavc_venc_context->coded_frame->coded_picture_number;
printf("PSNR: Y:%2.2f, Cb:%2.2f, Cr:%2.2f, All:%2.2f\n",