Lines Matching refs:best

255         int best[8];
258 memset(best, 64, sizeof(int)*8);
282 if(score < best[i]){
283 memmove(&best[i+1], &best[i], sizeof(int)*(7-i));
285 best[i]= score;
330 if(score < best[i]){
331 memmove(&best[i+1], &best[i], sizeof(int)*(7-i));
333 best[i]= score;
374 COPY3_IF_LT(dmin, d, best[0], x, best[1], y)\
397 best[0]=x;\
398 best[1]=y;\
416 static av_always_inline int small_diamond_search(MpegEncContext * s, int *best, int dmin,
430 { /* ensure that the best point is in the MAP as h/qpel refinement needs it */
431 const unsigned key = ((unsigned)best[1]<<ME_MAP_MV_BITS) + best[0] + map_generation;
432 const int index= (((unsigned)best[1]<<ME_MAP_SHIFT) + best[0])&(ME_MAP_SIZE-1);
434 score_map[index]= cmp(s, best[0], best[1], 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);
442 const int x= best[0];
443 const int y= best[1];
457 static int funny_diamond_search(MpegEncContext * s, int *best, int dmin,
473 const int x= best[0];
474 const int y= best[1];
493 if(x!=best[0] || y!=best[1])
499 static int hex_search(MpegEncContext * s, int *best, int dmin,
516 x= best[0];
517 y= best[1];
527 }while(best[0] != x || best[1] != y);
533 static int l2s_dia_search(MpegEncContext * s, int *best, int dmin,
553 x= best[0];
554 y= best[1];
558 }while(best[0] != x || best[1] != y);
561 x= best[0];
562 y= best[1];
571 static int umh_search(MpegEncContext * s, int *best, int dmin,
590 x= best[0];
591 y= best[1];
599 x= best[0];
600 y= best[1];
615 return hex_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags, 2);
618 static int full_search(MpegEncContext * s, int *best, int dmin,
639 x= best[0];
640 y= best[1];
647 best[0]= x;
648 best[1]= y;
681 static int sab_diamond_search(MpegEncContext * s, int *best, int dmin,
755 best[0]= minima[0].x;
756 best[1]= minima[0].y;
759 if( best[0] < xmax && best[0] > xmin
760 && best[1] < ymax && best[1] > ymin){
763 CHECK_MV(best[0]-1, best[1])
764 CHECK_MV(best[0]+1, best[1])
765 CHECK_MV(best[0], best[1]-1)
766 CHECK_MV(best[0], best[1]+1)
771 static int var_diamond_search(MpegEncContext * s, int *best, int dmin,
787 const int x= best[0];
788 const int y= best[1];
826 if(x!=best[0] || y!=best[1])
832 static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dmin,
837 return funny_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
839 return sab_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
841 return small_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
843 return full_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
845 return umh_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
847 return hex_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags, c->dia_size&0xFF);
849 return l2s_dia_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
851 return var_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
865 int best[2]={0, 0}; /**< x and y coordinates of the best motion vector.
870 int dmin; /**< the best value of d, i.e. the score
871 corresponding to the mv stored in best[]. */
966 //check(best[0],best[1],0, b0)
967 dmin= diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
969 //check(best[0],best[1],0, b1)
970 *mx_ptr= best[0];
971 *my_ptr= best[1];
999 int best[2]={0, 0};
1042 dmin= diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
1044 *mx_ptr= best[0];
1045 *my_ptr= best[1];