Mercurial > libavcodec.hg
comparison mdec.c @ 10977:a7a2892e24de libavcodec
Use qstride = 0 and allocate only a single line for qscale_table since
for this codecs all quants are the same for a single frame.
author | reimar |
---|---|
date | Sat, 23 Jan 2010 18:01:38 +0000 |
parents | 34a65026fa06 |
children | 8754b8361dc9 |
comparison
equal
deleted
inserted
replaced
10976:b3e3f5cb4b46 | 10977:a7a2892e24de |
---|---|
199 idct_put(a, a->mb_x, a->mb_y); | 199 idct_put(a, a->mb_x, a->mb_y); |
200 } | 200 } |
201 } | 201 } |
202 | 202 |
203 p->quality= a->qscale * FF_QP2LAMBDA; | 203 p->quality= a->qscale * FF_QP2LAMBDA; |
204 memset(p->qscale_table, a->qscale, p->qstride*a->mb_height); | 204 memset(p->qscale_table, a->qscale, a->mb_width); |
205 | 205 |
206 *picture = a->picture; | 206 *picture = a->picture; |
207 *data_size = sizeof(AVPicture); | 207 *data_size = sizeof(AVPicture); |
208 | 208 |
209 return (get_bits_count(&a->gb)+31)/32*4; | 209 return (get_bits_count(&a->gb)+31)/32*4; |
227 | 227 |
228 mdec_common_init(avctx); | 228 mdec_common_init(avctx); |
229 ff_mpeg12_init_vlcs(); | 229 ff_mpeg12_init_vlcs(); |
230 ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct); | 230 ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct); |
231 | 231 |
232 p->qstride= a->mb_width; | 232 p->qstride= 0; |
233 p->qscale_table= av_mallocz( p->qstride * a->mb_height); | 233 p->qscale_table= av_mallocz(a->mb_width); |
234 avctx->pix_fmt= PIX_FMT_YUV420P; | 234 avctx->pix_fmt= PIX_FMT_YUV420P; |
235 | 235 |
236 return 0; | 236 return 0; |
237 } | 237 } |
238 | 238 |