Sped up scale by a factor of 4 by combinig the bilinear and integer
steps and using omp