Mercurial > libavcodec.hg
comparison mpegvideo.c @ 2584:c07be5590462 libavcodec
motion estimation bitrate penalty compensation
author | michael |
---|---|
date | Sun, 27 Mar 2005 12:19:59 +0000 |
parents | e237d9bd0f8c |
children | ba6530ae8e34 |
comparison
equal
deleted
inserted
replaced
2583:61a08e2b9822 | 2584:c07be5590462 |
---|---|
5249 | 5249 |
5250 ff_init_me(s); | 5250 ff_init_me(s); |
5251 | 5251 |
5252 /* Estimate motion for every MB */ | 5252 /* Estimate motion for every MB */ |
5253 if(s->pict_type != I_TYPE){ | 5253 if(s->pict_type != I_TYPE){ |
5254 s->lambda = (s->lambda * s->avctx->me_penalty_compensation + 128)>>8; | |
5255 s->lambda2= (s->lambda2* s->avctx->me_penalty_compensation + 128)>>8; | |
5254 if(s->pict_type != B_TYPE && s->avctx->me_threshold==0){ | 5256 if(s->pict_type != B_TYPE && s->avctx->me_threshold==0){ |
5255 if((s->avctx->pre_me && s->last_non_b_pict_type==I_TYPE) || s->avctx->pre_me==2){ | 5257 if((s->avctx->pre_me && s->last_non_b_pict_type==I_TYPE) || s->avctx->pre_me==2){ |
5256 s->avctx->execute(s->avctx, pre_estimate_motion_thread, (void**)&(s->thread_context[0]), NULL, s->avctx->thread_count); | 5258 s->avctx->execute(s->avctx, pre_estimate_motion_thread, (void**)&(s->thread_context[0]), NULL, s->avctx->thread_count); |
5257 } | 5259 } |
5258 } | 5260 } |