comparison mpegvideo.c @ 9721:5d0f71ba8648 libavcodec

Rename alloc_picture to ff_alloc_picture and move its definition in mpegvideo.h to avoid including mpegvideo_common.h in mpeg12.c, because it contains motion code.
author bcoudurier
date Wed, 27 May 2009 19:55:35 +0000
parents 15660ad4c641
children 6487152f17f2
comparison
equal deleted inserted replaced
9720:d6a35d7be925 9721:5d0f71ba8648
217 217
218 /** 218 /**
219 * allocates a Picture 219 * allocates a Picture
220 * The pixels are allocated/set by calling get_buffer() if shared=0 220 * The pixels are allocated/set by calling get_buffer() if shared=0
221 */ 221 */
222 int alloc_picture(MpegEncContext *s, Picture *pic, int shared){ 222 int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared){
223 const int big_mb_num= s->mb_stride*(s->mb_height+1) + 1; //the +1 is needed so memset(,,stride*height) does not sig11 223 const int big_mb_num= s->mb_stride*(s->mb_height+1) + 1; //the +1 is needed so memset(,,stride*height) does not sig11
224 const int mb_array_size= s->mb_stride*s->mb_height; 224 const int mb_array_size= s->mb_stride*s->mb_height;
225 const int b8_array_size= s->b8_stride*s->mb_height*2; 225 const int b8_array_size= s->b8_stride*s->mb_height*2;
226 const int b4_array_size= s->b4_stride*s->mb_height*4; 226 const int b4_array_size= s->b4_stride*s->mb_height*4;
227 int i; 227 int i;
915 pic->reference = 3; 915 pic->reference = 3;
916 } 916 }
917 917
918 pic->coded_picture_number= s->coded_picture_number++; 918 pic->coded_picture_number= s->coded_picture_number++;
919 919
920 if(alloc_picture(s, pic, 0) < 0) 920 if(ff_alloc_picture(s, pic, 0) < 0)
921 return -1; 921 return -1;
922 922
923 s->current_picture_ptr= pic; 923 s->current_picture_ptr= pic;
924 s->current_picture_ptr->top_field_first= s->top_field_first; //FIXME use only the vars from current_pic 924 s->current_picture_ptr->top_field_first= s->top_field_first; //FIXME use only the vars from current_pic
925 s->current_picture_ptr->interlaced_frame= !s->progressive_frame && !s->progressive_sequence; 925 s->current_picture_ptr->interlaced_frame= !s->progressive_frame && !s->progressive_sequence;