Mercurial > libavcodec.hg
comparison motion_est_template.c @ 1800:e039d79185c2 libavcodec
simplify MV availability check / dont use below last row MV which is always zero
author | michael |
---|---|
date | Fri, 13 Feb 2004 18:39:43 +0000 |
parents | 95612d423fde |
children | a3c60fa850dc |
comparison
equal
deleted
inserted
replaced
1799:95612d423fde | 1800:e039d79185c2 |
---|---|
944 CHECK_CLIPED_MV((last_mv[ref_mv_xy-ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16, | 944 CHECK_CLIPED_MV((last_mv[ref_mv_xy-ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16, |
945 (last_mv[ref_mv_xy-ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16) | 945 (last_mv[ref_mv_xy-ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16) |
946 }else{ | 946 }else{ |
947 CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16, | 947 CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16, |
948 (last_mv[ref_mv_xy+1][1]*ref_mv_scale + (1<<15))>>16) | 948 (last_mv[ref_mv_xy+1][1]*ref_mv_scale + (1<<15))>>16) |
949 if(s->end_mb_y == s->mb_height || s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line | 949 if(s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line |
950 CHECK_CLIPED_MV((last_mv[ref_mv_xy+ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16, | 950 CHECK_CLIPED_MV((last_mv[ref_mv_xy+ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16, |
951 (last_mv[ref_mv_xy+ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16) | 951 (last_mv[ref_mv_xy+ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16) |
952 } | 952 } |
953 } | 953 } |
954 | 954 |
1046 } | 1046 } |
1047 } | 1047 } |
1048 if(dmin>64*4){ | 1048 if(dmin>64*4){ |
1049 CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16, | 1049 CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16, |
1050 (last_mv[ref_mv_xy+1][1]*ref_mv_scale + (1<<15))>>16) | 1050 (last_mv[ref_mv_xy+1][1]*ref_mv_scale + (1<<15))>>16) |
1051 if(s->end_mb_y == s->mb_height || s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line | 1051 if(s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line |
1052 CHECK_CLIPED_MV((last_mv[ref_mv_xy+ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16, | 1052 CHECK_CLIPED_MV((last_mv[ref_mv_xy+ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16, |
1053 (last_mv[ref_mv_xy+ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16) | 1053 (last_mv[ref_mv_xy+ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16) |
1054 } | 1054 } |
1055 | 1055 |
1056 if(s->me.dia_size==-1) | 1056 if(s->me.dia_size==-1) |
1125 } | 1125 } |
1126 } | 1126 } |
1127 if(dmin>64*4){ | 1127 if(dmin>64*4){ |
1128 CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16, | 1128 CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16, |
1129 (last_mv[ref_mv_xy+1][1]*ref_mv_scale + (1<<15))>>16) | 1129 (last_mv[ref_mv_xy+1][1]*ref_mv_scale + (1<<15))>>16) |
1130 if(s->end_mb_y == s->mb_height || s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line | 1130 if(s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line |
1131 CHECK_CLIPED_MV((last_mv[ref_mv_xy+ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16, | 1131 CHECK_CLIPED_MV((last_mv[ref_mv_xy+ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16, |
1132 (last_mv[ref_mv_xy+ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16) | 1132 (last_mv[ref_mv_xy+ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16) |
1133 } | 1133 } |
1134 | 1134 |
1135 if(s->me.dia_size==-1) | 1135 if(s->me.dia_size==-1) |