]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_deshake.c
Merge commit 'c3c96deb5f8cbbdb700ba97920ceedddacb5dcb9'
[ffmpeg] / libavfilter / vf_deshake.c
index c68de3653d76a501f6e2384ff5f6f9a7ea2e31f1..9a56b71b3938cced715e4480f177bc184f53e2ea 100644 (file)
@@ -57,7 +57,7 @@
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
-#include "libavcodec/dsputil.h"
+#include "libavcodec/me_cmp.h"
 
 #include "deshake.h"
 #include "deshake_opencl.h"
@@ -249,7 +249,7 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
     int contrast;
 
     int pos;
-    double *angles = av_malloc(sizeof(*angles) * width * height / (16 * deshake->blocksize));
+    double *angles = av_malloc_array(width * height / (16 * deshake->blocksize), sizeof(*angles));
     int center_x = 0, center_y = 0;
     double p_x, p_y;
 
@@ -414,7 +414,7 @@ static int config_props(AVFilterLink *link)
     deshake->last.zoom = 0;
 
     deshake->avctx = avcodec_alloc_context3(NULL);
-    avpriv_dsputil_init(&deshake->c, deshake->avctx);
+    ff_me_cmp_init(&deshake->c, deshake->avctx);
 
     return 0;
 }