Mercurial > libavcodec.hg
diff mpegvideo.c @ 2015:3ab8f3e2ae6a libavcodec
moving motion estimation specific variables from MpegEncContext -> MotionEstContext
author | michael |
---|---|
date | Tue, 11 May 2004 01:38:46 +0000 |
parents | 8d3540dddd1b |
children | f65d87bfdd5a |
line wrap: on
line diff
--- a/mpegvideo.c Tue May 11 00:58:08 2004 +0000 +++ b/mpegvideo.c Tue May 11 01:38:46 2004 +0000 @@ -3958,7 +3958,7 @@ s->current_picture.mb_var [s->mb_stride * mb_y + mb_x] = varc; s->current_picture.mb_mean[s->mb_stride * mb_y + mb_x] = (sum+128)>>8; - s->mb_var_sum_temp += varc; + s->me.mb_var_sum_temp += varc; } } return 0; @@ -4552,9 +4552,9 @@ #define MERGE(field) dst->field += src->field; src->field=0 static void merge_context_after_me(MpegEncContext *dst, MpegEncContext *src){ - MERGE(scene_change_score); - MERGE(mc_mb_var_sum_temp); - MERGE(mb_var_sum_temp); + MERGE(me.scene_change_score); + MERGE(me.mc_mb_var_sum_temp); + MERGE(me.mb_var_sum_temp); } static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src){ @@ -4595,8 +4595,8 @@ s->picture_number = picture_number; /* Reset the average MB variance */ - s->mb_var_sum_temp = - s->mc_mb_var_sum_temp = 0; + s->me.mb_var_sum_temp = + s->me.mc_mb_var_sum_temp = 0; #ifdef CONFIG_RISKY /* we need to initialize some time vars before we can encode b-frames */ @@ -4605,7 +4605,7 @@ ff_set_mpeg4_time(s, s->picture_number); //FIXME rename and use has_b_frames or similar #endif - s->scene_change_score=0; + s->me.scene_change_score=0; s->lambda= s->current_picture_ptr->quality; //FIXME qscale / ... stuff for ME ratedistoration @@ -4646,11 +4646,11 @@ for(i=1; i<s->avctx->thread_count; i++){ merge_context_after_me(s, s->thread_context[i]); } - s->current_picture.mc_mb_var_sum= s->current_picture_ptr->mc_mb_var_sum= s->mc_mb_var_sum_temp; - s->current_picture. mb_var_sum= s->current_picture_ptr-> mb_var_sum= s-> mb_var_sum_temp; + s->current_picture.mc_mb_var_sum= s->current_picture_ptr->mc_mb_var_sum= s->me.mc_mb_var_sum_temp; + s->current_picture. mb_var_sum= s->current_picture_ptr-> mb_var_sum= s->me. mb_var_sum_temp; emms_c(); - if(s->scene_change_score > s->avctx->scenechange_threshold && s->pict_type == P_TYPE){ + if(s->me.scene_change_score > s->avctx->scenechange_threshold && s->pict_type == P_TYPE){ s->pict_type= I_TYPE; for(i=0; i<s->mb_stride*s->mb_height; i++) s->mb_type[i]= CANDIDATE_MB_TYPE_INTRA;