Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

int Impala::Core::VideoSet::KfrMotionExtractor::FullSearch16 ( unsigned char *  refframe,
unsigned char *  desframe,
int  framewidth,
int  frameheight,
int *  cx,
int *  cy 
) [inline]

Definition at line 1072 of file KfrMotionExtractor.h.

References GetMotionError16(), and MAX_DISP.

01073     {
01074         int minerror;
01075         int curX, curY;
01076         int error, oX, oY;
01077         int sx, sy;
01078 
01079         int i, j;
01080         unsigned char * block;
01081         block = desframe + * cy * framewidth + * cx;
01082 
01083         // first
01084         oX = curX = * cx; 
01085         oY = curY = * cy;
01086         if (curX < 0 || curX > framewidth - 16|| curY < 0 || curY > frameheight - 16) 
01087         {
01088             * cx = * cy = 0;
01089             return -1;
01090         }
01091         minerror = GetMotionError16(refframe, block, framewidth, curX, curY);
01092 
01093         for (i = 1; i <= MAX_DISP; i ++)
01094         {
01095             sx = sy = -i;
01096             for (j = 0; j < 8 * i; j ++)
01097             {
01098                 curX = oX + sx;
01099                 curY = oY + sy;
01100 
01101                 if (!(curX < 0 || curX > framewidth - 16|| curY < 0 || curY > frameheight - 16))
01102                 {
01103                     error = GetMotionError16(refframe, block, framewidth, curX, curY);
01104                     if (error < minerror)
01105                     {
01106                         minerror = error;
01107                         * cx = curX;
01108                         * cy = curY;
01109                     }
01110                 }
01111 
01112                 if (j < 2 * i) sx++;
01113                 else if (j < 4 * i) sy++;
01114                 else if (j < 6 * i) sx--;
01115                 else sy--;
01116             }
01117         }
01118 
01119         return minerror;
01120 
01121     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:22:01 2011 for ImpalaSrc by  doxygen 1.5.1