blob: b9761071e991f5f66f6ff27d787a63354f0ee2a3 [file] [log] [blame]
Pierre Ossman5eb84ff2009-03-09 13:25:30 +00001;
2; jdct.inc - private declarations for forward & reverse DCT subsystems
3;
4; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
5;
DRC123f7252016-05-24 10:23:56 -05006; Based on the x86 SIMD extension for IJG JPEG library
Pierre Ossman5eb84ff2009-03-09 13:25:30 +00007; Copyright (C) 1999-2006, MIYASAKA Masaru.
8; For conditions of distribution and use, see copyright notice in jsimdext.inc
9;
10; [TAB8]
11
12; Each IDCT routine is responsible for range-limiting its results and
13; converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could
14; be quite far out of range if the input data is corrupt, so a bulletproof
15; range-limiting step is required. We use a mask-and-table-lookup method
16; to do the combined operations quickly.
17;
18%define RANGE_MASK (MAXJSAMPLE * 4 + 3) ; 2 bits wider than legal samples
19
DRCe5eaf372014-05-09 18:00:32 +000020%define ROW(n,b,s) ((b)+(n)*(s))
21%define COL(n,b,s) ((b)+(n)*(s)*DCTSIZE)
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000022
DRCe5eaf372014-05-09 18:00:32 +000023%define DWBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_DWORD)
24%define MMBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_MMWORD)
25%define XMMBLOCK(m,n,b,s) ((b)+(m)*DCTSIZE*(s)+(n)*SIZEOF_XMMWORD)
Pierre Ossman5eb84ff2009-03-09 13:25:30 +000026
27; --------------------------------------------------------------------------