Mercurial > libavcodec.hg
comparison vc1.c @ 4237:327e9d4572cb libavcodec
100l: Initialize dc_scale with current quantizer for adv I frames
author | kostya |
---|---|
date | Sun, 26 Nov 2006 04:53:36 +0000 |
parents | aee20d5bd41f |
children | a784639411d6 |
comparison
equal
deleted
inserted
replaced
4236:aee20d5bd41f | 4237:327e9d4572cb |
---|---|
3781 case 2: | 3781 case 2: |
3782 v->codingset2 = CS_MID_RATE_INTER; | 3782 v->codingset2 = CS_MID_RATE_INTER; |
3783 break; | 3783 break; |
3784 } | 3784 } |
3785 | 3785 |
3786 /* Set DC scale - y and c use the same */ | |
3787 s->y_dc_scale = s->y_dc_scale_table[v->pq]; | |
3788 s->c_dc_scale = s->c_dc_scale_table[v->pq]; | |
3789 | |
3790 //do frame decode | 3786 //do frame decode |
3791 s->mb_x = s->mb_y = 0; | 3787 s->mb_x = s->mb_y = 0; |
3792 s->mb_intra = 1; | 3788 s->mb_intra = 1; |
3793 s->first_slice_line = 1; | 3789 s->first_slice_line = 1; |
3794 ff_er_add_slice(s, 0, 0, s->mb_width - 1, s->mb_height - 1, (AC_END|DC_END|MV_END)); | 3790 ff_er_add_slice(s, 0, 0, s->mb_width - 1, s->mb_height - 1, (AC_END|DC_END|MV_END)); |
3818 overlap = (v->condover == CONDOVER_ALL); | 3814 overlap = (v->condover == CONDOVER_ALL); |
3819 | 3815 |
3820 GET_MQUANT(); | 3816 GET_MQUANT(); |
3821 | 3817 |
3822 s->current_picture.qscale_table[mb_pos] = mquant; | 3818 s->current_picture.qscale_table[mb_pos] = mquant; |
3819 /* Set DC scale - y and c use the same */ | |
3820 s->y_dc_scale = s->y_dc_scale_table[mquant]; | |
3821 s->c_dc_scale = s->c_dc_scale_table[mquant]; | |
3823 | 3822 |
3824 for(k = 0; k < 6; k++) { | 3823 for(k = 0; k < 6; k++) { |
3825 val = ((cbp >> (5 - k)) & 1); | 3824 val = ((cbp >> (5 - k)) & 1); |
3826 | 3825 |
3827 if (k < 4) { | 3826 if (k < 4) { |