BUG fixed: too large grid for d_block computation

The BUG is described on the commit #678b42448dac60442803a70e2aec1b2bdf971cc3.
Only half of the BUG has been patched so far, the problem is the same with the computation of d_outputImage.