diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-11-20 10:48:23 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-11-20 10:48:23 +0000 |
commit | 789382d3403d08fed25246cebff2617c3a23ecc6 (patch) | |
tree | 99a77bd794e5fa31f95e8fa9b046ff08b9543480 /libavcodec | |
parent | 6ffdc53de9e51c4c8f48cf3f5fa7256f5cc5707b (diff) | |
download | ffmpeg-streaming-789382d3403d08fed25246cebff2617c3a23ecc6.zip ffmpeg-streaming-789382d3403d08fed25246cebff2617c3a23ecc6.tar.gz |
100l qprd fix 2nd try
Originally committed as revision 7132 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 703ac3b..791744d 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -5226,7 +5226,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ if(s->flags & CODEC_FLAG_QP_RD){ if(best_s.mv_type==MV_TYPE_16X16 && !(best_s.mv_dir&MV_DIRECT)){ const int last_qp= backup_s.qscale; - int dquant, qpi, qp, dc[6]; + int qpi, qp, dc[6]; DCTELEM ac[6][16]; const int mvdir= (best_s.mv_dir&MV_DIR_BACKWARD) ? 1 : 0; static const int dquant_tab[4]={-1,1,-2,2}; @@ -5243,7 +5243,8 @@ static int encode_thread(AVCodecContext *c, void *arg){ s->mv[1][0][1] = best_s.mv[1][0][1]; qpi = s->pict_type == B_TYPE ? 2 : 0; - for(dquant= dquant_tab[qpi]; qpi<4; qpi++){ + for(; qpi<4; qpi++){ + int dquant= dquant_tab[qpi]; qp= last_qp + dquant; if(qp < s->avctx->qmin || qp > s->avctx->qmax) continue; |