Definition at line 873 of file KfrMotionExtractor.h. References DiamondSearch16(), and MVBLOCKSIZE. Referenced by HandleNewFrame(). 00874 { 00875 // bWidth, bHeight: size of block grid 00876 int bWidth = Width / MVBLOCKSIZE; 00877 int bHeight = Height / MVBLOCKSIZE; 00878 00879 int i, j; 00880 int x, y, x_modify, y_modify; 00881 char sx, sy; 00882 00883 if (pre == NULL || cur == NULL) 00884 return TRUE; 00885 00886 int count=0; 00887 for (j = 0, y = 0; j < bHeight; j ++, y += 16) 00888 { 00889 for (i = 0, x = 0; i < bWidth; i ++, x += 16) 00890 { 00891 x_modify = x; 00892 y_modify = y; 00893 DiamondSearch16(pre, cur, Width, Height, &x_modify, &y_modify); 00894 //FullSearch16(pre, cur, Width, Height, &x_modify, &y_modify); 00895 00896 sx = x_modify - x; 00897 sy = y_modify - y; 00898 00899 count += abs(sx)+abs(sy); 00900 00901 //m_MVseq = new BYTE[bWidth * bHeight * 2 * (window->WindowSize()-1)]; 00902 mvseq[bWidth*bHeight*2*index + 2*(j*bWidth+i) + 0] = sx; 00903 mvseq[bWidth*bHeight*2*index + 2*(j*bWidth+i) + 1] = sy; 00904 00905 } 00906 } 00907 00908 return TRUE; 00909 00910 }
Here is the call graph for this function:
|