diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 4cf8a68df7..12e12571b1 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -1140,7 +1140,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s, dmin= c->sub_motion_search(s, &mx, &my, dmin, 0, 0, 0, 16); if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip) - dmin= ff_get_mb_score(s, mx, my, 0, 0, 0, 16, 1); + dmin= get_mb_score(s, mx, my, 0, 0, 0, 16, 1); if((s->flags&CODEC_FLAG_4MV) && !c->skip && varc>50<<8 && vard>10<<8){ @@ -1312,7 +1312,7 @@ static int ff_estimate_motion_b(MpegEncContext * s, dmin= c->sub_motion_search(s, &mx, &my, dmin, 0, ref_index, 0, 16); if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip) - dmin= ff_get_mb_score(s, mx, my, 0, ref_index, 0, 16, 1); + dmin= get_mb_score(s, mx, my, 0, ref_index, 0, 16, 1); //printf("%d %d %d %d//", s->mb_x, s->mb_y, mx, my); // s->mb_type[mb_y*s->mb_width + mb_x]= mb_type; @@ -1624,7 +1624,7 @@ static inline int direct_search(MpegEncContext * s, int mb_x, int mb_y) dmin = hpel_motion_search(s, &mx, &my, dmin, 0, 0, 0, 16); if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip) - dmin= ff_get_mb_score(s, mx, my, 0, 0, 0, 16, 1); + dmin= get_mb_score(s, mx, my, 0, 0, 0, 16, 1); get_limits(s, 16*mb_x, 16*mb_y); //restore c->?min/max, maybe not needed diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index d0d4b4107a..136d8b8494 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -160,8 +160,9 @@ static int no_sub_motion_search(MpegEncContext * s, return dmin; } -inline int ff_get_mb_score(MpegEncContext * s, int mx, int my, int src_index, - int ref_index, int size, int h, int add_rate) +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; @@ -190,6 +191,12 @@ inline int ff_get_mb_score(MpegEncContext * s, int mx, int my, int src_index, return d; } +int ff_get_mb_score(MpegEncContext *s, int mx, int my, int src_index, + int ref_index, int size, int h, int add_rate) +{ + return get_mb_score(s, mx, my, src_index, ref_index, size, h, add_rate); +} + #define CHECK_QUARTER_MV(dx, dy, x, y)\ {\ const int hx= 4*(x)+(dx);\ @@ -972,9 +979,10 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int } //this function is dedicated to the braindamaged gcc -inline int ff_epzs_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr, - int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2], - int ref_mv_scale, int size, int h) +int ff_epzs_motion_search(MpegEncContext *s, int *mx_ptr, int *my_ptr, + int P[10][2], int src_index, int ref_index, + int16_t (*last_mv)[2], int ref_mv_scale, + int size, int h) { MotionEstContext * const c= &s->me; //FIXME convert other functions in the same way if faster