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: gmc.h,v 1.1.2.3 2003-09-10 22:18:59 edgomez Exp $ |
* $Id: gmc.h,v 1.1.2.5 2003-09-30 18:20:31 edgomez Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
32 |
{ |
{ |
33 |
int length = 1 << (fcode+4); |
int length = 1 << (fcode+4); |
34 |
|
|
35 |
|
#if 0 |
36 |
if (quarterpel) value *= 2; |
if (quarterpel) value *= 2; |
37 |
|
#endif |
38 |
|
|
39 |
if (value < -length) |
if (value < -length) |
40 |
return -length; |
return -length; |
83 |
}; |
}; |
84 |
#undef MLT |
#undef MLT |
85 |
|
|
|
////////////////////////////////////////////////////////// |
|
|
// Pts = 2 or 3 |
|
86 |
|
|
87 |
// Warning! *src is the global frame pointer (that is: adress |
/* ************************************************************ |
88 |
// of pixel 0,0), not the macroblock one. |
* Pts = 2 or 3 |
89 |
// Conversely, *dst is the macroblock top-left adress. |
* |
90 |
|
* Warning! *src is the global frame pointer (that is: adress |
91 |
|
* of pixel 0,0), not the macroblock one. |
92 |
|
* Conversely, *dst is the macroblock top-left adress. |
93 |
|
*/ |
94 |
|
|
95 |
void Predict_16x16_C(const NEW_GMC_DATA * const This, |
void Predict_16x16_C(const NEW_GMC_DATA * const This, |
96 |
uint8_t *dst, const uint8_t *src, |
uint8_t *dst, const uint8_t *src, |
104 |
void get_average_mv_C(const NEW_GMC_DATA * const Dsp, VECTOR * const mv, |
void get_average_mv_C(const NEW_GMC_DATA * const Dsp, VECTOR * const mv, |
105 |
int x, int y, int qpel); |
int x, int y, int qpel); |
106 |
|
|
107 |
/* ************************************************************ */ |
/* ************************************************************ |
108 |
// simplified version for 1 warp point |
* simplified version for 1 warp point |
109 |
|
*/ |
110 |
|
|
111 |
void Predict_1pt_16x16_C(const NEW_GMC_DATA * const This, |
void Predict_1pt_16x16_C(const NEW_GMC_DATA * const This, |
112 |
uint8_t *Dst, const uint8_t *Src, |
uint8_t *Dst, const uint8_t *Src, |
120 |
void get_average_mv_1pt_C(const NEW_GMC_DATA * const Dsp, VECTOR * const mv, |
void get_average_mv_1pt_C(const NEW_GMC_DATA * const Dsp, VECTOR * const mv, |
121 |
int x, int y, int qpel); |
int x, int y, int qpel); |
122 |
|
|
123 |
/* ************************************************************* */ |
/* ************************************************************* |
124 |
|
* Warning! It's Accuracy being passed, not 'resolution'! |
125 |
|
*/ |
|
// Warning! It's Accuracy being passed, not 'resolution'! |
|
126 |
|
|
127 |
void generate_GMCparameters(int nb_pts, const int accuracy, |
void generate_GMCparameters(int nb_pts, const int accuracy, |
128 |
const WARPPOINTS *const pts, |
const WARPPOINTS *const pts, |
129 |
const int width, const int height, |
const int width, const int height, |
130 |
NEW_GMC_DATA *const gmc); |
NEW_GMC_DATA *const gmc); |
131 |
|
|
132 |
/* ******************************************************************* */ |
/* ******************************************************************* |
133 |
|
*/ |
134 |
|
|
135 |
void |
void |
136 |
generate_GMCimage( const NEW_GMC_DATA *const gmc_data, // [input] precalculated data |
generate_GMCimage( const NEW_GMC_DATA *const gmc_data, /* [input] precalculated data */ |
137 |
const IMAGE *const pRef, // [input] |
const IMAGE *const pRef, /* [input] */ |
138 |
const int mb_width, |
const int mb_width, |
139 |
const int mb_height, |
const int mb_height, |
140 |
const int stride, |
const int stride, |
141 |
const int stride2, |
const int stride2, |
142 |
const int fcode, // [input] some parameters... |
const int fcode, /* [input] some parameters... */ |
143 |
const int32_t quarterpel, // [input] for rounding avgMV |
const int32_t quarterpel, /* [input] for rounding avgMV */ |
144 |
const int reduced_resolution, // [input] ignored |
const int reduced_resolution, /* [input] ignored */ |
145 |
const int32_t rounding, // [input] for rounding image data |
const int32_t rounding, /* [input] for rounding image data */ |
146 |
MACROBLOCK *const pMBs, // [output] average motion vectors |
MACROBLOCK *const pMBs, /* [output] average motion vectors */ |
147 |
IMAGE *const pGMC); // [output] full warped image |
IMAGE *const pGMC); /* [output] full warped image */ |
148 |
|
|