filter_vismv.c: bugfix pointer to array of motion vectors
[melted] / src / modules / motion_est / filter_motion_est.c
index 15e4be4..31254d6 100644 (file)
@@ -160,7 +160,7 @@ inline static int constrain(        int *x, int *y, int *w, int *h,
 /** /brief Reference Sum of Absolute Differences comparison function
 *
 */
-inline static int sad_reference( uint8_t *block1, uint8_t *block2, const int xstride, const int ystride, const int w, const int h )
+static int sad_reference( uint8_t *block1, uint8_t *block2, const int xstride, const int ystride, const int w, const int h )
 {
        int i, j, score = 0;
        for ( j = 0; j < h; j++ ){
@@ -290,6 +290,8 @@ static inline void diamond_search(
 
        // Keep track of best and former best candidates
        motion_vector best, former;
+       best.dx = 0;
+       best.dy = 0;
        former.dx = 0;
        former.dy = 0;