avpacket: Check for and return errors in ff_interleave_add_packet()
[ffmpeg.git] / libavcodec / x86 / motion_est.c
index d126012..2b34a28 100644 (file)
@@ -27,6 +27,7 @@
 #include "libavutil/mem.h"
 #include "libavutil/x86/asm.h"
 #include "libavutil/x86/cpu.h"
+#include "libavcodec/mpegvideo.h"
 #include "dsputil_x86.h"
 
 #if HAVE_INLINE_ASM
@@ -94,7 +95,8 @@ static inline void sad8_1_mmxext(uint8_t *blk1, uint8_t *blk2,
         : "r" ((x86_reg) stride));
 }
 
-static int sad16_sse2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h)
+static int sad16_sse2(MpegEncContext *v, uint8_t *blk2, uint8_t *blk1,
+                      int stride, int h)
 {
     int ret;
     __asm__ volatile (
@@ -323,7 +325,7 @@ static inline void sad8_y2a_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
 }
 
 #define PIX_SAD(suf)                                                    \
-static int sad8_ ## suf(void *v, uint8_t *blk2,                         \
+static int sad8_ ## suf(MpegEncContext *v, uint8_t *blk2,               \
                         uint8_t *blk1, int stride, int h)               \
 {                                                                       \
     assert(h == 8);                                                     \
@@ -337,7 +339,7 @@ static int sad8_ ## suf(void *v, uint8_t *blk2,                         \
     return sum_ ## suf();                                               \
 }                                                                       \
                                                                         \
-static int sad8_x2_ ## suf(void *v, uint8_t *blk2,                      \
+static int sad8_x2_ ## suf(MpegEncContext *v, uint8_t *blk2,            \
                            uint8_t *blk1, int stride, int h)            \
 {                                                                       \
     assert(h == 8);                                                     \
@@ -352,7 +354,7 @@ static int sad8_x2_ ## suf(void *v, uint8_t *blk2,                      \
     return sum_ ## suf();                                               \
 }                                                                       \
                                                                         \
-static int sad8_y2_ ## suf(void *v, uint8_t *blk2,                      \
+static int sad8_y2_ ## suf(MpegEncContext *v, uint8_t *blk2,            \
                            uint8_t *blk1, int stride, int h)            \
 {                                                                       \
     assert(h == 8);                                                     \
@@ -367,7 +369,7 @@ static int sad8_y2_ ## suf(void *v, uint8_t *blk2,                      \
     return sum_ ## suf();                                               \
 }                                                                       \
                                                                         \
-static int sad8_xy2_ ## suf(void *v, uint8_t *blk2,                     \
+static int sad8_xy2_ ## suf(MpegEncContext *v, uint8_t *blk2,           \
                             uint8_t *blk1, int stride, int h)           \
 {                                                                       \
     assert(h == 8);                                                     \
@@ -381,7 +383,7 @@ static int sad8_xy2_ ## suf(void *v, uint8_t *blk2,                     \
     return sum_ ## suf();                                               \
 }                                                                       \
                                                                         \
-static int sad16_ ## suf(void *v, uint8_t *blk2,                        \
+static int sad16_ ## suf(MpegEncContext *v, uint8_t *blk2,              \
                          uint8_t *blk1, int stride, int h)              \
 {                                                                       \
     __asm__ volatile (                                                  \
@@ -395,7 +397,7 @@ static int sad16_ ## suf(void *v, uint8_t *blk2,                        \
     return sum_ ## suf();                                               \
 }                                                                       \
                                                                         \
-static int sad16_x2_ ## suf(void *v, uint8_t *blk2,                     \
+static int sad16_x2_ ## suf(MpegEncContext *v, uint8_t *blk2,           \
                             uint8_t *blk1, int stride, int h)           \
 {                                                                       \
     __asm__ volatile (                                                  \
@@ -410,7 +412,7 @@ static int sad16_x2_ ## suf(void *v, uint8_t *blk2,                     \
     return sum_ ## suf();                                               \
 }                                                                       \
                                                                         \
-static int sad16_y2_ ## suf(void *v, uint8_t *blk2,                     \
+static int sad16_y2_ ## suf(MpegEncContext *v, uint8_t *blk2,           \
                             uint8_t *blk1, int stride, int h)           \
 {                                                                       \
     __asm__ volatile (                                                  \
@@ -425,7 +427,7 @@ static int sad16_y2_ ## suf(void *v, uint8_t *blk2,                     \
     return sum_ ## suf();                                               \
 }                                                                       \
                                                                         \
-static int sad16_xy2_ ## suf(void *v, uint8_t *blk2,                    \
+static int sad16_xy2_ ## suf(MpegEncContext *v, uint8_t *blk2,          \
                              uint8_t *blk1, int stride, int h)          \
 {                                                                       \
     __asm__ volatile (                                                  \