using pitched memory, takes 1.9ms