Revision 4d2a4834 libavcodec/msmpeg4.c

View differences:

libavcodec/msmpeg4.c
549 549
	if (s->use_skip_mb_code && (cbp | motion_x | motion_y) == 0) {
550 550
	    /* skip macroblock */
551 551
	    put_bits(&s->pb, 1, 1);
552
            s->last_bits++;
553
	    s->misc_bits++;
554

  
552 555
	    return;
553 556
	}
554 557
        if (s->use_skip_mb_code)
......
564 567
            put_bits(&s->pb, 
565 568
                     cbpy_tab[coded_cbp>>2][1], 
566 569
                     cbpy_tab[coded_cbp>>2][0]);
567
                        
570

  
571
            s->misc_bits += get_bits_diff(s);
572

  
568 573
            h263_pred_motion(s, 0, &pred_x, &pred_y);
569 574
            msmpeg4v2_encode_motion(s, motion_x - pred_x);
570 575
            msmpeg4v2_encode_motion(s, motion_y - pred_y);
......
573 578
                     table_mb_non_intra[cbp + 64][1], 
574 579
                     table_mb_non_intra[cbp + 64][0]);
575 580

  
581
            s->misc_bits += get_bits_diff(s);
582

  
576 583
            /* motion vector */
577 584
            h263_pred_motion(s, 0, &pred_x, &pred_y);
578 585
            msmpeg4_encode_motion(s, motion_x - pred_x, 
579 586
                                  motion_y - pred_y);
580 587
        }
588

  
589
        s->mv_bits += get_bits_diff(s);
590

  
591
        for (i = 0; i < 6; i++) {
592
            msmpeg4_encode_block(s, block[i], i);
593
        }
594
        s->p_tex_bits += get_bits_diff(s);
581 595
    } else {
582 596
	/* compute cbp */
583 597
	cbp = 0;
......
633 647
                put_bits(&s->pb, table_inter_intra[s->h263_aic_dir][1], table_inter_intra[s->h263_aic_dir][0]);
634 648
            }
635 649
        }
636
    }
650
        s->misc_bits += get_bits_diff(s);
637 651

  
638
    for (i = 0; i < 6; i++) {
639
        msmpeg4_encode_block(s, block[i], i);
652
        for (i = 0; i < 6; i++) {
653
            msmpeg4_encode_block(s, block[i], i);
654
        }
655
        s->i_tex_bits += get_bits_diff(s);
640 656
    }
641 657
}
642 658

  

Also available in: Unified diff