[FFmpeg-cvslog] r21404 - trunk/libavcodec/mdec.c
reimar
subversion
Sat Jan 23 19:01:39 CET 2010
Author: reimar
Date: Sat Jan 23 19:01:38 2010
New Revision: 21404
Log:
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.
Modified:
trunk/libavcodec/mdec.c
Modified: trunk/libavcodec/mdec.c
==============================================================================
--- trunk/libavcodec/mdec.c Sat Jan 23 19:01:28 2010 (r21403)
+++ trunk/libavcodec/mdec.c Sat Jan 23 19:01:38 2010 (r21404)
@@ -201,7 +201,7 @@ static int decode_frame(AVCodecContext *
}
p->quality= a->qscale * FF_QP2LAMBDA;
- memset(p->qscale_table, a->qscale, p->qstride*a->mb_height);
+ memset(p->qscale_table, a->qscale, a->mb_width);
*picture = a->picture;
*data_size = sizeof(AVPicture);
@@ -229,8 +229,8 @@ static av_cold int decode_init(AVCodecCo
ff_mpeg12_init_vlcs();
ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct);
- p->qstride= a->mb_width;
- p->qscale_table= av_mallocz( p->qstride * a->mb_height);
+ p->qstride= 0;
+ p->qscale_table= av_mallocz(a->mb_width);
avctx->pix_fmt= PIX_FMT_YUV420P;
return 0;
More information about the ffmpeg-cvslog
mailing list