Mercurial > libavcodec.hg
comparison mpegvideo.c @ 954:13aec7e50c52 libavcodec
qpel in mmx2/3dnow
qpel refinement quality parameter
author | michaelni |
---|---|
date | Sun, 05 Jan 2003 15:57:10 +0000 |
parents | f348d302a51e |
children | 8f5d4c666806 |
comparison
equal
deleted
inserted
replaced
953:9eb066d6e0db | 954:13aec7e50c52 |
---|---|
2784 if(s->pict_type==I_TYPE) | 2784 if(s->pict_type==I_TYPE) |
2785 s->no_rounding=0; | 2785 s->no_rounding=0; |
2786 else if(s->pict_type!=B_TYPE) | 2786 else if(s->pict_type!=B_TYPE) |
2787 s->no_rounding ^= 1; | 2787 s->no_rounding ^= 1; |
2788 } | 2788 } |
2789 | |
2790 /* Estimate motion for every MB */ | 2789 /* Estimate motion for every MB */ |
2791 if(s->pict_type != I_TYPE){ | 2790 if(s->pict_type != I_TYPE){ |
2792 if(s->pict_type != B_TYPE){ | 2791 if(s->pict_type != B_TYPE){ |
2793 if((s->avctx->pre_me && s->last_non_b_pict_type==I_TYPE) || s->avctx->pre_me==2){ | 2792 if((s->avctx->pre_me && s->last_non_b_pict_type==I_TYPE) || s->avctx->pre_me==2){ |
2794 s->me.pre_pass=1; | 2793 s->me.pre_pass=1; |
2794 s->me.dia_size= s->avctx->pre_dia_size; | |
2795 | 2795 |
2796 for(mb_y=s->mb_height-1; mb_y >=0 ; mb_y--) { | 2796 for(mb_y=s->mb_height-1; mb_y >=0 ; mb_y--) { |
2797 for(mb_x=s->mb_width-1; mb_x >=0 ; mb_x--) { | 2797 for(mb_x=s->mb_width-1; mb_x >=0 ; mb_x--) { |
2798 s->mb_x = mb_x; | 2798 s->mb_x = mb_x; |
2799 s->mb_y = mb_y; | 2799 s->mb_y = mb_y; |
2802 } | 2802 } |
2803 s->me.pre_pass=0; | 2803 s->me.pre_pass=0; |
2804 } | 2804 } |
2805 } | 2805 } |
2806 | 2806 |
2807 s->me.dia_size= s->avctx->dia_size; | |
2807 for(mb_y=0; mb_y < s->mb_height; mb_y++) { | 2808 for(mb_y=0; mb_y < s->mb_height; mb_y++) { |
2808 s->block_index[0]= s->block_wrap[0]*(mb_y*2 + 1) - 1; | 2809 s->block_index[0]= s->block_wrap[0]*(mb_y*2 + 1) - 1; |
2809 s->block_index[1]= s->block_wrap[0]*(mb_y*2 + 1); | 2810 s->block_index[1]= s->block_wrap[0]*(mb_y*2 + 1); |
2810 s->block_index[2]= s->block_wrap[0]*(mb_y*2 + 2) - 1; | 2811 s->block_index[2]= s->block_wrap[0]*(mb_y*2 + 2) - 1; |
2811 s->block_index[3]= s->block_wrap[0]*(mb_y*2 + 2); | 2812 s->block_index[3]= s->block_wrap[0]*(mb_y*2 + 2); |
2814 s->mb_y = mb_y; | 2815 s->mb_y = mb_y; |
2815 s->block_index[0]+=2; | 2816 s->block_index[0]+=2; |
2816 s->block_index[1]+=2; | 2817 s->block_index[1]+=2; |
2817 s->block_index[2]+=2; | 2818 s->block_index[2]+=2; |
2818 s->block_index[3]+=2; | 2819 s->block_index[3]+=2; |
2819 | 2820 |
2820 /* compute motion vector & mb_type and store in context */ | 2821 /* compute motion vector & mb_type and store in context */ |
2821 if(s->pict_type==B_TYPE) | 2822 if(s->pict_type==B_TYPE) |
2822 ff_estimate_b_frame_motion(s, mb_x, mb_y); | 2823 ff_estimate_b_frame_motion(s, mb_x, mb_y); |
2823 else | 2824 else |
2824 ff_estimate_p_frame_motion(s, mb_x, mb_y); | 2825 ff_estimate_p_frame_motion(s, mb_x, mb_y); |