19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: estimation_gmc.c,v 1.1.2.2 2003-09-30 18:20:31 edgomez Exp $ |
* $Id: estimation_gmc.c,v 1.1.2.3 2003-11-19 12:24:25 syskin Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
39 |
#include "motion_inlines.h" |
#include "motion_inlines.h" |
40 |
|
|
41 |
static void |
static void |
42 |
CheckCandidate16I(const int x, const int y, const SearchData * const data, const unsigned int Direction) |
CheckCandidate16I(const int x, const int y, SearchData * const data, const unsigned int Direction) |
43 |
{ |
{ |
44 |
int sad; |
int sad; |
45 |
const uint8_t * Reference; |
const uint8_t * Reference; |
54 |
if (sad < data->iMinSAD[0]) { |
if (sad < data->iMinSAD[0]) { |
55 |
data->iMinSAD[0] = sad; |
data->iMinSAD[0] = sad; |
56 |
data->currentMV[0].x = x; data->currentMV[0].y = y; |
data->currentMV[0].x = x; data->currentMV[0].y = y; |
57 |
*data->dir = Direction; |
data->dir = Direction; |
58 |
} |
} |
59 |
} |
} |
60 |
|
|
129 |
const IMAGE * const pCurrent = ¤t->image; |
const IMAGE * const pCurrent = ¤t->image; |
130 |
const IMAGE * const pReference = &reference->image; |
const IMAGE * const pReference = &reference->image; |
131 |
|
|
|
int32_t iMinSAD[5], temp[5]; |
|
|
VECTOR currentMV[5]; |
|
|
uint32_t dir; |
|
132 |
SearchData Data; |
SearchData Data; |
133 |
memset(&Data, 0, sizeof(SearchData)); |
memset(&Data, 0, sizeof(SearchData)); |
134 |
|
|
135 |
Data.iEdgedWidth = pParam->edged_width; |
Data.iEdgedWidth = pParam->edged_width; |
136 |
Data.rounding = pParam->m_rounding_type; |
Data.rounding = pParam->m_rounding_type; |
137 |
|
|
|
Data.currentMV = ¤tMV[0]; |
|
|
Data.iMinSAD = &iMinSAD[0]; |
|
138 |
Data.iFcode = current->fcode; |
Data.iFcode = current->fcode; |
|
Data.temp = temp; |
|
|
Data.dir = &dir; |
|
139 |
|
|
140 |
if (sadInit) (*sadInit) (); |
if (sadInit) (*sadInit) (); |
141 |
|
|