36 |
#include "../portab.h" |
#include "../portab.h" |
37 |
#include "../global.h" |
#include "../global.h" |
38 |
|
|
39 |
// fast ((A)/2)*2 |
/* fast ((A)/2)*2 */ |
40 |
#define EVEN(A) (((A)<0?(A)+1:(A)) & ~1) |
#define EVEN(A) (((A)<0?(A)+1:(A)) & ~1) |
41 |
|
|
42 |
#define MVzero(A) ( ((A).x)==(0) && ((A).y)==(0) ) |
#define MVzero(A) ( ((A).x)==(0) && ((A).y)==(0) ) |
87 |
|
|
88 |
void MotionEstimationBVOP(MBParam * const pParam, |
void MotionEstimationBVOP(MBParam * const pParam, |
89 |
FRAMEINFO * const frame, |
FRAMEINFO * const frame, |
90 |
// forward (past) reference |
/* forward (past) reference */ |
91 |
const int32_t time_bp, |
const int32_t time_bp, |
92 |
const int32_t time_pp, |
const int32_t time_pp, |
93 |
const MACROBLOCK * const f_mbs, |
const MACROBLOCK * const f_mbs, |
95 |
const IMAGE * const f_refH, |
const IMAGE * const f_refH, |
96 |
const IMAGE * const f_refV, |
const IMAGE * const f_refV, |
97 |
const IMAGE * const f_refHV, |
const IMAGE * const f_refHV, |
98 |
// backward (future) reference |
/* backward (future) reference */ |
99 |
const FRAMEINFO * const b_reference, |
const FRAMEINFO * const b_reference, |
100 |
const IMAGE * const b_ref, |
const IMAGE * const b_ref, |
101 |
const IMAGE * const b_refH, |
const IMAGE * const b_refH, |
121 |
/* GMC stuff. Maybe better put it into a separate file */ |
/* GMC stuff. Maybe better put it into a separate file */ |
122 |
|
|
123 |
void |
void |
124 |
generate_GMCparameters( const int num_wp, // [input]: number of warppoints |
generate_GMCparameters( const int num_wp, /* [input]: number of warppoints */ |
125 |
const int res, // [input]: resolution |
const int res, /* [input]: resolution */ |
126 |
const WARPPOINTS *const warp, // [input]: warp points |
const WARPPOINTS *const warp, /* [input]: warp points */ |
127 |
const int width, const int height, // [input]: without edges! |
const int width, const int height, /* [input]: without edges! */ |
128 |
GMC_DATA *const gmc); // [output] precalculated parameters |
GMC_DATA *const gmc); /* [output] precalculated parameters */ |
129 |
|
|
130 |
void |
void |
131 |
generate_GMCimage( const GMC_DATA *const gmc_data, // [input] precalculated data |
generate_GMCimage( const GMC_DATA *const gmc_data, /* [input] precalculated data */ |
132 |
const IMAGE *const pRef, // [input] |
const IMAGE *const pRef, /* [input] */ |
133 |
const int mb_width, |
const int mb_width, |
134 |
const int mb_height, |
const int mb_height, |
135 |
const int stride, |
const int stride, |
136 |
const int stride2, |
const int stride2, |
137 |
const int fcode, // [input] some parameters... |
const int fcode, /* [input] some parameters... */ |
138 |
const int32_t quarterpel, // [input] for rounding avgMV |
const int32_t quarterpel, /* [input] for rounding avgMV */ |
139 |
const int reduced_resolution, // [input] ignored |
const int reduced_resolution, /* [input] ignored */ |
140 |
const int32_t rounding, // [input] for rounding image data |
const int32_t rounding, /* [input] for rounding image data */ |
141 |
MACROBLOCK *const pMBs, // [output] average motion vectors |
MACROBLOCK *const pMBs, /* [output] average motion vectors */ |
142 |
IMAGE *const pGMC); // [output] full warped image |
IMAGE *const pGMC); /* [output] full warped image */ |
143 |
|
|
144 |
VECTOR generate_GMCimageMB( const GMC_DATA *const gmc_data, /* [input] all precalc data */ |
VECTOR generate_GMCimageMB( const GMC_DATA *const gmc_data, /* [input] all precalc data */ |
145 |
const IMAGE *const pRef, // [input] |
const IMAGE *const pRef, /* [input] */ |
146 |
const int mi, const int mj, /* [input] MB position */ |
const int mi, const int mj, /* [input] MB position */ |
147 |
const int stride, /* [input] Lumi stride */ |
const int stride, /* [input] Lumi stride */ |
148 |
const int stride2, /* [input] chroma stride */ |
const int stride2, /* [input] chroma stride */ |