X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmotion_est.c;h=54bc93da38a5daf0b7ce2c42ffc44fb31799c6ca;hb=432a54ef805695b9083597a987e8e92b26f7c5a7;hp=9d1c26fe23714bf75c39076beef5a45b7ff87cfe;hpb=755bfeabccbba9ae1b565b11d645b8e4fe139fa8;p=ffmpeg diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 9d1c26fe237..54bc93da38a 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -3,6 +3,7 @@ * Copyright (c) 2000,2001 Fabrice Bellard. * Copyright (c) 2002-2004 Michael Niedermayer * + * new motion estimation (X1/EPZS) by Michael Niedermayer * * This file is part of FFmpeg. * @@ -19,8 +20,6 @@ * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * new Motion Estimation (X1/EPZS) by Michael Niedermayer */ /** @@ -1807,7 +1806,7 @@ static inline int direct_search(MpegEncContext * s, int mb_x, int mb_y) P_LEFT[1] = av_clip(mv_table[mot_xy - 1][1], ymin<first_slice_line) { //FIXME maybe allow this over thread boundary as its clipped + if (!s->first_slice_line) { //FIXME maybe allow this over thread boundary as it is clipped P_TOP[0] = av_clip(mv_table[mot_xy - mot_stride ][0], xmin<pict_type==B_TYPE || s->current_picture.mc_mb_var[xy] < s->current_picture.mb_var[xy]) + if(s->pict_type==FF_B_TYPE || s->current_picture.mc_mb_var[xy] < s->current_picture.mb_var[xy]) score[j]-= 170; } } @@ -2059,7 +2058,7 @@ void ff_fix_long_p_mvs(MpegEncContext * s) MotionEstContext * const c= &s->me; const int f_code= s->f_code; int y, range; - assert(s->pict_type==P_TYPE); + assert(s->pict_type==FF_P_TYPE); range = (((s->out_format == FMT_MPEG1 || s->msmpeg4_version) ? 8 : 16) << f_code);