peachsim 0.1.1692 → 0.1.1700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/bridge-flow-runner.ts +61 -39
- package/cli/commands/agent-wrapper.ts +21 -10
- package/cli/commands/control.ts +27 -7
- package/cli/commands/coverage.ts +1 -1
- package/cli/commands/detect.ts +17 -4
- package/cli/commands/maestro-compare.ts +25 -99
- package/cli/help-core.ts +3 -4
- package/cli/maestro-compare.ts +172 -4
- package/cli/outbound-endpoints.ts +2 -10
- package/detox/index.ts +15 -0
- package/detox/launch-permissions.ts +169 -0
- package/dist-lib/agent-daemon-client.cjs +2 -2
- package/dist-lib/agent-events.cjs +2 -2
- package/dist-lib/attached-projects.cjs +2 -2
- package/dist-lib/auth/shared-session.cjs +2 -2
- package/dist-lib/backend-origin.cjs +2 -2
- package/dist-lib/beta.cjs +2 -2
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +2 -2
- package/dist-lib/bridge-contract-input.cjs +2 -2
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +18273 -15925
- package/dist-lib/capture-contract.cjs +2 -2
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +2 -2
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +2 -2
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +104 -3
- package/dist-lib/dev-bundle-resolution.cjs +208 -44
- package/dist-lib/expo-swift-bundle.cjs +2349 -1778
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +2 -2
- package/dist-lib/host/bridge-host.cjs +7885 -3334
- package/dist-lib/host/fetch-proxy-handler.cjs +331 -39
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +2 -2
- package/dist-lib/host/websocket-proxy.cjs +2 -2
- package/dist-lib/index.cjs +297 -77
- package/dist-lib/jump-to-source-babel.cjs +2 -2
- package/dist-lib/jump-to-source-native.cjs +2 -2
- package/dist-lib/kotlin-host.cjs +2 -2
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +2 -2
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +2 -2
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +294 -74
- package/dist-lib/native-app-identity-project.cjs +48 -37
- package/dist-lib/native-app-identity-project.mjs +47 -36
- package/dist-lib/native-app-identity.cjs +2 -2
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +2 -2
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +2 -2
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +2 -2
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/public-origins-lib-esm.json +24 -23
- package/dist-lib/public-origins-lib.json +199 -79
- package/dist-lib/react-native-host-modules.cjs +2 -2
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +19600 -15992
- package/dist-lib/swift-compile.cjs +640 -402
- package/dist-lib/swift-compile.mjs +595 -357
- package/dist-lib/swift-package.cjs +24 -20
- package/dist-lib/swift-package.mjs +23 -19
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +31 -4
- package/dist-lib/swift.cjs +2 -2
- package/dist-lib/vite-swift.cjs +1559 -1208
- package/dist-lib/vite.cjs +251 -42
- package/dist-lib/worklet-executable.cjs +2 -2
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
- package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
- package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -229
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
- package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
- package/sdk/ios/usr/include/copyfile.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
- package/sdk/ios/usr/include/malloc/_platform.h +80 -0
- package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
- package/sdk/ios/usr/include/malloc/malloc.h +768 -0
- package/sdk/ios/usr/include/os/availability.h +168 -6
- package/sdk/ios/usr/include/os/base.h +351 -0
- package/sdk/ios/usr/include/os/clock.h +18 -0
- package/sdk/ios/usr/include/os/lock.h +232 -10
- package/sdk/ios/usr/include/os/log.h +521 -38
- package/sdk/ios/usr/include/os/object.h +320 -3
- package/sdk/ios/usr/include/os/trace.h +492 -0
- package/sdk/ios/usr/include/os/trace_base.h +167 -0
- package/sdk/ios/usr/include/os/workgroup.h +37 -0
- package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
- package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
- package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
- package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
- package/sdk/ios/usr/include/sys/cdefs.h +38 -0
- package/sdk/ios/wasm/include/unistd.h +3 -0
- package/skills/contrast/SKILL.md +3 -0
- package/src/codex-client.ts +11 -6
- package/src/dev-bundle-resolution.ts +124 -48
- package/src/expo-native-workspace.ts +176 -0
- package/src/expo-swift-host.ts +161 -26
- package/src/expo-swift-ready.ts +14 -28
- package/src/expoSwiftContract.ts +4 -1
- package/src/generated/swift-c-predefines.json +68 -12
- package/src/host/bridge-host.ts +5 -0
- package/src/installed-package-versions.ts +14 -1
- package/src/metro-project-root.ts +44 -33
- package/src/native-app-identity-project.ts +1 -0
- package/src/nitro-adapter.lock.json +916 -10
- package/src/nitro-adapter.ts +33 -24
- package/src/nitro-bundle.ts +108 -22
- package/src/nitro-compile.ts +32 -5
- package/src/nitro-source.ts +13 -3
- package/src/nitroAdapterContract.ts +100 -20
- package/src/node-http-fetch.ts +116 -0
- package/src/packageVersionsContract.ts +46 -0
- package/src/serverDiscoveryContract.ts +1 -0
- package/src/settingsContract.ts +0 -30
- package/src/swift-binary-modules.ts +20 -5
- package/src/swift-compile.ts +168 -48
- package/src/swift-coverage/xcode-assets.ts +4 -3
- package/src/swift-host.ts +14 -3
- package/src/swift-objc-compile.ts +32 -5
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-platform.ts +2 -2
- package/src/swift-objc-standin.ts +43 -13
- package/src/swift-package.ts +33 -26
- package/src/swift-source-pods.ts +126 -41
- package/src/swift-standin-digest.ts +77 -0
- package/src/swift-standin-emit.ts +40 -4
- package/src/swift-standins.ts +68 -19
- package/src/swift-toolchain.ts +38 -0
- package/src/swiftContract.ts +8 -0
- package/src/vite-plugin.ts +0 -10
- package/src/xcode-project.ts +62 -42
- package/src/settings-flags.ts +0 -107
|
@@ -1,13 +1,302 @@
|
|
|
1
|
+
|
|
2
|
+
/****************************************************************************************************************************************************************
|
|
3
|
+
* *
|
|
4
|
+
* The main vImage documentation is available in the vImage Programming Guide: *
|
|
5
|
+
* *
|
|
6
|
+
* OS X: https://developer.apple.com/library/mac/documentation/Performance/Conceptual/vImage/Introduction/Introduction.html *
|
|
7
|
+
* iOS: https://developer.apple.com/library/ios/documentation/Performance/Conceptual/vImage/Introduction/Introduction.html *
|
|
8
|
+
* *
|
|
9
|
+
* However, that resource, generously provided by ADC, is updated infrequently. In order to provide more timely documentation for newer vImage API, these *
|
|
10
|
+
* headers contain additional headerdoc documentation in the comments. The vImage headerdoc documentation can be viewed in lovely HTML as follows: *
|
|
11
|
+
* *
|
|
12
|
+
* /usr/bin/headerdoc2html -o ~/vImage_docs \ *
|
|
13
|
+
* `xcrun --sdk {iphoneos|macosx} --show-sdk-path`/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers *
|
|
14
|
+
* # Select the single platform for the SDK you are working with. vImage APIs generally stay in sync between platforms. *
|
|
15
|
+
* # (or using system headers from command line tools: /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers) *
|
|
16
|
+
* /usr/bin/gatherheaderdoc ~/vImage_docs *
|
|
17
|
+
* open ~/vImage_docs/masterTOC.html *
|
|
18
|
+
* *
|
|
19
|
+
* For more on using headerdoc: *
|
|
20
|
+
* https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/HeaderDoc/usage/usage.html#//apple_ref/doc/uid/TP40001215-CH337-CDEBBJJA *
|
|
21
|
+
* *
|
|
22
|
+
* vImage headerdoc documentation is a work in progress, and currently only covers recent additions. Most functions not covered in headerdoc should be *
|
|
23
|
+
* documented in the vImage Programming Guide. Please file a bug report if you encounter a function documented in neither resource. *
|
|
24
|
+
* http://bugreport.apple.com *
|
|
25
|
+
* *
|
|
26
|
+
* Option clicking a vImage symbol in Xcode will often bring up online help with information assembled from both resources. *
|
|
27
|
+
* *
|
|
28
|
+
****************************************************************************************************************************************************************/
|
|
29
|
+
|
|
1
30
|
#ifndef VIMAGE_H
|
|
2
31
|
#define VIMAGE_H
|
|
32
|
+
|
|
33
|
+
/*!
|
|
34
|
+
* @header vImage.h
|
|
35
|
+
* @copyright Copyright (c) 2002-2016 by Apple Inc. All rights reserved.
|
|
36
|
+
* @compilerflag -framework Accelerate
|
|
37
|
+
* @charset utf-8
|
|
38
|
+
*
|
|
39
|
+
* @discussion
|
|
40
|
+
*
|
|
41
|
+
* <pre> @textblock
|
|
42
|
+
* Data Formats
|
|
43
|
+
* ------------
|
|
44
|
+
* Most functions are available in four flavors, one for each of the four standard data formats supported
|
|
45
|
+
* by vImage. These are:
|
|
46
|
+
*
|
|
47
|
+
* 8 bit planar integer data -- "Planar8":
|
|
48
|
+
* The buffer contains a single color channel (e.g. red) as an array of packed unsigned chars.
|
|
49
|
+
*
|
|
50
|
+
* 32 bit planar floating point data -- "PlanarF":
|
|
51
|
+
* The buffer contains a single color channel (e.g. red) as an array of packed floats.
|
|
52
|
+
*
|
|
53
|
+
* 8 bit ARGB interleaved integer data -- "ARGB8888":
|
|
54
|
+
* The buffer contains four interleaved color channels in the order alpha, red, green, blue, in a
|
|
55
|
+
* packed array of unsigned chars. (This is a standard 32 bit ARGB color pixel, with 8 bits per channel).
|
|
56
|
+
*
|
|
57
|
+
* 32 bit ARGB interleaved floating point data -- "ARGBFFFF":
|
|
58
|
+
* The buffer contains four interleaved color channels in the order alpha, red, green, blue, in a
|
|
59
|
+
* packed array of floats.
|
|
60
|
+
*
|
|
61
|
+
* Many functions are also available in Planar and ARGB versions of unsigned and signed 16-bit integer, 16S and
|
|
62
|
+
* 16U respectively.
|
|
63
|
+
*
|
|
64
|
+
* PERFORMANCE ADVISORY: Performance of the planar versions of these functions will in some cases
|
|
65
|
+
* be *MUCH* better than their interleaved counterparts. Most operations are done in register with planar
|
|
66
|
+
* data, even if the starting data format was an interleaved format. By using planar data formats,
|
|
67
|
+
* you avoid the de-interleave, re-interleave cost in each function call. In addition, where calculation
|
|
68
|
+
* on the alpha channel is not desired, the computational cost and cache usage for planar formats is
|
|
69
|
+
* in principle 3/4 the cost of interleaved formats for four channel data. Finally planar data is a natural
|
|
70
|
+
* form of tiling that works well when used with multiple serial filters. When applying multiple filters to
|
|
71
|
+
* a image, apply them all to one channel, then repeat the sequence for the next channel and so forth until
|
|
72
|
+
* all the color channels are calculated. This will help keep key data in the caches and in some cases may
|
|
73
|
+
* produce profound performance improvements.
|
|
74
|
+
*
|
|
75
|
+
* The presumed value range for 8 bit color channels is 0 to 255, with 0 being black and 255 being full intensity color.
|
|
76
|
+
* For floating point data, 0.0f is black and 1.0f is full intensity color. Values outside this range are allowed for
|
|
77
|
+
* floating point data. Except where noted, FP calculations do not clip values outside the range 0.0f ... 1.0f. In certain
|
|
78
|
+
* cases (most notably geometry operations that involve resampling and colvolutions), it is possible that input data
|
|
79
|
+
* that is entirely withing the range 0.0f ... 1.0f will produce results that are slightly outside that range. A separate
|
|
80
|
+
* floating point clipping function is provided if clipping is required.
|
|
81
|
+
*
|
|
82
|
+
* Other floating point ranges (e.g. 0.0f ... 255.0f) are likely to also work since most functions in vImage are linear.
|
|
83
|
+
* However, they are not extensively tested.
|
|
84
|
+
*
|
|
85
|
+
* vImage_Buffers
|
|
86
|
+
* --------------
|
|
87
|
+
* Most vImage functions attempt to fill a destination buffer with pixels drawn from an input buffer using some
|
|
88
|
+
* transformation. In some cases, the operation would require that pixels outside the area covered by the input
|
|
89
|
+
* buffer be used to fill the output buffer. The input vImage_Buffer defines the absolute limit of the area of
|
|
90
|
+
* data that may be read by the function. The function will not stray outside of this area in its attempt to
|
|
91
|
+
* fill the destination with pixels. How a function copes with edge cases when data is unavailable is dependent
|
|
92
|
+
* on the function.
|
|
93
|
+
*
|
|
94
|
+
* typedef struct vImage_Buffer
|
|
95
|
+
* {
|
|
96
|
+
* void *data; // Pointer to the top left pixel of the buffer.
|
|
97
|
+
* vImagePixelCount height; // The height (in pixels) of the buffer
|
|
98
|
+
* vImagePixelCount width; // The width (in pixels) of the buffer
|
|
99
|
+
* size_t rowBytes; // The number of bytes in a pixel row
|
|
100
|
+
* }vImage_Buffer;
|
|
101
|
+
*
|
|
102
|
+
* Some functions may operate only on a rectangular subset of pixels in the input buffer. This is useful for tiling
|
|
103
|
+
* or for when image operations are only desired to be applied to part of an image. The top left corner of the subset
|
|
104
|
+
* is provided by a X and Y offset into the vImage_Buffer passed as the input buffer. The height and width of the input
|
|
105
|
+
* region of interest is in many cases given by the height and width of the destination buffer. The geometry operators
|
|
106
|
+
* use non-rectangular input regions of interest making it difficult to predict which pixels will be used. In this case,
|
|
107
|
+
* the offsets (if any) are the offsets into the input region of interest for the case where the scale factor is 1.0 and
|
|
108
|
+
* shear and translate are 0.0f.
|
|
109
|
+
*
|
|
110
|
+
* Please be aware that many functions, especially those that require kernels or which do resampling, will read
|
|
111
|
+
* outside the input region of interest. Some extra care with multithreaded code may be required in those cases to make
|
|
112
|
+
* sure nobody is changing data outside the region of interest that is read by the function while the function is operating.
|
|
113
|
+
* At no time will a function read outside the vImage_Buffer within which the region of interest resides.
|
|
114
|
+
*
|
|
115
|
+
* So as to make multithreaded tiled (stripmined) algorithms easy to write, vImage makes two guarantees:
|
|
116
|
+
*
|
|
117
|
+
* (1) vImage will never write data outside of the destination vImage_Buffer. vImage will not try to cheat this
|
|
118
|
+
* guarantee by reading data outside the destination buffer and writing it back unmodified.
|
|
119
|
+
*
|
|
120
|
+
* (2) vImage will never read data outside of the area passed to it as the input vImage_Buffer.
|
|
121
|
+
*
|
|
122
|
+
* The state of the output vImage_Buffer while a vImage function is working on it is undefined. There may be times when
|
|
123
|
+
* a pixel in the ROI is neither the starting data or the finished result, but instead the result of some
|
|
124
|
+
* intermediate calculation. The calculation is complete when the function returns.
|
|
125
|
+
*
|
|
126
|
+
* Note that although a vImage_Buffer struct may be marked const, this does not mean that the pixel data that
|
|
127
|
+
* it points to is also const. It is merely an indication that it is safe to reuse the struct between function
|
|
128
|
+
* calls. Except where noted, the pixel data in the input buffers will not be changed by the function. vImage
|
|
129
|
+
* does not go to extreme lengths to guarantee this however, so for example you may pass the same buffer as input
|
|
130
|
+
* and output to a function, in which case the input buffer will be changed.
|
|
131
|
+
* Caution: except where otherwise documented, most vImage functions do not work correctly in place.
|
|
132
|
+
*
|
|
133
|
+
* Performance advisory: If the rowBytes of a vImage_Buffer is a integer power of 2, performance may be adversely
|
|
134
|
+
* affected on some functions. (This is a side effect of how some machines handle address arithmetic
|
|
135
|
+
* internally. It is not something we can solve in software, except by setting rowBytes differently. )
|
|
136
|
+
* In some cases, it may also be advantageous to pad rowbytes out to 16 bytes. Using vImageBuffer_Init()
|
|
137
|
+
* in vImage/vImage_Utilities.h will help sidestep this issue. It will attempt tune rowBytes to benefit the
|
|
138
|
+
* current architecture.
|
|
139
|
+
*
|
|
140
|
+
* It is not required that you do set up your buffers exactly this way, however. To protect your investment in
|
|
141
|
+
* preexisting data structures, vImage is designed to work with any (natural) data alignment and any rowBytes.
|
|
142
|
+
* Floats must be 4 byte aligned. RowBytes must of course be greater than or equal to width * bytesPerPixel.
|
|
143
|
+
* BytesPerPixel values are as follows:
|
|
144
|
+
*
|
|
145
|
+
* Buffer Data Format Size
|
|
146
|
+
* ------------------ ----
|
|
147
|
+
* planar uint8 sizeof( Pixel_8) // 1 byte
|
|
148
|
+
* planar float sizeof( Pixel_F ) // 4 bytes
|
|
149
|
+
* ARGB uint8 sizeof( Pixel_8888) // 4 bytes
|
|
150
|
+
* ARGB float sizeof( Pixel_FFFF ) // 16 bytes
|
|
151
|
+
*
|
|
152
|
+
*
|
|
153
|
+
*
|
|
154
|
+
* Tiling / Strip Mining and Multithreading
|
|
155
|
+
* ----------------------------------------
|
|
156
|
+
* In general, the size of the data segment that you operate on is critical to the performance of vImage. In
|
|
157
|
+
* many cases, the number of pixels that may be processed per second can be up to an order of magnitude lower
|
|
158
|
+
* for large buffers than for small ones. A common method to fix this is to operate on small chunks of the image
|
|
159
|
+
* at a time. Typically, you would apply all the filters one after another to one chunk, before going on to the next
|
|
160
|
+
* chunk. In this way, the data is much more likely to be in the caches when you need it. This motif is easily
|
|
161
|
+
* multithreaded in principle, since different processors can work on different chunks concurrently in many
|
|
162
|
+
* cases.
|
|
163
|
+
*
|
|
164
|
+
* All vImage functions are thread safe and may be called reentrantly.
|
|
165
|
+
*
|
|
166
|
+
* A quick test to do to see if tiling is good for you is to measure the number of pixels that you can process
|
|
167
|
+
* per second for very large (>4 MB uncompressed) and reasonably small (< 256 kB uncompressed) images. If the
|
|
168
|
+
* number of pixels you can process per unit time is much improved for smaller images over large ones then tiling
|
|
169
|
+
* is likely to be helpful.
|
|
170
|
+
*
|
|
171
|
+
* It is important to whenever possible make sure the tile fits in the caches. In general, the data processed in
|
|
172
|
+
* a single tile (including input and output buffers) should be less than 256 kB, though in some cases there may
|
|
173
|
+
* be a performance advantage to even smaller buffers. We have found that for many, 16-32 kB is a better number.
|
|
174
|
+
* In many cases, you will only see performance improvement if the tile is significantly wider than it is tall,
|
|
175
|
+
* for example 16 rows tall and 1024 horizontal bytes of pixels wide has been observed to be twice as fast as
|
|
176
|
+
* 64x128. Clearly having a tile wider than the image isn't very helpful.
|
|
177
|
+
*
|
|
178
|
+
* A convenience method for making a vImage_Buffer that refers to a rectangular sub-region of another vImage_Buffer:
|
|
179
|
+
*
|
|
180
|
+
* // Calculate a vImage_Buffer descriptor for a sub-rectangle within an image
|
|
181
|
+
* // This function does not attempt to ensure that the tile fits in the image.
|
|
182
|
+
* vImage_Buffer MyMakeTileFromImage( const vImage_Buffer *image,
|
|
183
|
+
* unsigned long startColumn, // x coordinate of top left corner of tile
|
|
184
|
+
* unsigned long startRow, // y coordinate of top left corner of tile
|
|
185
|
+
* unsigned long tileHeight, // number of rows in tile
|
|
186
|
+
* unsigned long tileWidth, // number of columns in tile
|
|
187
|
+
* size_t pixelBytes ){ // number of bytes in pixel
|
|
188
|
+
* return (vImage_Buffer){
|
|
189
|
+
* .data = (void*) ((char*) image->data + startColumn * pixelBytes + startRow * image->rowBytes),
|
|
190
|
+
* .height = tileHeight,
|
|
191
|
+
* .width = tileWidth,
|
|
192
|
+
* .rowBytes = image->rowBytes
|
|
193
|
+
* };
|
|
194
|
+
* }
|
|
195
|
+
*
|
|
196
|
+
* CAUTION: This will cause vImage to believe the edges of the image are at the edges of the tile. Usually that
|
|
197
|
+
* doesn't affect the result, but will for convolultions, morphology operations and geometry operations
|
|
198
|
+
* -- things that take a edge mode flag. For such routines, the start of the tile is declared using
|
|
199
|
+
* a srcOffsetToROI_X/Y and the size of the tile is inferred from the destination image size.
|
|
200
|
+
*
|
|
201
|
+
* Sometimes you may want to flip an image vertically. In vImage, this can be done cheaply by adjusting the pointer
|
|
202
|
+
* to point to the last scanline of the image and setting rowBytes negative, for either the source or destination
|
|
203
|
+
* image:
|
|
204
|
+
*
|
|
205
|
+
* static inline vImage_Buffer MyFlipVertical( const vImage_Buffer *b ) __attribute__ ((always_inline,nodebug));
|
|
206
|
+
* static inline vImage_Buffer MyFlipVertical( const vImage_Buffer *b ){
|
|
207
|
+
* return (vImage_Buffer){ .data = (void*) ( (char*)b->data + b->rowBytes * (b->height-1)),
|
|
208
|
+
* .height = b->height,
|
|
209
|
+
* .width = b->width,
|
|
210
|
+
* .rowBytes = -b->rowBytes };
|
|
211
|
+
* }
|
|
212
|
+
*
|
|
213
|
+
* CAUTION: While vImage will put up with this sort of abuse, other frameworks may not. Make sure the data is
|
|
214
|
+
* right side up before passing it to anyone else.
|
|
215
|
+
*
|
|
216
|
+
* Real Time Applications
|
|
217
|
+
* ----------------------
|
|
218
|
+
* vImage attempts to avoid doing things that will damage its suitability for use in real time applications.
|
|
219
|
+
* vImage will in general never take a lock, or do things that might involve taking a lock, such as allocating
|
|
220
|
+
* memory. Functions that may take a lock will be documented as such. Some functions take temporary buffers
|
|
221
|
+
* as arguments. If you do not provide a temporary buffer, they may call malloc.
|
|
222
|
+
*
|
|
223
|
+
* Unused Flag Bits
|
|
224
|
+
* ----------------
|
|
225
|
+
* Many of the bits in the vImage_Flags datatype are currently unused. Apple reserves all bits in the flags field
|
|
226
|
+
* for their exclusive use. You must set all unused bits to 0 in the flags field. If you do not do this, in the
|
|
227
|
+
* future some of these bits may become active and your application may start doing unexpected things when image
|
|
228
|
+
* processing.
|
|
229
|
+
*
|
|
230
|
+
* Getting Data in and out of vImage
|
|
231
|
+
* ---------------------------------
|
|
232
|
+
* Since vImage will simply use your data in place in your objects, interfacing with your existing image pipeline
|
|
233
|
+
* should be a simple matter of intializing the vImage_Buffer struct fields to correspond to the location and
|
|
234
|
+
* and shape of your data.
|
|
235
|
+
*
|
|
236
|
+
* When the objects are not yours and are opaque, then getting data in and out of those objects can be a little
|
|
237
|
+
* more work. Most image frameworks have a method to import and export raw data. These are often simple to use
|
|
238
|
+
* but the data is frequently not in the format you wanted. In such cases, please see vImage/vImage_Utilities.h for
|
|
239
|
+
* vImageConvert_AnyToAny() which can convert nearly any image format to nearly any other one with full colorspace
|
|
240
|
+
* conversion, if desired, even on iOS. This should help you convert the output of one imaging library into
|
|
241
|
+
* something useful for another one. (It is used by ImageIO.framework for example, to convert the many different
|
|
242
|
+
* image buffer formats produced by PNG, JPEG, GIF, TIFF, etc. to formats more favored by CoreGraphics, CoreAnimation
|
|
243
|
+
* and CoreImage, for example.) The conversions are vectorized and multithreaded to minimize time and energy
|
|
244
|
+
* consumption.
|
|
245
|
+
*
|
|
246
|
+
* If the opaque image object comes from CoreGraphics (CGImageRef) or CoreVideo (CVPixelBufferRef), then high level
|
|
247
|
+
* convenience routines are provided to import and export data from those sources as vImage_Buffers. See
|
|
248
|
+
* vImage/vImage_Utilities.h and vImage/vImage_CVUtilities.h respectively for these. Since the conversions go through
|
|
249
|
+
* the same vImageConvert_AnyToAny core, it is possible to convert all the way from a YUV 420 format out to CMYK for
|
|
250
|
+
* a printer in a single function call, or anywhere inbetween, if you want. A few formats like 565 and half float not
|
|
251
|
+
* usually part of CG are supported as a bonus.
|
|
252
|
+
*
|
|
253
|
+
* @/textblock </pre>
|
|
254
|
+
*/
|
|
255
|
+
|
|
3
256
|
#include <TargetConditionals.h>
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
// Types, defines, flags and error codes
|
|
4
260
|
#include <vImage/vImage_Types.h>
|
|
261
|
+
|
|
262
|
+
// Alpha compositing, premultiplication, unpremultiplication
|
|
263
|
+
#include <vImage/Alpha.h>
|
|
264
|
+
|
|
265
|
+
// Sharpen, blur, edge detection, deconvolution
|
|
5
266
|
#include <vImage/Convolution.h>
|
|
267
|
+
|
|
268
|
+
// Hundreds of functions to convert from one image format to another.
|
|
6
269
|
#include <vImage/Conversion.h>
|
|
270
|
+
|
|
271
|
+
// Change the shape of an image by resizing it, vertical/horizontal reflect, rotation, shearing and affine warp.
|
|
7
272
|
#include <vImage/Geometry.h>
|
|
273
|
+
|
|
274
|
+
// Get a histogram. Make an image conform to a histogram.
|
|
275
|
+
#include <vImage/Histogram.h>
|
|
276
|
+
|
|
277
|
+
// Reshape structure elements in an image. Enlarge dark or light features. Close holes. Erode thin structures.
|
|
278
|
+
#include <vImage/Morphology.h>
|
|
279
|
+
|
|
280
|
+
// some limited support for PNG encoding
|
|
281
|
+
#include <vImage/BasicImageTypes.h>
|
|
282
|
+
|
|
283
|
+
// Gamma, polynomials, rationals, matrix multiplication (for hue saturation and brightness)
|
|
284
|
+
#include <vImage/Transform.h>
|
|
285
|
+
|
|
286
|
+
// The utility headers providing CG and CV interoperability pull in higher-level system headers that assume
|
|
287
|
+
// objective-c support that is not availble unless you are using clang as your compiler.
|
|
8
288
|
#if defined __clang__ && defined __has_include
|
|
9
289
|
# if __has_include(<CoreGraphics/CoreGraphics.h>)
|
|
290
|
+
// Convert any image format to nearly any other one. Exchange data with CGImageRefs
|
|
10
291
|
# include <vImage/vImage_Utilities.h>
|
|
11
292
|
# endif
|
|
12
|
-
|
|
13
|
-
#
|
|
293
|
+
|
|
294
|
+
# if __has_include(<CoreVideo/CVPixelBuffer.h>)
|
|
295
|
+
// Import and export video frames from CVPixelBufferRefs
|
|
296
|
+
# include <vImage/vImage_CVUtilities.h>
|
|
297
|
+
# endif
|
|
298
|
+
#endif /* defined __clang__ && defined __has_include */
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
#endif /* VIMAGE_H */
|