comparison vc1.c @ 3514:db3335b2b8f1 libavcodec

Some fixes for decode_p_mb()
author kostya
date Mon, 24 Jul 2006 04:20:49 +0000
parents 634ad7b3a198
children 20938be7b67b
comparison
equal deleted inserted replaced
3513:634ad7b3a198 3514:db3335b2b8f1
2538 if(i == 4) vc1_mc_4mv_chroma(v); 2538 if(i == 4) vc1_mc_4mv_chroma(v);
2539 v->mb_type[0][s->block_index[i]] = is_intra[i]; 2539 v->mb_type[0][s->block_index[i]] = is_intra[i];
2540 if(!coded_inter) coded_inter = !is_intra[i] & is_coded[i]; 2540 if(!coded_inter) coded_inter = !is_intra[i] & is_coded[i];
2541 } 2541 }
2542 // if there are no coded blocks then don't do anything more 2542 // if there are no coded blocks then don't do anything more
2543 if(!intra_count && !coded_inter) return; 2543 if(!intra_count && !coded_inter) return 0;
2544 dst_idx = 0; 2544 dst_idx = 0;
2545 GET_MQUANT(); 2545 GET_MQUANT();
2546 s->current_picture.qscale_table[mb_pos] = mquant; 2546 s->current_picture.qscale_table[mb_pos] = mquant;
2547 /* test if block is intra and has pred */ 2547 /* test if block is intra and has pred */
2548 { 2548 {
2557 } 2557 }
2558 if(intrapred)s->ac_pred = get_bits(gb, 1); 2558 if(intrapred)s->ac_pred = get_bits(gb, 1);
2559 else s->ac_pred = 0; 2559 else s->ac_pred = 0;
2560 } 2560 }
2561 if (!v->ttmbf && coded_inter) 2561 if (!v->ttmbf && coded_inter)
2562 ttmb = get_vlc2(gb, vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 12); 2562 ttmb = get_vlc2(gb, vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);
2563 for (i=0; i<6; i++) 2563 for (i=0; i<6; i++)
2564 { 2564 {
2565 dst_idx += i >> 2; 2565 dst_idx += i >> 2;
2566 off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); 2566 off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize);
2567 s->mb_intra = is_intra[i]; 2567 s->mb_intra = is_intra[i];
2594 return status; 2594 return status;
2595 } 2595 }
2596 else //Skipped MB 2596 else //Skipped MB
2597 { 2597 {
2598 s->mb_intra = 0; 2598 s->mb_intra = 0;
2599 s->current_picture.qscale_table[mb_pos] = 0;
2599 for (i=0; i<6; i++) { 2600 for (i=0; i<6; i++) {
2600 v->mb_type[0][s->block_index[i]] = 0; 2601 v->mb_type[0][s->block_index[i]] = 0;
2601 s->dc_val[0][s->block_index[i]] = 0; 2602 s->dc_val[0][s->block_index[i]] = 0;
2602 } 2603 }
2603 for (i=0; i<4; i++) 2604 for (i=0; i<4; i++)