aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-01-23 18:01:38 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-01-23 18:01:38 +0000
commitb9e3f85dbc5ad3e5c64808173b494ca5164b6908 (patch)
tree33903cd5efcba6c08c4a28d45a85456291018b45
parente4833b5d7145ae3285406d4e069a2e50e5dacf6d (diff)
downloadffmpeg-b9e3f85dbc5ad3e5c64808173b494ca5164b6908.tar.gz
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. Originally committed as revision 21404 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 9cf2a0cf05..fa9661e19f 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -201,7 +201,7 @@ static int decode_frame(AVCodecContext *avctx,
}
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(AVCodecContext *avctx){
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;