1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-29 02:22:19 +00:00

qpel & pre ME improvements

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8804 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
michael 2003-01-05 16:06:18 +00:00
parent ddb751e5f1
commit b4fccbe1e4
2 changed files with 20 additions and 0 deletions

View File

@ -276,6 +276,7 @@ pred (for huffyuv)
qpel use quarter pel motion compensation
Tip: this seems only usefull for high bitrate encodings
precmp comparission function for motion estimation pre pass
cmp comparission function for full pel motion estimation
subcmp comparission function for sub pel motion estimation
0 SAD (sum of absolute differences) (default)
@ -289,6 +290,7 @@ subcmp comparission function for sub pel motion estimation
Tip2: when using SATD for full pel search u should use a larger diamond
something like dia=2 or dia=4
predia (-99 - 6) diamond type & size for motion estimation pre pass
dia (-99 - 6) diamond type & size for motion estimation
...
-3 shape adaptive diamond with size 3
@ -318,6 +320,7 @@ trell trellis quantization
lambda is a qp dependant constant
bits is the amount of bits needed to encode the block
error is simple the sum of squared errors of the quantization
Tip: this
last_pred (0-99) amount of motion predictors from the previous frame
0 (default)
@ -327,6 +330,10 @@ preme (0-2) Motion estimation pre-pass
0 disabled
1 only after I frames (default)
2 allways
subq (1-8) subpel refinement quality (for qpel)
8 (default)
Note: this has a significant effect on the speed
lavdopts: (decoder options)
---------------------------

View File

@ -107,14 +107,17 @@ static int lavc_param_prediction_method= FF_PRED_LEFT;
static char *lavc_param_format="YV12";
static int lavc_param_debug= 0;
static int lavc_param_psnr= 0;
static int lavc_param_me_pre_cmp= 0;
static int lavc_param_me_cmp= 0;
static int lavc_param_me_sub_cmp= 0;
static int lavc_param_mb_cmp= 0;
static int lavc_param_pre_dia_size= 0;
static int lavc_param_dia_size= 0;
static int lavc_param_qpel= 0;
static int lavc_param_trell= 0;
static int lavc_param_last_pred= 0;
static int lavc_param_pre_me= 1;
static int lavc_param_me_subpel_quality= 8;
#include "cfgparser.h"
@ -178,9 +181,11 @@ struct config lavcopts_conf[]={
#if LIBAVCODEC_BUILD >= 4643
{"psnr", &lavc_param_psnr, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PSNR, NULL},
#endif
{"precmp", &lavc_param_me_pre_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
{"cmp", &lavc_param_me_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
{"subcmp", &lavc_param_me_sub_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
{"mbcmp", &lavc_param_mb_cmp, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
{"predia", &lavc_param_pre_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL},
{"dia", &lavc_param_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL},
{"qpel", &lavc_param_qpel, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL, NULL},
#if LIBAVCODEC_BUILD >= 4648
@ -188,6 +193,7 @@ struct config lavcopts_conf[]={
#endif
{"last_pred", &lavc_param_last_pred, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
{"preme", &lavc_param_pre_me, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
{"subq", &lavc_param_me_subpel_quality, CONF_TYPE_INT, CONF_RANGE, 0, 8, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL}
};
#endif
@ -267,6 +273,13 @@ static int config(struct vf_instance_s* vf,
#if LIBAVCODEC_BUILD >= 4650
lavc_venc_context->pre_me= lavc_param_pre_me;
#endif
#if LIBAVCODEC_BUILD >= 4651
lavc_venc_context->me_pre_cmp= lavc_param_me_pre_cmp;
lavc_venc_context->pre_dia_size= lavc_param_pre_dia_size;
#endif
#if LIBAVCODEC_BUILD >= 4652
lavc_venc_context->me_subpel_quality= lavc_param_me_subpel_quality;
#endif
p= lavc_param_rc_override_string;
for(i=0; p; i++){