diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-03-27 12:19:59 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-03-27 12:19:59 +0000 |
commit | 09c3e44e8a2ab04bd6ed56888e7f412b24512f2b (patch) | |
tree | d067b22bc709979b65ff209880e2f634d08fed50 /libavcodec/mpegvideo.c | |
parent | 048bfeeb12e9d0b8d7c5439deaada1ef6103a7bc (diff) | |
download | ffmpeg-09c3e44e8a2ab04bd6ed56888e7f412b24512f2b.tar.gz |
motion estimation bitrate penalty compensation
Originally committed as revision 4092 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 4dfd18c539..36bb267138 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -5251,6 +5251,8 @@ static void encode_picture(MpegEncContext *s, int picture_number) /* Estimate motion for every MB */ if(s->pict_type != I_TYPE){ + s->lambda = (s->lambda * s->avctx->me_penalty_compensation + 128)>>8; + s->lambda2= (s->lambda2* s->avctx->me_penalty_compensation + 128)>>8; if(s->pict_type != B_TYPE && s->avctx->me_threshold==0){ if((s->avctx->pre_me && s->last_non_b_pict_type==I_TYPE) || s->avctx->pre_me==2){ s->avctx->execute(s->avctx, pre_estimate_motion_thread, (void**)&(s->thread_context[0]), NULL, s->avctx->thread_count); |