anchor.diff:          (yend (plus dy (1- height))))
       (declare #.*optimize*
                (type fixnum dx dy h w height width ncomp xend yend)
  -             (type (simple-vector *) inbuf outbuf))
  +             (type (array uint8 *) inbuf outbuf))
       (setf xend (min xend (1- w)))
       (setf yend (min yend (1- h)))
       (loop for yd fixnum from dy to yend
  
positive.code: 
  ;;; Default quantization tables
  (define-constant +q-luminance+
    #(#(16 11 10 16 24 40 51 61)
      #(12 12 14 19 26 58 60 55)
      #(14 13 16 24 40 57 69 56)
      #(14 17 22 29 51 87 80 62)
      #(18 22 37 56 68 109 103 77)
      #(24 35 55 64 81 104 113 92)
      #(49 64 78 87 103 121 120 101)
      #(72 92 95 98 112 100 103 99)))
  
  (define-constant +q-chrominance+
    #(#(17 18 24 47 99 99 99 99)
      #(18 21 26 66 99 99 99 99)
      #(24 26 56 99 99 99 99 99)
      #(47 66 99 99 99 99 99 99)
      #(99 99 99 99 99 99 99 99)
      #(99 99 99 99 99 99 99 99)
      #(99 99 99 99 99 99 99 99)
      #(99 99 99 99 99 99 99 99)))
  
  (define-constant +q-luminance-hi+
    #(#(10 7 6 10 15 25 32 38)
      #(8 8 9 12 16 36 38 34)
      #(9 8 10 15 25 36 43 35)
      #(9 11 14 18 32 54 50 39)
      #(11 14 23 35 42 68 64 48)
      #(15 22 34 40 51 65 71 58)
      #(31 40 49 54 64 76 75 63)
      #(45 58 59 61 70 62 64 62)))
  
  (define-constant +q-chrominance-hi+
    #(#(11 11 15 29 62 62 62 62)
      #(11 13 16 41 62 62 62 62)
      #(15 16 35 62 62 62 62 62)
      #(29 41 62 62 62 62 62 62)
      #(62 62 62 62 62 62 62 62)
      #(62 62 62 62 62 62 62 62)
      #(62 62 62 62 62 62 62 62)
      #(62 62 62 62 62 62 62 62)))
  
  )
  
  
negative.code: (eval-when (:compile-toplevel :load-toplevel :execute)
  ;;; For ease of reference
  (defmacro dbref (data x y)
    `(the fixnum (aref (aref ,data ,y) ,x)))
  
  ;;; Integer arithmetic wrappers
  (defmacro plus (a b)
  