aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2007-03-25 06:00:06 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2007-03-25 06:00:06 +0000
commitb6661510459da787b6f04871b89d09256c809e1d (patch)
tree6710a27b782a019ef8cea2c0e54d171a3f1dddcc /libavcodec
parent8509fc7b1318eafebd9dda27de8ff586458cdc79 (diff)
downloadffmpeg-b6661510459da787b6f04871b89d09256c809e1d.tar.gz
1000l to myself - get correct quantization for blocks 1 and 2
P.S. This condition could be also written as if(n==3 || n==(2-dc_pred_dir)) Originally committed as revision 8508 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index eac92368ae..0c6c2026c2 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -2954,7 +2954,9 @@ static int vc1_decode_i_block_adv(VC1Context *v, DCTELEM block[64], int n, int c
q1 = s->current_picture.qscale_table[mb_pos];
if(dc_pred_dir && c_avail && mb_pos) q2 = s->current_picture.qscale_table[mb_pos - 1];
if(!dc_pred_dir && a_avail && mb_pos >= s->mb_stride) q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride];
- if(n && n<4) q2 = q1;
+ if(dc_pred_dir && n==1) q2 = q1;
+ if(!dc_pred_dir && n==2) q2 = q1;
+ if(n==3) q2 = q1;
if(coded) {
int last = 0, skip, value;
@@ -3159,7 +3161,9 @@ static int vc1_decode_intra_block(VC1Context *v, DCTELEM block[64], int n, int c
q1 = s->current_picture.qscale_table[mb_pos];
if(dc_pred_dir && c_avail && mb_pos) q2 = s->current_picture.qscale_table[mb_pos - 1];
if(!dc_pred_dir && a_avail && mb_pos >= s->mb_stride) q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride];
- if(n && n<4) q2 = q1;
+ if(dc_pred_dir && n==1) q2 = q1;
+ if(!dc_pred_dir && n==2) q2 = q1;
+ if(n==3) q2 = q1;
if(coded) {
int last = 0, skip, value;