Parent Directory
|
Revision Log
Revision 1.13 - (view) (download)
1 : | edgomez | 1.11 | /***************************************************************************** |
2 : | Isibaar | 1.1 | * |
3 : | edgomez | 1.11 | * XVID MPEG-4 VIDEO CODEC |
4 : | * - Motion estimation fuctions header file - | ||
5 : | Isibaar | 1.1 | * |
6 : | edgomez | 1.11 | * Copyright(C) 2002 Michael Militzer |
7 : | Isibaar | 1.1 | * |
8 : | edgomez | 1.11 | * This program is an implementation of a part of one or more MPEG-4 |
9 : | * Video tools as specified in ISO/IEC 14496-2 standard. Those intending | ||
10 : | * to use this software module in hardware or software products are | ||
11 : | * advised that its use may infringe existing patents or copyrights, and | ||
12 : | * any such use would be at such party's own risk. The original | ||
13 : | * developer of this software module and his/her company, and subsequent | ||
14 : | * editors and their companies, will have no liability for use of this | ||
15 : | * software or modifications or derivatives thereof. | ||
16 : | Isibaar | 1.1 | * |
17 : | edgomez | 1.11 | * This program is free software; you can redistribute it and/or modify |
18 : | * it under the terms of the GNU General Public License as published by | ||
19 : | * the Free Software Foundation; either version 2 of the License, or | ||
20 : | * (at your option) any later version. | ||
21 : | * | ||
22 : | * This program is distributed in the hope that it will be useful, | ||
23 : | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
24 : | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
25 : | * GNU General Public License for more details. | ||
26 : | * | ||
27 : | * You should have received a copy of the GNU General Public License | ||
28 : | * along with this program; if not, write to the Free Software | ||
29 : | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
30 : | * | ||
31 : | chl | 1.13 | * $Id: mbfunctions.h,v 1.12 2002/09/05 22:44:00 edgomez Exp $ |
32 : | edgomez | 1.11 | * |
33 : | ****************************************************************************/ | ||
34 : | Isibaar | 1.1 | |
35 : | edgomez | 1.11 | #ifndef _MBFUNCTIONS_H |
36 : | #define _MBFUNCTIONS_H | ||
37 : | Isibaar | 1.1 | |
38 : | #include "../encoder.h" | ||
39 : | #include "../bitstream/bitstream.h" | ||
40 : | |||
41 : | edgomez | 1.11 | /***************************************************************************** |
42 : | * Prototypes | ||
43 : | ****************************************************************************/ | ||
44 : | Isibaar | 1.1 | |
45 : | |||
46 : | edgomez | 1.11 | /* MotionEstimation */ |
47 : | Isibaar | 1.1 | |
48 : | edgomez | 1.6 | bool MotionEstimation(MBParam * const pParam, |
49 : | FRAMEINFO * const current, | ||
50 : | FRAMEINFO * const reference, | ||
51 : | const IMAGE * const pRefH, | ||
52 : | const IMAGE * const pRefV, | ||
53 : | const IMAGE * const pRefHV, | ||
54 : | const uint32_t iLimit); | ||
55 : | Isibaar | 1.1 | |
56 : | |||
57 : | chl | 1.7 | bool SMP_MotionEstimation(MBParam * const pParam, |
58 : | edgomez | 1.11 | FRAMEINFO * const current, |
59 : | FRAMEINFO * const reference, | ||
60 : | const IMAGE * const pRefH, | ||
61 : | const IMAGE * const pRefV, | ||
62 : | const IMAGE * const pRefHV, | ||
63 : | const uint32_t iLimit); | ||
64 : | |||
65 : | chl | 1.7 | |
66 : | |||
67 : | edgomez | 1.11 | /* MBMotionCompensation */ |
68 : | chl | 1.7 | |
69 : | edgomez | 1.6 | void MBMotionCompensation(MACROBLOCK * const pMB, |
70 : | const uint32_t j, | ||
71 : | const uint32_t i, | ||
72 : | const IMAGE * const pRef, | ||
73 : | const IMAGE * const pRefH, | ||
74 : | const IMAGE * const pRefV, | ||
75 : | const IMAGE * const pRefHV, | ||
76 : | IMAGE * const pCurrent, | ||
77 : | int16_t dct_codes[6 * 64], | ||
78 : | const uint32_t width, | ||
79 : | const uint32_t height, | ||
80 : | const uint32_t edged_width, | ||
81 : | const uint32_t rounding); | ||
82 : | Isibaar | 1.1 | |
83 : | |||
84 : | edgomez | 1.11 | /* MBTransQuant.c */ |
85 : | Isibaar | 1.1 | |
86 : | edgomez | 1.6 | void MBTransQuantIntra(const MBParam * pParam, |
87 : | FRAMEINFO * frame, | ||
88 : | MACROBLOCK * pMB, | ||
89 : | edgomez | 1.11 | const uint32_t x_pos, /* <-- The x position of the MB to be searched */ |
90 : | const uint32_t y_pos, /* <-- The y position of the MB to be searched */ | ||
91 : | int16_t data[6 * 64], /* <-> the data of the MB to be coded */ | ||
92 : | int16_t qcoeff[6 * 64]); /* <-> the quantized DCT coefficients */ | ||
93 : | |||
94 : | edgomez | 1.6 | |
95 : | |||
96 : | chl | 1.9 | void MBTransQuantIntra2(const MBParam * pParam, |
97 : | edgomez | 1.11 | FRAMEINFO * frame, |
98 : | MACROBLOCK * pMB, | ||
99 : | const uint32_t x_pos, /* <-- The x position of the MB to be searched */ | ||
100 : | const uint32_t y_pos, /* <-- The y position of the MB to be searched */ | ||
101 : | int16_t data[6 * 64], /* <-> the data of the MB to be coded */ | ||
102 : | int16_t qcoeff[6 * 64]); /* <-> the quantized DCT coefficients */ | ||
103 : | |||
104 : | chl | 1.9 | |
105 : | |||
106 : | uint8_t MBTransQuantInter(const MBParam * pParam, | ||
107 : | FRAMEINFO * frame, | ||
108 : | MACROBLOCK * pMB, | ||
109 : | const uint32_t x_pos, | ||
110 : | const uint32_t y_pos, | ||
111 : | int16_t data[6 * 64], | ||
112 : | int16_t qcoeff[6 * 64]); | ||
113 : | |||
114 : | |||
115 : | uint8_t MBTransQuantInter2(const MBParam * pParam, | ||
116 : | edgomez | 1.11 | FRAMEINFO * frame, |
117 : | MACROBLOCK * pMB, | ||
118 : | const uint32_t x_pos, | ||
119 : | const uint32_t y_pos, | ||
120 : | int16_t data[6 * 64], | ||
121 : | int16_t qcoeff[6 * 64]); | ||
122 : | chl | 1.9 | |
123 : | uint8_t MBTransQuantInterBVOP(const MBParam * pParam, | ||
124 : | edgomez | 1.11 | FRAMEINFO * frame, |
125 : | MACROBLOCK * pMB, | ||
126 : | int16_t data[6 * 64], | ||
127 : | int16_t qcoeff[6 * 64]); | ||
128 : | edgomez | 1.6 | |
129 : | chl | 1.9 | void MBTrans(const MBParam * pParam, |
130 : | edgomez | 1.11 | FRAMEINFO * frame, |
131 : | MACROBLOCK * pMB, | ||
132 : | const uint32_t x_pos, | ||
133 : | const uint32_t y_pos, | ||
134 : | int16_t data[6 * 64]); | ||
135 : | chl | 1.9 | |
136 : | void MBfDCT(const MBParam * pParam, | ||
137 : | FRAMEINFO * frame, | ||
138 : | MACROBLOCK * pMB, | ||
139 : | int16_t data[6 * 64]); | ||
140 : | |||
141 : | edgomez | 1.11 | uint8_t MBQuantInter(const MBParam * pParam, |
142 : | const int iQuant, | ||
143 : | int16_t data[6 * 64], | ||
144 : | int16_t qcoeff[6 * 64]); | ||
145 : | chl | 1.9 | |
146 : | void MBQuantDeQuantIntra(const MBParam * pParam, | ||
147 : | FRAMEINFO * frame, | ||
148 : | MACROBLOCK *pMB, | ||
149 : | int16_t qcoeff[6 * 64], | ||
150 : | int16_t data[6*64]); | ||
151 : | |||
152 : | edgomez | 1.11 | void MBQuantIntra(const MBParam * pParam, |
153 : | FRAMEINFO * frame, | ||
154 : | MACROBLOCK *pMB, | ||
155 : | chl | 1.13 | int16_t data[6*64], |
156 : | int16_t qcoeff[6 * 64]); | ||
157 : | edgomez | 1.6 | |
158 : | chl | 1.9 | void MBDeQuantIntra(const MBParam * pParam, |
159 : | const int iQuant, | ||
160 : | int16_t qcoeff[6 * 64], | ||
161 : | int16_t data[6*64]); | ||
162 : | |||
163 : | void MBDeQuantInter(const MBParam * pParam, | ||
164 : | const int iQuant, | ||
165 : | int16_t data[6 * 64], | ||
166 : | int16_t qcoeff[6 * 64], | ||
167 : | const uint8_t cbp); | ||
168 : | |||
169 : | |||
170 : | edgomez | 1.12 | void MBiDCT(int16_t data[6 * 64], |
171 : | edgomez | 1.11 | const uint8_t cbp); |
172 : | h | 1.2 | |
173 : | |||
174 : | edgomez | 1.11 | void MBTransAdd(const MBParam * pParam, |
175 : | FRAMEINFO * frame, | ||
176 : | MACROBLOCK * pMB, | ||
177 : | const uint32_t x_pos, | ||
178 : | const uint32_t y_pos, | ||
179 : | int16_t data[6 * 64], | ||
180 : | const uint8_t cbp); | ||
181 : | h | 1.2 | |
182 : | Isibaar | 1.1 | |
183 : | |||
184 : | edgomez | 1.11 | /* interlacing */ |
185 : | Isibaar | 1.1 | |
186 : | edgomez | 1.11 | uint32_t MBDecideFieldDCT(int16_t data[6 * 64]); /* <- decide whether to use field-based DCT for interlacing */ |
187 : | chl | 1.8 | |
188 : | edgomez | 1.11 | void MBFrameToField(int16_t data[6 * 64]); /* de-interlace vertical Y blocks */ |
189 : | chl | 1.8 | |
190 : | edgomez | 1.6 | |
191 : | edgomez | 1.11 | /* MBCoding.c */ |
192 : | edgomez | 1.6 | |
193 : | edgomez | 1.11 | void MBSkip(Bitstream * bs); /* just the bitstream. Since MB is skipped, no info is needed */ |
194 : | edgomez | 1.6 | |
195 : | |||
196 : | edgomez | 1.11 | void MBCoding(const FRAMEINFO * frame, /* <-- the parameter for coding of the bitstream */ |
197 : | MACROBLOCK * pMB, /* <-- Info of the MB to be coded */ | ||
198 : | int16_t qcoeff[6 * 64], /* <-- the quantized DCT coefficients */ | ||
199 : | Bitstream * bs, /* <-> the bitstream */ | ||
200 : | Statistics * pStat); /* <-> statistical data collected for current frame */ | ||
201 : | Isibaar | 1.1 | |
202 : | #endif |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |