[FFmpeg-devel] [PATCH] Rename template included sources from .h to _template.c.
Diego 'Flameeyes' Pettenò
flameeyes
Sat Oct 4 13:55:47 CEST 2008
There are multiple source files that are #include'd rather than
compiled, as they are used as template for generation of similar code,
like asm-optimised code. Some of these files are right now named with
a .h extension, although they are not header in any reasonable sense.
Rename them so that instead of being named with .h extension they are
named with _template.c as final part.
---
libavcodec/armv4l/dsputil_iwmmxt.c | 4
libavcodec/armv4l/dsputil_iwmmxt_rnd.h | 1118 -----------------------
libavcodec/armv4l/dsputil_iwmmxt_rnd_template.c | 1118 +++++++++++++++++++++++
libavcodec/i386/dsputil_mmx.c | 8
libavcodec/i386/dsputil_mmx_avg.h | 900 -------------------
libavcodec/i386/dsputil_mmx_avg_template.c | 900 +++++++++++++++++++
libavcodec/i386/dsputil_mmx_qns.h | 105 --
libavcodec/i386/dsputil_mmx_qns_template.c | 105 ++
libavcodec/i386/dsputil_mmx_rnd.h | 594 ------------
libavcodec/i386/dsputil_mmx_rnd_template.c | 594 ++++++++++++
libavcodec/i386/dsputilenc_mmx.c | 6
libavcodec/imgconvert.c | 10
libavcodec/imgconvert_template.c | 879 ++++++++++++++++++
libavcodec/imgconvert_template.h | 879 ------------------
14 files changed, 3610 insertions(+), 3610 deletions(-)
delete mode 100644 libavcodec/armv4l/dsputil_iwmmxt_rnd.h
create mode 100644 libavcodec/armv4l/dsputil_iwmmxt_rnd_template.c
delete mode 100644 libavcodec/i386/dsputil_mmx_avg.h
create mode 100644 libavcodec/i386/dsputil_mmx_avg_template.c
delete mode 100644 libavcodec/i386/dsputil_mmx_qns.h
create mode 100644 libavcodec/i386/dsputil_mmx_qns_template.c
delete mode 100644 libavcodec/i386/dsputil_mmx_rnd.h
create mode 100644 libavcodec/i386/dsputil_mmx_rnd_template.c
create mode 100644 libavcodec/imgconvert_template.c
delete mode 100644 libavcodec/imgconvert_template.h
diff --git a/libavcodec/armv4l/dsputil_iwmmxt.c b/libavcodec/armv4l/dsputil_iwmmxt.c
index 6d824e2..7ffd539 100644
--- a/libavcodec/armv4l/dsputil_iwmmxt.c
+++ b/libavcodec/armv4l/dsputil_iwmmxt.c
@@ -24,7 +24,7 @@
#define DEF(x, y) x ## _no_rnd_ ## y ##_iwmmxt
#define SET_RND(regd) asm volatile ("mov r12, #1 \n\t tbcsth " #regd ", r12":::"r12");
#define WAVG2B "wavg2b"
-#include "dsputil_iwmmxt_rnd.h"
+#include "dsputil_iwmmxt_rnd_template.c"
#undef DEF
#undef SET_RND
#undef WAVG2B
@@ -32,7 +32,7 @@
#define DEF(x, y) x ## _ ## y ##_iwmmxt
#define SET_RND(regd) asm volatile ("mov r12, #2 \n\t tbcsth " #regd ", r12":::"r12");
#define WAVG2B "wavg2br"
-#include "dsputil_iwmmxt_rnd.h"
+#include "dsputil_iwmmxt_rnd_template.c"
#undef DEF
#undef SET_RND
#undef WAVG2BR
diff --git a/libavcodec/armv4l/dsputil_iwmmxt_rnd.h b/libavcodec/armv4l/dsputil_iwmmxt_rnd_template.c
similarity index 100%
rename from libavcodec/armv4l/dsputil_iwmmxt_rnd.h
rename to libavcodec/armv4l/dsputil_iwmmxt_rnd_template.c
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c
index 6e1a93d..c4e79b8 100644
--- a/libavcodec/i386/dsputil_mmx.c
+++ b/libavcodec/i386/dsputil_mmx.c
@@ -153,7 +153,7 @@ DECLARE_ALIGNED_16(const double, ff_pd_2[2]) = { 2.0, 2.0 };
#define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX_NO_RND(a, b, c, d, e, f)
#define PAVGB(a, b, c, e) PAVGB_MMX_NO_RND(a, b, c, e)
-#include "dsputil_mmx_rnd.h"
+#include "dsputil_mmx_rnd_template.c"
#undef DEF
#undef SET_RND
@@ -167,7 +167,7 @@ DECLARE_ALIGNED_16(const double, ff_pd_2[2]) = { 2.0, 2.0 };
#define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX(a, b, c, d, e, f)
#define PAVGB(a, b, c, e) PAVGB_MMX(a, b, c, e)
-#include "dsputil_mmx_rnd.h"
+#include "dsputil_mmx_rnd_template.c"
#undef DEF
#undef SET_RND
@@ -180,7 +180,7 @@ DECLARE_ALIGNED_16(const double, ff_pd_2[2]) = { 2.0, 2.0 };
#define DEF(x) x ## _3dnow
#define PAVGB "pavgusb"
-#include "dsputil_mmx_avg.h"
+#include "dsputil_mmx_avg_template.c"
#undef DEF
#undef PAVGB
@@ -193,7 +193,7 @@ DECLARE_ALIGNED_16(const double, ff_pd_2[2]) = { 2.0, 2.0 };
/* Introduced only in MMX2 set */
#define PAVGB "pavgb"
-#include "dsputil_mmx_avg.h"
+#include "dsputil_mmx_avg_template.c"
#undef DEF
#undef PAVGB
diff --git a/libavcodec/i386/dsputil_mmx_avg.h b/libavcodec/i386/dsputil_mmx_avg_template.c
similarity index 100%
rename from libavcodec/i386/dsputil_mmx_avg.h
rename to libavcodec/i386/dsputil_mmx_avg_template.c
diff --git a/libavcodec/i386/dsputil_mmx_qns.h b/libavcodec/i386/dsputil_mmx_qns_template.c
similarity index 100%
rename from libavcodec/i386/dsputil_mmx_qns.h
rename to libavcodec/i386/dsputil_mmx_qns_template.c
diff --git a/libavcodec/i386/dsputil_mmx_rnd.h b/libavcodec/i386/dsputil_mmx_rnd_template.c
similarity index 100%
rename from libavcodec/i386/dsputil_mmx_rnd.h
rename to libavcodec/i386/dsputil_mmx_rnd_template.c
diff --git a/libavcodec/i386/dsputilenc_mmx.c b/libavcodec/i386/dsputilenc_mmx.c
index be423f8..84bf8bc 100644
--- a/libavcodec/i386/dsputilenc_mmx.c
+++ b/libavcodec/i386/dsputilenc_mmx.c
@@ -1270,7 +1270,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si
#define SET_RND MOVQ_WONE
#define SCALE_OFFSET 1
-#include "dsputil_mmx_qns.h"
+#include "dsputil_mmx_qns_template.c"
#undef DEF
#undef SET_RND
@@ -1284,7 +1284,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si
"pmulhrw " #s ", "#x " \n\t"\
"pmulhrw " #s ", "#y " \n\t"
-#include "dsputil_mmx_qns.h"
+#include "dsputil_mmx_qns_template.c"
#undef DEF
#undef SET_RND
@@ -1303,7 +1303,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si
"pmulhrsw " #s ", "#x " \n\t"\
"pmulhrsw " #s ", "#y " \n\t"
-#include "dsputil_mmx_qns.h"
+#include "dsputil_mmx_qns_template.c"
#undef DEF
#undef SET_RND
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index fcdfbd9..2087a17 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -1416,7 +1416,7 @@ static inline unsigned int bitcopy_n(unsigned int a, int n)
#define BPP 2
-#include "imgconvert_template.h"
+#include "imgconvert_template.c"
/* rgb565 handling */
@@ -1437,7 +1437,7 @@ static inline unsigned int bitcopy_n(unsigned int a, int n)
#define BPP 2
-#include "imgconvert_template.h"
+#include "imgconvert_template.c"
/* bgr24 handling */
@@ -1459,7 +1459,7 @@ static inline unsigned int bitcopy_n(unsigned int a, int n)
#define BPP 3
-#include "imgconvert_template.h"
+#include "imgconvert_template.c"
#undef RGB_IN
#undef RGB_OUT
@@ -1486,7 +1486,7 @@ static inline unsigned int bitcopy_n(unsigned int a, int n)
#define BPP 3
-#include "imgconvert_template.h"
+#include "imgconvert_template.c"
/* rgb32 handling */
@@ -1517,7 +1517,7 @@ static inline unsigned int bitcopy_n(unsigned int a, int n)
#define BPP 4
-#include "imgconvert_template.h"
+#include "imgconvert_template.c"
static void mono_to_gray(AVPicture *dst, const AVPicture *src,
int width, int height, int xor_mask)
diff --git a/libavcodec/imgconvert_template.h b/libavcodec/imgconvert_template.c
similarity index 100%
rename from libavcodec/imgconvert_template.h
rename to libavcodec/imgconvert_template.c
More information about the ffmpeg-devel
mailing list