anchor.diff:                                                                 collecting (make-array 8))))))
            (preds (make-array ncomp :initial-element 0))
            (tqv (case ncomp
  -                (3 #(0 1 1)) ;q-tables destinations for various component numbers
  +                (3 #(0 1 1)) ; q-tables destinations for various component numbers
                   (1 #(0))
                   (2 #(0 1))
                   (4 #(0 1 2 3))
  
positive.code:                 (loop for y fixnum from 0 to 7 do
                       (setf (dbref entry2 x y) (the fixnum (dbref entry x y))))))
          (setq q-tabs q-tabs2))
        (loop for entry across q-tabs do  ;scaling all q-tables
             (q-scale entry q-factor)))
      (setq *prev-byte* 0)
      (setq *prev-length* 0)
      (if (and (/= ncomp 1) (/= ncomp 3))
          (write-marker +M_SOI+ out-stream)
          (prepare-JFIF-stream out-stream))
      (write-frame-header w h ncomp q-tabs sampling tqv out-stream) ;frame header
      ;;writing scan header
      (write-marker +M_SOS+ out-stream)
      (write-byte 0 out-stream)           ;length
      (write-byte (plus 6 (ash ncomp 1)) out-stream)
      (write-byte ncomp out-stream)    ;number of components in the scan
      (loop for Cj from 0 below ncomp do
           (write-byte Cj out-stream)     ;component ID
           (write-byte (if (zerop Cj) 0 17) out-stream)) ;TdTa
      (write-byte 0 out-stream)                          ;Ss
      (write-byte 63 out-stream)                         ;Se
      (write-byte 0 out-stream)                          ;AhAl
  
      (let ((luminance-tabset (list
                               (build-tables +luminance-dc-bits+ +luminance-dc-values+)
  
negative.code: ;;; Writes single huffman table
  (defun write-hufftable (bits vals tcti s)
    (declare (type fixnum tcti))
      (write-byte tcti s) ; Tc/Th
      (write-sequence bits s)
      (write-sequence vals s))
  
  