# HG changeset patch # User michael # Date 1041782778 0 # Node ID 324afc962aee48e4c9c6ceeaebfbf8b7ec40d107 # Parent dc9f50b54a8736838e97f0942bf3e9136b3a9e16 qpel & pre ME improvements diff -r dc9f50b54a87 -r 324afc962aee DOCS/tech/libavc-options.txt --- a/DOCS/tech/libavc-options.txt Sun Jan 05 15:45:55 2003 +0000 +++ b/DOCS/tech/libavc-options.txt Sun Jan 05 16:06:18 2003 +0000 @@ -276,6 +276,7 @@ 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 @@ 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 @@ 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 @@ 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) --------------------------- diff -r dc9f50b54a87 -r 324afc962aee libmpcodecs/ve_lavc.c --- a/libmpcodecs/ve_lavc.c Sun Jan 05 15:45:55 2003 +0000 +++ b/libmpcodecs/ve_lavc.c Sun Jan 05 16:06:18 2003 +0000 @@ -107,14 +107,17 @@ 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 @@ #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 @@ #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 @@ #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++){