anchor.diff:          (yend (plus dy (1- height))))
       (declare #.*optimize*
                (type fixnum dx dy h w height width ncomp xend yend)
  -             (type (array uint8 *) inbuf outbuf))
  +             (type (simple-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:                             &key (q-tabs +q-tables+) (sampling '((2 2)(1 1)(1 1))) (q-factor 64))
    (declare #.*optimize*
             (type fixnum ncomp h w q-factor)
             (type (array uint8 *) image))
    (when (= ncomp 1)
      (setq sampling '((1 1))))
    (let* ((wd (loop for entry in sampling maximize (first entry)))
  
negative.code:          (nybase (mul ybase nwidth)))
      (declare #.*optimize*
               (type (simple-vector *) block)
               (type (simple-array uint8 (*)) buffer)
               (type fixnum x y H V ncomp xbase ybase nwidth nx dend nxbase nybase offset)
               (dynamic-extent ncomp xbase ybase nxbase nybase))
      (loop for row across block
  