comparison h263dec.c @ 1138:e10e841c9bf0 libavcodec

field pic decoding cleanup
author michaelni
date Sun, 16 Mar 2003 20:22:22 +0000
parents 7fb0b38ab5a3
children 21c85c4ab2f0
comparison
equal deleted inserted replaced
1137:7fb0b38ab5a3 1138:e10e841c9bf0
619 // for hurry_up==5 619 // for hurry_up==5
620 s->current_picture.pict_type= s->pict_type; 620 s->current_picture.pict_type= s->pict_type;
621 s->current_picture.key_frame= s->pict_type == I_TYPE; 621 s->current_picture.key_frame= s->pict_type == I_TYPE;
622 622
623 /* skip b frames if we dont have reference frames */ 623 /* skip b frames if we dont have reference frames */
624 if(s->last_picture.data[0]==NULL && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size); 624 if(s->last_picture_ptr==NULL && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size);
625 /* skip b frames if we are in a hurry */ 625 /* skip b frames if we are in a hurry */
626 if(avctx->hurry_up && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size); 626 if(avctx->hurry_up && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size);
627 /* skip everything if we are in a hurry>=5 */ 627 /* skip everything if we are in a hurry>=5 */
628 if(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size); 628 if(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size);
629 629
729 } 729 }
730 } 730 }
731 731
732 MPV_frame_end(s); 732 MPV_frame_end(s);
733 733
734 if((avctx->debug&FF_DEBUG_VIS_MV) && s->last_picture.data[0]){ 734 if((avctx->debug&FF_DEBUG_VIS_MV) && s->last_picture_ptr){
735 const int shift= 1 + s->quarter_sample; 735 const int shift= 1 + s->quarter_sample;
736 int mb_y; 736 int mb_y;
737 uint8_t *ptr= s->last_picture.data[0]; 737 uint8_t *ptr= s->last_picture.data[0];
738 s->low_delay=0; //needed to see the vectors without trashing the buffers 738 s->low_delay=0; //needed to see the vectors without trashing the buffers
739 739
787 /* Return the Picture timestamp as the frame number */ 787 /* Return the Picture timestamp as the frame number */
788 /* we substract 1 because it is added on utils.c */ 788 /* we substract 1 because it is added on utils.c */
789 avctx->frame_number = s->picture_number - 1; 789 avctx->frame_number = s->picture_number - 1;
790 790
791 /* dont output the last pic after seeking */ 791 /* dont output the last pic after seeking */
792 if(s->last_picture.data[0] || s->low_delay) 792 if(s->last_picture_ptr || s->low_delay)
793 *data_size = sizeof(AVFrame); 793 *data_size = sizeof(AVFrame);
794 #ifdef PRINT_FRAME_TIME 794 #ifdef PRINT_FRAME_TIME
795 printf("%Ld\n", rdtsc()-time); 795 printf("%Ld\n", rdtsc()-time);
796 #endif 796 #endif
797 return get_consumed_bytes(s, buf_size); 797 return get_consumed_bytes(s, buf_size);