anchor.diff:          //OK, spectrum is almost ready
   
           for i := 63 downto 0 do
  -          Buffer[ZigZagPath[i].C + ZigZagPath[i].R * 8] := ZZ[i] * Quant^[i];
  +          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
  
positive.code: end;
  
  destructor TJPEGDecoder.Destroy;
  var i: Integer;
  begin
    for i := 0 to 3 do
      if Assigned(FQuantTables[i]) then FreeMem(FQuantTables[i]);
    inherited Destroy;
  end;
  
  
negative.code:   ZZ: Array [0..63] of Integer; //0: DC, others: AC coef in zig-zag order
    Buffer: TRealArray64;  //won't struggle with fixed point arithmetic here
    //later we can use SSE/SSE2 etc to make it extremely effective
    Quant: PRealArray64;
    Run: PByte;
    WordRun: PWord absolute Run;
    CurChannelId: Integer;
    BlockNum: Integer;
  begin
    //MCU's here are interleaved, component after component
    //dealing with sequential mode here. We can do IDCT on the fly
    //into Dest.
    BlockNum := 0;
    for dbg := 0 to 87 do begin
      if dbg = 32 then
        assert(dbg=32);
  
      for compNum := 0 to Ns-1 do begin
        //let's fetch appropriate quant table
        Quant := nil; //to make compiler happy. We know already that right component exists
  