summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-22 12:46:44 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-22 12:46:44 +0000
commit4e3270d131bfb865487c3d3d868e1c4738b87d19 (patch)
tree7b19bfa8e33c4019b65888cdac7e39b934d54fee
parent169af37678fc9a229fb1a7eace20ed381fadd66c (diff)
downloadmpv-4e3270d131bfb865487c3d3d868e1c4738b87d19.tar.bz2
mpv-4e3270d131bfb865487c3d3d868e1c4738b87d19.tar.xz
lavc 4663 / quantizer bias
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9646 b3059339-0415-0410-9bf9-f77b7e298cf2
-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",