anchor.diff:          (V (aref YUV 2)))
       (declare #.*optimize*
                (type fixnum dx dy h w height width xend yend)
  -             (type (simple-vector *) YUV Y U V)
  -             (type (simple-array uint8 (*)) RGB))
  +	     (type fixnum-2d-array Y U V)
  +	     (type (simple-array fixnum (*)) *ctab*)
  +             (type uint8-array RGB))
       (setf xend (min xend (1- w)))
       (setf yend (min yend (1- h)))
       (loop for yd fixnum from dy to yend
  
positive.code: 
  ;;; Implementation of Loeffer, Ligtenberg and Moschytz forward DCT
  (defun llm-dct (data)
    (declare #.*optimize* (type (simple-vector *) data))
    (loop with tmp0 fixnum and tmp1 fixnum and tmp2 fixnum
          and tmp3 fixnum and tmp4 fixnum and tmp5 fixnum
          and tmp6 fixnum and tmp7 fixnum and tmp10 fixnum
          and tmp11 fixnum and tmp12 fixnum and tmp13 fixnum
          and z1 fixnum and z2 fixnum and z3 fixnum
          and z4 fixnum and z5 fixnum do
          (loop ; for dptrpos fixnum from 7 downto 0
                ; for dptr = (svref data dptrpos) do
                for dptr across data do   ; iterating over rows
                (setf tmp0 (plus (svref dptr 0) (svref dptr 7)))
                (setf tmp7 (minus (svref dptr 0) (svref dptr 7)))
                (setf tmp1 (plus (svref dptr 1) (svref dptr 6)))
                (setf tmp6 (minus (svref dptr 1) (svref dptr 6)))
                (setf tmp2 (plus (svref dptr 2) (svref dptr 5)))
                (setf tmp5 (minus (svref dptr 2) (svref dptr 5)))
                (setf tmp3 (plus (svref dptr 3) (svref dptr 4)))
                (setf tmp4 (minus (svref dptr 3) (svref dptr 4)))
                (setf tmp10 (plus tmp0 tmp3))
                (setf tmp13 (minus tmp0 tmp3))
                (setf tmp11 (plus tmp1 tmp2))
                (setf tmp12 (minus tmp1 tmp2))
                (setf (svref dptr 0) (ash (plus tmp10 tmp11) 1))
                (setf (svref dptr 4) (ash (minus tmp10 tmp11) 1))
                (setf z1 (mul (plus tmp12 tmp13) +FIX-0-541196100+))
                (setf (svref dptr 2) (descale (plus z1 (mul tmp13 +FIX-0-765366865+)) +shift-1+))
                (setf (svref dptr 6) (descale (plus z1 (mul tmp12 (- +FIX-1-847759065+))) +shift-1+))
                (setf z1 (plus tmp4 tmp7))
                (setf z2 (plus tmp5 tmp6))
                (setf z3 (plus tmp4 tmp6))
  
negative.code: 
  ;;; Top level decoder function
  (defun decode-image (filename)
    (with-open-file (in filename :direction :input :element-type 'uint8)
      (decode-stream in)))
  
  (defun decode-stream-height-width (stream)
  