Doxygen Source Code Documentation
        
Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search   
search.h
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 #include "ansi.h"
00070 
00071 
00072 
00073 
00074 
00075 
00076 #define PSEARCH_SUBSAMPLE   0
00077 #define PSEARCH_EXHAUSTIVE  1
00078 #define PSEARCH_LOGARITHMIC 2
00079 #define PSEARCH_TWOLEVEL    3
00080 
00081 #define BSEARCH_EXHAUSTIVE  0
00082 #define BSEARCH_CROSS2      1
00083 #define BSEARCH_SIMPLE      2
00084 
00085 
00086 
00087 
00088 
00089 
00090 #define COMPUTE_MOTION_BOUNDARY(by,bx,stepSize,leftMY,leftMX,rightMY,rightMX)\
00091     leftMY = -2*DCTSIZE*by;              \
00092     leftMX = -2*DCTSIZE*bx;                                                  \
00093                                        \
00094     rightMY = 2*(Fsize_y - (by+2)*DCTSIZE + 1) - 1;                          \
00095     rightMX = 2*(Fsize_x - (bx+2)*DCTSIZE + 1) - 1;                          \
00096                                                                              \
00097     if ( stepSize == 2 ) {                                                   \
00098         rightMY++;                                                           \
00099         rightMX++;                                                           \
00100     }
00101     
00102 #define VALID_MOTION(y,x)       \
00103     (((y) >= leftMY) && ((y) < rightMY) &&   \
00104      ((x) >= leftMX) && ((x) < rightMX) )
00105 
00106 
00107 
00108 
00109 
00110 
00111 void    SetPSearchAlg _ANSI_ARGS_((char *alg));
00112 void    SetBSearchAlg _ANSI_ARGS_((char *alg));
00113 char    *BSearchName _ANSI_ARGS_((void));
00114 char    *PSearchName _ANSI_ARGS_((void));
00115 int32   PLogarithmicSearch _ANSI_ARGS_((LumBlock currentBlock,
00116                                         MpegFrame *prev,
00117                                         int by, int bx,
00118                                         int *motionY, int *motionX, int searchRange));
00119 int32   PSubSampleSearch _ANSI_ARGS_((LumBlock currentBlock,
00120                                               MpegFrame *prev, int by, int bx,
00121                                               int *motionY, int *motionX, int searchRange));
00122 int32   PLocalSearch _ANSI_ARGS_((LumBlock currentBlock,
00123                                           MpegFrame *prev, int by, int bx,
00124                                           int *motionY, int *motionX,
00125                                           int32 bestSoFar, int searchRange));
00126 int32   PTwoLevelSearch _ANSI_ARGS_((LumBlock currentBlock,
00127                                      MpegFrame *prev, int by, int bx,
00128                                      int *motionY, int *motionX,
00129                                      int32 bestSoFar, int searchRange));
00130 boolean PMotionSearch _ANSI_ARGS_((LumBlock currentBlock,
00131                                    MpegFrame *prev,
00132                                    int by, int bx,
00133                                    int *motionY, int *motionX));
00134 
00135 
00136 
00137 
00138 
00139 
00140 extern int psearchAlg;
00141