Mercurial > libavcodec.hg
changeset 2053:c46e203dd698 libavcodec
change qscale -> lambda for the motion estimation
finetune bit/distortion weighting factor used in motion estimation, the old coeffs where finetuned relative to incorrect mv_penalty tables which where then fixed later but the coeffs where not
this _may_ fix the long standing blocking artifacts, but may also introduce mudding artefacts theoretically, so please tell us if u stumble across any so we can either fix them or export this variable so the user can change it
author | michael |
---|---|
date | Thu, 03 Jun 2004 19:29:47 +0000 |
parents | 4032a03192ec |
children | 06d6a6bade18 |
files | motion_est.c mpegvideo.c |
diffstat | 2 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/motion_est.c Thu Jun 03 14:17:59 2004 +0000 +++ b/motion_est.c Thu Jun 03 19:29:47 2004 +0000 @@ -223,18 +223,17 @@ switch(type&0xFF){ default: case FF_CMP_SAD: - return s->qscale*2; + return s->lambda>>FF_LAMBDA_SHIFT; case FF_CMP_DCT: - return s->qscale*3; + return (3*s->lambda)>>(FF_LAMBDA_SHIFT+1); case FF_CMP_SATD: - return s->qscale*6; + return (2*s->lambda)>>FF_LAMBDA_SHIFT; + case FF_CMP_RD: + case FF_CMP_PSNR: case FF_CMP_SSE: - return s->qscale*s->qscale*2; + return s->lambda2>>FF_LAMBDA_SHIFT; case FF_CMP_BIT: return 1; - case FF_CMP_RD: - case FF_CMP_PSNR: - return (s->qscale*s->qscale*185 + 64)>>7; } }
--- a/mpegvideo.c Thu Jun 03 14:17:59 2004 +0000 +++ b/mpegvideo.c Thu Jun 03 19:29:47 2004 +0000 @@ -4623,7 +4623,7 @@ s->me.scene_change_score=0; - s->lambda= s->current_picture_ptr->quality; //FIXME qscale / ... stuff for ME ratedistoration +// s->lambda= s->current_picture_ptr->quality; //FIXME qscale / ... stuff for ME ratedistoration if(s->pict_type==I_TYPE){ if(s->msmpeg4_version >= 3) s->no_rounding=1;