1 |
/************************************************************************** |
/***************************************************************************** |
2 |
* |
* |
3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* motion estimation |
* - Motion Estimation module - |
5 |
|
* |
6 |
|
* Copyright(C) 2002 Christoph Lampert <gruel@web.de> |
7 |
|
* Copyright(C) 2002 Michael Militzer <michael@xvid.org> |
8 |
|
* Copyright(C) 2002 Edouard Gomez <ed.gomez@wanadoo.fr> |
9 |
|
* Copyright(C) 2002 chenm001 <chenm001@163.com> |
10 |
* |
* |
11 |
* This program is an implementation of a part of one or more MPEG-4 |
* This program is an implementation of a part of one or more MPEG-4 |
12 |
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
29 |
* |
* |
30 |
* You should have received a copy of the GNU General Public License |
* You should have received a copy of the GNU General Public License |
31 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
32 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
33 |
* |
* |
34 |
*************************************************************************/ |
*************************************************************************/ |
35 |
|
|
|
/************************************************************************** |
|
|
* |
|
|
* Modifications: |
|
|
* |
|
|
* 01.05.2002 updated MotionEstimationBVOP |
|
|
* 25.04.2002 partial prevMB conversion |
|
|
* 22.04.2002 remove some compile warning by chenm001 <chenm001@163.com> |
|
|
* 14.04.2002 added MotionEstimationBVOP() |
|
|
* 02.04.2002 add EPZS(^2) as ME algorithm, use PMV_USESQUARES to choose between |
|
|
* EPZS and EPZS^2 |
|
|
* 08.02.2002 split up PMVfast into three routines: PMVFast, PMVFast_MainLoop |
|
|
* PMVFast_Refine to support multiple searches with different start points |
|
|
* 07.01.2002 uv-block-based interpolation |
|
|
* 06.01.2002 INTER/INTRA-decision is now done before any SEARCH8 (speedup) |
|
|
* changed INTER_BIAS to 150 (as suggested by suxen_drol) |
|
|
* removed halfpel refinement step in PMVfastSearch8 + quality=5 |
|
|
* added new quality mode = 6 which performs halfpel refinement |
|
|
* filesize difference between quality 5 and 6 is smaller than 1% |
|
|
* (Isibaar) |
|
|
* 31.12.2001 PMVfastSearch16 and PMVfastSearch8 (gruel) |
|
|
* 30.12.2001 get_range/MotionSearchX simplified; blue/green bug fix |
|
|
* 22.12.2001 commented best_point==99 check |
|
|
* 19.12.2001 modified get_range (purple bug fix) |
|
|
* 15.12.2001 moved pmv displacement from mbprediction |
|
|
* 02.12.2001 motion estimation/compensation split (Isibaar) |
|
|
* 16.11.2001 rewrote/tweaked search algorithms; pross@cs.rmit.edu.au |
|
|
* 10.11.2001 support for sad16/sad8 functions |
|
|
* 28.08.2001 reactivated MODE_INTER4V for EXT_MODE |
|
|
* 24.08.2001 removed MODE_INTER4V_Q, disabled MODE_INTER4V for EXT_MODE |
|
|
* 22.08.2001 added MODE_INTER4V_Q |
|
|
* 20.08.2001 added pragma to get rid of internal compiler error with VC6 |
|
|
* idea by Cyril. Thanks. |
|
|
* |
|
|
* Michael Militzer <isibaar@videocoding.de> |
|
|
* |
|
|
**************************************************************************/ |
|
|
|
|
36 |
#include <assert.h> |
#include <assert.h> |
37 |
#include <stdio.h> |
#include <stdio.h> |
38 |
#include <stdlib.h> |
#include <stdlib.h> |