def test_TenBlackFrames(self): codec = openh264.OpenH264Codec() my_optimizer = optimizer.Optimizer(codec) videofile = test_tools.MakeYuvFileWithBlankFrames( 'ten_black_frames_1024_768_30.yuv', 10) encoding = my_optimizer.BestEncoding(1000, videofile) encoding.Execute() # Most codecs should be good at this. self.assertLess(40.0, my_optimizer.Score(encoding))
def test_MoreBlackFrames(self): codec = hevc_jm.HevcCodec() my_optimizer = optimizer.Optimizer(codec) videofile = test_tools.MakeYuvFileWithBlankFrames( 'more_black_frames_1024_768_30.yuv', 8) encoding = my_optimizer.BestEncoding(1000, videofile) encoding.Execute() # Most codecs should be good at this. self.assertLess(40.0, my_optimizer.Score(encoding))