anchor.diff:          (make-array (* (setf (descriptor-height image) (read-word s)) ; height
                          (setf (descriptor-width image) (read-word s))  ; width
                          (setf (descriptor-ncomp image) (read-byte s))) ; number of components
  -                    :initial-element 0))
  +                    :initial-element 0)))
  +
  +;;; Frame decoding subroutine
  +(defun decode-frame (image s)
  +  (decode-frame-beginning image s)
     (loop for i fixnum from 0 below (descriptor-ncomp image)
           with hv fixnum do
           (setf (svref (descriptor-cid image) i) (read-byte s)) ; Cj
  
positive.code:                    (descriptor-height image)
                     (descriptor-width image)
                     (descriptor-ncomp image)))
            (t (error "Unsupported JPEG format")))))
  
  ;;; Top level decoder function
  (defun decode-image (filename)
    (with-open-file (in filename :direction :input :element-type 'unsigned-byte)
      (decode-stream in)))
  
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;; Here are some useful routines
  
negative.code:                 (setf (svref buffer pv) ; RED
                        (the fixnum (limit (plus yy (svref *cr-r-tab* cr)))))))))
  
  (defun decode-frame-beginning (image s)
    (read-byte s) ; length
    (read-byte s)
    (read-byte s) ; sample precision
  