comparison h263dec.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 986e461dc072
children 6ea595d66852
comparison
equal deleted inserted replaced
11:26331be7e47d 12:4d50c7d89e0f
77 void *data, int *data_size, 77 void *data, int *data_size,
78 UINT8 *buf, int buf_size) 78 UINT8 *buf, int buf_size)
79 { 79 {
80 MpegEncContext *s = avctx->priv_data; 80 MpegEncContext *s = avctx->priv_data;
81 int ret; 81 int ret;
82 DCTELEM block[6][64];
83 AVPicture *pict = data; 82 AVPicture *pict = data;
84 83
85 #ifdef DEBUG 84 #ifdef DEBUG
86 printf("*****frame %d size=%d\n", avctx->frame_number, buf_size); 85 printf("*****frame %d size=%d\n", avctx->frame_number, buf_size);
87 printf("bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]); 86 printf("bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);
129 /* default quantization values */ 128 /* default quantization values */
130 s->y_dc_scale = 8; 129 s->y_dc_scale = 8;
131 s->c_dc_scale = 8; 130 s->c_dc_scale = 8;
132 } 131 }
133 132
134 memset(block, 0, sizeof(block)); 133 memset(s->block, 0, sizeof(s->block));
135 s->mv_dir = MV_DIR_FORWARD; 134 s->mv_dir = MV_DIR_FORWARD;
136 s->mv_type = MV_TYPE_16X16; 135 s->mv_type = MV_TYPE_16X16;
137 if (s->h263_msmpeg4) { 136 if (s->h263_msmpeg4) {
138 if (msmpeg4_decode_mb(s, block) < 0) 137 if (msmpeg4_decode_mb(s, s->block) < 0)
139 return -1; 138 return -1;
140 } else { 139 } else {
141 if (h263_decode_mb(s, block) < 0) 140 if (h263_decode_mb(s, s->block) < 0)
142 return -1; 141 return -1;
143 } 142 }
144 MPV_decode_mb(s, block); 143 MPV_decode_mb(s, s->block);
145 } 144 }
146 } 145 }
147 146
148 MPV_frame_end(s); 147 MPV_frame_end(s);
149 148