merge SAO code from smarter/hevc