Mercurial > libavcodec.hg
changeset 4724:ea97803884e1 libavcodec
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))
author | kostya |
---|---|
date | Sun, 25 Mar 2007 06:00:06 +0000 |
parents | b62a3a46856c |
children | 74caca70e2b3 |
files | vc1.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/vc1.c Sun Mar 25 01:09:26 2007 +0000 +++ b/vc1.c Sun Mar 25 06:00:06 2007 +0000 @@ -2954,7 +2954,9 @@ 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 @@ 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;