fix compute_diff() and subpixel ydir bugs

The pull request fixes two bugs:
1. The columns in `compute_diff()` were actually just repeats of the rows
2. The subpixel corrections in the y-direction had the wrong sign