Add gamma encodign/decoding before/after scaling in libswscale