32 |
* |
* |
33 |
* History: |
* History: |
34 |
* |
* |
35 |
|
* 29.03.2002 interlacing fix - compensated block wasn't being used when |
36 |
|
* reconstructing blocks, thus artifacts |
37 |
|
* interlacing speedup - used transfers to re-interlace |
38 |
|
* interlaced decoding should be as fast as progressive now |
39 |
|
* 26.03.2002 interlacing support - moved transfers outside decode loop |
40 |
* 26.12.2001 decoder_mbinter: dequant/idct moved within if(coded) block |
* 26.12.2001 decoder_mbinter: dequant/idct moved within if(coded) block |
41 |
* 22.12.2001 block based interpolation |
* 22.12.2001 block based interpolation |
42 |
* 01.12.2001 inital version; (c)2001 peter ross <pross@cs.rmit.edu.au> |
* 01.12.2001 inital version; (c)2001 peter ross <pross@cs.rmit.edu.au> |
73 |
{ |
{ |
74 |
DECODER * dec; |
DECODER * dec; |
75 |
|
|
76 |
dec = xvid_malloc(sizeof(DECODER), 16); |
dec = xvid_malloc(sizeof(DECODER), CACHE_LINE); |
77 |
if (dec == NULL) |
if (dec == NULL) |
78 |
{ |
{ |
79 |
return XVID_ERR_MEMORY; |
return XVID_ERR_MEMORY; |
102 |
return XVID_ERR_MEMORY; |
return XVID_ERR_MEMORY; |
103 |
} |
} |
104 |
|
|
105 |
dec->mbs = xvid_malloc(sizeof(MACROBLOCK) * dec->mb_width * dec->mb_height, 16); |
dec->mbs = xvid_malloc(sizeof(MACROBLOCK) * dec->mb_width * dec->mb_height, CACHE_LINE); |
106 |
if (dec->mbs == NULL) |
if (dec->mbs == NULL) |
107 |
{ |
{ |
108 |
image_destroy(&dec->cur, dec->edged_width, dec->edged_height); |
image_destroy(&dec->cur, dec->edged_width, dec->edged_height); |
111 |
} |
} |
112 |
|
|
113 |
init_timer(); |
init_timer(); |
|
create_vlc_tables(); |
|
114 |
|
|
115 |
return XVID_ERR_OK; |
return XVID_ERR_OK; |
116 |
} |
} |
123 |
image_destroy(&dec->cur, dec->edged_width, dec->edged_height); |
image_destroy(&dec->cur, dec->edged_width, dec->edged_height); |
124 |
xvid_free(dec); |
xvid_free(dec); |
125 |
|
|
|
destroy_vlc_tables(); |
|
|
|
|
126 |
write_timer(); |
write_timer(); |
127 |
return XVID_ERR_OK; |
return XVID_ERR_OK; |
128 |
} |
} |
137 |
|
|
138 |
// decode an intra macroblock |
// decode an intra macroblock |
139 |
|
|
140 |
void decoder_mbintra(DECODER * dec, MACROBLOCK * mb, int x, int y, uint32_t acpred_flag, uint32_t cbp, Bitstream * bs, int quant, int intra_dc_threshold) |
void decoder_mbintra(DECODER * dec, |
141 |
{ |
MACROBLOCK * pMB, |
142 |
uint32_t k; |
const uint32_t x_pos, |
143 |
|
const uint32_t y_pos, |
144 |
|
const uint32_t acpred_flag, |
145 |
|
const uint32_t cbp, |
146 |
|
Bitstream * bs, |
147 |
|
const uint32_t quant, |
148 |
|
const uint32_t intra_dc_threshold) |
149 |
|
{ |
150 |
|
|
151 |
|
DECLARE_ALIGNED_MATRIX(block, 6, 64, int16_t, CACHE_LINE); |
152 |
|
DECLARE_ALIGNED_MATRIX(data, 6, 64, int16_t, CACHE_LINE); |
153 |
|
|
154 |
|
uint32_t stride = dec->edged_width; |
155 |
|
uint32_t stride2 = stride / 2; |
156 |
|
uint32_t next_block = stride * 8; |
157 |
|
uint32_t i; |
158 |
|
uint32_t iQuant = pMB->quant; |
159 |
|
uint8_t *pY_Cur, *pU_Cur, *pV_Cur; |
160 |
|
|
161 |
|
pY_Cur = dec->cur.y + (y_pos << 4) * stride + (x_pos << 4); |
162 |
|
pU_Cur = dec->cur.u + (y_pos << 3) * stride2 + (x_pos << 3); |
163 |
|
pV_Cur = dec->cur.v + (y_pos << 3) * stride2 + (x_pos << 3); |
164 |
|
|
165 |
for (k = 0; k < 6; k++) |
memset(block, 0, 6*64*sizeof(int16_t)); // clear |
166 |
|
|
167 |
|
for (i = 0; i < 6; i++) |
168 |
{ |
{ |
169 |
uint32_t dcscalar; |
uint32_t iDcScaler = get_dc_scaler(iQuant, i < 4); |
|
int16_t block[64]; |
|
|
int16_t data[64]; |
|
170 |
int16_t predictors[8]; |
int16_t predictors[8]; |
171 |
int start_coeff; |
int start_coeff; |
172 |
|
|
|
dcscalar = get_dc_scaler(mb->quant, k < 4); |
|
|
|
|
173 |
start_timer(); |
start_timer(); |
174 |
predict_acdc(dec->mbs, x, y, dec->mb_width, k, block, mb->quant, dcscalar, predictors); |
predict_acdc(dec->mbs, x_pos, y_pos, dec->mb_width, i, &block[i*64], iQuant, iDcScaler, predictors); |
175 |
if (!acpred_flag) |
if (!acpred_flag) |
176 |
{ |
{ |
177 |
mb->acpred_directions[k] = 0; |
pMB->acpred_directions[i] = 0; |
178 |
} |
} |
179 |
stop_prediction_timer(); |
stop_prediction_timer(); |
180 |
|
|
|
memset(block, 0, 64*sizeof(int16_t)); // clear |
|
|
|
|
181 |
if (quant < intra_dc_threshold) |
if (quant < intra_dc_threshold) |
182 |
{ |
{ |
183 |
int dc_size; |
int dc_size; |
184 |
int dc_dif; |
int dc_dif; |
185 |
|
|
186 |
dc_size = k < 4 ? get_dc_size_lum(bs) : get_dc_size_chrom(bs); |
dc_size = i < 4 ? get_dc_size_lum(bs) : get_dc_size_chrom(bs); |
187 |
dc_dif = dc_size ? get_dc_dif(bs, dc_size) : 0 ; |
dc_dif = dc_size ? get_dc_dif(bs, dc_size) : 0 ; |
188 |
|
|
189 |
if (dc_size > 8) |
if (dc_size > 8) |
191 |
BitstreamSkip(bs, 1); // marker |
BitstreamSkip(bs, 1); // marker |
192 |
} |
} |
193 |
|
|
194 |
block[0] = dc_dif; |
block[i*64 + 0] = dc_dif; |
195 |
start_coeff = 1; |
start_coeff = 1; |
196 |
} |
} |
197 |
else |
else |
200 |
} |
} |
201 |
|
|
202 |
start_timer(); |
start_timer(); |
203 |
if (cbp & (1 << (5-k))) // coded |
if (cbp & (1 << (5-i))) // coded |
204 |
{ |
{ |
205 |
get_intra_block(bs, block, mb->acpred_directions[k], start_coeff); |
get_intra_block(bs, &block[i*64], pMB->acpred_directions[i], start_coeff); |
206 |
} |
} |
207 |
stop_coding_timer(); |
stop_coding_timer(); |
208 |
|
|
209 |
start_timer(); |
start_timer(); |
210 |
add_acdc(mb, k, block, dcscalar, predictors); |
add_acdc(pMB, i, &block[i*64], iDcScaler, predictors); |
211 |
stop_prediction_timer(); |
stop_prediction_timer(); |
212 |
|
|
213 |
start_timer(); |
start_timer(); |
214 |
if (dec->quant_type == 0) |
if (dec->quant_type == 0) |
215 |
{ |
{ |
216 |
dequant_intra(data, block, mb->quant, dcscalar); |
dequant_intra(&data[i*64], &block[i*64], iQuant, iDcScaler); |
217 |
} |
} |
218 |
else |
else |
219 |
{ |
{ |
220 |
dequant4_intra(data, block, mb->quant, dcscalar); |
dequant4_intra(&data[i*64], &block[i*64], iQuant, iDcScaler); |
221 |
} |
} |
222 |
stop_iquant_timer(); |
stop_iquant_timer(); |
223 |
|
|
224 |
start_timer(); |
start_timer(); |
225 |
idct(data); |
idct(&data[i*64]); |
226 |
stop_idct_timer(); |
stop_idct_timer(); |
|
|
|
|
start_timer(); |
|
|
if (k < 4) |
|
|
{ |
|
|
transfer_16to8copy(dec->cur.y + (16*y*dec->edged_width) + 16*x + (4*(k&2)*dec->edged_width) + 8*(k&1), data, dec->edged_width); |
|
|
} |
|
|
else if (k == 4) |
|
|
{ |
|
|
transfer_16to8copy(dec->cur.u+ 8*y*(dec->edged_width/2) + 8*x, data, (dec->edged_width/2)); |
|
227 |
} |
} |
228 |
else // if (k == 5) |
|
229 |
|
if (pMB->field_dct) |
230 |
{ |
{ |
231 |
transfer_16to8copy(dec->cur.v + 8*y*(dec->edged_width/2) + 8*x, data, (dec->edged_width/2)); |
next_block = stride; |
232 |
|
stride *= 2; |
233 |
} |
} |
234 |
|
|
235 |
|
start_timer(); |
236 |
|
transfer_16to8copy(pY_Cur, &data[0*64], stride); |
237 |
|
transfer_16to8copy(pY_Cur + 8, &data[1*64], stride); |
238 |
|
transfer_16to8copy(pY_Cur + next_block, &data[2*64], stride); |
239 |
|
transfer_16to8copy(pY_Cur + 8 + next_block, &data[3*64], stride); |
240 |
|
transfer_16to8copy(pU_Cur, &data[4*64], stride2); |
241 |
|
transfer_16to8copy(pV_Cur, &data[5*64], stride2); |
242 |
stop_transfer_timer(); |
stop_transfer_timer(); |
243 |
} |
} |
|
} |
|
244 |
|
|
245 |
|
|
246 |
|
|
254 |
|
|
255 |
// decode an inter macroblock |
// decode an inter macroblock |
256 |
|
|
257 |
void decoder_mbinter(DECODER * dec, MACROBLOCK * mb, int x, int y, uint32_t acpred_flag, uint32_t cbp, Bitstream * bs, int quant, int rounding) |
void decoder_mbinter(DECODER * dec, |
258 |
{ |
const MACROBLOCK * pMB, |
259 |
const uint32_t stride = dec->edged_width; |
const uint32_t x_pos, |
260 |
const uint32_t stride2 = dec->edged_width / 2; |
const uint32_t y_pos, |
261 |
|
const uint32_t acpred_flag, |
262 |
|
const uint32_t cbp, |
263 |
|
Bitstream * bs, |
264 |
|
const uint32_t quant, |
265 |
|
const uint32_t rounding) |
266 |
|
{ |
267 |
|
|
268 |
|
DECLARE_ALIGNED_MATRIX(block,6, 64, int16_t, CACHE_LINE); |
269 |
|
DECLARE_ALIGNED_MATRIX(data, 6, 64, int16_t, CACHE_LINE); |
270 |
|
|
271 |
|
uint32_t stride = dec->edged_width; |
272 |
|
uint32_t stride2 = stride / 2; |
273 |
|
uint32_t next_block = stride * 8; |
274 |
|
uint32_t i; |
275 |
|
uint32_t iQuant = pMB->quant; |
276 |
|
uint8_t *pY_Cur, *pU_Cur, *pV_Cur; |
277 |
int uv_dx, uv_dy; |
int uv_dx, uv_dy; |
|
uint32_t k; |
|
278 |
|
|
279 |
if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) |
pY_Cur = dec->cur.y + (y_pos << 4) * stride + (x_pos << 4); |
280 |
|
pU_Cur = dec->cur.u + (y_pos << 3) * stride2 + (x_pos << 3); |
281 |
|
pV_Cur = dec->cur.v + (y_pos << 3) * stride2 + (x_pos << 3); |
282 |
|
|
283 |
|
if (pMB->mode == MODE_INTER || pMB->mode == MODE_INTER_Q) |
284 |
{ |
{ |
285 |
uv_dx = mb->mvs[0].x; |
uv_dx = pMB->mvs[0].x; |
286 |
uv_dy = mb->mvs[0].y; |
uv_dy = pMB->mvs[0].y; |
287 |
|
|
288 |
uv_dx = (uv_dx & 3) ? (uv_dx >> 1) | 1 : uv_dx / 2; |
uv_dx = (uv_dx & 3) ? (uv_dx >> 1) | 1 : uv_dx / 2; |
289 |
uv_dy = (uv_dy & 3) ? (uv_dy >> 1) | 1 : uv_dy / 2; |
uv_dy = (uv_dy & 3) ? (uv_dy >> 1) | 1 : uv_dy / 2; |
291 |
else |
else |
292 |
{ |
{ |
293 |
int sum; |
int sum; |
294 |
sum = mb->mvs[0].x + mb->mvs[1].x + mb->mvs[2].x + mb->mvs[3].x; |
sum = pMB->mvs[0].x + pMB->mvs[1].x + pMB->mvs[2].x + pMB->mvs[3].x; |
295 |
uv_dx = (sum == 0 ? 0 : SIGN(sum) * (roundtab[ABS(sum) % 16] + (ABS(sum) / 16) * 2) ); |
uv_dx = (sum == 0 ? 0 : SIGN(sum) * (roundtab[ABS(sum) % 16] + (ABS(sum) / 16) * 2) ); |
296 |
|
|
297 |
sum = mb->mvs[0].y + mb->mvs[1].y + mb->mvs[2].y + mb->mvs[3].y; |
sum = pMB->mvs[0].y + pMB->mvs[1].y + pMB->mvs[2].y + pMB->mvs[3].y; |
298 |
uv_dy = (sum == 0 ? 0 : SIGN(sum) * (roundtab[ABS(sum) % 16] + (ABS(sum) / 16) * 2) ); |
uv_dy = (sum == 0 ? 0 : SIGN(sum) * (roundtab[ABS(sum) % 16] + (ABS(sum) / 16) * 2) ); |
299 |
} |
} |
300 |
|
|
301 |
start_timer(); |
start_timer(); |
302 |
interpolate8x8_switch(dec->cur.y, dec->refn.y, 16*x, 16*y , mb->mvs[0].x, mb->mvs[0].y, stride, rounding); |
interpolate8x8_switch(dec->cur.y, dec->refn.y, 16*x_pos, 16*y_pos , pMB->mvs[0].x, pMB->mvs[0].y, stride, rounding); |
303 |
interpolate8x8_switch(dec->cur.y, dec->refn.y, 16*x + 8, 16*y , mb->mvs[1].x, mb->mvs[1].y, stride, rounding); |
interpolate8x8_switch(dec->cur.y, dec->refn.y, 16*x_pos + 8, 16*y_pos , pMB->mvs[1].x, pMB->mvs[1].y, stride, rounding); |
304 |
interpolate8x8_switch(dec->cur.y, dec->refn.y, 16*x, 16*y + 8, mb->mvs[2].x, mb->mvs[2].y, stride, rounding); |
interpolate8x8_switch(dec->cur.y, dec->refn.y, 16*x_pos, 16*y_pos + 8, pMB->mvs[2].x, pMB->mvs[2].y, stride, rounding); |
305 |
interpolate8x8_switch(dec->cur.y, dec->refn.y, 16*x + 8, 16*y + 8, mb->mvs[3].x, mb->mvs[3].y, stride, rounding); |
interpolate8x8_switch(dec->cur.y, dec->refn.y, 16*x_pos + 8, 16*y_pos + 8, pMB->mvs[3].x, pMB->mvs[3].y, stride, rounding); |
306 |
interpolate8x8_switch(dec->cur.u, dec->refn.u, 8*x, 8*y, uv_dx, uv_dy, stride2, rounding); |
interpolate8x8_switch(dec->cur.u, dec->refn.u, 8*x_pos, 8*y_pos, uv_dx, uv_dy, stride2, rounding); |
307 |
interpolate8x8_switch(dec->cur.v, dec->refn.v, 8*x, 8*y, uv_dx, uv_dy, stride2, rounding); |
interpolate8x8_switch(dec->cur.v, dec->refn.v, 8*x_pos, 8*y_pos, uv_dx, uv_dy, stride2, rounding); |
308 |
stop_comp_timer(); |
stop_comp_timer(); |
309 |
|
|
310 |
|
for (i = 0; i < 6; i++) |
|
for (k = 0; k < 6; k++) |
|
311 |
{ |
{ |
312 |
int16_t block[64]; |
if (cbp & (1 << (5-i))) // coded |
|
int16_t data[64]; |
|
|
|
|
|
if (cbp & (1 << (5-k))) // coded |
|
313 |
{ |
{ |
314 |
memset(block, 0, 64 * sizeof(int16_t)); // clear |
memset(&block[i*64], 0, 64 * sizeof(int16_t)); // clear |
315 |
|
|
316 |
start_timer(); |
start_timer(); |
317 |
get_inter_block(bs, block); |
get_inter_block(bs, &block[i*64]); |
318 |
stop_coding_timer(); |
stop_coding_timer(); |
319 |
|
|
320 |
start_timer(); |
start_timer(); |
321 |
if (dec->quant_type == 0) |
if (dec->quant_type == 0) |
322 |
{ |
{ |
323 |
dequant_inter(data, block, mb->quant); |
dequant_inter(&data[i*64], &block[i*64], iQuant); |
324 |
} |
} |
325 |
else |
else |
326 |
{ |
{ |
327 |
dequant4_inter(data, block, mb->quant); |
dequant4_inter(&data[i*64], &block[i*64], iQuant); |
328 |
} |
} |
329 |
stop_iquant_timer(); |
stop_iquant_timer(); |
330 |
|
|
331 |
start_timer(); |
start_timer(); |
332 |
idct(data); |
idct(&data[i*64]); |
333 |
stop_idct_timer(); |
stop_idct_timer(); |
|
|
|
|
start_timer(); |
|
|
if (k < 4) |
|
|
{ |
|
|
transfer_16to8add(dec->cur.y + (16*y + 4*(k&2))*stride + 16*x + 8*(k&1), data, stride); |
|
334 |
} |
} |
|
else if (k == 4) |
|
|
{ |
|
|
transfer_16to8add(dec->cur.u + 8*y*stride2 + 8*x, data, stride2); |
|
335 |
} |
} |
336 |
else // k == 5 |
|
337 |
|
if (pMB->field_dct) |
338 |
{ |
{ |
339 |
transfer_16to8add(dec->cur.v + 8*y*stride2 + 8*x, data, stride2); |
next_block = stride; |
340 |
|
stride *= 2; |
341 |
} |
} |
342 |
|
|
343 |
|
start_timer(); |
344 |
|
if (cbp & 32) |
345 |
|
transfer_16to8add(pY_Cur, &data[0*64], stride); |
346 |
|
if (cbp & 16) |
347 |
|
transfer_16to8add(pY_Cur + 8, &data[1*64], stride); |
348 |
|
if (cbp & 8) |
349 |
|
transfer_16to8add(pY_Cur + next_block, &data[2*64], stride); |
350 |
|
if (cbp & 4) |
351 |
|
transfer_16to8add(pY_Cur + 8 + next_block, &data[3*64], stride); |
352 |
|
if (cbp & 2) |
353 |
|
transfer_16to8add(pU_Cur, &data[4*64], stride2); |
354 |
|
if (cbp & 1) |
355 |
|
transfer_16to8add(pV_Cur, &data[5*64], stride2); |
356 |
stop_transfer_timer(); |
stop_transfer_timer(); |
357 |
} |
} |
|
} |
|
|
} |
|
|
|
|
358 |
|
|
359 |
|
|
360 |
void decoder_iframe(DECODER * dec, Bitstream * bs, int quant, int intra_dc_threshold) |
void decoder_iframe(DECODER * dec, Bitstream * bs, int quant, int intra_dc_threshold) |
361 |
{ |
{ |
362 |
|
|
363 |
uint32_t x, y; |
uint32_t x, y; |
364 |
|
|
365 |
for (y = 0; y < dec->mb_height; y++) |
for (y = 0; y < dec->mb_height; y++) |
403 |
} |
} |
404 |
mb->quant = quant; |
mb->quant = quant; |
405 |
|
|
406 |
|
if (dec->interlacing) |
407 |
|
{ |
408 |
|
mb->field_dct = BitstreamGetBit(bs); |
409 |
|
DEBUG1("deci: field_dct: ", mb->field_dct); |
410 |
|
} |
411 |
|
|
412 |
decoder_mbintra(dec, mb, x, y, acpred_flag, cbp, bs, quant, intra_dc_threshold); |
decoder_mbintra(dec, mb, x, y, acpred_flag, cbp, bs, quant, intra_dc_threshold); |
413 |
} |
} |
414 |
} |
} |
415 |
|
|
416 |
} |
} |
417 |
|
|
418 |
|
|
419 |
void get_motion_vector(DECODER *dec, Bitstream *bs, int x, int y, int k, VECTOR * mv, int fcode) |
void get_motion_vector(DECODER *dec, Bitstream *bs, int x, int y, int k, VECTOR * mv, int fcode) |
420 |
{ |
{ |
421 |
|
|
422 |
int scale_fac = 1 << (fcode - 1); |
int scale_fac = 1 << (fcode - 1); |
423 |
int high = (32 * scale_fac) - 1; |
int high = (32 * scale_fac) - 1; |
424 |
int low = ((-32) * scale_fac); |
int low = ((-32) * scale_fac); |
468 |
|
|
469 |
void decoder_pframe(DECODER * dec, Bitstream * bs, int rounding, int quant, int fcode, int intra_dc_threshold) |
void decoder_pframe(DECODER * dec, Bitstream * bs, int rounding, int quant, int fcode, int intra_dc_threshold) |
470 |
{ |
{ |
471 |
|
|
472 |
uint32_t x, y; |
uint32_t x, y; |
473 |
|
|
474 |
image_swap(&dec->cur, &dec->refn); |
image_swap(&dec->cur, &dec->refn); |
475 |
|
|
476 |
start_timer(); |
start_timer(); |
477 |
image_setedges(&dec->refn, dec->edged_width, dec->edged_height, dec->width, dec->height); |
image_setedges(&dec->refn, dec->edged_width, dec->edged_height, dec->width, dec->height, dec->interlacing); |
478 |
stop_edges_timer(); |
stop_edges_timer(); |
479 |
|
|
480 |
for (y = 0; y < dec->mb_height; y++) |
for (y = 0; y < dec->mb_height; y++) |
527 |
} |
} |
528 |
mb->quant = quant; |
mb->quant = quant; |
529 |
|
|
530 |
|
if (dec->interlacing) |
531 |
|
{ |
532 |
|
mb->field_dct = BitstreamGetBit(bs); |
533 |
|
DEBUG1("decp: field_dct: ", mb->field_dct); |
534 |
|
|
535 |
if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) |
if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) |
536 |
{ |
{ |
537 |
|
mb->field_pred = BitstreamGetBit(bs); |
538 |
|
DEBUG1("decp: field_pred: ", mb->field_pred); |
539 |
|
|
540 |
|
if (mb->field_pred) |
541 |
|
{ |
542 |
|
mb->field_for_top = BitstreamGetBit(bs); |
543 |
|
DEBUG1("decp: field_for_top: ", mb->field_for_top); |
544 |
|
mb->field_for_bot = BitstreamGetBit(bs); |
545 |
|
DEBUG1("decp: field_for_bot: ", mb->field_for_bot); |
546 |
|
} |
547 |
|
} |
548 |
|
} |
549 |
|
|
550 |
|
if (mb->mode == MODE_INTER || mb->mode == MODE_INTER_Q) |
551 |
|
{ |
552 |
|
if (dec->interlacing && mb->field_pred) |
553 |
|
{ |
554 |
|
get_motion_vector(dec, bs, x, y, 0, &mb->mvs[0], fcode); |
555 |
|
get_motion_vector(dec, bs, x, y, 0, &mb->mvs[1], fcode); |
556 |
|
} |
557 |
|
else |
558 |
|
{ |
559 |
get_motion_vector(dec, bs, x, y, 0, &mb->mvs[0], fcode); |
get_motion_vector(dec, bs, x, y, 0, &mb->mvs[0], fcode); |
560 |
mb->mvs[1].x = mb->mvs[2].x = mb->mvs[3].x = mb->mvs[0].x; |
mb->mvs[1].x = mb->mvs[2].x = mb->mvs[3].x = mb->mvs[0].x; |
561 |
mb->mvs[1].y = mb->mvs[2].y = mb->mvs[3].y = mb->mvs[0].y; |
mb->mvs[1].y = mb->mvs[2].y = mb->mvs[3].y = mb->mvs[0].y; |
562 |
} |
} |
563 |
|
} |
564 |
else if (mb->mode == MODE_INTER4V /* || mb->mode == MODE_INTER4V_Q */) |
else if (mb->mode == MODE_INTER4V /* || mb->mode == MODE_INTER4V_Q */) |
565 |
{ |
{ |
566 |
get_motion_vector(dec, bs, x, y, 0, &mb->mvs[0], fcode); |
get_motion_vector(dec, bs, x, y, 0, &mb->mvs[0], fcode); |
621 |
|
|
622 |
int decoder_decode(DECODER * dec, XVID_DEC_FRAME * frame) |
int decoder_decode(DECODER * dec, XVID_DEC_FRAME * frame) |
623 |
{ |
{ |
624 |
|
|
625 |
Bitstream bs; |
Bitstream bs; |
626 |
uint32_t rounding; |
uint32_t rounding; |
627 |
uint32_t quant; |
uint32_t quant; |
665 |
stop_global_timer(); |
stop_global_timer(); |
666 |
|
|
667 |
return XVID_ERR_OK; |
return XVID_ERR_OK; |
668 |
|
|
669 |
} |
} |