diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index dc92c0be71f2dbe4e5322fd3f3d58d1dbd54350a..88319b8aef3aef35793e0c53749f5d0c72dfe794 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -30,6 +30,8 @@
 #include "libavutil/avstring.h"
 #include "libavutil/file.h"
 #include "avfilter.h"
+#include "formats.h"
+#include "video.h"
 
 static void fill_iplimage_from_picref(IplImage *img, const AVFilterBufferRef *picref, enum PixelFormat pixfmt)
 {