changed gamma fix/unfix to use simple math instead of tables (ran a number of speed/visual tests to come to this conclusion)