summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2005-03-31 19:32:13 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2005-03-31 19:32:13 (GMT)
commit0692fd3ae8c1219b81098de4fa7a8d7a90422afe (patch)
tree204af6c7843be6fc0e381c0f3614357f741ae477 /include
download5kk53-0692fd3ae8c1219b81098de4fa7a8d7a90422afe.zip
5kk53-0692fd3ae8c1219b81098de4fa7a8d7a90422afe.tar.gz
5kk53-0692fd3ae8c1219b81098de4fa7a8d7a90422afe.tar.bz2
Initial dct modules with dummy main.
forward dct compiles cleanly. Needs to be verified if working. inverse dct needs some type fixing (from original libjpeg).
Diffstat (limited to 'include')
-rw-r--r--include/dct.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/dct.h b/include/dct.h
new file mode 100644
index 0000000..d202de5
--- /dev/null
+++ b/include/dct.h
@@ -0,0 +1,11 @@
+#define CONST_BITS 8
+#define DCTSIZE 8
+#define DCTSIZE_BLOCK (DCTSIZE * DCTSIZE)
+
+#define RIGHT_SHIFT(x,shft) ((x) >> (shft))
+
+#define DESCALE(x,n) RIGHT_SHIFT((x) + (1 << ((n)-1)), n)
+
+#define MULTIPLY(var,constant) (DESCALE((var) * (constant), CONST_BITS))
+
+void fdct(int *data);