Mercurial > libavcodec.hg
comparison h263dec.c @ 2764:2b37bcabe608 libavcodec
spelling fixes
patch by Peter Robinson pbrobinson @ at @ gmail . dot . com and myself
author | diego |
---|---|
date | Fri, 17 Jun 2005 15:02:53 +0000 |
parents | 67171616ead6 |
children | 0a8c847ad5e7 |
comparison
equal
deleted
inserted
replaced
2763:01ed2c3b8f08 | 2764:2b37bcabe608 |
---|---|
120 MPV_common_end(s); | 120 MPV_common_end(s); |
121 return 0; | 121 return 0; |
122 } | 122 } |
123 | 123 |
124 /** | 124 /** |
125 * retunrs the number of bytes consumed for building the current frame | 125 * returns the number of bytes consumed for building the current frame |
126 */ | 126 */ |
127 static int get_consumed_bytes(MpegEncContext *s, int buf_size){ | 127 static int get_consumed_bytes(MpegEncContext *s, int buf_size){ |
128 int pos= (get_bits_count(&s->gb)+7)>>3; | 128 int pos= (get_bits_count(&s->gb)+7)>>3; |
129 | 129 |
130 if(s->divx_packed){ | 130 if(s->divx_packed){ |
277 s->workaround_bugs |= FF_BUG_NO_PADDING; | 277 s->workaround_bugs |= FF_BUG_NO_PADDING; |
278 else | 278 else |
279 s->workaround_bugs &= ~FF_BUG_NO_PADDING; | 279 s->workaround_bugs &= ~FF_BUG_NO_PADDING; |
280 } | 280 } |
281 | 281 |
282 // handle formats which dont have unique end markers | 282 // handle formats which don't have unique end markers |
283 if(s->msmpeg4_version || (s->workaround_bugs&FF_BUG_NO_PADDING)){ //FIXME perhaps solve this more cleanly | 283 if(s->msmpeg4_version || (s->workaround_bugs&FF_BUG_NO_PADDING)){ //FIXME perhaps solve this more cleanly |
284 int left= s->gb.size_in_bits - get_bits_count(&s->gb); | 284 int left= s->gb.size_in_bits - get_bits_count(&s->gb); |
285 int max_extra=7; | 285 int max_extra=7; |
286 | 286 |
287 /* no markers in M$ crap */ | 287 /* no markers in M$ crap */ |
667 | 667 |
668 // for hurry_up==5 | 668 // for hurry_up==5 |
669 s->current_picture.pict_type= s->pict_type; | 669 s->current_picture.pict_type= s->pict_type; |
670 s->current_picture.key_frame= s->pict_type == I_TYPE; | 670 s->current_picture.key_frame= s->pict_type == I_TYPE; |
671 | 671 |
672 /* skip b frames if we dont have reference frames */ | 672 /* skip B-frames if we don't have reference frames */ |
673 if(s->last_picture_ptr==NULL && (s->pict_type==B_TYPE || s->dropable)) return get_consumed_bytes(s, buf_size); | 673 if(s->last_picture_ptr==NULL && (s->pict_type==B_TYPE || s->dropable)) return get_consumed_bytes(s, buf_size); |
674 /* skip b frames if we are in a hurry */ | 674 /* skip b frames if we are in a hurry */ |
675 if(avctx->hurry_up && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size); | 675 if(avctx->hurry_up && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size); |
676 /* skip everything if we are in a hurry>=5 */ | 676 /* skip everything if we are in a hurry>=5 */ |
677 if(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size); | 677 if(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size); |
770 | 770 |
771 /* Return the Picture timestamp as the frame number */ | 771 /* Return the Picture timestamp as the frame number */ |
772 /* we substract 1 because it is added on utils.c */ | 772 /* we substract 1 because it is added on utils.c */ |
773 avctx->frame_number = s->picture_number - 1; | 773 avctx->frame_number = s->picture_number - 1; |
774 | 774 |
775 /* dont output the last pic after seeking */ | 775 /* don't output the last pic after seeking */ |
776 if(s->last_picture_ptr || s->low_delay) | 776 if(s->last_picture_ptr || s->low_delay) |
777 *data_size = sizeof(AVFrame); | 777 *data_size = sizeof(AVFrame); |
778 #ifdef PRINT_FRAME_TIME | 778 #ifdef PRINT_FRAME_TIME |
779 printf("%Ld\n", rdtsc()-time); | 779 printf("%Ld\n", rdtsc()-time); |
780 #endif | 780 #endif |