aboutsummaryrefslogtreecommitdiff
path: root/simd/jdct.inc
diff options
context:
space:
mode:
authorossman_ <ossman_@632fc199-4ca6-4c93-a231-07263d6284db>2009-03-09 13:25:30 +0000
committerossman_ <ossman_@632fc199-4ca6-4c93-a231-07263d6284db>2009-03-09 13:25:30 +0000
commit65984f5ac9933a1fc74c22da22671156f9b9de15 (patch)
tree809d3bf09560d2e99d61f190ea2d16e6d3122b13 /simd/jdct.inc
parentddd9d54d5e181e76197c787220f3bc46e206deba (diff)
Add MMX SIMD implementation of computationally intensive routines.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@17 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'simd/jdct.inc')
-rw-r--r--simd/jdct.inc27
1 files changed, 27 insertions, 0 deletions
diff --git a/simd/jdct.inc b/simd/jdct.inc
new file mode 100644
index 0000000..e53f66e
--- /dev/null
+++ b/simd/jdct.inc
@@ -0,0 +1,27 @@
+;
+; jdct.inc - private declarations for forward & reverse DCT subsystems
+;
+; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
+;
+; Based on
+; x86 SIMD extension for IJG JPEG library
+; Copyright (C) 1999-2006, MIYASAKA Masaru.
+; For conditions of distribution and use, see copyright notice in jsimdext.inc
+;
+; [TAB8]
+
+; Each IDCT routine is responsible for range-limiting its results and
+; converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could
+; be quite far out of range if the input data is corrupt, so a bulletproof
+; range-limiting step is required. We use a mask-and-table-lookup method
+; to do the combined operations quickly.
+;
+%define RANGE_MASK (MAXJSAMPLE * 4 + 3) ; 2 bits wider than legal samples
+
+%define ROW(n,b,s) ((b)+(n)*(s))
+%define COL(n,b,s) ((b)+(n)*(s)*DCTSIZE)
+
+%define DWBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_DWORD)
+%define MMBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_MMWORD)
+
+; --------------------------------------------------------------------------