1 |
/************************************************************************** |
/************************************************************************** |
2 |
* |
* |
3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - SMP Motion search header - |
* - Multithreaded motion estimation - |
5 |
* |
* |
6 |
* This program is an implementation of a part of one or more MPEG-4 |
* Copyright(C) 2002-2003 Christoph Lampert <gruel@web.de> |
|
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
|
|
* to use this software module in hardware or software products are |
|
|
* advised that its use may infringe existing patents or copyrights, and |
|
|
* any such use would be at such party's own risk. The original |
|
|
* developer of this software module and his/her company, and subsequent |
|
|
* editors and their companies, will have no liability for use of this |
|
|
* software or modifications or derivatives thereof. |
|
7 |
* |
* |
8 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
9 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
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: smp_motion_est.h,v 1.4 2003-02-15 15:22:19 edgomez Exp $ |
* $Id: smp_motion_est.h,v 1.4.2.2 2003-06-09 13:54:59 edgomez Exp $ |
23 |
* |
* |
24 |
***************************************************************************/ |
*************************************************************************/ |
25 |
|
|
26 |
#ifndef _SMP_MOTION_EST_H |
#ifndef _SMP_MOTION_EST_H |
27 |
#define _SMP_MOTION_EST_H |
#define _SMP_MOTION_EST_H |
28 |
|
|
29 |
#ifdef _SMP |
#ifdef _SMP |
30 |
|
|
31 |
#define MAXNUMTHREADS 16 |
#error SMP support has been removed until B-frame API is stable. |
|
|
|
|
//#define NUMTHREADS 2 |
|
|
|
|
|
typedef struct |
|
|
{ |
|
|
|
|
|
MBParam * pParam; |
|
|
|
|
|
FRAMEINFO* reference; |
|
|
FRAMEINFO* current; |
|
|
|
|
|
IMAGE* pRef; |
|
|
IMAGE* pRefH; |
|
|
IMAGE* pRefV; |
|
|
IMAGE* pRefHV; |
|
|
|
|
|
// int iLimit; /* currently unused */ |
|
|
|
|
|
MACROBLOCK * pMBs; |
|
|
MACROBLOCK * prevMBs; |
|
|
|
|
|
} globaldata; /* this data is the same for all threads */ |
|
|
|
|
|
typedef struct |
|
|
{ |
|
|
int id; |
|
|
|
|
|
int minx; |
|
|
int maxx; |
|
|
int miny; |
|
|
int maxy; |
|
|
|
|
|
globaldata *gdata; |
|
|
|
|
|
} jobdata; /* every thread get it's personal version of these */ |
|
|
|
|
|
|
|
|
void |
|
|
SMP_correct_pmv(int x, int y, int iWcount, MACROBLOCK* pMBs); |
|
|
|
|
|
void |
|
|
SMP_MotionEstimationWorker(jobdata *arg); |
|
|
|
|
|
bool |
|
|
SMP_MotionEstimation(MBParam * const pParam, |
|
|
FRAMEINFO * const current, |
|
|
FRAMEINFO * const reference, |
|
|
const IMAGE * const pRefH, |
|
|
const IMAGE * const pRefV, |
|
|
const IMAGE * const pRefHV, |
|
|
const uint32_t iLimit); |
|
|
|
|
|
#endif |
|
32 |
|
|
33 |
#endif |
#endif |