Analaozing this file, I found that the calculations of the differences between the reference Macro Block and his neihgborhoods, sometimes the difference between pixels are zero but the pixels are not the same. I explain it better in an example.

if for exemple slice{1,j} = [255 128]
and im2 of the seleced pixels is im2(...)=[255 255]
Then the difference in the fastMV.m file is
diff.diam1{1,k} = [0 0]
and if I'm not wrong this would be
diff.diam1{1,k} = [0 127]

I think that this happens because uint8 doesn't admit negative numbers and the difference (before the abs function) is negative and it aproximates it to 0.

I don't know if it is known and is correct for the algoritm or there is a mistake.