21 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 |
* |
* |
24 |
* $Id: motion_est.c,v 1.58.2.22 2003-07-13 09:58:44 syskin Exp $ |
* $Id: motion_est.c,v 1.58.2.23 2003-07-24 13:09:01 Isibaar Exp $ |
25 |
* |
* |
26 |
****************************************************************************/ |
****************************************************************************/ |
27 |
|
|
979 |
} |
} |
980 |
|
|
981 |
static __inline void |
static __inline void |
982 |
|
ZeroMacroblockP(MACROBLOCK *pMB, const int32_t sad) |
983 |
|
{ |
984 |
|
pMB->mode = MODE_INTER; |
985 |
|
pMB->mvs[0] = pMB->mvs[1] = pMB->mvs[2] = pMB->mvs[3] = zeroMV; |
986 |
|
pMB->qmvs[0] = pMB->qmvs[1] = pMB->qmvs[2] = pMB->qmvs[3] = zeroMV; |
987 |
|
pMB->sad16 = pMB->sad8[0] = pMB->sad8[1] = pMB->sad8[2] = pMB->sad8[3] = sad; |
988 |
|
} |
989 |
|
|
990 |
|
static __inline void |
991 |
ModeDecision(SearchData * const Data, |
ModeDecision(SearchData * const Data, |
992 |
MACROBLOCK * const pMB, |
MACROBLOCK * const pMB, |
993 |
const MACROBLOCK * const pMBs, |
const MACROBLOCK * const pMBs, |
1259 |
} |
} |
1260 |
} |
} |
1261 |
|
|
1262 |
|
if ((current->vop_flags & XVID_VOP_CARTOON) && |
1263 |
|
(sad00 < pMB->quant * 4 * skip_thresh)) { /* favorize (0,0) vector for cartoons */ |
1264 |
|
ZeroMacroblockP(pMB, sad00); |
1265 |
|
continue; |
1266 |
|
} |
1267 |
|
|
1268 |
SearchP(pRef, pRefH->y, pRefV->y, pRefHV->y, pCurrent, x, |
SearchP(pRef, pRefH->y, pRefV->y, pRefHV->y, pCurrent, x, |
1269 |
y, MotionFlags, current->vop_flags, current->vol_flags, |
y, MotionFlags, current->vop_flags, current->vol_flags, |
1270 |
&Data, pParam, pMBs, reference->mbs, pMB); |
&Data, pParam, pMBs, reference->mbs, pMB); |