Convert vertical_diff to intrinsics. Use stdint types.