diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-05 14:41:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-05 18:10:34 +0100 |
commit | 5b4da8a38a5ed211df9504c85ce401c30af86b97 (patch) | |
tree | 8709a7ac58039ac905041ab8f2dd5215cc5781e1 /libavcodec/motion_est.h | |
parent | e7271e6d078a4f8064cf6eef59eff7d58da1b1d5 (diff) | |
download | ffmpeg-5b4da8a38a5ed211df9504c85ce401c30af86b97.tar.gz |
avcodec/motion_est: Fix mv_penalty table size
Fixes out of array read
Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/motion_est.h')
-rw-r--r-- | libavcodec/motion_est.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/motion_est.h b/libavcodec/motion_est.h index df9e3c7e85..9cdd637aaa 100644 --- a/libavcodec/motion_est.h +++ b/libavcodec/motion_est.h @@ -30,6 +30,7 @@ struct MpegEncContext; #define MAX_MV 4096 +#define MAX_DMV (2*MAX_MV) #define ME_MAP_SIZE 64 #define FF_ME_ZERO 0 @@ -85,7 +86,7 @@ typedef struct MotionEstContext { op_pixels_func(*hpel_avg)[4]; qpel_mc_func(*qpel_put)[16]; qpel_mc_func(*qpel_avg)[16]; - uint8_t (*mv_penalty)[MAX_MV * 2 + 1]; ///< bit amount needed to encode a MV + uint8_t (*mv_penalty)[MAX_DMV * 2 + 1]; ///< bit amount needed to encode a MV uint8_t *current_mv_penalty; int (*sub_motion_search)(struct MpegEncContext *s, int *mx_ptr, int *my_ptr, int dmin, |