jdct.inc 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. ;
  2. ; jdct.inc - private declarations for forward & reverse DCT subsystems
  3. ;
  4. ; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
  5. ; Copyright (C) 2018, D. R. Commander.
  6. ;
  7. ; Based on the x86 SIMD extension for IJG JPEG library
  8. ; Copyright (C) 1999-2006, MIYASAKA Masaru.
  9. ; For conditions of distribution and use, see copyright notice in jsimdext.inc
  10. ; Each IDCT routine is responsible for range-limiting its results and
  11. ; converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could
  12. ; be quite far out of range if the input data is corrupt, so a bulletproof
  13. ; range-limiting step is required. We use a mask-and-table-lookup method
  14. ; to do the combined operations quickly.
  15. ;
  16. %define RANGE_MASK (MAXJSAMPLE * 4 + 3) ; 2 bits wider than legal samples
  17. %define ROW(n, b, s) ((b) + (n) * (s))
  18. %define COL(n, b, s) ((b) + (n) * (s) * DCTSIZE)
  19. %define DWBLOCK(m, n, b, s) \
  20. ((b) + (m) * DCTSIZE * (s) + (n) * SIZEOF_DWORD)
  21. %define MMBLOCK(m, n, b, s) \
  22. ((b) + (m) * DCTSIZE * (s) + (n) * SIZEOF_MMWORD)
  23. %define XMMBLOCK(m, n, b, s) \
  24. ((b) + (m) * DCTSIZE * (s) + (n) * SIZEOF_XMMWORD)
  25. %define YMMBLOCK(m, n, b, s) \
  26. ((b) + (m) * DCTSIZE * (s) + (n) * SIZEOF_YMMWORD)
  27. ; --------------------------------------------------------------------------