summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/motion_est.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 01ba6c63a7..17954b52f6 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -1475,11 +1475,11 @@ static inline int bidir_refine(MpegEncContext * s, int mb_x, int mb_y)
const int ymin= c->ymin<<shift;
const int xmax= c->xmax<<shift;
const int ymax= c->ymax<<shift;
- uint8_t map[8][8][8][8];
+ uint8_t map[256];
memset(map,0,sizeof(map));
#define BIDIR_MAP(fx,fy,bx,by) \
- map[(motion_fx+fx)&7][(motion_fy+fy)&7][(motion_bx+bx)&7][(motion_by+by)&7]
+ map[((motion_fx+fx)+17*(motion_fy+fy)+63*(motion_bx+bx)+117*(motion_by+by))&255]
BIDIR_MAP(0,0,0,0) = 1;
fbmin= check_bidir_mv(s, motion_fx, motion_fy,