diff options
Diffstat (limited to 'libavcodec/motion_est_template.c')
-rw-r--r-- | libavcodec/motion_est_template.c | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index 575dadd269..01936c6a83 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -63,8 +63,8 @@ static int hpel_motion_search(MpegEncContext * s, //FIXME factorize - cmp_sub= s->dsp.me_sub_cmp[size]; - chroma_cmp_sub= s->dsp.me_sub_cmp[size+1]; + cmp_sub = s->mecc.me_sub_cmp[size]; + chroma_cmp_sub = s->mecc.me_sub_cmp[size + 1]; if(c->skip){ //FIXME move out of hpel? *mx_ptr = 0; @@ -166,7 +166,6 @@ static inline int get_mb_score(MpegEncContext *s, int mx, int my, int src_index, int ref_index, int size, int h, int add_rate) { -// const int check_luma= s->dsp.me_sub_cmp != s->dsp.mb_cmp; MotionEstContext * const c= &s->me; const int penalty_factor= c->mb_penalty_factor; const int flags= c->mb_flags; @@ -179,8 +178,8 @@ static inline int get_mb_score(MpegEncContext *s, int mx, int my, //FIXME factorize - cmp_sub= s->dsp.mb_cmp[size]; - chroma_cmp_sub= s->dsp.mb_cmp[size+1]; + cmp_sub = s->mecc.mb_cmp[size]; + chroma_cmp_sub = s->mecc.mb_cmp[size + 1]; // assert(!c->skip); // assert(c->avctx->me_sub_cmp != c->avctx->mb_cmp); @@ -226,12 +225,12 @@ static int qpel_motion_search(MpegEncContext * s, LOAD_COMMON int flags= c->sub_flags; - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; //factorize FIXME + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; // FIXME: factorize //FIXME factorize - cmp_sub= s->dsp.me_sub_cmp[size]; - chroma_cmp_sub= s->dsp.me_sub_cmp[size+1]; + cmp_sub = s->mecc.me_sub_cmp[size]; + chroma_cmp_sub = s->mecc.me_sub_cmp[size + 1]; if(c->skip){ //FIXME somehow move up (benchmark) *mx_ptr = 0; @@ -427,8 +426,8 @@ static av_always_inline int small_diamond_search(MpegEncContext * s, int *best, LOAD_COMMON2 unsigned map_generation = c->map_generation; - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; { /* ensure that the best point is in the MAP as h/qpel refinement needs it */ const unsigned key = (best[1]<<ME_MAP_MV_BITS) + best[0] + map_generation; @@ -468,8 +467,8 @@ static int funny_diamond_search(MpegEncContext * s, int *best, int dmin, LOAD_COMMON2 unsigned map_generation = c->map_generation; - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; for(dia_size=1; dia_size<=4; dia_size++){ int dir; @@ -511,8 +510,8 @@ static int hex_search(MpegEncContext * s, int *best, int dmin, int x,y,d; const int dec= dia_size & (dia_size-1); - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; for(;dia_size; dia_size= dec ? dia_size-1 : dia_size>>1){ do{ @@ -548,8 +547,8 @@ static int l2s_dia_search(MpegEncContext * s, int *best, int dmin, static const int hex[8][2]={{-2, 0}, {-1,-1}, { 0,-2}, { 1,-1}, { 2, 0}, { 1, 1}, { 0, 2}, {-1, 1}}; - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; for(; dia_size; dia_size= dec ? dia_size-1 : dia_size>>1){ do{ @@ -587,8 +586,8 @@ static int umh_search(MpegEncContext * s, int *best, int dmin, {-2, 3}, { 0, 4}, { 2, 3}, {-2,-3}, { 0,-4}, { 2,-3},}; - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; x= best[0]; y= best[1]; @@ -630,8 +629,8 @@ static int full_search(MpegEncContext * s, int *best, int dmin, int x,y, d; const int dia_size= c->dia_size&0xFF; - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; for(y=FFMAX(-dia_size, ymin); y<=FFMIN(dia_size,ymax); y++){ for(x=FFMAX(-dia_size, xmin); x<=FFMIN(dia_size,xmax); x++){ @@ -694,8 +693,8 @@ static int sab_diamond_search(MpegEncContext * s, int *best, int dmin, LOAD_COMMON2 unsigned map_generation = c->map_generation; - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; /*Note j<MAX_SAB_SIZE is needed if MAX_SAB_SIZE < ME_MAP_SIZE as j can become larger due to MVs overflowing their ME_MAP_MV_BITS bits space in map @@ -779,8 +778,8 @@ static int var_diamond_search(MpegEncContext * s, int *best, int dmin, LOAD_COMMON2 unsigned map_generation = c->map_generation; - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; for(dia_size=1; dia_size<=c->dia_size; dia_size++){ int dir, start, end; @@ -880,12 +879,12 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int 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]; + cmpf = s->mecc.me_pre_cmp[size]; + chroma_cmpf = s->mecc.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]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; } map_generation= update_map_generation(c); @@ -1009,8 +1008,8 @@ static int epzs_motion_search4(MpegEncContext * s, int flags= c->flags; LOAD_COMMON2 - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; map_generation= update_map_generation(c); @@ -1068,8 +1067,8 @@ static int epzs_motion_search2(MpegEncContext * s, int flags= c->flags; LOAD_COMMON2 - cmpf= s->dsp.me_cmp[size]; - chroma_cmpf= s->dsp.me_cmp[size+1]; + cmpf = s->mecc.me_cmp[size]; + chroma_cmpf = s->mecc.me_cmp[size + 1]; map_generation= update_map_generation(c); |