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

BOOL Impala::Core::VideoSet::KfrMotionExtractor::CalcMotionVectors ( unsigned char *  pre,
unsigned char *  cur,
int  Width,
int  Height,
BYTE *  mvseq,
int  index 
) [inline]

Definition at line 866 of file KfrMotionExtractor.h.

References DiamondSearch16(), and MVBLOCKSIZE.

Referenced by HandleNewFrame().

00867     {
00868         // bWidth, bHeight: size of block grid
00869         int bWidth  = Width / MVBLOCKSIZE;
00870         int bHeight = Height / MVBLOCKSIZE;
00871 
00872         int i, j;
00873         int x, y, x_modify, y_modify;
00874         char sx, sy;
00875 
00876         if (pre == NULL || cur == NULL)
00877             return TRUE;
00878 
00879         int count=0;
00880         for (j = 0, y = 0; j < bHeight; j ++, y += 16)
00881         {
00882             for (i = 0, x = 0; i < bWidth; i ++, x += 16)
00883             {
00884                 x_modify = x;
00885                 y_modify = y;
00886                 DiamondSearch16(pre, cur, Width, Height, &x_modify, &y_modify);
00887                 //FullSearch16(pre, cur, Width, Height, &x_modify, &y_modify);
00888 
00889                 sx = x_modify - x;
00890                 sy = y_modify - y;
00891 
00892                 count += abs(sx)+abs(sy);
00893 
00894                 //m_MVseq = new BYTE[bWidth * bHeight * 2 * (window->WindowSize()-1)];
00895                 mvseq[bWidth*bHeight*2*index + 2*(j*bWidth+i) + 0] = sx;
00896                 mvseq[bWidth*bHeight*2*index + 2*(j*bWidth+i) + 1] = sy;
00897 
00898             }
00899         }
00900 
00901         return TRUE;
00902 
00903     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:30:22 2010 for ImpalaSrc by  doxygen 1.5.1