comparison svq1.c @ 2860:1c7921282a28 libavcodec

set a few variables correctly
author michael
date Mon, 05 Sep 2005 10:26:11 +0000
parents 0a8c847ad5e7
children ef2149182f1c
comparison
equal deleted inserted replaced
2859:079b5cca2497 2860:1c7921282a28
1116 s->m.mb_height= block_height; 1116 s->m.mb_height= block_height;
1117 s->m.mb_stride= s->m.mb_width+1; 1117 s->m.mb_stride= s->m.mb_width+1;
1118 s->m.b8_stride= 2*s->m.mb_width+1; 1118 s->m.b8_stride= 2*s->m.mb_width+1;
1119 s->m.f_code=1; 1119 s->m.f_code=1;
1120 s->m.pict_type= s->picture.pict_type; 1120 s->m.pict_type= s->picture.pict_type;
1121 s->m.qscale= s->picture.quality/FF_QP2LAMBDA;
1122 s->m.me_method= s->avctx->me_method; 1121 s->m.me_method= s->avctx->me_method;
1122 s->m.me.scene_change_score=0;
1123 s->m.flags= s->avctx->flags;
1124 // s->m.out_format = FMT_H263;
1125 // s->m.unrestricted_mv= 1;
1126
1127 s->m.lambda= s->picture.quality;
1128 s->m.qscale= (s->m.lambda*139 + FF_LAMBDA_SCALE*64) >> (FF_LAMBDA_SHIFT + 7);
1129 s->m.lambda2= (s->m.lambda*s->m.lambda + FF_LAMBDA_SCALE/2) >> FF_LAMBDA_SHIFT;
1123 1130
1124 if(!s->motion_val8[plane]){ 1131 if(!s->motion_val8[plane]){
1125 s->motion_val8 [plane]= av_mallocz((s->m.b8_stride*block_height*2 + 2)*2*sizeof(int16_t)); 1132 s->motion_val8 [plane]= av_mallocz((s->m.b8_stride*block_height*2 + 2)*2*sizeof(int16_t));
1126 s->motion_val16[plane]= av_mallocz((s->m.mb_stride*(block_height + 2) + 1)*2*sizeof(int16_t)); 1133 s->motion_val16[plane]= av_mallocz((s->m.mb_stride*(block_height + 2) + 1)*2*sizeof(int16_t));
1127 } 1134 }