comparison mpeg12.c @ 12:4d50c7d89e0f libavcodec

use block[] in structure to have it aligned on 8 bytes for mmx optimizations
author glantau
date Mon, 30 Jul 2001 23:24:58 +0000
parents 1d3ac9654178
children b69fe46fd708
comparison
equal deleted inserted replaced
11:26331be7e47d 12:4d50c7d89e0f
1258 UINT8 *buf, int buf_size) 1258 UINT8 *buf, int buf_size)
1259 { 1259 {
1260 Mpeg1Context *s1 = avctx->priv_data; 1260 Mpeg1Context *s1 = avctx->priv_data;
1261 MpegEncContext *s = &s1->mpeg_enc_ctx; 1261 MpegEncContext *s = &s1->mpeg_enc_ctx;
1262 int ret; 1262 int ret;
1263 DCTELEM block[6][64];
1264 1263
1265 start_code = (start_code - 1) & 0xff; 1264 start_code = (start_code - 1) & 0xff;
1266 if (start_code >= s->mb_height) 1265 if (start_code >= s->mb_height)
1267 return -1; 1266 return -1;
1268 s->last_dc[0] = 1 << (7 + s->intra_dc_precision); 1267 s->last_dc[0] = 1 << (7 + s->intra_dc_precision);
1286 while (get_bits(&s->gb, 1) != 0) { 1285 while (get_bits(&s->gb, 1) != 0) {
1287 get_bits(&s->gb, 8); 1286 get_bits(&s->gb, 8);
1288 } 1287 }
1289 1288
1290 for(;;) { 1289 for(;;) {
1291 memset(block, 0, sizeof(block)); 1290 memset(s->block, 0, sizeof(s->block));
1292 ret = mpeg_decode_mb(s, block); 1291 ret = mpeg_decode_mb(s, s->block);
1293 dprintf("ret=%d\n", ret); 1292 dprintf("ret=%d\n", ret);
1294 if (ret < 0) 1293 if (ret < 0)
1295 return -1; 1294 return -1;
1296 if (ret == 1) 1295 if (ret == 1)
1297 break; 1296 break;
1298 MPV_decode_mb(s, block); 1297 MPV_decode_mb(s, s->block);
1299 } 1298 }
1300 1299
1301 /* end of slice reached */ 1300 /* end of slice reached */
1302 if (s->mb_x == (s->mb_width - 1) && 1301 if (s->mb_x == (s->mb_width - 1) &&
1303 s->mb_y == (s->mb_height - 1)) { 1302 s->mb_y == (s->mb_height - 1)) {