Merge pull request #4172 from phire/software_fog_error VideoSoftware: Fix unsigned overflow bug in fog