Mercurial > libavcodec.hg
changeset 2226:4306aa6f8f16 libavcodec
pre_cmp fix
author | michael |
---|---|
date | Mon, 13 Sep 2004 12:37:39 +0000 |
parents | 35fc37209ea0 |
children | bf414a07af2e |
files | motion_est_template.c |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/motion_est_template.c Mon Sep 13 03:27:53 2004 +0000 +++ b/motion_est_template.c Mon Sep 13 12:37:39 2004 +0000 @@ -855,7 +855,7 @@ int best[2]={0, 0}; int d, dmin; int map_generation; - const int penalty_factor= c->penalty_factor; + int penalty_factor; const int ref_mv_stride= s->mb_stride; //pass as arg FIXME const int ref_mv_xy= s->mb_x + s->mb_y*ref_mv_stride; //add to last_mv beforepassing FIXME me_cmp_func cmpf, chroma_cmpf; @@ -863,8 +863,15 @@ LOAD_COMMON LOAD_COMMON2 - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + if(c->pre_pass){ + penalty_factor= c->pre_penalty_factor; + cmpf= s->dsp.me_pre_cmp[size]; + chroma_cmpf= s->dsp.me_pre_cmp[size+1]; + }else{ + penalty_factor= c->penalty_factor; + cmpf= s->dsp.me_cmp[size]; + chroma_cmpf= s->dsp.me_cmp[size+1]; + } map_generation= update_map_generation(c);