changeset 1764:5f42b809bc04 libavcodec

4mv + b frame encoding segfault fix
author michael
date Wed, 28 Jan 2004 00:36:58 +0000
parents 951403db901f
children e31754bc5b65
files motion_est.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/motion_est.c	Tue Jan 27 13:55:34 2004 +0000
+++ b/motion_est.c	Wed Jan 28 00:36:58 2004 +0000
@@ -1577,15 +1577,15 @@
 
         max= FFMAX(s->me.direct_basis_mv[i][0], s->me.direct_basis_mv[i][0] - s->me.co_located_mv[i][0])>>shift;
         min= FFMIN(s->me.direct_basis_mv[i][0], s->me.direct_basis_mv[i][0] - s->me.co_located_mv[i][0])>>shift;
-        max+= (2*mb_x + (i& 1))*8 + 1; // +-1 is for the simpler rounding
-        min+= (2*mb_x + (i& 1))*8 - 1;
+        max+= 16*mb_x + 1; // +-1 is for the simpler rounding
+        min+= 16*mb_x - 1;
         xmax= FFMIN(xmax, s->width - max);
         xmin= FFMAX(xmin, - 16     - min);
 
         max= FFMAX(s->me.direct_basis_mv[i][1], s->me.direct_basis_mv[i][1] - s->me.co_located_mv[i][1])>>shift;
         min= FFMIN(s->me.direct_basis_mv[i][1], s->me.direct_basis_mv[i][1] - s->me.co_located_mv[i][1])>>shift;
-        max+= (2*mb_y + (i>>1))*8 + 1; // +-1 is for the simpler rounding
-        min+= (2*mb_y + (i>>1))*8 - 1;
+        max+= 16*mb_y + 1; // +-1 is for the simpler rounding
+        min+= 16*mb_y - 1;
         ymax= FFMIN(ymax, s->height - max);
         ymin= FFMAX(ymin, - 16      - min);