There's one thing I have been wondering, in your script g-force, you're using Levels for setting brightness and contrast and that's also how I always have set the white and black points in Avisynth but isn't it actually better to do it with Tweak and only correct gamma with levels?
Correct me if I'm wrong, but doesn't Levels affect both luma and chroma whereas Tweak affect luma only?