42 |
|
|
43 |
|
|
44 |
/** MBMotionCompensation **/ |
/** MBMotionCompensation **/ |
45 |
void MBMotionCompensation(MACROBLOCK * const pMB, |
|
46 |
const uint32_t j, |
void |
47 |
|
MBMotionCompensation(MACROBLOCK * const mb, |
48 |
const uint32_t i, |
const uint32_t i, |
49 |
const IMAGE * const pRef, |
const uint32_t j, |
50 |
const IMAGE * const pRefH, |
const IMAGE * const ref, |
51 |
const IMAGE * const pRefV, |
const IMAGE * const refh, |
52 |
const IMAGE * const pRefHV, |
const IMAGE * const refv, |
53 |
IMAGE * const pCurrent, |
const IMAGE * const refhv, |
54 |
int16_t dct_codes[6 * 64], |
const IMAGE * const refGMC, |
55 |
|
IMAGE * const cur, |
56 |
|
int16_t * dct_codes, |
57 |
const uint32_t width, |
const uint32_t width, |
58 |
const uint32_t height, |
const uint32_t height, |
59 |
const uint32_t edged_width, |
const uint32_t edged_width, |
60 |
const uint32_t rounding); |
const int32_t quarterpel, |
61 |
|
const int reduced_resolution, |
62 |
|
const int32_t rounding); |
63 |
|
|
64 |
/** MBTransQuant.c **/ |
/** MBTransQuant.c **/ |
65 |
|
|
77 |
); |
); |
78 |
|
|
79 |
|
|
80 |
uint8_t MBTransQuantInter(const MBParam * pParam, /* <-- the parameter for DCT transformation and Quantization */ |
void MBTransQuantIntra2(const MBParam * pParam, |
|
|
|
81 |
FRAMEINFO * frame, |
FRAMEINFO * frame, |
82 |
MACROBLOCK * pMB, |
MACROBLOCK * pMB, |
83 |
const uint32_t x_pos, /* <-- The x position of the MB to be searched */ |
const uint32_t x_pos, /* <-- The x position of the MB to be searched */ |
90 |
); |
); |
91 |
|
|
92 |
|
|
93 |
|
uint8_t MBTransQuantInter(const MBParam * pParam, |
94 |
|
FRAMEINFO * frame, |
95 |
|
MACROBLOCK * pMB, |
96 |
|
const uint32_t x_pos, |
97 |
|
const uint32_t y_pos, |
98 |
|
int16_t data[6 * 64], |
99 |
|
int16_t qcoeff[6 * 64]); |
100 |
|
|
101 |
|
|
102 |
|
uint8_t MBTransQuantInter2(const MBParam * pParam, |
103 |
|
FRAMEINFO * frame, |
104 |
|
MACROBLOCK * pMB, |
105 |
|
const uint32_t x_pos, |
106 |
|
const uint32_t y_pos, |
107 |
|
int16_t data[6 * 64], |
108 |
|
int16_t qcoeff[6 * 64]); |
109 |
|
|
110 |
|
uint8_t MBTransQuantInterBVOP(const MBParam * pParam, |
111 |
|
FRAMEINFO * frame, |
112 |
|
MACROBLOCK * pMB, |
113 |
|
const uint32_t x_pos, |
114 |
|
const uint32_t y_pos, |
115 |
|
int16_t data[6 * 64], |
116 |
|
int16_t qcoeff[6 * 64]); |
117 |
|
|
118 |
|
void MBTrans(const MBParam * pParam, |
119 |
|
FRAMEINFO * frame, |
120 |
|
MACROBLOCK * pMB, |
121 |
|
const uint32_t x_pos, |
122 |
|
const uint32_t y_pos, |
123 |
|
int16_t data[6 * 64]); |
124 |
|
|
125 |
|
void MBfDCT(const MBParam * pParam, |
126 |
|
FRAMEINFO * frame, |
127 |
|
MACROBLOCK * pMB, |
128 |
|
int16_t data[6 * 64]); |
129 |
|
|
130 |
|
uint8_t MBQuantInter( const MBParam * pParam, |
131 |
|
const int iQuant, |
132 |
|
int16_t data[6 * 64], |
133 |
|
int16_t qcoeff[6 * 64]); |
134 |
|
|
135 |
|
void MBQuantDeQuantIntra(const MBParam * pParam, |
136 |
|
FRAMEINFO * frame, |
137 |
|
MACROBLOCK *pMB, |
138 |
|
int16_t qcoeff[6 * 64], |
139 |
|
int16_t data[6*64]); |
140 |
|
|
141 |
|
void MBQuantIntra( const MBParam * pParam, |
142 |
|
FRAMEINFO * frame, |
143 |
|
MACROBLOCK *pMB, |
144 |
|
int16_t qcoeff[6 * 64], |
145 |
|
int16_t data[6*64]); |
146 |
|
|
147 |
|
void MBDeQuantIntra(const MBParam * pParam, |
148 |
|
const int iQuant, |
149 |
|
int16_t qcoeff[6 * 64], |
150 |
|
int16_t data[6*64]); |
151 |
|
|
152 |
|
void MBDeQuantInter(const MBParam * pParam, |
153 |
|
const int iQuant, |
154 |
|
int16_t data[6 * 64], |
155 |
|
int16_t qcoeff[6 * 64], |
156 |
|
const uint8_t cbp); |
157 |
|
|
158 |
|
|
159 |
|
void MBiDCT( int16_t data[6 * 64], |
160 |
|
const uint8_t cbp); |
161 |
|
|
162 |
|
|
163 |
|
void MBTransAdd( const MBParam * pParam, |
164 |
|
FRAMEINFO * frame, |
165 |
|
MACROBLOCK * pMB, |
166 |
|
const uint32_t x_pos, |
167 |
|
const uint32_t y_pos, |
168 |
|
int16_t data[6 * 64], |
169 |
|
const uint8_t cbp); |
170 |
|
|
171 |
|
|
172 |
|
|
173 |
/** interlacing **/ |
/** interlacing **/ |
174 |
|
|
175 |
uint32_t MBDecideFieldDCT(int16_t data[6 * 64]); /* <- decide whether to use field-based DCT |
uint32_t MBDecideFieldDCT(int16_t data[6 * 64]); /* <- decide whether to use field-based DCT |
176 |
for interlacing */ |
for interlacing */ |
177 |
|
|
178 |
|
typedef uint32_t (MBFIELDTEST) (int16_t data[6 * 64]); /* function pointer for field test */ |
179 |
|
typedef MBFIELDTEST *MBFIELDTEST_PTR; |
180 |
|
|
181 |
|
/* global field test pointer for xvid.c */ |
182 |
|
extern MBFIELDTEST_PTR MBFieldTest; |
183 |
|
|
184 |
|
/* field test implementations */ |
185 |
|
MBFIELDTEST MBFieldTest_c; |
186 |
|
MBFIELDTEST MBFieldTest_mmx; |
187 |
|
|
188 |
void MBFrameToField(int16_t data[6 * 64]); /* de-interlace vertical Y blocks */ |
void MBFrameToField(int16_t data[6 * 64]); /* de-interlace vertical Y blocks */ |
189 |
|
|
190 |
|
|
191 |
/** MBCoding.c **/ |
/** MBCoding.c **/ |
192 |
|
|
193 |
void MBCoding(const FRAMEINFO * frame, /* <-- the parameter for coding of the bitstream */ |
/* void MBSkip(Bitstream * bs); just the bitstream. Since MB is skipped, no info is needed */ |
194 |
|
|
195 |
|
|
196 |
|
void MBCoding(const FRAMEINFO * const frame, /* <-- the parameter for coding of the bitstream */ |
197 |
|
|
198 |
MACROBLOCK * pMB, /* <-- Info of the MB to be coded */ |
MACROBLOCK * pMB, /* <-- Info of the MB to be coded */ |
199 |
|
|