anchor.diff:                                 (setf (descriptor-ncomp image) ncomp))))))
   
   ;;; Frame decoding subroutine
  -(defun decode-frame (image s buffer)
  -  (decode-frame-beginning image s buffer)
  +(defun decode-frame (image buffer)
  +  (decode-frame-beginning image buffer)
     (loop for i fixnum from 0 below (descriptor-ncomp image)
        with hv fixnum do
  -       (setf (aref (descriptor-cid image) i) (read-byte s)) ; Cj
  -       (setf hv (read-byte s))				    ; HV
  +       (setf (aref (descriptor-cid image) i) (read-jpeg-byte image)) ; Cj
  +       (setf hv (read-jpeg-byte image))				    ; HV
          (setf (aref (descriptor-H image) i) (ash hv -4))
          (setf (aref (descriptor-V image) i) (logand hv 7))
  -       (setf (aref (descriptor-qdest image) i) (read-byte s)))
  +       (setf (aref (descriptor-qdest image) i) (read-jpeg-byte image)))
   	(let* ((frl (loop for i fixnum from 0 below (descriptor-ncomp image)
   		       collecting (list (aref (descriptor-H image) i)
   					(aref (descriptor-V image) i))))
  
positive.code:              (setf (scan-x scan) 0))))))
  
  ;;; Scan decoding subroutine
  (defun decode-scan (image i s)
    (let ((scan (aref (descriptor-scans image) i))
  	(zzbuf (2d-sint16-array
  			    '(0  0  0  0  0  0  0  0)
  
negative.code: 
  ;;; APP14 is assumed to be Adobe proprietary extension marker
  ;;; We parse it to figure out if some special color transform is necessary
  (defun read-app14 (image)
    (let ((length (minus (read-word image) 2)))
      (loop repeat 11 do (read-jpeg-byte image))
      (setf (descriptor-adobe-app14-transform image)
  	  (case (read-jpeg-byte image)
  	    (0 :unknown)
  	    (1 :ycbcr-rgb)
  	    (2 :ycck-cmyk)
  	    (otherwise :invalid)))
      (loop repeat (- length 12) do (read-jpeg-byte image))))
  
  ;;; Reads tables etc., returns the first unrecognized marker it met
  (defun interpret-markers (image term)
    "Reads tables etc., returns the first unrecognized marker it met"
    (loop for mk fixnum = (cond ((zerop term) (read-marker image))
                                (t term)) do
         (setf term 0)
         (cond ((= mk +M_APP14+) (read-app14 image)) ;Adobe marker
  	     ((= #xe0 (logand #xf0 mk)) ; Unrecognized APPn marker
  	      (read-app image))
  	     (t (cond ((= mk +M_DAC+) (error 'unsupported-arithmetic-encoding))
  		      ((= mk +M_DRI+) (read-dri image))
  		      ((= mk +M_DHT+) (read-dht image))
  		      ((= mk +M_DQT+) (read-dqt image))
  		      ((= mk +M_COM+) (read-com image))		      
  		      (t (return mk)))))))
  
  ;;; EXTEND procedure, as described in the standard
  