[Ffmpeg-cvslog] r8508 - trunk/libavcodec/vc1.c

kostya subversion
Sun Mar 25 08:00:07 CEST 2007


Author: kostya
Date: Sun Mar 25 08:00:06 2007
New Revision: 8508

Modified:
   trunk/libavcodec/vc1.c

Log:
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))


Modified: trunk/libavcodec/vc1.c
==============================================================================
--- trunk/libavcodec/vc1.c	(original)
+++ trunk/libavcodec/vc1.c	Sun Mar 25 08:00:06 2007
@@ -2954,7 +2954,9 @@ static int vc1_decode_i_block_adv(VC1Con
     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(VC1Con
     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;




More information about the ffmpeg-cvslog mailing list