X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmotion_est_template.c;h=6ab0ea13dc959ea06fe99c81da9ecd8688679c52;hb=1ec87f50f42a16f9228444dc08aa8264879f61e1;hp=014038e54fc4600de2ddcaeb193a861d5a6af1bc;hpb=a2ae381b5a6f50669bcbd37001c110567a61f446;p=ffmpeg diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index 014038e54fc..6ab0ea13dc9 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -34,7 +34,7 @@ const int av_unused ymin= c->ymin;\ const int av_unused xmax= c->xmax;\ const int av_unused ymax= c->ymax;\ - uint8_t *mv_penalty= c->current_mv_penalty;\ + const uint8_t *mv_penalty = c->current_mv_penalty; \ const int pred_x= c->pred_x;\ const int pred_y= c->pred_y;\ @@ -82,7 +82,7 @@ static int hpel_motion_search(MpegEncContext * s, if (mx > xmin && mx < xmax && my > ymin && my < ymax) { int d= dmin; - const int index= (my<penalty_factor; const int l= score_map[(index- 1 )&(ME_MAP_SIZE-1)] @@ -95,13 +95,13 @@ static int hpel_motion_search(MpegEncContext * s, #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1 unsigned key; unsigned map_generation= c->map_generation; - key= ((my-1)<map[(index-(1<map[(index+(1<map[(index+1)&(ME_MAP_SIZE-1)] == key); - key= ((my)<map[(index-1)&(ME_MAP_SIZE-1)] == key); #endif if(t<=b){ @@ -157,8 +157,8 @@ static int no_sub_motion_search(MpegEncContext * s, int src_index, int ref_index, int size, int h) { - (*mx_ptr)<<=1; - (*my_ptr)<<=1; + (*mx_ptr) *= 2; + (*my_ptr) *= 2; return dmin; } @@ -246,7 +246,7 @@ static int qpel_motion_search(MpegEncContext * s, int bx=4*mx, by=4*my; int d= dmin; int i, nx, ny; - const int index= (my<