(Hevc): Optimize GenerateBS.