Revision 7bc9090a libavcodec/h263dec.c

View differences:

libavcodec/h263dec.c
209 209
            MPV_decode_mb(s, s->block);
210 210

  
211 211
            if(ret<0){
212
                const int xy= s->mb_x + s->mb_y*s->mb_width;
212
                const int xy= s->mb_x + s->mb_y*s->mb_stride;
213 213
                if(ret==SLICE_END){
214 214
//printf("%d %d %d %06X\n", s->mb_x, s->mb_y, s->gb.size*8 - get_bits_count(&s->gb), show_bits(&s->gb, 24));
215 215
                    ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask);
......
644 644
    ff_er_frame_start(s);
645 645
    
646 646
    /* decode each macroblock */
647
    s->block_wrap[0]=
648
    s->block_wrap[1]=
649
    s->block_wrap[2]=
650
    s->block_wrap[3]= s->mb_width*2 + 2;
651
    s->block_wrap[4]=
652
    s->block_wrap[5]= s->mb_width + 2;
653 647
    s->mb_x=0; 
654 648
    s->mb_y=0;
655 649
    
......
708 702
        for(mb_y=0; mb_y<s->mb_height; mb_y++){
709 703
            int mb_x;
710 704
            for(mb_x=0; mb_x<s->mb_width; mb_x++){
711
                const int mb_index= mb_x + mb_y*s->mb_width;
712
                if(s->co_located_type_table[mb_index] == MV_TYPE_8X8){
705
                const int mb_index= mb_x + mb_y*s->mb_stride;
706
                if(IS_8X8(s->current_picture.mb_type[mb_index])){
713 707
                    int i;
714 708
                    for(i=0; i<4; i++){
715 709
                        int sx= mb_x*16 + 4 + 8*(i&1);
......
732 726
        }
733 727
    }
734 728

  
735

  
736 729
    if(s->pict_type==B_TYPE || s->low_delay){
737 730
        *pict= *(AVFrame*)&s->current_picture;
731
        ff_print_debug_info(s, s->current_picture_ptr);
738 732
    } else {
739 733
        *pict= *(AVFrame*)&s->last_picture;
734
        ff_print_debug_info(s, s->last_picture_ptr);
740 735
    }
741

  
742
    if(avctx->debug&FF_DEBUG_QP){
743
        int8_t *qtab= pict->qscale_table;
744
        int x,y;
745
        
746
        for(y=0; y<s->mb_height; y++){
747
            for(x=0; x<s->mb_width; x++){
748
                printf("%2d ", qtab[x + y*s->mb_width]);
749
            }
750
            printf("\n");
751
        }
752
        printf("\n");
753
    }
736
    
754 737

  
755 738
    /* Return the Picture timestamp as the frame number */
756 739
    /* we substract 1 because it is added on utils.c    */

Also available in: Unified diff