comparison mdec.c @ 7153:a702d2a5892f libavcodec

Remove pointless AVFrame* casting.
author astrange
date Fri, 27 Jun 2008 18:53:41 +0000
parents 7801d83ba2c8
children 0bd920dcb7a5
comparison
equal deleted inserted replaced
7152:7801d83ba2c8 7153:a702d2a5892f
155 void *data, int *data_size, 155 void *data, int *data_size,
156 const uint8_t *buf, int buf_size) 156 const uint8_t *buf, int buf_size)
157 { 157 {
158 MDECContext * const a = avctx->priv_data; 158 MDECContext * const a = avctx->priv_data;
159 AVFrame *picture = data; 159 AVFrame *picture = data;
160 AVFrame * const p= (AVFrame*)&a->picture; 160 AVFrame * const p= &a->picture;
161 int i; 161 int i;
162 162
163 if(p->data[0]) 163 if(p->data[0])
164 avctx->release_buffer(avctx, p); 164 avctx->release_buffer(avctx, p);
165 165
198 } 198 }
199 199
200 p->quality= a->qscale * FF_QP2LAMBDA; 200 p->quality= a->qscale * FF_QP2LAMBDA;
201 memset(p->qscale_table, a->qscale, p->qstride*a->mb_height); 201 memset(p->qscale_table, a->qscale, p->qstride*a->mb_height);
202 202
203 *picture= *(AVFrame*)&a->picture; 203 *picture = a->picture;
204 *data_size = sizeof(AVPicture); 204 *data_size = sizeof(AVPicture);
205 205
206 return (get_bits_count(&a->gb)+31)/32*4; 206 return (get_bits_count(&a->gb)+31)/32*4;
207 } 207 }
208 208
212 dsputil_init(&a->dsp, avctx); 212 dsputil_init(&a->dsp, avctx);
213 213
214 a->mb_width = (avctx->coded_width + 15) / 16; 214 a->mb_width = (avctx->coded_width + 15) / 16;
215 a->mb_height = (avctx->coded_height + 15) / 16; 215 a->mb_height = (avctx->coded_height + 15) / 16;
216 216
217 avctx->coded_frame= (AVFrame*)&a->picture; 217 avctx->coded_frame= &a->picture;
218 a->avctx= avctx; 218 a->avctx= avctx;
219 } 219 }
220 220
221 static av_cold int decode_init(AVCodecContext *avctx){ 221 static av_cold int decode_init(AVCodecContext *avctx){
222 MDECContext * const a = avctx->priv_data; 222 MDECContext * const a = avctx->priv_data;
223 AVFrame *p= (AVFrame*)&a->picture; 223 AVFrame *p= &a->picture;
224 224
225 mdec_common_init(avctx); 225 mdec_common_init(avctx);
226 init_vlcs(); 226 init_vlcs();
227 ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct); 227 ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct);
228 228