summaryrefslogtreecommitdiff
path: root/src/stretch_hvx_N.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stretch_hvx_N.h')
-rw-r--r--src/stretch_hvx_N.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/stretch_hvx_N.h b/src/stretch_hvx_N.h
new file mode 100644
index 0000000..168f4e0
--- /dev/null
+++ b/src/stretch_hvx_N.h
@@ -0,0 +1,42 @@
+#if UPDOWN == 1
+#define FUNC_NAME_(K,P,F) FUNC_NAME(up,K,P,F)
+#else
+#define FUNC_NAME_(K,P,F) FUNC_NAME(down,K,P,F)
+#endif
+
+
+/* NONE */
+static void FUNC_NAME_(_,_,DST_FORMAT)
+#include STRETCH_HVX_N_H
+
+
+/* FIXME: DST_FORMAT == DSPF_RGB16 doesn't work */
+#ifdef FORMAT_RGB16
+/* RGB16 <- RGB32 */
+#define SOURCE_TYPE u32
+#define SOURCE_LOOKUP(x) PIXEL_RGB16( ((x) & 0xff0000) >> 16, \
+ ((x) & 0x00ff00) >> 8, \
+ ((x) & 0x0000ff) )
+static void FUNC_NAME_(_,_,DSPF_RGB32)
+#include STRETCH_HVX_N_H
+
+#undef SOURCE_LOOKUP
+#undef SOURCE_TYPE
+#endif
+
+
+/* FIXME: DST_FORMAT == DSPF_ARGB doesn't work */
+#ifdef FORMAT_ARGB
+/* ARGB <- RGB32 */
+#define SOURCE_TYPE u32
+#define SOURCE_LOOKUP(x) ((x) | 0xff000000)
+static void FUNC_NAME_(_,_,DSPF_RGB32)
+#include STRETCH_HVX_N_H
+
+#undef SOURCE_LOOKUP
+#undef SOURCE_TYPE
+#endif
+
+
+#undef FUNC_NAME_
+