anchor.diff:    (R: 6; C: 5), (R: 7; C: 4), (R: 7; C: 5), (R: 6; C: 6),
     (R: 5; C: 7), (R: 6; C: 7), (R: 7; C: 6), (R: 7; C: 7));
   
  +//  C + R*8
  +var ZigZag1D: array [0..63] of Integer;
  +//  (0, 1, 8, 16, 9, 2, 3, 10,
  +//   17,
  +
  +const IDCT_Scales: array [0..7] of Real = (
  +  1,
  +  1.38703984532215,
  +  1.30656296487638,
  +  1.17587560241936,
  +  1,
  +  0.785694958387102,
  +  0.541196100146197,
  +  0.275899379282943);
  +
   const SQR_2     = 1.4142135623731;
         INV_SQR_2 = 0.707106781186547;
   
  
positive.code:               end;
                inc(Run, fRowSize - 8 * fInterleavedBlockSize);
              end;
              dec(Run, fRowSize * 8 - 8 * fInterleavedBlockSize);
            end
            else  //this part is wrong
              repeat
  
negative.code:         //OK, spectrum is almost ready
  
          for i := 63 downto 0 do
            Buffer[ZigZag1D[i]] := ZZ[i] * Quant^[i];
  
          for i := 0 to 63 do
            if (i mod 8) <> 0 then
              Buffer[i] := 0;
  
          //ok, now it's in right order (row after row) and scaled back.
          //still don't trust it too much...
          IDCT(Buffer);
  
          for i := 0 to 63 do
            Buffer[i] := Buffer[i] / 8;
  
          i := 0;
          //and at least, divide by 8, add 128 or 2048 and scale appropriately
  