change SCALE_FLAGS to SWS_FAST_BILINEAR