comparison mpegvideo.c @ 1834:41c324b09fcc libavcodec

100l (field picture decoding fix)
author michael
date Thu, 26 Feb 2004 02:48:07 +0000
parents ba27ce284d07
children 8cdbb74c2f4b
comparison
equal deleted inserted replaced
1833:ba27ce284d07 1834:41c324b09fcc
410 410
411 CHECKED_ALLOCZ(s->allocated_edge_emu_buffer, (s->width+64)*2*17*2); //(width + edge + align)*interlaced*MBsize*tolerance 411 CHECKED_ALLOCZ(s->allocated_edge_emu_buffer, (s->width+64)*2*17*2); //(width + edge + align)*interlaced*MBsize*tolerance
412 s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*17; 412 s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*17;
413 413
414 //FIXME should be linesize instead of s->width*2 but that isnt known before get_buffer() 414 //FIXME should be linesize instead of s->width*2 but that isnt known before get_buffer()
415 CHECKED_ALLOCZ(s->me.scratchpad, s->width*2*16*2*sizeof(uint8_t)) 415 CHECKED_ALLOCZ(s->me.scratchpad, (s->width+64)*2*16*2*sizeof(uint8_t))
416 s->rd_scratchpad= s->me.scratchpad; 416 s->rd_scratchpad= s->me.scratchpad;
417 s->b_scratchpad= s->me.scratchpad; 417 s->b_scratchpad= s->me.scratchpad;
418 s->obmc_scratchpad= s->me.scratchpad + 16; 418 s->obmc_scratchpad= s->me.scratchpad + 16;
419 if (s->encoding) { 419 if (s->encoding) {
420 CHECKED_ALLOCZ(s->me.map , ME_MAP_SIZE*sizeof(uint32_t)) 420 CHECKED_ALLOCZ(s->me.map , ME_MAP_SIZE*sizeof(uint32_t))
3156 dest_y= s->dest[0]; 3156 dest_y= s->dest[0];
3157 dest_cb= s->dest[1]; 3157 dest_cb= s->dest[1];
3158 dest_cr= s->dest[2]; 3158 dest_cr= s->dest[2];
3159 }else{ 3159 }else{
3160 dest_y = s->b_scratchpad; 3160 dest_y = s->b_scratchpad;
3161 dest_cb= s->b_scratchpad+16*s->linesize; 3161 dest_cb= s->b_scratchpad+16*linesize;
3162 dest_cr= s->b_scratchpad+16*s->linesize+8; 3162 dest_cr= s->b_scratchpad+16*linesize+8;
3163 } 3163 }
3164 if (!s->mb_intra) { 3164 if (!s->mb_intra) {
3165 /* motion handling */ 3165 /* motion handling */
3166 /* decoding or more than one mb_type (MC was allready done otherwise) */ 3166 /* decoding or more than one mb_type (MC was allready done otherwise) */
3167 if(!s->encoding){ 3167 if(!s->encoding){
4640 4640
4641 #ifdef CONFIG_RISKY 4641 #ifdef CONFIG_RISKY
4642 /* we need to initialize some time vars before we can encode b-frames */ 4642 /* we need to initialize some time vars before we can encode b-frames */
4643 // RAL: Condition added for MPEG1VIDEO 4643 // RAL: Condition added for MPEG1VIDEO
4644 if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->h263_msmpeg4)) 4644 if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->h263_msmpeg4))
4645 ff_set_mpeg4_time(s, s->picture_number); 4645 ff_set_mpeg4_time(s, s->picture_number); //FIXME rename and use has_b_frames or similar
4646 #endif 4646 #endif
4647 4647
4648 s->scene_change_score=0; 4648 s->scene_change_score=0;
4649 4649
4650 s->lambda= s->current_picture_ptr->quality; //FIXME qscale / ... stuff for ME ratedistoration 4650 s->lambda= s->current_picture_ptr->quality; //FIXME qscale / ... stuff for ME ratedistoration