This supersedes my previous patch. Changes are: - Rebased atop current git master - Corrected and clarified how bilinear is done by GOOD, removed unnecessary filter switch because BOX.BOX as scale==1 is the same as bilinear. - Merged and rearranged some patches about impulse sampling.