diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index 4f219645d168cf6ab5bbf4f361fc7b9f72efad2c..8a601dff7512dedd709c51baadf1885d1d44da7a 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -45,6 +45,7 @@
 #include "aandcttab.h"
 #include "faandct.h"
 #include "faanidct.h"
+#include "x86/fdct.h"
 #include "x86/idct_xvid.h"
 #include "dctref.h"
 
diff --git a/libavcodec/dct.h b/libavcodec/dct.h
index 3de10b99c588333ed9b0c03f8170d32b5ce1c7aa..3fd4e278334fc87e256fbd7569fba291d2cce695 100644
--- a/libavcodec/dct.h
+++ b/libavcodec/dct.h
@@ -60,8 +60,4 @@ void ff_fdct248_islow_10(int16_t *data);
 
 void ff_j_rev_dct(int16_t *data);
 
-void ff_fdct_mmx(int16_t *block);
-void ff_fdct_mmxext(int16_t *block);
-void ff_fdct_sse2(int16_t *block);
-
 #endif /* AVCODEC_DCT_H */
diff --git a/libavcodec/x86/fdct.c b/libavcodec/x86/fdct.c
index 6c95439e100247603dbf76fdb74896e5bb05761e..6528b57361f778a94630adfcba4c9b750de2007d 100644
--- a/libavcodec/x86/fdct.c
+++ b/libavcodec/x86/fdct.c
@@ -32,7 +32,7 @@
 
 #include "libavutil/common.h"
 #include "libavutil/x86/asm.h"
-#include "libavcodec/dct.h"
+#include "fdct.h"
 
 #if HAVE_MMX_INLINE
 
diff --git a/libavcodec/x86/fdct.h b/libavcodec/x86/fdct.h
new file mode 100644
index 0000000000000000000000000000000000000000..c94a977e8f84fa6a191be8250663e49229463e44
--- /dev/null
+++ b/libavcodec/x86/fdct.h
@@ -0,0 +1,28 @@
+/*
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_X86_FDCT_H
+#define AVCODEC_X86_FDCT_H
+
+#include <stdint.h>
+
+void ff_fdct_mmx(int16_t *block);
+void ff_fdct_mmxext(int16_t *block);
+void ff_fdct_sse2(int16_t *block);
+
+#endif /* AVCODEC_X86_FDCT_H */
diff --git a/libavcodec/x86/fdctdsp_init.c b/libavcodec/x86/fdctdsp_init.c
index 93fdd6567d548e249d1fe9e0bc1e0f25f2f2909e..4e8e4eb60d72e01dfb04eb3fce0580c1b5490c7f 100644
--- a/libavcodec/x86/fdctdsp_init.c
+++ b/libavcodec/x86/fdctdsp_init.c
@@ -20,8 +20,8 @@
 #include "libavutil/cpu.h"
 #include "libavutil/x86/cpu.h"
 #include "libavcodec/avcodec.h"
-#include "libavcodec/dct.h"
 #include "libavcodec/fdctdsp.h"
+#include "fdct.h"
 
 av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx,
                                  unsigned high_bit_depth)
diff --git a/libavcodec/x86/mpegvideoenc_template.c b/libavcodec/x86/mpegvideoenc_template.c
index 87965fe114d9d6a5630fdadca47afa23b987151a..1274c13e058d434a2b20d2687f5eee9e84787eee 100644
--- a/libavcodec/x86/mpegvideoenc_template.c
+++ b/libavcodec/x86/mpegvideoenc_template.c
@@ -25,6 +25,7 @@
 #include "libavutil/internal.h"
 #include "libavutil/x86/asm.h"
 #include "libavcodec/mpegvideo.h"
+#include "fdct.h"
 
 #undef MMREG_WIDTH
 #undef MM