Revision 7bc9090a libavcodec/msmpeg4.c

View differences:

libavcodec/msmpeg4.c
27 27
#include "avcodec.h"
28 28
#include "dsputil.h"
29 29
#include "mpegvideo.h"
30
//#define PRINT_MB
31 30

  
32 31
/*
33 32
 * You can also call this codec : MPEG4 with a twist ! 
......
1585 1584
{
1586 1585
    int cbp, code, i;
1587 1586
    uint8_t *coded_val;
1588

  
1589
#ifdef PRINT_MB
1590
if(s->mb_x==0){
1591
    printf("\n");
1592
    if(s->mb_y==0) printf("\n");
1593
}
1594
#endif
1587
    uint32_t * const mb_type_ptr= &s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ];
1595 1588

  
1596 1589
    if (s->pict_type == P_TYPE) {
1597 1590
        set_stat(ST_INTER_MB);
......
1606 1599
                s->mv[0][0][0] = 0;
1607 1600
                s->mv[0][0][1] = 0;
1608 1601
                s->mb_skiped = 1;
1609
#ifdef PRINT_MB
1610
printf("S ");
1611
#endif
1602
                *mb_type_ptr = MB_TYPE_SKIP | MB_TYPE_L0 | MB_TYPE_16x16;
1603

  
1612 1604
                return 0;
1613 1605
            }
1614 1606
        }
......
1654 1646
        s->mv_type = MV_TYPE_16X16;
1655 1647
        s->mv[0][0][0] = mx;
1656 1648
        s->mv[0][0][1] = my;
1657
#ifdef PRINT_MB
1658
printf("P ");
1659
#endif
1649
        *mb_type_ptr = MB_TYPE_L0 | MB_TYPE_16x16;
1660 1650
    } else {
1661 1651
//printf("I at %d %d %d %06X\n", s->mb_x, s->mb_y, ((cbp&3)? 1 : 0) +((cbp&0x3C)? 2 : 0), show_bits(&s->gb, 24));
1662 1652
        set_stat(ST_INTRA_MB);
1663 1653
        s->ac_pred = get_bits1(&s->gb);
1664
#ifdef PRINT_MB
1665
printf("%c", s->ac_pred ? 'A' : 'I');
1666
#endif
1654
        *mb_type_ptr = MB_TYPE_INTRA;
1667 1655
        if(s->inter_intra_pred){
1668 1656
            s->h263_aic_dir= get_vlc2(&s->gb, inter_intra_vlc.table, INTER_INTRA_VLC_BITS, 1);
1669 1657
//            printf("%d%d %d %d/", s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y);
......
1701 1689
	/* DC coef */
1702 1690
        set_stat(ST_DC);
1703 1691
        level = msmpeg4_decode_dc(s, n, &dc_pred_dir);
1704
#ifdef PRINT_MB
1705
{
1706
    static int c;
1707
    if(n==0) c=0;
1708
    if(n==4) printf("%X", c);
1709
    c+= c +dc_pred_dir;
1710
}
1711
#endif
1692
        
1712 1693
        if (level < 0){
1713 1694
            fprintf(stderr, "dc overflow- block: %d qscale: %d//\n", n, s->qscale);
1714 1695
            if(s->inter_intra_pred) level=0;

Also available in: Unified diff