anchor.diff:                  (2 #(0 1))
                   (4 #(0 1 2 3))
                   (otherwise (error 'illegal-number-of-components)))))
  -    (declare (special *zz-result* *prev-byte* *prev-length*)
  -	     (type (simple-array sint16-2d-array (*)) YUV sampled-buf)
  -	     (type fixnum *prev-length* *prev-byte*))
  +    (declare (type (simple-array sint16-2d-array (*)) YUV sampled-buf))
       (cond ((/= ncomp (length sampling))
              (error 'invalid-sampling-list :ncomp ncomp))
             ((> (length q-tabs) ncomp)
  
positive.code:         (dcval 0))
      (declare #.*optimize*
               (type fixnum tmp0 tmp1 tmp2 tmp3 tmp10 tmp11 tmp12 tmp13 z1 z2 z3 z4 z5 dcval)
               (type sint16-2d-array block *ws*)
               (dynamic-extent tmp0 tmp1 tmp2 tmp3 tmp10 tmp11 tmp12 tmp13 z1 z2 z3 z4 z5 dcval))
      (loop for dptr fixnum from 0 to 7 ; iterating over columns
            if (and (zerop (s16ref block dptr 1))
  
negative.code: (defmacro dct-limit (n)
    `(aref *idct-limit-array* (logand (plus ,n 255) 511)))
  
  (defvar *ws* (2d-sint16-array
  		'(0  0  0  0  0  0  0  0)
  		'(0  0  0  0  0  0  0  0)
  		'(0  0  0  0  0  0  0  0)
  		'(0  0  0  0  0  0  0  0)
  		'(0  0  0  0  0  0  0  0)
  		'(0  0  0  0  0  0  0  0)
  		'(0  0  0  0  0  0  0  0)
  		'(0  0  0  0  0  0  0  0)))
  (declaim (type sint16-2d-array *ws*))
  
  ;;; Inverse LLM DCT and dequantization
  (defun inverse-llm-dct (block q-table)
    "Performs Inverse LMM DCT and dequantization"
  