3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - QPel interpolation - |
* - QPel interpolation - |
5 |
* |
* |
6 |
|
* Copyright(C) 2003 Pascal Massimino <skal@planet-d.net> |
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 |
10 |
* the Free Software Foundation ; either version 2 of the License, or |
* the Free Software Foundation ; either version 2 of the License, or |
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: qpel.h,v 1.1.4.2 2003-08-23 15:11:23 edgomez Exp $ |
|
|
|
|
/************************************************************************** |
|
|
* |
|
|
* History: |
|
23 |
* |
* |
24 |
* 22.10.2002 initial coding - Skal - |
****************************************************************************/ |
|
* |
|
|
*************************************************************************/ |
|
25 |
|
|
26 |
#ifndef _XVID_QPEL_H_ |
#ifndef _XVID_QPEL_H_ |
27 |
#define _XVID_QPEL_H_ |
#define _XVID_QPEL_H_ |
37 |
|
|
38 |
typedef XVID_QP_PASS_SIGNATURE(XVID_QP_PASS); |
typedef XVID_QP_PASS_SIGNATURE(XVID_QP_PASS); |
39 |
|
|
40 |
// We put everything in a single struct so it can easily be passed |
/* We put everything in a single struct so it can easily be passed |
41 |
// to prediction functions as a whole... |
* to prediction functions as a whole... */ |
42 |
|
|
43 |
struct XVID_QP_FUNCS { |
typedef struct _XVID_QP_FUNCS { |
44 |
|
|
45 |
// filter for QPel 16x? prediction |
/* filter for QPel 16x? prediction */ |
46 |
|
|
47 |
XVID_QP_PASS *H_Pass; |
XVID_QP_PASS *H_Pass; |
48 |
XVID_QP_PASS *H_Pass_Avrg; |
XVID_QP_PASS *H_Pass_Avrg; |
59 |
XVID_QP_PASS *V_Pass_8; |
XVID_QP_PASS *V_Pass_8; |
60 |
XVID_QP_PASS *V_Pass_Avrg_8; |
XVID_QP_PASS *V_Pass_Avrg_8; |
61 |
XVID_QP_PASS *V_Pass_Avrg_Up_8; |
XVID_QP_PASS *V_Pass_Avrg_Up_8; |
62 |
}; |
} XVID_QP_FUNCS; |
|
typedef struct XVID_QP_FUNCS XVID_QP_FUNCS; |
|
63 |
|
|
64 |
/***************************************************************************** |
/***************************************************************************** |
65 |
* fwd dcl |
* fwd dcl |
66 |
****************************************************************************/ |
****************************************************************************/ |
67 |
|
extern void xvid_Init_QP(); |
68 |
|
|
69 |
extern XVID_QP_FUNCS xvid_QP_Funcs_C; // for P-frames |
extern XVID_QP_FUNCS xvid_QP_Funcs_C; // for P-frames |
70 |
extern XVID_QP_FUNCS xvid_QP_Add_Funcs_C; // for B-frames |
extern XVID_QP_FUNCS xvid_QP_Add_Funcs_C; // for B-frames |
71 |
|
|
72 |
|
#ifdef ARCH_IS_IA32 |
73 |
extern XVID_QP_FUNCS xvid_QP_Funcs_mmx; |
extern XVID_QP_FUNCS xvid_QP_Funcs_mmx; |
74 |
extern XVID_QP_FUNCS xvid_QP_Add_Funcs_mmx; |
extern XVID_QP_FUNCS xvid_QP_Add_Funcs_mmx; |
75 |
extern void xvid_Init_QP_mmx(); // should be called at mmx initialization |
#endif |
76 |
|
|
77 |
extern XVID_QP_FUNCS *xvid_QP_Funcs; // <- main pointer for enc/dec structure |
extern XVID_QP_FUNCS *xvid_QP_Funcs; // <- main pointer for enc/dec structure |
78 |
extern XVID_QP_FUNCS *xvid_QP_Add_Funcs; // <- main pointer for enc/dec structure |
extern XVID_QP_FUNCS *xvid_QP_Add_Funcs; // <- main pointer for enc/dec structure |
97 |
|
|
98 |
****************************************************************************/ |
****************************************************************************/ |
99 |
|
|
100 |
static __inline void new_interpolate16x16_quarterpel( |
static void __inline |
101 |
uint8_t * const cur, |
new_interpolate16x16_quarterpel(uint8_t * const cur, |
102 |
uint8_t * const refn, |
uint8_t * const refn, |
103 |
uint8_t * const refh, |
uint8_t * const refh, |
104 |
uint8_t * const refv, |
uint8_t * const refv, |
199 |
} |
} |
200 |
} |
} |
201 |
|
|
202 |
static __inline void new_interpolate16x8_quarterpel( |
static void __inline |
203 |
uint8_t * const cur, |
new_interpolate16x8_quarterpel(uint8_t * const cur, |
204 |
uint8_t * const refn, |
uint8_t * const refn, |
205 |
uint8_t * const refh, |
uint8_t * const refh, |
206 |
uint8_t * const refv, |
uint8_t * const refv, |
299 |
} |
} |
300 |
} |
} |
301 |
|
|
302 |
static __inline void new_interpolate8x8_quarterpel( |
static void __inline |
303 |
uint8_t * const cur, |
new_interpolate8x8_quarterpel(uint8_t * const cur, |
304 |
uint8_t * const refn, |
uint8_t * const refn, |
305 |
uint8_t * const refh, |
uint8_t * const refh, |
306 |
uint8_t * const refv, |
uint8_t * const refv, |
397 |
break; |
break; |
398 |
} |
} |
399 |
} |
} |
|
/*****************************************************************************/ |
|
400 |
|
|
401 |
#endif /* _XVID_QPEL_H_ */ |
#endif /* _XVID_QPEL_H_ */ |