From 796919d857f10568d6ac6a00381be86d88288d35 Mon Sep 17 00:00:00 2001 From: Jamie Matthews Date: Mon, 19 Aug 2013 11:08:37 -0400 Subject: [PATCH 1/2] fixed gpuimage benchmark suite for live video streams --- .../BenchmarkSuite/VideoFilteringDisplayController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/iOS/BenchmarkSuite/BenchmarkSuite/VideoFilteringDisplayController.m b/examples/iOS/BenchmarkSuite/BenchmarkSuite/VideoFilteringDisplayController.m index 82f583e42..c9412de63 100755 --- a/examples/iOS/BenchmarkSuite/BenchmarkSuite/VideoFilteringDisplayController.m +++ b/examples/iOS/BenchmarkSuite/BenchmarkSuite/VideoFilteringDisplayController.m @@ -260,8 +260,8 @@ -(void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMS CIImage *outputImage = [sepiaCoreImageFilter outputImage]; - [coreImageContext drawImage:outputImage atPoint:CGPointMake(0.0, 0.0) fromRect:[inputImage extent]]; - + //[coreImageContext drawImage:outputImage atPoint:CGPointMake(0.0, 0.0) fromRect:[inputImage extent]]; + [coreImageContext drawImage:outputImage inRect:CGRectMake(0, 0, 0, 0) fromRect:[inputImage extent]]; [self.openGLESContext presentRenderbuffer:GL_RENDERBUFFER]; elapsedTime = CFAbsoluteTimeGetCurrent() - startTime; From 6bce7912091300370cd234fbbd39bc5dc8757308 Mon Sep 17 00:00:00 2001 From: Jamie Matthews Date: Mon, 19 Aug 2013 13:03:28 -0400 Subject: [PATCH 2/2] updated video processing benchmark - CoreImage processing now uses entire screen --- .../BenchmarkSuite/VideoFilteringDisplayController.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/iOS/BenchmarkSuite/BenchmarkSuite/VideoFilteringDisplayController.m b/examples/iOS/BenchmarkSuite/BenchmarkSuite/VideoFilteringDisplayController.m index c9412de63..d1f35676e 100755 --- a/examples/iOS/BenchmarkSuite/BenchmarkSuite/VideoFilteringDisplayController.m +++ b/examples/iOS/BenchmarkSuite/BenchmarkSuite/VideoFilteringDisplayController.m @@ -260,8 +260,10 @@ -(void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMS CIImage *outputImage = [sepiaCoreImageFilter outputImage]; - //[coreImageContext drawImage:outputImage atPoint:CGPointMake(0.0, 0.0) fromRect:[inputImage extent]]; - [coreImageContext drawImage:outputImage inRect:CGRectMake(0, 0, 0, 0) fromRect:[inputImage extent]]; + CGFloat scale = UIScreen.mainScreen.scale; + CGRect s = CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width * scale, [[UIScreen mainScreen] bounds].size.height * scale); + [coreImageContext drawImage:outputImage inRect:s fromRect:[inputImage extent]]; + [self.openGLESContext presentRenderbuffer:GL_RENDERBUFFER]; elapsedTime = CFAbsoluteTimeGetCurrent() - startTime;