diff --git a/libavfilter/libmpcodecs/vf_geq.c b/libavfilter/libmpcodecs/vf_geq.c
index 2102c87f55859a3a6e3de45f5fb8665e3c842ff7..22f29387d59f1006df08f6bf3dffb3d3d12efaff 100644
--- a/libavfilter/libmpcodecs/vf_geq.c
+++ b/libavfilter/libmpcodecs/vf_geq.c
@@ -27,7 +27,6 @@
 #include "config.h"
 
 #include "mp_msg.h"
-#include "cpudetect.h"
 
 #include "img_format.h"
 #include "mp_image.h"
diff --git a/libavfilter/libmpcodecs/vf_mcdeint.c b/libavfilter/libmpcodecs/vf_mcdeint.c
index aad2afdfad5baf011daab45d06026cb67b28e796..64c402cba5a19cbb93541a9ecad2002d56d67ace 100644
--- a/libavfilter/libmpcodecs/vf_mcdeint.c
+++ b/libavfilter/libmpcodecs/vf_mcdeint.c
@@ -92,7 +92,6 @@ struct vf_priv_s {
 
 static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int dst_stride[3], int src_stride[3], int width, int height){
     int x, y, i;
-    int out_size;
 
     for(i=0; i<3; i++){
         p->frame->data[i]= src[i];
@@ -102,7 +101,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds
     p->avctx_enc->me_cmp=
     p->avctx_enc->me_sub_cmp= FF_CMP_SAD /*| (p->parity ? FF_CMP_ODD : FF_CMP_EVEN)*/;
     p->frame->quality= p->qp*FF_QP2LAMBDA;
-    out_size = avcodec_encode_video(p->avctx_enc, p->outbuf, p->outbuf_size, p->frame);
+    avcodec_encode_video(p->avctx_enc, p->outbuf, p->outbuf_size, p->frame);
     p->frame_dec = p->avctx_enc->coded_frame;
 
     for(i=0; i<3; i++){
diff --git a/libavfilter/libmpcodecs/vf_perspective.c b/libavfilter/libmpcodecs/vf_perspective.c
index f6c6dd60d70c4b2cd58f886648a72b881cd3ae6f..f5a9d6be36a26208a22dd3a0498c78bf58ddeb24 100644
--- a/libavfilter/libmpcodecs/vf_perspective.c
+++ b/libavfilter/libmpcodecs/vf_perspective.c
@@ -32,6 +32,8 @@
 #include <malloc.h>
 #endif
 
+#include "libavutil/mem.h"
+
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"
diff --git a/libavfilter/libmpcodecs/vf_pp7.c b/libavfilter/libmpcodecs/vf_pp7.c
index c075d6619cd1e012aa98da0b3731d790ce277e79..eae30bf7a112d548f2c98810bb2d40f6998bb950 100644
--- a/libavfilter/libmpcodecs/vf_pp7.c
+++ b/libavfilter/libmpcodecs/vf_pp7.c
@@ -34,6 +34,8 @@
 #include <malloc.h>
 #endif
 
+#include "libavutil/mem.h"
+
 #include "img_format.h"
 #include "mp_image.h"
 #include "vf.h"
diff --git a/libavfilter/libmpcodecs/vf_remove_logo.c b/libavfilter/libmpcodecs/vf_remove_logo.c
index 5498a1bd03e974c5a9fbe55e51ac997cd13009f4..a970adc5b0ea3185792b48020f8ee421d96f9f1e 100644
--- a/libavfilter/libmpcodecs/vf_remove_logo.c
+++ b/libavfilter/libmpcodecs/vf_remove_logo.c
@@ -22,7 +22,7 @@
  */
 
 /**
- * \file vf_remove_logo.c
+ * \file
  *
  * \brief Advanced blur-based logo removing filter.
 
diff --git a/libavfilter/libmpcodecs/vf_sab.c b/libavfilter/libmpcodecs/vf_sab.c
index 51e9d78158e300b7ea69524c4ab5e38df8a8afc3..4dadeb798e2d14d4a78302aa5bcd912899a96280 100644
--- a/libavfilter/libmpcodecs/vf_sab.c
+++ b/libavfilter/libmpcodecs/vf_sab.c
@@ -66,6 +66,8 @@ struct vf_priv_s {
 //FIXME stupid code duplication
 static void getSubSampleFactors(int *h, int *v, int format){
     switch(format){
+    default:
+        assert(0);
     case IMGFMT_YV12:
     case IMGFMT_I420:
         *h=1;
diff --git a/libavfilter/libmpcodecs/vf_smartblur.c b/libavfilter/libmpcodecs/vf_smartblur.c
index 5bfcb2806eff0e96c2dacb0e6f881d213670ac14..3f0d7c3d6bef0125a8acb28d9640bc61a4d54dfa 100644
--- a/libavfilter/libmpcodecs/vf_smartblur.c
+++ b/libavfilter/libmpcodecs/vf_smartblur.c
@@ -53,6 +53,8 @@ struct vf_priv_s {
 //FIXME stupid code duplication
 static void getSubSampleFactors(int *h, int *v, int format){
     switch(format){
+    default:
+        assert(0);
     case IMGFMT_YV12:
     case IMGFMT_I420:
         *h=1;
diff --git a/libavfilter/libmpcodecs/vf_uspp.c b/libavfilter/libmpcodecs/vf_uspp.c
index 7f5a86522a18e263c30c5582b4a45d72177c2752..d9c5de8fb10b8450c048fe72cb9e7d2a9648211c 100644
--- a/libavfilter/libmpcodecs/vf_uspp.c
+++ b/libavfilter/libmpcodecs/vf_uspp.c
@@ -175,12 +175,12 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds
     for(i=0; i<count; i++){
         const int x1= offset[i+count-1][0];
         const int y1= offset[i+count-1][1];
-        int offset, out_size;
+        int offset;
         p->frame->data[0]= p->src[0] + x1 + y1 * p->frame->linesize[0];
         p->frame->data[1]= p->src[1] + x1/2 + y1/2 * p->frame->linesize[1];
         p->frame->data[2]= p->src[2] + x1/2 + y1/2 * p->frame->linesize[2];
 
-        out_size = avcodec_encode_video(p->avctx_enc[i], p->outbuf, p->outbuf_size, p->frame);
+        avcodec_encode_video(p->avctx_enc[i], p->outbuf, p->outbuf_size, p->frame);
         p->frame_dec = p->avctx_enc[i]->coded_frame;
 
         offset= (BLOCK-x1) + (BLOCK-y1)*p->frame_dec->linesize[0];