nsse weight

Originally committed as revision 3205 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2004-06-07 17:30:02 +00:00
parent e6a2ac3474
commit d4c5d2adf3
4 changed files with 21 additions and 12 deletions

View file

@ -223,7 +223,6 @@ static inline int get_penalty_factor(MpegEncContext *s, int type){
switch(type&0xFF){
default:
case FF_CMP_SAD:
case FF_CMP_NSSE:
return s->lambda>>FF_LAMBDA_SHIFT;
case FF_CMP_DCT:
return (3*s->lambda)>>(FF_LAMBDA_SHIFT+1);
@ -232,6 +231,7 @@ static inline int get_penalty_factor(MpegEncContext *s, int type){
case FF_CMP_RD:
case FF_CMP_PSNR:
case FF_CMP_SSE:
case FF_CMP_NSSE:
return s->lambda2>>FF_LAMBDA_SHIFT;
case FF_CMP_BIT:
return 1;