Skip to content

Commit 3df7d5f

Browse files
committed
Added CameraViewController for benchmark.
1 parent b01441a commit 3df7d5f

9 files changed

+1889
-1390
lines changed

CameraViewController.h

+14-8
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,25 @@ double _toc();
3939
double _tocp(); // with printf
4040

4141
typedef enum {
42-
BufferTypeMask = 0x0f,
43-
BufferGrayColor = 0,
44-
BufferRGBColor = 1,
42+
BufferTypeMask = 0x0f,
43+
BufferGrayColor = 0,
44+
BufferRGBColor = 1,
4545
}CameraViewControllerType;
4646

4747
typedef enum {
48-
BufferSizeMask = 0xf0,
49-
BufferSize1280x720 = 0 << 4,
50-
BufferSize640x480 = 1 << 4,
51-
BufferSize480x360 = 2 << 4,
52-
BufferSize192x144 = 3 << 4,
48+
BufferSizeMask = 0xf0,
49+
BufferSize1280x720 = 0 << 4,
50+
BufferSize640x480 = 1 << 4,
51+
BufferSize480x360 = 2 << 4,
52+
BufferSize192x144 = 3 << 4,
5353
}CameraViewControllerSize;
5454

55+
typedef enum {
56+
MultiThreadingMask = 0x100,
57+
NotSupportMultiThreading = 0 << 5,
58+
SupportMultiThreading = 1 << 5,
59+
}CameraViewControllerMultiThreading;
60+
5561
@class CameraViewController;
5662

5763
@protocol CameraViewControllerDelegate <NSObject>

cv.xcodeproj/project.pbxproj

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
1443574013650BBF004CC7AA /* BinarizedCameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1443573F13650BBF004CC7AA /* BinarizedCameraViewController.m */; };
2121
1489D1621369001800C061B7 /* CameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1489D1611369001800C061B7 /* CameraViewController.m */; };
2222
1489D169136903E500C061B7 /* NormalCameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1489D168136903E500C061B7 /* NormalCameraViewController.m */; };
23+
1489D16C1369068400C061B7 /* BenchmarkCameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1489D16B1369068400C061B7 /* BenchmarkCameraViewController.m */; };
2324
14975FC613653CBA00F41B08 /* QuartzHelpLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 14975FC313653CBA00F41B08 /* QuartzHelpLibrary.m */; };
2425
14975FC713653CBA00F41B08 /* UIImage+pixel.m in Sources */ = {isa = PBXBuildFile; fileRef = 14975FC513653CBA00F41B08 /* UIImage+pixel.m */; };
2526
14B377941365BD6200738C9C /* icon114x114.png in Resources */ = {isa = PBXBuildFile; fileRef = 14B377911365BD6200738C9C /* icon114x114.png */; };
@@ -57,6 +58,8 @@
5758
1489D1611369001800C061B7 /* CameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CameraViewController.m; sourceTree = SOURCE_ROOT; };
5859
1489D167136903E500C061B7 /* NormalCameraViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NormalCameraViewController.h; sourceTree = "<group>"; };
5960
1489D168136903E500C061B7 /* NormalCameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NormalCameraViewController.m; sourceTree = "<group>"; };
61+
1489D16A1369068400C061B7 /* BenchmarkCameraViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BenchmarkCameraViewController.h; sourceTree = "<group>"; };
62+
1489D16B1369068400C061B7 /* BenchmarkCameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BenchmarkCameraViewController.m; sourceTree = "<group>"; };
6063
14975FC213653CBA00F41B08 /* QuartzHelpLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzHelpLibrary.h; path = "../../Quartz-Help-Library/QuartzHelpLibrary.h"; sourceTree = "<group>"; };
6164
14975FC313653CBA00F41B08 /* QuartzHelpLibrary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QuartzHelpLibrary.m; path = "../../Quartz-Help-Library/QuartzHelpLibrary.m"; sourceTree = "<group>"; };
6265
14975FC413653CBA00F41B08 /* UIImage+pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIImage+pixel.h"; path = "../../Quartz-Help-Library/UIImage+pixel.h"; sourceTree = "<group>"; };
@@ -163,6 +166,8 @@
163166
1489D168136903E500C061B7 /* NormalCameraViewController.m */,
164167
1443573E13650BBF004CC7AA /* BinarizedCameraViewController.h */,
165168
1443573F13650BBF004CC7AA /* BinarizedCameraViewController.m */,
169+
1489D16A1369068400C061B7 /* BenchmarkCameraViewController.h */,
170+
1489D16B1369068400C061B7 /* BenchmarkCameraViewController.m */,
166171
);
167172
name = "Test ViewControllers";
168173
sourceTree = "<group>";
@@ -277,6 +282,7 @@
277282
14975FC713653CBA00F41B08 /* UIImage+pixel.m in Sources */,
278283
1489D1621369001800C061B7 /* CameraViewController.m in Sources */,
279284
1489D169136903E500C061B7 /* NormalCameraViewController.m in Sources */,
285+
1489D16C1369068400C061B7 /* BenchmarkCameraViewController.m in Sources */,
280286
);
281287
runOnlyForDeploymentPostprocessing = 0;
282288
};

0 commit comments

Comments
 (0)