Mercurial > libavcodec.hg
comparison rv10.c @ 1938:e2501e6e7ff7 libavcodec
unify table indexing (motion_val,dc_val,ac_val,coded_block changed)
minor +-1 bugfix
author | michael |
---|---|
date | Fri, 16 Apr 2004 01:01:45 +0000 |
parents | 1c382d137275 |
children | 141a9539e270 |
comparison
equal
deleted
inserted
replaced
1937:4d91a9342d95 | 1938:e2501e6e7ff7 |
---|---|
562 if ((s->mb_x == 0 && s->mb_y == 0) || s->current_picture_ptr==NULL) { | 562 if ((s->mb_x == 0 && s->mb_y == 0) || s->current_picture_ptr==NULL) { |
563 if(MPV_frame_start(s, avctx) < 0) | 563 if(MPV_frame_start(s, avctx) < 0) |
564 return -1; | 564 return -1; |
565 } | 565 } |
566 | 566 |
567 if(s->pict_type == B_TYPE){ //FIXME remove after cleaning mottion_val indexing | |
568 memset(s->current_picture.motion_val[0], 0, sizeof(int16_t)*2*(s->mb_width*2+2)*(s->mb_height*2+2)); | |
569 } | |
570 | |
571 #ifdef DEBUG | 567 #ifdef DEBUG |
572 printf("qscale=%d\n", s->qscale); | 568 printf("qscale=%d\n", s->qscale); |
573 #endif | 569 #endif |
574 | 570 |
575 /* default quantization values */ | 571 /* default quantization values */ |
598 s->rv10_first_dc_coded[2] = 0; | 594 s->rv10_first_dc_coded[2] = 0; |
599 //printf("%d %X %X\n", s->pict_type, s->current_picture.motion_val[0], s->current_picture.motion_val[1]); | 595 //printf("%d %X %X\n", s->pict_type, s->current_picture.motion_val[0], s->current_picture.motion_val[1]); |
600 s->block_wrap[0]= | 596 s->block_wrap[0]= |
601 s->block_wrap[1]= | 597 s->block_wrap[1]= |
602 s->block_wrap[2]= | 598 s->block_wrap[2]= |
603 s->block_wrap[3]= s->mb_width*2 + 2; | 599 s->block_wrap[3]= s->b8_stride; |
604 s->block_wrap[4]= | 600 s->block_wrap[4]= |
605 s->block_wrap[5]= s->mb_width + 2; | 601 s->block_wrap[5]= s->mb_stride; |
606 ff_init_block_index(s); | 602 ff_init_block_index(s); |
607 /* decode each macroblock */ | 603 /* decode each macroblock */ |
608 | 604 |
609 for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) { | 605 for(s->mb_num_left= mb_count; s->mb_num_left>0; s->mb_num_left--) { |
610 int ret; | 606 int ret; |
675 }else{ | 671 }else{ |
676 if( rv10_decode_packet(avctx, buf, buf_size) < 0 ) | 672 if( rv10_decode_packet(avctx, buf, buf_size) < 0 ) |
677 return -1; | 673 return -1; |
678 } | 674 } |
679 | 675 |
680 if(s->pict_type == B_TYPE){ //FIXME remove after cleaning mottion_val indexing | |
681 memset(s->current_picture.motion_val[0], 0, sizeof(int16_t)*2*(s->mb_width*2+2)*(s->mb_height*2+2)); | |
682 } | |
683 | |
684 if(s->mb_y>=s->mb_height){ | 676 if(s->mb_y>=s->mb_height){ |
685 MPV_frame_end(s); | 677 MPV_frame_end(s); |
686 | 678 |
687 if(s->pict_type==B_TYPE || s->low_delay){ | 679 if(s->pict_type==B_TYPE || s->low_delay){ |
688 *pict= *(AVFrame*)&s->current_picture; | 680 *pict= *(AVFrame*)&s->current_picture; |