diff --git a/Base/Sources/ARCore/ARCore.h b/Base/Sources/ARCore/ARCore.h index 35e59f2..45c93c9 100644 --- a/Base/Sources/ARCore/ARCore.h +++ b/Base/Sources/ARCore/ARCore.h @@ -25,3 +25,6 @@ #if __has_include() #import #endif +#if __has_include() +#import +#endif diff --git a/Examples/AugmentedFacesExample/Podfile b/Examples/AugmentedFacesExample/Podfile index c47a5bb..ccb7be9 100644 --- a/Examples/AugmentedFacesExample/Podfile +++ b/Examples/AugmentedFacesExample/Podfile @@ -1,4 +1,4 @@ target 'AugmentedFacesExample' use_frameworks! -platform :ios, '11.0' -pod 'ARCore/AugmentedFaces', '~> 1.39.0' \ No newline at end of file +platform :ios, '12.0' +pod 'ARCore/AugmentedFaces', '~> 1.40.0' \ No newline at end of file diff --git a/Examples/CloudAnchorExample/Podfile b/Examples/CloudAnchorExample/Podfile index 238a139..e939d93 100644 --- a/Examples/CloudAnchorExample/Podfile +++ b/Examples/CloudAnchorExample/Podfile @@ -1,5 +1,5 @@ target 'CloudAnchorExample' use_frameworks! -platform :ios, '11.0' -pod 'ARCore/CloudAnchors', '~> 1.39.0' +platform :ios, '12.0' +pod 'ARCore/CloudAnchors', '~> 1.40.0' pod 'Firebase/Database', '~> 8.0' diff --git a/Examples/GeospatialExample/Podfile b/Examples/GeospatialExample/Podfile index 608b66f..630014b 100644 --- a/Examples/GeospatialExample/Podfile +++ b/Examples/GeospatialExample/Podfile @@ -1,4 +1,4 @@ target 'GeospatialExample' use_frameworks! -platform :ios, '11.0' -pod 'ARCore/Geospatial', '~> 1.39.0' +platform :ios, '12.0' +pod 'ARCore/Geospatial', '~> 1.40.0' diff --git a/Examples/PersistentCloudAnchorExample/Podfile b/Examples/PersistentCloudAnchorExample/Podfile index 4724e2a..0a78539 100644 --- a/Examples/PersistentCloudAnchorExample/Podfile +++ b/Examples/PersistentCloudAnchorExample/Podfile @@ -1,4 +1,4 @@ target 'PersistentCloudAnchorExample' use_frameworks! -platform :ios, '11.0' -pod 'ARCore/CloudAnchors', '~> 1.39.0' +platform :ios, '12.0' +pod 'ARCore/CloudAnchors', '~> 1.40.0' diff --git a/Examples/SemanticsExample/Podfile b/Examples/SemanticsExample/Podfile new file mode 100644 index 0000000..4f4032d --- /dev/null +++ b/Examples/SemanticsExample/Podfile @@ -0,0 +1,4 @@ +target 'SemanticsExample' +use_frameworks! +platform :ios, '12.0' +pod 'ARCore/Semantics', '~> 1.40.0' diff --git a/Examples/SemanticsExample/README b/Examples/SemanticsExample/README new file mode 100644 index 0000000..7617b22 --- /dev/null +++ b/Examples/SemanticsExample/README @@ -0,0 +1,28 @@ +# Semantics API sample app for iOS + +This sample app shows how to use the ARCore Scene Semantics API for iOS. + +# Setup + +## Install the SDK + +You can install the SDK using either CocoaPods or Swift Package Manager. + +### Installing the SDK using CocoaPods. + +Run the following command from the directory with Podfile: + +``` +$ pod install +``` + +Open the resulting `.xcworkspace` file (not the project file). + +### Installing the SDK using Swift Package Manager. + +Open the Xcode project file and add a dependency on the 'ARCoreSemantics' +product of the ARCore package. + +## Change the bundle ID + +Change the app's bundle ID so you can sign the app with your development team. diff --git a/Examples/SemanticsExample/SemanticsExample.xcodeproj/project.pbxproj b/Examples/SemanticsExample/SemanticsExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..1d9c1e5 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample.xcodeproj/project.pbxproj @@ -0,0 +1,366 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + E5622DE02A58D5F80035742A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E5622DDF2A58D5F80035742A /* AppDelegate.m */; }; + E5622DE62A58D5F80035742A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E5622DE52A58D5F80035742A /* ViewController.m */; }; + E5622DE92A58D5F80035742A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E5622DE72A58D5F80035742A /* Main.storyboard */; }; + E5622DEB2A58D5FA0035742A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E5622DEA2A58D5FA0035742A /* Assets.xcassets */; }; + E5622DEE2A58D5FA0035742A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E5622DEC2A58D5FA0035742A /* LaunchScreen.storyboard */; }; + E5622DF12A58D5FA0035742A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E5622DF02A58D5FA0035742A /* main.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + E5622DDB2A58D5F80035742A /* SemanticsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SemanticsExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E5622DDE2A58D5F80035742A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + E5622DDF2A58D5F80035742A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + E5622DE42A58D5F80035742A /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + E5622DE52A58D5F80035742A /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + E5622DE82A58D5F80035742A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + E5622DEA2A58D5FA0035742A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E5622DED2A58D5FA0035742A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + E5622DEF2A58D5FA0035742A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E5622DF02A58D5FA0035742A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E5622DD82A58D5F80035742A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E5622DD22A58D5F80035742A = { + isa = PBXGroup; + children = ( + E5622DDD2A58D5F80035742A /* SemanticsExample */, + E5622DDC2A58D5F80035742A /* Products */, + ); + sourceTree = ""; + }; + E5622DDC2A58D5F80035742A /* Products */ = { + isa = PBXGroup; + children = ( + E5622DDB2A58D5F80035742A /* SemanticsExample.app */, + ); + name = Products; + sourceTree = ""; + }; + E5622DDD2A58D5F80035742A /* SemanticsExample */ = { + isa = PBXGroup; + children = ( + E5622DDE2A58D5F80035742A /* AppDelegate.h */, + E5622DDF2A58D5F80035742A /* AppDelegate.m */, + E5622DE42A58D5F80035742A /* ViewController.h */, + E5622DE52A58D5F80035742A /* ViewController.m */, + E5622DE72A58D5F80035742A /* Main.storyboard */, + E5622DEA2A58D5FA0035742A /* Assets.xcassets */, + E5622DEC2A58D5FA0035742A /* LaunchScreen.storyboard */, + E5622DEF2A58D5FA0035742A /* Info.plist */, + E5622DF02A58D5FA0035742A /* main.m */, + ); + path = SemanticsExample; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E5622DDA2A58D5F80035742A /* SemanticsExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = E5622DF42A58D5FA0035742A /* Build configuration list for PBXNativeTarget "SemanticsExample" */; + buildPhases = ( + E5622DD72A58D5F80035742A /* Sources */, + E5622DD82A58D5F80035742A /* Frameworks */, + E5622DD92A58D5F80035742A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SemanticsExample; + productName = SemanticsExample; + productReference = E5622DDB2A58D5F80035742A /* SemanticsExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E5622DD32A58D5F80035742A /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1430; + TargetAttributes = { + E5622DDA2A58D5F80035742A = { + CreatedOnToolsVersion = 14.3; + }; + }; + }; + buildConfigurationList = E5622DD62A58D5F80035742A /* Build configuration list for PBXProject "SemanticsExample" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E5622DD22A58D5F80035742A; + productRefGroup = E5622DDC2A58D5F80035742A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E5622DDA2A58D5F80035742A /* SemanticsExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E5622DD92A58D5F80035742A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E5622DEE2A58D5FA0035742A /* LaunchScreen.storyboard in Resources */, + E5622DEB2A58D5FA0035742A /* Assets.xcassets in Resources */, + E5622DE92A58D5F80035742A /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E5622DD72A58D5F80035742A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E5622DE62A58D5F80035742A /* ViewController.m in Sources */, + E5622DE02A58D5F80035742A /* AppDelegate.m in Sources */, + E5622DF12A58D5FA0035742A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + E5622DE72A58D5F80035742A /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E5622DE82A58D5F80035742A /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + E5622DEC2A58D5FA0035742A /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E5622DED2A58D5FA0035742A /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + E5622DF22A58D5FA0035742A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + E5622DF32A58D5FA0035742A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E5622DF52A58D5FA0035742A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SemanticsExample/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.google.arcore.SemanticsExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + E5622DF62A58D5FA0035742A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SemanticsExample/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.google.arcore.SemanticsExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E5622DD62A58D5F80035742A /* Build configuration list for PBXProject "SemanticsExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E5622DF22A58D5FA0035742A /* Debug */, + E5622DF32A58D5FA0035742A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E5622DF42A58D5FA0035742A /* Build configuration list for PBXNativeTarget "SemanticsExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E5622DF52A58D5FA0035742A /* Debug */, + E5622DF62A58D5FA0035742A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E5622DD32A58D5F80035742A /* Project object */; +} diff --git a/Examples/SemanticsExample/SemanticsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/SemanticsExample/SemanticsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..c24a4a3 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Examples/SemanticsExample/SemanticsExample/AppDelegate.h b/Examples/SemanticsExample/SemanticsExample/AppDelegate.h new file mode 100644 index 0000000..87d8255 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/AppDelegate.h @@ -0,0 +1,25 @@ +/* + * Copyright 2023 Google LLC. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +/** The app delegate for the sample app that responds to app life cycle events. */ +@interface AppDelegate : UIResponder + +/** Full screen window for the AR scene. */ +@property(nonatomic) UIWindow *window; + +@end diff --git a/Examples/SemanticsExample/SemanticsExample/AppDelegate.m b/Examples/SemanticsExample/SemanticsExample/AppDelegate.m new file mode 100644 index 0000000..5ad90c3 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/AppDelegate.m @@ -0,0 +1,39 @@ +/* + * Copyright 2023 Google LLC. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "AppDelegate.h" + +#import "ViewController.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [UIApplication sharedApplication].idleTimerDisabled = YES; + self.window = [[UIWindow alloc] init]; + UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; + ViewController *viewController = [storyBoard instantiateInitialViewController]; + self.window.rootViewController = viewController; + [self.window makeKeyAndVisible]; + return YES; +} + +- (UIInterfaceOrientationMask)application:(UIApplication *)application + supportedInterfaceOrientationsForWindow:(UIWindow *)window { + return UIInterfaceOrientationMaskPortrait; +} + +@end diff --git a/Examples/SemanticsExample/SemanticsExample/Assets.xcassets/AccentColor.colorset/Contents.json b/Examples/SemanticsExample/SemanticsExample/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SemanticsExample/SemanticsExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SemanticsExample/SemanticsExample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SemanticsExample/SemanticsExample/Assets.xcassets/Contents.json b/Examples/SemanticsExample/SemanticsExample/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/SemanticsExample/SemanticsExample/Base.lproj/LaunchScreen.storyboard b/Examples/SemanticsExample/SemanticsExample/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SemanticsExample/SemanticsExample/Base.lproj/Main.storyboard b/Examples/SemanticsExample/SemanticsExample/Base.lproj/Main.storyboard new file mode 100644 index 0000000..808a21c --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SemanticsExample/SemanticsExample/Info.plist b/Examples/SemanticsExample/SemanticsExample/Info.plist new file mode 100644 index 0000000..87de456 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/Info.plist @@ -0,0 +1,42 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSCameraUsageDescription + Camera permission is needed for AR mode. + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + arkit + + UIRequiresFullScreen + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/Examples/SemanticsExample/SemanticsExample/ViewController.h b/Examples/SemanticsExample/SemanticsExample/ViewController.h new file mode 100644 index 0000000..3a7e820 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/ViewController.h @@ -0,0 +1,21 @@ +/* + * Copyright 2023 Google LLC. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#import + +/** A minimal AR scene which overlays semantic images on the ARKit frames. */ +@interface ViewController : UIViewController + +@end diff --git a/Examples/SemanticsExample/SemanticsExample/ViewController.m b/Examples/SemanticsExample/SemanticsExample/ViewController.m new file mode 100644 index 0000000..30c725e --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/ViewController.m @@ -0,0 +1,387 @@ +/* + * Copyright 2023 Google LLC. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "ViewController.h" + +#import +#import +#import +#import + +#include + +#import + +@interface ViewController () + +/** ARCore session, used for geospatial localization. */ +@property(nonatomic) GARSession *garSession; + +/** ARKit session. */ +@property(nonatomic) ARSession *arSession; + +/** A view that shows an AR enabled camera feed and 3D content. */ +@property(nonatomic, weak) ARSCNView *scnView; + +/** Context for drawing semantic images. */ +@property(nonatomic) CGContextRef semanticImageContext; + +/** UIImage for drawing semantic images. */ +@property(nonatomic) UIImage *semanticUiImage; + +/** Buffer for semantics data. */ +@property(nonatomic) NSMutableData *semanticData; + +/** Image view for semantic images. */ +@property(nonatomic) UIImageView *imageView; + +/** Legend for semantic color labels. */ +@property(nonatomic) UIStackView *colorLegend; + +/** Semantic label fractions for each label. Updated each frame. */ +@property(nonatomic) NSMutableArray *labelFractions; + +/** Current semantics mode. */ +@property(nonatomic) GARSemanticMode semanticMode; + +/** Default colors for visualizing semantic labeling image. */ +@property(nonatomic) NSArray *colorMap; + +/** Labels corresponding to `GARSemanticLabel` classes. */ +@property(nonatomic) NSArray *colorLabels; + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + ARSCNView *scnView = [[ARSCNView alloc] init]; + scnView.translatesAutoresizingMaskIntoConstraints = NO; + self.scnView = scnView; + self.arSession = self.scnView.session; + [self.view addSubview:self.scnView]; + + self.imageView = [[UIImageView alloc] initWithImage:nil]; + self.imageView.contentMode = UIViewContentModeScaleAspectFill; + self.imageView.translatesAutoresizingMaskIntoConstraints = NO; + [self.scnView addSubview:self.imageView]; + + // Align the semantic UIImageView with the AR scene view to ensure the semantic image overlays the + // physical world. + [self.imageView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor].active = YES; + [self.imageView.heightAnchor constraintEqualToAnchor:self.view.heightAnchor].active = YES; + [self.imageView.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor].active = YES; + [self.imageView.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor].active = YES; + + [self.scnView.topAnchor constraintEqualToAnchor:self.view.topAnchor].active = YES; + [self.scnView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor].active = YES; + [self.scnView.leftAnchor constraintEqualToAnchor:self.view.leftAnchor].active = YES; + [self.scnView.rightAnchor constraintEqualToAnchor:self.view.rightAnchor].active = YES; + + // Setup default color labels. + self.colorMap = @[ + [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:.5], // unlabeled + [UIColor colorWithRed:0.27 green:0.50 blue:0.70 alpha:.5], // sky + [UIColor colorWithRed:0.27 green:0.27 blue:0.27 alpha:.5], // building + [UIColor colorWithRed:0.13 green:0.54 blue:0.13 alpha:.5], // tree + [UIColor colorWithRed:0.54 green:0.16 blue:0.88 alpha:.5], // road + [UIColor colorWithRed:0.95 green:0.13 blue:0.90 alpha:.5], // sidewalk + [UIColor colorWithRed:0.59 green:0.98 blue:0.59 alpha:.5], // terrain + [UIColor colorWithRed:0.82 green:0.70 blue:0.54 alpha:.5], // structure + [UIColor colorWithRed:0.86 green:0.86 blue:0.0 alpha:.5], // object + [UIColor colorWithRed:0.06 green:0.06 blue:0.90 alpha:.5], // vehicle + [UIColor colorWithRed:1.0 green:0.03 blue:0.0 alpha:.5], // person + [UIColor colorWithRed:0.0 green:1.0 blue:1.0 alpha:.5], // water + ]; + + self.colorLabels = @[ + @"Unlabeled", + @"Sky", + @"Building", + @"Tree", + @"Road", + @"Sidewalk", + @"Terrain", + @"Structure", + @"Object", + @"Vehicle", + @"Person", + @"Water", + ]; + + // Add a color legend to understand each category. + self.colorLegend = [self addLegend]; + [self.colorLegend setHidden:YES]; + + self.labelFractions = [NSMutableArray arrayWithCapacity:self.colorLabels.count]; + for (int i = 0; i < self.colorLabels.count; i++) { + [self.labelFractions addObject:@(0.0)]; + } + + UIButton *toggleLegend = [UIButton buttonWithType:UIButtonTypeSystem]; + toggleLegend.translatesAutoresizingMaskIntoConstraints = NO; + toggleLegend.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:.8]; + [toggleLegend setTitle:@"Show Legend" forState:UIControlStateNormal]; + [toggleLegend addTarget:self + action:@selector(toggleLegend:) + forControlEvents:UIControlEventTouchDown]; + + [self.view addSubview:toggleLegend]; + + [toggleLegend.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor] + .active = YES; + [toggleLegend.leftAnchor constraintEqualToAnchor:self.colorLegend.leftAnchor].active = YES; + [toggleLegend.rightAnchor constraintEqualToAnchor:self.colorLegend.rightAnchor].active = YES; + + [self.colorLegend.bottomAnchor constraintEqualToAnchor:toggleLegend.topAnchor].active = YES; + + // Enable/disable semantics on screen tap. + UITapGestureRecognizer *tapGesture = + [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(toggleSemantics:)]; + [self.scnView addGestureRecognizer:tapGesture]; + + [self.view sendSubviewToBack:self.scnView]; +} + +/** Toggles color legend visibility. */ +- (void)toggleLegend:(UIButton *)sender { + if (self.colorLegend.isHidden) { + [self.colorLegend setHidden:NO]; + [sender setTitle:@"Hide Legend" forState:UIControlStateNormal]; + } else { + [self.colorLegend setHidden:YES]; + [sender setTitle:@"Show Legend" forState:UIControlStateNormal]; + } +} + +/** Updates semantic label fractions on legend. */ +- (void)updateLegendFractions { + for (int i = 0; i < self.colorLabels.count; i++) { + UIView *colorView = self.colorLegend.arrangedSubviews[i]; + UILabel *fraction = colorView.subviews[2]; + fraction.text = [NSString stringWithFormat:@"%.2f", self.labelFractions[i].floatValue]; + } +} + +/** Returns a box showing the semantic label's name and default color. */ +- (UIView *)colorView:(NSString *)name color:(UIColor *)color { + UIView *containerView = [[UIView alloc] init]; + UILabel *label = [[UILabel alloc] init]; + UILabel *fraction = [[UILabel alloc] init]; + UIView *box = [[UIView alloc] init]; + containerView.translatesAutoresizingMaskIntoConstraints = NO; + box.translatesAutoresizingMaskIntoConstraints = NO; + label.translatesAutoresizingMaskIntoConstraints = NO; + fraction.translatesAutoresizingMaskIntoConstraints = NO; + + label.text = name; + label.textColor = UIColor.whiteColor; + fraction.textColor = UIColor.whiteColor; + fraction.text = @"0.00"; + + box.backgroundColor = color; + + [containerView addSubview:box]; + [containerView addSubview:label]; + [containerView addSubview:fraction]; + + CGFloat padding = 5; + + [containerView.heightAnchor constraintEqualToAnchor:label.heightAnchor constant:padding].active = + YES; + [containerView.widthAnchor constraintEqualToConstant:150].active = YES; + [containerView.rightAnchor constraintEqualToAnchor:fraction.rightAnchor constant:padding].active = + YES; + + [label.leftAnchor constraintEqualToAnchor:box.rightAnchor constant:padding].active = YES; + [label.centerYAnchor constraintEqualToAnchor:containerView.centerYAnchor].active = YES; + + [fraction.centerYAnchor constraintEqualToAnchor:containerView.centerYAnchor].active = YES; + + [box.leftAnchor constraintEqualToAnchor:containerView.leftAnchor constant:padding].active = YES; + [box.centerYAnchor constraintEqualToAnchor:containerView.centerYAnchor].active = YES; + [box.heightAnchor constraintEqualToAnchor:label.heightAnchor multiplier:.7].active = YES; + [box.widthAnchor constraintEqualToAnchor:box.heightAnchor].active = YES; + + return containerView; +} + +/** Adds legend to view for semantic label colors. */ +- (UIStackView *)addLegend { + UIStackView *colorLegend = [[UIStackView alloc] init]; + colorLegend.translatesAutoresizingMaskIntoConstraints = NO; + colorLegend.axis = UILayoutConstraintAxisVertical; + colorLegend.spacing = 5; + colorLegend.distribution = UIStackViewDistributionFillEqually; + [self.view addSubview:colorLegend]; + + [colorLegend.leftAnchor constraintEqualToAnchor:self.view.leftAnchor].active = YES; + + UIView *background = [[UIView alloc] initWithFrame:colorLegend.frame]; + background.translatesAutoresizingMaskIntoConstraints = NO; + background.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:.8]; + background.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + [colorLegend addSubview:background]; + + for (int i = 0; i < self.colorMap.count; i++) { + UIColor *color = self.colorMap[i]; + [colorLegend addArrangedSubview:[self colorView:self.colorLabels[i] color:color]]; + } + + return colorLegend; +} + +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + + self.semanticMode = GARSemanticModeEnabled; + [self setUpARSession]; + [self setUpGARSession]; +} + +/** Initializes ARKit session. */ +- (void)setUpARSession { + ARWorldTrackingConfiguration *configuration = [[ARWorldTrackingConfiguration alloc] init]; + configuration.worldAlignment = ARWorldAlignmentGravity; + + self.arSession.delegate = self; + [self.arSession runWithConfiguration:configuration]; +} + +/** Initializes GARSession with the required `GARSemanticModeEnabled`. */ +- (void)setUpGARSession { + NSError *error = nil; + self.garSession = [GARSession sessionWithError:&error]; + + if (error) { + NSLog(@"Failed to create GARSession: %d", (int)error.code); + return; + } + [self configureSemantics:self.semanticMode]; +} + +/** Configure GARSession with given GARSemanticMode. */ +- (void)configureSemantics:(GARSemanticMode)semanticMode { + if (![self.garSession isSemanticModeSupported:GARSemanticModeEnabled]) { + NSLog(@"Semantics is not supported by the given device/OS version."); + return; + } + + GARSessionConfiguration *configuration = [[GARSessionConfiguration alloc] init]; + configuration.semanticMode = semanticMode; + NSError *error; + [self.garSession setConfiguration:configuration error:&error]; + if (error) { + NSLog(@"Failed to configure GARSession: %d", (int)error.code); + } +} + +/** Toggles semantics mode. */ +- (void)toggleSemantics:(UITapGestureRecognizer *)recognizer { + if (self.semanticMode == GARSemanticModeEnabled) { + self.semanticMode = GARSemanticModeDisabled; + self.imageView.image = nil; + for (int i = 0; i < self.labelFractions.count; i++) { + self.labelFractions[i] = @(0.0); + } + [self updateLegendFractions]; + } else { + self.semanticMode = GARSemanticModeEnabled; + } + + [self configureSemantics:self.semanticMode]; +} + +/** Initializes the semantic image buffers with the given dimensions. */ +- (void)initializeSemanticImageWithWidth:(size_t)width height:(size_t)height { + // UIImageView for rendering semantic image. The semantic image pixels are 8-bit class labels, and + // are converted to some default colors for visualization. + self.semanticData = [NSMutableData dataWithLength:(width * height * 4)]; + self.semanticImageContext = + CGBitmapContextCreate((void *)self.semanticData.mutableBytes, width, height, + /* bitsPerComponent= */ 8, + /* bytesPerRow= */ width * 4, CGColorSpaceCreateDeviceRGB(), + kCGImageAlphaPremultipliedLast | kCGBitmapByteOrderDefault); +} + +/** Updates the UI with the latest semantic data. */ +- (void)updateSemantics:(GARFrame *)garFrame { + CVPixelBufferRef pixelBuffer = garFrame.semanticImage; + if (!pixelBuffer) { + NSLog(@"Semantic images are not yet available."); + return; + } + + if (!self.semanticData) { + [self initializeSemanticImageWithWidth:CVPixelBufferGetWidth(pixelBuffer) + height:CVPixelBufferGetHeight(pixelBuffer)]; + } + + // CVPixelBuffer base address must be locked before access. + CVPixelBufferLockBaseAddress(pixelBuffer, kCVPixelBufferLock_ReadOnly); + uint8_t *baseAddress = (uint8_t *)CVPixelBufferGetBaseAddress(pixelBuffer); + size_t totalBytes = CVPixelBufferGetDataSize(pixelBuffer); + + // Copy GARFrame's semantic data to be rendered by a UIImage. + for (size_t i = 0; i < totalBytes; i++) { + CGFloat red, green, blue, alpha; + [self.colorMap[baseAddress[i]] getRed:&red green:&green blue:&blue alpha:&alpha]; + + uint8_t *semanticData = (uint8_t *)self.semanticData.mutableBytes; + + semanticData[i * 4 + 0] = red * 255; + semanticData[i * 4 + 1] = green * 255; + semanticData[i * 4 + 2] = blue * 255; + semanticData[i * 4 + 3] = alpha * 255; + } + + // |GARFrame#acquireSemanticImage:error| implicitly retains the semantic image. It must be + // released here. + CVPixelBufferUnlockBaseAddress(pixelBuffer, 0); + + CGImageRef imageRef = CGBitmapContextCreateImage(self.semanticImageContext); + UIImage *image = [UIImage imageWithCGImage:imageRef + scale:1.0 + orientation:UIImageOrientationRight]; + CGImageRelease(imageRef); + + self.imageView.image = image; + + // Update the semantic label fractions. + for (int i = 0; i < self.colorLabels.count; i++) { + self.labelFractions[i] = @([garFrame fractionForSemanticLabel:(GARSemanticLabel)i]); + } +} + +- (void)dealloc { + CGContextRelease(self.semanticImageContext); +} + +#pragma mark - ARSessionDelegate + +/** ARKit delege update which passes frame updates to GARSession. */ +- (void)session:(ARSession *)session didUpdateFrame:(ARFrame *)frame { + if (self.garSession == nil) { + return; + } + GARFrame *garFrame = [self.garSession update:frame error:nil]; + [self updateSemantics:garFrame]; + [self updateLegendFractions]; +} + +@end diff --git a/Examples/SemanticsExample/SemanticsExample/main.m b/Examples/SemanticsExample/SemanticsExample/main.m new file mode 100644 index 0000000..efab901 --- /dev/null +++ b/Examples/SemanticsExample/SemanticsExample/main.m @@ -0,0 +1,25 @@ +/* + * Copyright 2023 Google LLC. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#import "AppDelegate.h" + +int main(int argc, char* argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/LICENSE b/LICENSE index 036edf1..8a6c2c5 100644 --- a/LICENSE +++ b/LICENSE @@ -3265,9 +3265,6 @@ This software is partially based on Firebase Google Utilities: ================================================================================ -The following copyright from Landon J. Fuller applies to the isAppEncrypted -function in Environment/third_party/GULAppEnvironmentUtil.m. - Copyright (c) 2017 Landon J. Fuller All rights reserved. @@ -3288,26 +3285,6 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Comment from -iPhone Dev Wiki -Crack Prevention: App Store binaries are signed by both their developer -and Apple. This encrypts the binary so that decryption keys are needed in order -to make the binary readable. When iOS executes the binary, the decryption keys -are used to decrypt the binary into a readable state where it is then loaded -into memory and executed. iOS can tell the encryption status of a binary via the -cryptid structure member of LC_ENCRYPTION_INFO MachO load command. If cryptid is -a non-zero value then the binary is encrypted. - -'Cracking' works by letting the kernel decrypt the binary then siphoning the -decrypted data into a new binary file, resigning, and repackaging. This will -only work on jailbroken devices as codesignature validation has been removed. -Resigning takes place because while the codesignature doesn't have to be valid -thanks to the jailbreak, it does have to be in place unless you have AppSync or -similar to disable codesignature checks. - -More information at Landon -Fuller's blog - This software is partially based on FlatBuffers: @@ -3718,6 +3695,225 @@ This software is partially based on Google Toolbox for Mac: See the License for the specific language governing permissions and limitations under the License. +This software is partially based on Halide: + +Copyright (c) 2012-2020 MIT CSAIL, Google, Facebook, Adobe, NVIDIA CORPORATION, and other contributors. + +Developed by: + + The Halide team + http://halide-lang.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +apps/bgu is Copyright 2016 Google Inc. and is Licensed under the Apache License, +Version 2.0 (the "License"); you may not use this file except in compliance +with the License. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with +that entity. For the purposes of this definition, "control" means (i) the +power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty percent +(50%) or more of the outstanding shares, or (iii) beneficial ownership of such +entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, and +configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object +code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that is +included in or attached to the work (an example is provided in the Appendix +below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative +Works shall not include works that remain separable from, or merely link (or +bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the purposes +of this definition, "submitted" means any form of electronic, verbal, or +written communication sent to the Licensor or its representatives, including +but not limited to communication on electronic mailing lists, source code +control systems, and issue tracking systems that are managed by, or on behalf +of, the Licensor for the purpose of discussing and improving the Work, but +excluding communication that is conspicuously marked or otherwise designated +in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +(a) You must give any other recipients of the Work or Derivative Works a copy +of this License; and + +(b) You must cause any modified files to carry prominent notices stating that +You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from the +Source form of the Work, excluding those notices that do not pertain to any +part of the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy of +the attribution notices contained within such NOTICE file, excluding those +notices that do not pertain to any part of the Derivative Works, in at least +one of the following places: within a NOTICE text file distributed as part of +the Derivative Works; within the Source form or documentation, if provided +along with the Derivative Works; or, within a display generated by the +Derivative Works, if and wherever such third-party notices normally appear. +The contents of the NOTICE file are for informational purposes only and do not +modify the License. You may add Your own attribution notices within Derivative +Works that You distribute, alongside or as an addendum to the NOTICE text from +the Work, provided that such additional attribution notices cannot be +construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a +whole, provided Your use, reproduction, and distribution of the Work otherwise +complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +----- + +apps/support/cmdline.h is Copyright (c) 2009, Hideyuki Tanaka and is licensed +under the BSD 3-Clause license. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +* Neither the name of the nor the +names of its contributors may be used to endorse or promote products +derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---- + +dependencies/spirv is Copyright (c) 2014-2018 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and/or associated documentation files (the "Materials"), +to deal in the Materials without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Materials, and to permit persons to whom the +Materials are furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Materials. + +MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +IN THE MATERIALS. + +---- + +apps/linear_algebra/include/cblas.h is licensed under the BLAS license. + +The reference BLAS is a freely-available software package. It is available from +netlib via anonymous ftp and the World Wide Web. Thus, it can be included in +commercial software packages (and has been). We only ask that proper credit be +given to the authors. + +Like all software, it is copyrighted. It is not trademarked, but we do ask the +following: + +If you modify the source for these routines we ask that you change the name of +the routine and comment the changes made to the original. + +We will gladly answer any questions regarding the software. If a modification is +done, however, it is the responsibility of the person who modified the routine +to provide support. + + This software is partially based on ICU4C: UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE @@ -4174,6 +4370,26 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +This software is partially based on IsAppEncrypted: + +Copyright (c) 2017 Landon J. Fuller +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING +BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + This software is partially based on Khronos OpenGL headers: @@ -7003,11 +7219,41 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The above license applies to all files in this directory and +subdirectories, with exceptions noted below. + Code generated by the Protocol Buffer compiler is owned by the owner of the input file used when generating it. This code is not standalone and requires a support library to be linked with it. This support library is itself covered by the above license. +=========================================================================== +rust/utf8.rs +=========================================================================== +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + This software is partially based on RE2: // Copyright (c) 2009 The RE2 Authors. All rights reserved. @@ -10578,35 +10824,6 @@ We will gladly answer any questions regarding the software. If a modification is done, however, it is the responsibility of the person who modified the routine to provide support -This software is partially based on clog: - -Copyright (C) 2018 Marat Dukhan -Copyright (c) 2017-2018 Facebook Inc. -Copyright (c) 2017 Georgia Institute of Technology - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - This software is partially based on contexthub: Copyright (c) 2015, The Android Open Source Project @@ -10855,6 +11072,20 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +This software is partially based on coremltools: + +Copyright (c) 2017, Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + This software is partially based on cpu_features: @@ -13263,6 +13494,38 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +This software is partially based on libyuv: + +Copyright 2011 The LibYuv Project Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + This software is partially based on mathfu: @@ -13739,23 +14002,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This software is partially based on perfetto: - - Copyright (C) 2017 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -This software is partially based on program_image_remapper: +This software is partially based on opencl_headers: Apache License @@ -13960,37 +14207,7 @@ This software is partially based on program_image_remapper: See the License for the specific language governing permissions and limitations under the License. -This software is partially based on pthreadpool: - -Copyright 2019 Google LLC -Copyright (c) 2017 Facebook Inc. -Copyright (c) 2015-2017 Georgia Institute of Technology -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -This software is partially based on ruy: - +This software is partially based on opencl_icd_loader: Apache License Version 2.0, January 2004 @@ -14194,37 +14411,23 @@ This software is partially based on ruy: See the License for the specific language governing permissions and limitations under the License. -This software is partially based on sha3: +This software is partially based on perfetto: -Copyright (c) 2009 The Go Authors. All rights reserved. + Copyright (C) 2017 The Android Open Source Project -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. + http://www.apache.org/licenses/LICENSE-2.0 -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -This software is partially based on splitfile: +This software is partially based on program_image_remapper: Apache License @@ -14429,12 +14632,481 @@ This software is partially based on splitfile: See the License for the specific language governing permissions and limitations under the License. -This software is partially based on tz database: +This software is partially based on pthreadpool: -Unless specified below, all files in the tz code and data (including -this LICENSE file) are in the public domain. +Copyright 2019 Google LLC +Copyright (c) 2017 Facebook Inc. +Copyright (c) 2015-2017 Georgia Institute of Technology +All rights reserved. -If the files date.c, newstrftime.3, and strftime.c are present, they +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +This software is partially based on ruy: + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +This software is partially based on sha3: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This software is partially based on splitfile: + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +This software is partially based on tz database: + +Unless specified below, all files in the tz code and data (including +this LICENSE file) are in the public domain. + +If the files date.c, newstrftime.3, and strftime.c are present, they contain material derived from BSD and use the BSD 3-clause license. Copyright 1985, 1987, 1988, 1989, 1991 @@ -14526,6 +15198,36 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +This software is partially based on xxhash: + +xxHash Library +Copyright (c) 2012-2020 Yann Collet +All rights reserved. + +BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php) + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + This software is partially based on zlib: (extracted from README, except for match.S) diff --git a/Package.swift b/Package.swift index 9f662a7..395ef87 100644 --- a/Package.swift +++ b/Package.swift @@ -18,12 +18,13 @@ import PackageDescription let package = Package( - name: "ARCore", platforms: [.iOS(.v11)], + name: "ARCore", platforms: [.iOS(.v12)], products: [ .library(name: "ARCoreCloudAnchors", targets: ["CloudAnchors"]), .library(name: "ARCoreGeospatial", targets: ["Geospatial"]), .library(name: "ARCoreGARSession", targets: ["GARSession"]), .library(name: "ARCoreAugmentedFaces", targets: ["AugmentedFaces"]), + .library(name: "ARCoreSemantics", targets: ["Semantics"]), ], dependencies: [ .package(url: "https://github.com/firebase/nanopb.git", "2.30909.0"..<"2.30910.0"), @@ -34,8 +35,8 @@ let package = Package( ], targets: [ .binaryTarget( - name: "ARCoreBase", url: "https://dl.google.com/arcore/swiftpm/1.39.0/Base.zip", - checksum: "a2245887bf36f30da2ea4c53ccbcd5a1a85dec146d26e210e666c6afb2e28865" + name: "ARCoreBase", url: "https://dl.google.com/arcore/swiftpm/1.40.0/Base.zip", + checksum: "bd06e95119c7050ff64e1c98c248bf88af73d760d19c3c8e94b0c2761641ada9" ), .target( name: "Base", @@ -50,8 +51,8 @@ let package = Package( ), .binaryTarget( name: "ARCoreCloudAnchors", - url: "https://dl.google.com/arcore/swiftpm/1.39.0/CloudAnchors.zip", - checksum: "93c58249a9fdb59c50ab5a6c4eb2a4cf1cab42737e7d00674f73e50ecc5f1762" + url: "https://dl.google.com/arcore/swiftpm/1.40.0/CloudAnchors.zip", + checksum: "7ccd2a388f6f0b014f79e45a68c2cc4857a87e67b8f34a195a4cb28877cfa813" ), .target( name: "CloudAnchors", @@ -66,8 +67,8 @@ let package = Package( publicHeadersPath: "Sources" ), .binaryTarget( - name: "ARCoreGeospatial", url: "https://dl.google.com/arcore/swiftpm/1.39.0/Geospatial.zip", - checksum: "3275057560df9bb5db6c4a5acf12d63b49cf1685166e06a0519510e333e07030" + name: "ARCoreGeospatial", url: "https://dl.google.com/arcore/swiftpm/1.40.0/Geospatial.zip", + checksum: "bbb51c6cb434619c791cc3631e0665d0f047e51881e2de71e24ce3a60661a30c" ), .target( name: "Geospatial", @@ -80,8 +81,8 @@ let package = Package( publicHeadersPath: "Sources" ), .binaryTarget( - name: "ARCoreGARSession", url: "https://dl.google.com/arcore/swiftpm/1.39.0/GARSession.zip", - checksum: "a570003edaddb74a4c12de4437a66a4edd5b886f77c662aaf56f528c6389496f" + name: "ARCoreGARSession", url: "https://dl.google.com/arcore/swiftpm/1.40.0/GARSession.zip", + checksum: "7543c283d34e76f9d2655cd28a7f3d1e053e458be5c62f99e1aa799d81e917ea" ), .target( name: "GARSession", @@ -98,14 +99,15 @@ let package = Package( ), .binaryTarget( name: "ARCoreAugmentedFaces", - url: "https://dl.google.com/arcore/swiftpm/1.39.0/AugmentedFaces.zip", - checksum: "1b7a99e863464a9d627b02c172a83553d24ff21adc197fd7252b8ed09bfecdf4" + url: "https://dl.google.com/arcore/swiftpm/1.40.0/AugmentedFaces.zip", + checksum: "a498adba9d05d1f5b6914be84d282f18c7be3c430a4435dff4803988e35adf32" ), .target( name: "AugmentedFaces", dependencies: [ "ARCoreAugmentedFaces", "Base", + "TFShared", .product(name: "nanopb", package: "nanopb"), ], path: "AugmentedFaces", @@ -113,5 +115,35 @@ let package = Package( resources: [.copy("Resources/ARCoreFaceResources")], publicHeadersPath: "Sources" ), + .binaryTarget( + name: "ARCoreSemantics", url: "https://dl.google.com/arcore/swiftpm/1.40.0/Semantics.zip", + checksum: "1bc561c765e26d885a58f94500f3d44f1842c3c7c204903ecf6e5ebb10339888" + ), + .target( + name: "Semantics", + dependencies: [ + "ARCoreSemantics", + "GARSession", + "TFShared", + ], + path: "Semantics", + sources: ["dummy.m"], + resources: [.copy("Resources/ARCoreCoreMLSemanticsResources")], + publicHeadersPath: "Sources" + ), + .binaryTarget( + name: "ARCoreTFShared", url: "https://dl.google.com/arcore/swiftpm/1.40.0/TFShared.zip", + checksum: "05147bbdeba14846b8bcd0f2801477fe9503db6c74ae73e7ab762a3b7ecb7cca" + ), + .target( + name: "TFShared", + dependencies: [ + "ARCoreTFShared", + "Base", + ], + path: "TFShared", + sources: ["dummy.m"], + publicHeadersPath: "Sources" + ), ] ) diff --git a/Semantics/Resources/ARCoreCoreMLSemanticsResources/tflite_model_53512071_fp16_quant.tflite b/Semantics/Resources/ARCoreCoreMLSemanticsResources/tflite_model_53512071_fp16_quant.tflite new file mode 100644 index 0000000..3e5290b Binary files /dev/null and b/Semantics/Resources/ARCoreCoreMLSemanticsResources/tflite_model_53512071_fp16_quant.tflite differ diff --git a/Semantics/Sources/dummy.h b/Semantics/Sources/dummy.h new file mode 100644 index 0000000..ccdf435 --- /dev/null +++ b/Semantics/Sources/dummy.h @@ -0,0 +1,18 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Swift Package Manager requires that every target has a header file. +#pragma mark To the linter: this is an Objective-C header file. diff --git a/Semantics/dummy.m b/Semantics/dummy.m new file mode 100644 index 0000000..a4ceab7 --- /dev/null +++ b/Semantics/dummy.m @@ -0,0 +1,18 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Trigger auto-linking if ARCore is never imported in the app. +@import ARCore; diff --git a/TFShared/Sources/dummy.h b/TFShared/Sources/dummy.h new file mode 100644 index 0000000..ccdf435 --- /dev/null +++ b/TFShared/Sources/dummy.h @@ -0,0 +1,18 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Swift Package Manager requires that every target has a header file. +#pragma mark To the linter: this is an Objective-C header file. diff --git a/TFShared/dummy.m b/TFShared/dummy.m new file mode 100644 index 0000000..a4ceab7 --- /dev/null +++ b/TFShared/dummy.m @@ -0,0 +1,18 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Trigger auto-linking if ARCore is never imported in the app. +@import ARCore;