comparison mpegvideo.c @ 1451:62c16edd18c6 libavcodec

--disable-risky fix by (Luca Abeni <lucabe72 at email dot it>)
author michaelni
date Tue, 09 Sep 2003 19:46:21 +0000
parents 958d9c0cedba
children 40b69d238beb
comparison
equal deleted inserted replaced
1450:357c19b0b27b 1451:62c16edd18c6
3325 s->current_picture.mc_mb_var_sum = 0; 3325 s->current_picture.mc_mb_var_sum = 0;
3326 3326
3327 #ifdef CONFIG_RISKY 3327 #ifdef CONFIG_RISKY
3328 /* we need to initialize some time vars before we can encode b-frames */ 3328 /* we need to initialize some time vars before we can encode b-frames */
3329 // RAL: Condition added for MPEG1VIDEO 3329 // RAL: Condition added for MPEG1VIDEO
3330 //FIXME figure out why mpeg1/2 need this !!!
3331 if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->h263_msmpeg4)) 3330 if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->h263_msmpeg4))
3332 ff_set_mpeg4_time(s, s->picture_number); 3331 ff_set_mpeg4_time(s, s->picture_number);
3333 #endif 3332 #endif
3334 3333
3335 s->scene_change_score=0; 3334 s->scene_change_score=0;
3744 flush_put_bits(&s->tex_pb); 3743 flush_put_bits(&s->tex_pb);
3745 ff_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count); 3744 ff_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count);
3746 s->tex_pb= backup_s.tex_pb; 3745 s->tex_pb= backup_s.tex_pb;
3747 } 3746 }
3748 s->last_bits= get_bit_count(&s->pb); 3747 s->last_bits= get_bit_count(&s->pb);
3749 3748
3749 #ifdef CONFIG_RISKY
3750 if (s->out_format == FMT_H263 && s->pict_type!=B_TYPE) 3750 if (s->out_format == FMT_H263 && s->pict_type!=B_TYPE)
3751 ff_h263_update_motion_val(s); 3751 ff_h263_update_motion_val(s);
3752 #endif
3752 3753
3753 if(next_block==0){ 3754 if(next_block==0){
3754 s->dsp.put_pixels_tab[0][0](s->dest[0], s->me.scratchpad , s->linesize ,16); 3755 s->dsp.put_pixels_tab[0][0](s->dest[0], s->me.scratchpad , s->linesize ,16);
3755 s->dsp.put_pixels_tab[1][0](s->dest[1], s->me.scratchpad + 16, s->uvlinesize, 8); 3756 s->dsp.put_pixels_tab[1][0](s->dest[1], s->me.scratchpad + 16, s->uvlinesize, 8);
3756 s->dsp.put_pixels_tab[1][0](s->dest[2], s->me.scratchpad + 24, s->uvlinesize, 8); 3757 s->dsp.put_pixels_tab[1][0](s->dest[2], s->me.scratchpad + 24, s->uvlinesize, 8);
3910 encode_mb(s, motion_x, motion_y); 3911 encode_mb(s, motion_x, motion_y);
3911 3912
3912 // RAL: Update last macrobloc type 3913 // RAL: Update last macrobloc type
3913 s->last_mv_dir = s->mv_dir; 3914 s->last_mv_dir = s->mv_dir;
3914 3915
3916 #ifdef CONFIG_RISKY
3915 if (s->out_format == FMT_H263 && s->pict_type!=B_TYPE) 3917 if (s->out_format == FMT_H263 && s->pict_type!=B_TYPE)
3916 ff_h263_update_motion_val(s); 3918 ff_h263_update_motion_val(s);
3917 3919 #endif
3920
3918 MPV_decode_mb(s, s->block); 3921 MPV_decode_mb(s, s->block);
3919 } 3922 }
3920 3923
3921 /* clean the MV table in IPS frames for direct mode in B frames */ 3924 /* clean the MV table in IPS frames for direct mode in B frames */
3922 if(s->mb_intra /* && I,P,S_TYPE */){ 3925 if(s->mb_intra /* && I,P,S_TYPE */){