title: JPEG Quality Factor Compression
body: <p>The DCT values of a JPEG Image are centred around the multiples of a step (step depends on the Quality Factor of the compression).</p>
  
  <p>If a right-down cyclic shift is performed on a JPEG image, <code>circshift(lenaJPG,[1,1]);)</code>, the DCT values are not centred anymore around the steps. Why does this happen?</p>
  
  <p>I am guessing the problem is that I don't understand how does JPEG do its compression based on the QF.</p>
  
  <p>My guess is that the reason for the DCT values not being “discrete” anymore, in the sense that they are not all multiple of 16 (for QF=50), is that the JPEG compression rounds the DCT values to the nearest multiple of 16; but, when the DCT is done to the shifted image, the cosine waves that form each of the 8x8 blocks are different from the blocks that the image was compressed for.</p>
  
  <p>Is this what happens? Is the compression lost when the shift is applied? Am I completely wrong?</p>