changeset 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 b3e3f5cb4b46
children 8754b8361dc9
files mdec.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mdec.c	Sat Jan 23 18:01:28 2010 +0000
+++ b/mdec.c	Sat Jan 23 18:01:38 2010 +0000
@@ -201,7 +201,7 @@
     }
 
     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 @@
     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;