]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/agm.c
avfilter/transform: Stop exporting internal functions
[ffmpeg] / libavcodec / agm.c
index 19490c54564b2ebf822dd466b1338d2374ae5f53..f39383140fdb7b4c52105cec52c3b499ee9702e5 100644 (file)
@@ -26,6 +26,8 @@
 
 #define BITSTREAM_READER_LE
 
+#include "libavutil/mem_internal.h"
+
 #include "avcodec.h"
 #include "bytestream.h"
 #include "copy_block.h"
@@ -423,8 +425,8 @@ static int decode_inter_plane(AGMContext *s, GetBitContext *gb, int size,
                 int map = s->map[x];
 
                 if (orig_mv_x >= -32) {
-                    if (y * 8 + mv_y < 0 || y * 8 + mv_y + 8 >= h ||
-                        x * 8 + mv_x < 0 || x * 8 + mv_x + 8 >= w)
+                    if (y * 8 + mv_y < 0 || y * 8 + mv_y + 8 > h ||
+                        x * 8 + mv_x < 0 || x * 8 + mv_x + 8 > w)
                         return AVERROR_INVALIDDATA;
 
                     copy_block8(frame->data[plane] + (s->blocks_h - 1 - y) * 8 * frame->linesize[plane] + x * 8,