shape-adaptive diamond + prediction crash patch by (Loren Merritt <lorenm at u dot...