#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"
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;
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;
}