@margoengine/headless 0.0.0-stage → 1.0.0

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.
Files changed (45) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +4 -0
  3. package/README.md +1231 -2
  4. package/dist/accumulate.d.ts +123 -0
  5. package/dist/accumulate.js +198 -0
  6. package/dist/avc-range.d.ts +15 -0
  7. package/dist/compare.d.ts +97 -0
  8. package/dist/compare.js +320 -0
  9. package/dist/crc32-Cc3b8qnn.js +23 -0
  10. package/dist/errors-CDgOgzCd.js +7 -0
  11. package/dist/ffmpeg-colour-B_r-2O-e.js +15 -0
  12. package/dist/ffmpeg-colour.d.ts +6 -0
  13. package/dist/ffmpeg-files.d.ts +129 -0
  14. package/dist/ffmpeg-files.js +406 -0
  15. package/dist/ffmpeg.d.ts +164 -0
  16. package/dist/ffmpeg.js +402 -0
  17. package/dist/formats.d.ts +46 -0
  18. package/dist/formats.js +685 -0
  19. package/dist/frames.d.ts +33 -0
  20. package/dist/frames.js +70 -0
  21. package/dist/gif.d.ts +20 -0
  22. package/dist/gif.js +7 -0
  23. package/dist/index.d.ts +66 -0
  24. package/dist/index.js +1 -0
  25. package/dist/look-base.d.ts +87 -0
  26. package/dist/look-motion.d.ts +175 -0
  27. package/dist/look.d.ts +775 -0
  28. package/dist/look.js +1963 -0
  29. package/dist/null.d.ts +39 -0
  30. package/dist/null.js +61 -0
  31. package/dist/readback-HJLttuJt.js +122 -0
  32. package/dist/readback.d.ts +55 -0
  33. package/dist/src-VufTH2fo.js +154 -0
  34. package/dist/stage.d.ts +52 -0
  35. package/dist/stage.js +106 -0
  36. package/dist/tiles.d.ts +38 -0
  37. package/dist/tiles.js +79 -0
  38. package/dist/video-mux.d.ts +77 -0
  39. package/dist/video.d.ts +176 -0
  40. package/dist/video.js +1114 -0
  41. package/dist/yuv420-pool.d.ts +26 -0
  42. package/dist/yuv420-pool.js +73 -0
  43. package/dist/yuv420.d.ts +33 -0
  44. package/dist/yuv420.js +186 -0
  45. package/package.json +128 -4
package/dist/look.d.ts ADDED
@@ -0,0 +1,775 @@
1
+ import { type LookImage, type LookMask, type FloatFrame, type LookBound, type LookResult, type FlickerOptions } from './look-base.js';
2
+ export { LOOK_CHECKS, lookBound, missingResult, luma, type LookImage, type LookMask, type FloatFrame, type LookBound, type LookCheckName, type LookResult, type FlickerOptions, } from './look-base.js';
3
+ /** Options of {@link skyClip}. */
4
+ export interface SkyClipOptions {
5
+ /** The sky mask; the whole frame without one. */
6
+ sky?: LookMask;
7
+ /** A channel at or above this code is clipped. Default 254. */
8
+ level?: number;
9
+ bound?: LookBound;
10
+ }
11
+ /** Percent of the sky's pixels with a channel at the clip level. */
12
+ export declare function skyClip(frame: LookImage, { sky, level, bound }?: SkyClipOptions): LookResult;
13
+ /** Options of {@link grain} and {@link speckle}. */
14
+ export interface RegionOptions {
15
+ /** Only pixels whose 3 x 3 neighbourhood is inside this mask count; the whole frame without one. */
16
+ mask?: LookMask;
17
+ bound?: LookBound;
18
+ }
19
+ /**
20
+ * Noise standard deviation in 8-bit codes, by Immerkaer's estimator: the mean absolute response to the 3 x 3 mask
21
+ * [1 -2 1; -2 4 -2; 1 -2 1], which is blind to flat areas, ramps and planes, times sqrt(pi / 2) / 6.
22
+ */
23
+ export declare function grain(frame: LookImage, { mask, bound }?: RegionOptions): LookResult;
24
+ /** The absolute Laplacian responses {@link grain} sums over the interior of `inside`, and how many. */
25
+ export interface GrainSums {
26
+ readonly sum: number;
27
+ readonly count: number;
28
+ }
29
+ /** {@link GrainSums} of `frame` over the interior pixels of `inside` (one byte a pixel, nonzero inside). */
30
+ export declare function grainSums(frame: LookImage, inside: Uint8Array): GrainSums;
31
+ /** Options of {@link speckle}. */
32
+ export interface SpeckleOptions extends RegionOptions {
33
+ /** A pixel this many codes above the brightest, or below the darkest, of its eight neighbours is a speckle. Default 24. */
34
+ threshold?: number;
35
+ }
36
+ /** Isolated pixels, per million: brighter than all eight neighbours, or darker than all, by `threshold` codes. */
37
+ export declare function speckle(frame: LookImage, { mask, threshold, bound }?: SpeckleOptions): LookResult;
38
+ /** Options of {@link banding}. */
39
+ export interface BandingOptions extends RegionOptions {
40
+ /** Shortest flat run, in pixels, on each side of a step. Default 6. */
41
+ minRun?: number;
42
+ /** A step of more than this many luma codes skips a code. Default 1.5. */
43
+ minStep?: number;
44
+ /** Steps above this many codes are edges of things, not bands. Default 12. */
45
+ maxStep?: number;
46
+ /** The frame before its dither ({@link PreciseFrame}): banding also runs on its colours rounded to 8-bit codes, and
47
+ * the worse of the two is the value ({@link preDither}). */
48
+ codes?: PreciseFrame;
49
+ }
50
+ /**
51
+ * The precise frame rounded to 8-bit codes with no dither, as an RGBA frame (alpha 255): the colours the scene gave
52
+ * the encode. A dither two levels wide (the shot tool's, KB-SHOT-DITHERMOD1) breaks every run of identical pixels on
53
+ * the delivered frame, so a flat or banded area of the scene shows only here. A window of identical pixels after a
54
+ * rectangular dither lies within 1/8192 of one code, so it rounds to one code: flat on these codes counts every window
55
+ * the old encode counted, and more.
56
+ */
57
+ export declare function preDither(precise: PreciseFrame): LookImage;
58
+ /**
59
+ * Percent of pixels in banded runs: along every row and column, two neighbouring runs of identical pixels, each at
60
+ * least `minRun` long, whose luma differs by more than one code and at most `maxStep`. A smooth 8-bit gradient steps
61
+ * one code at a time and passes; the same gradient with too few levels skips codes between its flat runs, the gaps
62
+ * in the gradient's histogram that show as bands. Dithered or textured areas have no long runs and pass.
63
+ */
64
+ export declare function banding(frame: LookImage, options?: BandingOptions): LookResult;
65
+ /** Options of {@link flat}. */
66
+ export interface FlatOptions extends RegionOptions {
67
+ /** Half the side of the constant window: 32 is a 65 x 65 window, wider than the one-code steps of a slow 8-bit
68
+ * gradient, so a smooth sky is not flat. Default 32. */
69
+ radius?: number;
70
+ /** The frame before its dither ({@link PreciseFrame}): flat also runs on its colours rounded to 8-bit codes, and the
71
+ * worse of the two is the value ({@link preDither}). */
72
+ codes?: PreciseFrame;
73
+ }
74
+ /**
75
+ * Percent of pixels at the centre of a window of identical pixels, leaving out black and white (the crush and clip
76
+ * checks own those): an area with no variation at all, such as a missing texture or a fog that lost its detail.
77
+ */
78
+ export declare function flat(frame: LookImage, { codes, ...options }?: FlatOptions): LookResult;
79
+ /** Options of {@link blocks}. */
80
+ export interface BlocksOptions {
81
+ /** The block size in pixels, for example the froxel tile of `@margoengine/environment`. Default 8. */
82
+ pitch?: number;
83
+ /** Neighbour differences, less one code, are capped at this many codes, so a few strong edges cannot pose as a
84
+ * pattern. Default 8. */
85
+ cap?: number;
86
+ bound?: LookBound;
87
+ }
88
+ /**
89
+ * Percent of the frame in tiles showing a block pattern at the pitch: a blocky image is a smooth one plus a step
90
+ * signal at a known period (Wang, Bovik and Evans 2000). The frame is cut into tiles 8 pitches across. In each tile
91
+ * and along each axis, every neighbour difference loses one code (the one-code steps of a smooth 8-bit gradient
92
+ * never count), is capped, and is summed by its phase within the pitch and its period. A tile is blocky when one
93
+ * phase holds more step energy than every other phase in at least 7 of the 8 periods, and on average a quarter code
94
+ * more than they do. Random detail wins 7 of 8 periods with odds near 1 in 300,000 per phase; the edges of an object
95
+ * or two fall in a few periods; a pattern at a divisor of the pitch ties between phases. Texture masks blocks here as
96
+ * it does to the eye. Tiles with too few steps to say are counted as clear.
97
+ */
98
+ export declare function blocks(frame: LookImage, { pitch, cap, bound }?: BlocksOptions): LookResult;
99
+ /**
100
+ * The analytic horizon: the row, per column, where horizontal planes vanish, from the camera's view-projection
101
+ * (column-major, WebGPU clip space with y up). NaN in columns where the horizon is off the frame or the view looks
102
+ * straight up or down. The horizon of every horizontal plane is one line, so no plane height is needed.
103
+ */
104
+ export declare function horizonLine(viewProjection: ArrayLike<number>, width: number, height: number): Float32Array;
105
+ /** The first row, per column, where a mask turns inside going down: the top edge of the water is the water line. */
106
+ export declare function maskTopEdge(mask: LookMask): Float32Array;
107
+ /** Options of {@link horizonSeam}. */
108
+ export interface HorizonSeamOptions {
109
+ /** The camera's view-projection at this frame, column-major. */
110
+ viewProjection: ArrayLike<number>;
111
+ /**
112
+ * The sky mask: only columns with sky just above the line (3 rows up) count, where the horizon is in view. Without
113
+ * it every column counts, whatever stands across the line. {@link checkProbe} runs the check only with one.
114
+ */
115
+ sky?: LookMask;
116
+ bound?: LookBound;
117
+ }
118
+ /**
119
+ * The seam at the analytic horizon ({@link horizonLine}): the luma step there beyond its surroundings, in codes, over
120
+ * the columns where the sky meets the line. A wall, a mantel or a hill across the line is not a horizon: it has no sky
121
+ * above it, so those columns are left out, and a frame with no sky at the line measures 0 over 0 columns.
122
+ */
123
+ export declare function horizonSeam(frame: LookImage, { viewProjection, sky, bound }: HorizonSeamOptions): LookResult;
124
+ /** Options of {@link waterSeam}. */
125
+ export interface WaterSeamOptions {
126
+ /** The water mask: its top edge is the water line. */
127
+ water: LookMask;
128
+ bound?: LookBound;
129
+ }
130
+ /** The seam at the water line (the top edge of the water mask): the luma step there beyond its surroundings, in codes. */
131
+ export declare function waterSeam(frame: LookImage, { water, bound }: WaterSeamOptions): LookResult;
132
+ /** Options of {@link lights}. */
133
+ export interface LightsOptions {
134
+ /** Search only inside this mask, for example the sky. */
135
+ mask?: LookMask;
136
+ /** Luma at or above this is bright. Default 0.85 of the brightest luma in the search area, and at least 128. */
137
+ level?: number;
138
+ /** Smallest disc area in pixels; stars, sparks and glints are smaller. Default 24. */
139
+ minArea?: number;
140
+ /** The lights the scene shows, from its light list: the default bound is [0, lights]. Default 1. */
141
+ expected?: number;
142
+ bound?: LookBound;
143
+ }
144
+ /** A bright disc {@link lights} found. */
145
+ export interface LightDisc {
146
+ x: number;
147
+ y: number;
148
+ radius: number;
149
+ area: number;
150
+ }
151
+ /**
152
+ * Counts bright discs: 8-connected components of bright pixels that fill their bounding box as a disc does (between
153
+ * 0.6 and 0.95 of it) and are about as wide as tall. A second moon or sun is the double light this catches; streaks
154
+ * such as lightning fill too little of their box to count. A light is an emitter: its core clips (luma 250 or more)
155
+ * or it stands clear of what surrounds it (the mean luma of a ring just outside it is below 0.7 of the level). The
156
+ * sunlit tops of cumulus clear the level as round puffs too, but shade smoothly into the cloud round them, so they
157
+ * are not lights (KB-LOOK-LIGHTS-CLOUD1).
158
+ */
159
+ export declare function lights(frame: LookImage, options?: LightsOptions): LookResult & {
160
+ discs: LightDisc[];
161
+ };
162
+ /** Options of {@link foamEdges}. */
163
+ export interface FoamEdgesOptions {
164
+ /** Where the foam is. Edges within 2 pixels of it count. */
165
+ foam: LookMask;
166
+ /** An edge's luma rise across its width must reach this many codes to count. Default 48. */
167
+ minContrast?: number;
168
+ /** Edges this many pixels wide or less are hard. Default 2. */
169
+ hardWidth?: number;
170
+ bound?: LookBound;
171
+ }
172
+ /**
173
+ * Percent of the foam's strong edges that are hard. Each edge pixel (a local maximum of the gradient along its
174
+ * stronger axis) is walked both ways to the luma extrema, and the distance between them is its width (Marziliano et
175
+ * al. 2002): a thresholded foam edge is 1 pixel wide, a soft one many.
176
+ */
177
+ export declare function foamEdges(frame: LookImage, options: FoamEdgesOptions): LookResult;
178
+ /** Options of {@link crush}. */
179
+ export interface CrushOptions {
180
+ /** Areas declared dark, where black is meant; left out of the count. */
181
+ dark?: LookMask;
182
+ /** A pixel whose largest channel is at or below this code is crushed. Default 2. */
183
+ level?: number;
184
+ bound?: LookBound;
185
+ }
186
+ /** Percent of the pixels outside the declared dark areas that are crushed to black. */
187
+ export declare function crush(frame: LookImage, { dark, level, bound }?: CrushOptions): LookResult;
188
+ /**
189
+ * The largest jump of the mean luma off its trend over consecutive frames of a still camera, in codes: the most
190
+ * |m(t) - (m(t-1) + m(t+1)) / 2|. A steady change, a fade or a slow sweep, is a trend and passes.
191
+ */
192
+ export declare function flicker(frames: readonly LookImage[], { mask, bound }?: FlickerOptions): LookResult;
193
+ /**
194
+ * Percent of pixels that jump more than `threshold` codes off their own trend, averaged over the inner frames of a
195
+ * still camera: march noise and unstable shading that the frame mean hides.
196
+ */
197
+ export declare function shimmer(frames: readonly LookImage[], { mask, bound, threshold }?: FlickerOptions & {
198
+ threshold?: number;
199
+ }): LookResult;
200
+ /** Pixels of a float frame with a NaN or infinite channel; detail gives the first one's position. */
201
+ export declare function nan(frame: FloatFrame, { bound }?: {
202
+ bound?: LookBound;
203
+ }): LookResult;
204
+ /** Options of {@link flip}. */
205
+ export interface FlipOptions {
206
+ /** Pixels per degree of visual angle where the frames are seen. Default 67, the FLIP paper's 0.7 m from a 4K
207
+ * monitor 0.69 m wide; a phone held at 30 cm showing 1080 pixels across 6.5 cm is about 87. */
208
+ pixelsPerDegree?: number;
209
+ /** Also return the error of each pixel. Default false. */
210
+ map?: boolean;
211
+ }
212
+ /** What {@link flip} gives back: FLIP errors are 0 (no visible difference) to 1. */
213
+ export interface FlipResult {
214
+ mean: number;
215
+ /** Error at the 50th, 95th and 99th percentile of pixels. */
216
+ p50: number;
217
+ p95: number;
218
+ p99: number;
219
+ max: number;
220
+ /** With `map: true`: the error of each pixel, row by row. */
221
+ map?: Float32Array;
222
+ }
223
+ /**
224
+ * FLIP (Andersson et al. 2020): the difference a viewer sees flipping between a test frame and its reference, per
225
+ * pixel 0 to 1, as `{ mean, p50, p95, p99, max }`. Colour: both images filtered by the eye's contrast sensitivity at
226
+ * `pixelsPerDegree`, compared in Hunt-adjusted L*a*b* with HyAB and compressed into 0..1; features: edges and points
227
+ * found in one image and not the other raise it.
228
+ */
229
+ export declare function flip(test: LookImage, reference: LookImage, { pixelsPerDegree, map }?: FlipOptions): FlipResult;
230
+ /**
231
+ * A tone curve in the form of HDR-FLIP's Equation 1, y = (k0 x^2 + k1 x + k2) / (k3 x^2 + k4 x + k5), applied to each
232
+ * of R, G and B and clamped to 0..1: `'aces'` (the default, Narkowicz's ACES fit as `acesNarkowicz` in
233
+ * `packages/shared/aces.js` has it, with its 0.6 pre-scale), `'reinhard'` (Reinhard et al. 2002, x / (1 + x)) or the
234
+ * six coefficients of another curve that rises from 0 on [0, infinity).
235
+ */
236
+ export type ToneCurve = 'aces' | 'reinhard' | readonly [number, number, number, number, number, number];
237
+ /** Options of {@link hdrFlip}. */
238
+ export interface HdrFlipOptions extends FlipOptions {
239
+ /** The tone curve every exposure goes through before LDR-FLIP compares it. Default `'aces'`. */
240
+ toneMapper?: ToneCurve;
241
+ /** Shortest exposure compensation, in stops. Default: the exposure that maps the reference's largest luminance to
242
+ * 0.85 after the tone curve. */
243
+ startExposure?: number;
244
+ /** Longest exposure compensation, in stops. Default: the exposure that maps the reference's median luminance to
245
+ * 0.85 after the tone curve. */
246
+ stopExposure?: number;
247
+ /** Also return, per pixel, the exposure (in stops) whose LDR pair gave the largest error. Default false. */
248
+ exposureMap?: boolean;
249
+ }
250
+ /** What {@link hdrFlip} gives back: the errors pooled as {@link flip}'s, and the exposures they were taken over. */
251
+ export interface HdrFlipResult extends FlipResult {
252
+ startExposure: number;
253
+ stopExposure: number;
254
+ /** How many exposures were compared: max(2, ceil(stop - start)). */
255
+ exposures: number;
256
+ /** With `exposureMap: true`: the exposure in stops that gave each pixel its error, row by row. */
257
+ exposureMap?: Float32Array;
258
+ }
259
+ /**
260
+ * HDR-FLIP (Andersson, Nilsson, Shirley and Akenine-Moller 2021): the largest LDR-FLIP error a rendered HDR frame shows
261
+ * against its HDR reference over a range of exposures. Both float frames (linear Rec.709 RGBA, Float32 or half floats)
262
+ * are exposure compensated by 2^c for max(2, ceil(stop - start)) exposures c spread evenly from `startExposure` to
263
+ * `stopExposure`, tone mapped and clamped to 0..1, and each pair is compared with {@link flip}'s LDR-FLIP; each pixel
264
+ * keeps its largest error. The default range comes from the reference alone, so every test frame of one reference is
265
+ * judged over the same exposures.
266
+ */
267
+ export declare function hdrFlip(test: FloatFrame, reference: FloatFrame, { pixelsPerDegree, map, toneMapper, startExposure, stopExposure, exposureMap, }?: HdrFlipOptions): HdrFlipResult;
268
+ /** Mean FLIP of a frame against a reference, as the `reference` (16-sample frame) or `backends` (compat frame) check. */
269
+ export declare function difference(frame: LookImage, other: LookImage, check: 'reference' | 'backends', { bound, ...options }?: FlipOptions & {
270
+ bound?: LookBound;
271
+ }): LookResult & {
272
+ map?: Float32Array;
273
+ };
274
+ /** One probe frame and what the checks need beside it. Checks whose inputs are missing are left out, unless named. */
275
+ export interface LookProbe {
276
+ name: string;
277
+ frame: LookImage;
278
+ /**
279
+ * Masks by name: `sky`, `water`, `foam` and `dark` are read, and `sky-coverage` (the pixels `@margoengine/sky` drew,
280
+ * its `coverage` option) limits `skyClip` when there is no `sky` mask. `grain`, `lights` and `horizonSeam` read only
281
+ * `sky`.
282
+ */
283
+ masks?: Record<string, LookMask>;
284
+ /** The float frame before tone mapping, for the `nan` check. */
285
+ hdr?: FloatFrame;
286
+ /** The 16-sample reference render of this frame. */
287
+ reference?: LookImage;
288
+ /** This frame from the WebGL2 compatibility layer. */
289
+ compat?: LookImage;
290
+ /** The camera's view-projection at this frame, column-major, for the horizon seam. */
291
+ viewProjection?: ArrayLike<number>;
292
+ /** Consecutive frames of a still camera around this one, for flicker and shimmer. */
293
+ still?: LookImage[];
294
+ /** The frame after this one and each pixel's motion to it, for `shimmerMoving` and `motionBlur`. */
295
+ moving?: MovingFrames;
296
+ /** The light the frame was shaded with: `bounce` and `shadowTint` take their limits from it ({@link lightBounds}). */
297
+ light?: LookLight;
298
+ /** The frame before its 8 bits, which `bounce` and `shadowTint` read in its place. */
299
+ precise?: PreciseFrame;
300
+ /** The scene's light before its haze and tone map ({@link RadianceFrame}): `bounce` reads the ground's light from it. */
301
+ radiance?: RadianceFrame;
302
+ /**
303
+ * More frames whose ground `bounce` and `shadowTint` pool with this one's: each its precise frame (or frame) and its
304
+ * masks, or its {@link groundSample} made with this probe's choice of albedo (with one only if the probe has one).
305
+ * With the probe's `radiance`, each needs its own.
306
+ */
307
+ pool?: ({
308
+ frame?: LookImage;
309
+ precise?: PreciseFrame;
310
+ radiance?: RadianceFrame;
311
+ masks: Record<string, LookMask>;
312
+ } | GroundSample)[];
313
+ /**
314
+ * The pooled frames' penumbra ground as {@link penumbraSample}s (what `checkShot` reads of the shot's `probePool`);
315
+ * `penumbra` pools these and every `pool` frame that holds its 8-bit frame and a `penumbra` mask.
316
+ */
317
+ penumbraPool?: GrainSums[];
318
+ }
319
+ /** Options of {@link checkProbe}. */
320
+ export interface CheckProbeOptions {
321
+ /** The block pitch: the froxel tile in pixels. Default 8. */
322
+ pitch?: number;
323
+ /** Viewing condition of the FLIP checks. Default 67 pixels per degree. */
324
+ pixelsPerDegree?: number;
325
+ /** A look family from {@link LOOK_FAMILY_NAMES}: its bounds apply to every check the probe can run, under `bounds`. */
326
+ family?: string | null;
327
+ }
328
+ /**
329
+ * Runs every look check a probe has the inputs for, with `bounds` from the shot file's `lookBounds` in place of the
330
+ * defaults. A check named in `bounds` that cannot run fails as missing, and so does a name no check has.
331
+ */
332
+ export declare function checkProbe(probe: LookProbe, bounds?: Readonly<Record<string, LookBound>>, { pitch, pixelsPerDegree, family }?: CheckProbeOptions): (LookResult & {
333
+ map?: Float32Array;
334
+ })[];
335
+ /** A checked probe, for {@link lookReport}. */
336
+ export interface CheckedProbe {
337
+ name: string;
338
+ frame: LookImage;
339
+ results: (LookResult & {
340
+ map?: Float32Array;
341
+ })[];
342
+ }
343
+ /** The report as JSON. */
344
+ export interface LookReportJSON {
345
+ format: 'margo-look-report';
346
+ version: 1;
347
+ pass: boolean;
348
+ probes: {
349
+ name: string;
350
+ pass: boolean;
351
+ results: LookResult[];
352
+ }[];
353
+ }
354
+ /** What {@link lookReport} gives back: one page for review. */
355
+ export interface LookReport {
356
+ pass: boolean;
357
+ json: LookReportJSON;
358
+ /** A markdown table: one row per probe and check, failures first. */
359
+ markdown: string;
360
+ /** The contact sheet: each probe's thumbnail framed green (pass) or red (fail) and labelled with what failed, then
361
+ * its FLIP map against the reference when it has one. Save it with `encodePNG`. */
362
+ sheet: LookImage;
363
+ }
364
+ /** Options of {@link lookReport}. */
365
+ export interface LookReportOptions {
366
+ /** Thumbnail width in pixels. Default 270, a quarter of a vertical short. */
367
+ thumbWidth?: number;
368
+ /** Tiles per row. Default 4. */
369
+ columns?: number;
370
+ /** A title over the table. Default "Look checks". */
371
+ title?: string;
372
+ }
373
+ /** The contact sheet and the table, JSON and markdown, of checked probes. */
374
+ export declare function lookReport(probes: readonly CheckedProbe[], { thumbWidth, columns, title }?: LookReportOptions): LookReport;
375
+ /** A probe of a shot tool manifest (`manifest.json`, docs/shots.md): file paths relative to the shot folder. */
376
+ export interface ShotManifestProbe {
377
+ frame: number;
378
+ file: string;
379
+ aovs?: Record<string, string>;
380
+ /** The 16-sample reference render of this frame, a PNG. */
381
+ reference?: string;
382
+ /** This frame from the WebGL2 compatibility layer, a PNG. */
383
+ compat?: string;
384
+ /** The float frame, raw little-endian RGBA float32 rows (`.rgba32f`), the frame's size. */
385
+ hdr?: string;
386
+ /** The camera's view-projection at this frame, column-major. */
387
+ viewProjection?: number[];
388
+ /** PNGs of consecutive frames of a still camera around this one. */
389
+ still?: string[];
390
+ /**
391
+ * The frame after this one (a PNG) and each pixel's motion to it (raw little-endian float32, x then y per pixel, the
392
+ * frame's size), for `shimmerMoving` and `motionBlur`.
393
+ */
394
+ moving?: {
395
+ next: string;
396
+ motion: string;
397
+ back?: string;
398
+ velocity?: string;
399
+ nextVelocity?: string;
400
+ /** Each pixel's distance from the eye, raw little-endian float32, one a pixel (`MovingFrames.distance`). */
401
+ distance?: string;
402
+ /** The same for the next frame (`MovingFrames.nextDistance`). */
403
+ nextDistance?: string;
404
+ /** The next frame's flame mask, a PNG (`MovingFrames.nextFlame`). */
405
+ nextFlame?: string;
406
+ };
407
+ /**
408
+ * This probe's own bounds, check name: bound. They replace the shot's `lookBounds` for the checks they name, on this
409
+ * probe only (for example a lights bound for the probes that face the lamps).
410
+ */
411
+ lookBounds?: Record<string, LookBound>;
412
+ /** The light the frame was shaded with (the shot tool records it), for the T6 limits ({@link lightBounds}). */
413
+ light?: LookLight;
414
+ /** The frame before its 8 bits, raw little-endian RGB float32 rows, sRGB coded 0 to 1 (`.rgb32f`). */
415
+ precise?: string;
416
+ /**
417
+ * The scene's light before its haze and tone map, one little-endian float32 of linear luminance a pixel at the frame's
418
+ * size (`.radiance.f32`, the shot tool's `radiance` light image), which T6 `bounce` reads the ground's light from.
419
+ */
420
+ radiance?: string;
421
+ /**
422
+ * More frames whose ground T6 and penumbra pool with this one's (the shot's `probePool`): each its precise frame, its
423
+ * 8-bit frame (`file`, which `penumbra` reads), masks and, with the probe's, its `radiance`.
424
+ */
425
+ pool?: {
426
+ frame: number;
427
+ precise: string;
428
+ radiance?: string;
429
+ file?: string;
430
+ aovs?: Record<string, string>;
431
+ }[];
432
+ }
433
+ /** What {@link checkShot} reads. */
434
+ export interface CheckShotOptions extends CheckProbeOptions, LookReportOptions {
435
+ /** The shot tool's manifest.json, parsed. */
436
+ manifest: {
437
+ id?: string;
438
+ header?: {
439
+ lookBounds?: Record<string, LookBound>;
440
+ lookFamily?: string | null;
441
+ };
442
+ /** How the frames were made: a shot drawn with sub-frames over a shutter is judged by `motionBlur` at that angle. */
443
+ render?: {
444
+ subframes?: number;
445
+ shutter?: number;
446
+ };
447
+ probes?: Record<string, ShotManifestProbe>;
448
+ };
449
+ /** Reads a file of the shot folder by its manifest path, for example `(path) => readFile(join(folder, path))`. */
450
+ read: (path: string) => Promise<Uint8Array>;
451
+ /** Stops between probes; the promise rejects with the signal's reason. */
452
+ signal?: AbortSignal;
453
+ /**
454
+ * How `shimmerMoving` warps a moving probe's pixels (`MovingFrames.reproject`): default `'velocity'` where the probe
455
+ * has both velocities, `'camera'` for the camera's motion alone, as before 2026-11-29.
456
+ */
457
+ reproject?: 'velocity' | 'camera';
458
+ }
459
+ /**
460
+ * Runs the look checks on every probe of a rendered shot, with its `lookBounds` (and each probe's own `lookBounds` in
461
+ * their place for the checks a probe names), and makes the report.
462
+ */
463
+ export declare function checkShot({ manifest, read, signal, pitch, pixelsPerDegree, reproject, ...report }: CheckShotOptions): Promise<LookReport>;
464
+ /** A bound per check for a named look family. `natural` has none: every check keeps its default. */
465
+ export declare const LOOK_FAMILY_BOUNDS: Readonly<Record<string, Readonly<Record<string, LookBound>>>>;
466
+ /**
467
+ * The share of its fine detail a master frame must keep after a platform re-encode (T7, `detailKept` of the shot tool's
468
+ * master check), per look family: 0.5 for `natural`, 0.6 for `animatedFeature`.
469
+ */
470
+ export declare const LOOK_FAMILY_DETAIL_KEPT: Readonly<Record<string, number>>;
471
+ /** The `detailKept` floor of a look family (a missing or null family is `natural`). @throws RangeError for an unknown family. */
472
+ export declare function detailKeptFloor(family?: string | null): number;
473
+ /** The names of the look families, `natural` first. */
474
+ export declare const LOOK_FAMILY_NAMES: readonly string[];
475
+ /**
476
+ * The bounds of a look family, to pass as `lookBounds` (a shot's own `lookBounds` replace them by name).
477
+ * @throws RangeError for a family not in {@link LOOK_FAMILY_NAMES}.
478
+ */
479
+ export declare function familyBounds(family: string): Record<string, LookBound>;
480
+ /** Options of {@link stairs} and {@link colourEdges}. */
481
+ export interface EdgeOptions extends RegionOptions {
482
+ /** A step this large between neighbours is a strong edge: 24 codes of luma (or L*), 24 of a* or b*. Default 24. */
483
+ strong?: number;
484
+ }
485
+ /**
486
+ * T3: percent of the strong luma edges (a step over 24 codes) that are hard, one pixel stair steps with no value
487
+ * between the two plateaus in their 3 x 3 window. A frame supersampled and resolved has none; a pixel-aliased edge is all of them.
488
+ */
489
+ export declare function stairs(frame: LookImage, { mask, strong, bound }?: EdgeOptions): LookResult;
490
+ /**
491
+ * T7: percent of the strong colour edges (a step over 24 in a* or b*) that are one pixel wide. H.264 at 4:2:0 halves the
492
+ * colour detail, so a colour edge narrower than two pixels is smeared by the encoder: red fire and red skies first.
493
+ */
494
+ export declare function colourEdges(frame: LookImage, { mask, strong, bound }?: EdgeOptions): LookResult;
495
+ /** Options of {@link chromaSmear}. */
496
+ export interface ChromaSmearOptions extends RegionOptions {
497
+ /** A pixel whose CIE76 colour difference after the 4:2:0 round trip is over this is smeared. Default 6, clearly visible side by side. */
498
+ threshold?: number;
499
+ /** The 4:2:0 conversion modelled: `'sharp'` (default), the one the engine's film encodes ship
500
+ * (`@margoengine/headless/yuv420`, `encodeWithFFmpeg`, the shot tool's master); `'average'`, a plain filter, the
501
+ * one a scaler makes. */
502
+ chroma?: 'sharp' | 'average';
503
+ }
504
+ /**
505
+ * T7: percent of the pixels whose colour moves visibly when the frame is cut to 4:2:0 chroma by the encode that ships
506
+ * it, before any quantisation of the codec. The frame goes through {@link toYuv420} (BT.709, limited range, 8 bits,
507
+ * chroma sited on the left column between rows, the H.264 default the encode states) and back the way a player reads
508
+ * it ({@link fromYuv420}: bilinear chroma, the matrix, the clamp), and each pixel's CIE76 difference from the source
509
+ * is counted over `threshold`. An odd width or height is padded by its last column or row, as the encoder pads it.
510
+ * It needs no encoder, so it runs on any frame; where {@link colourEdges} counts the colour edges one pixel wide, this
511
+ * counts what the encode's chroma does to them.
512
+ */
513
+ export declare function chromaSmear(frame: LookImage, { mask, threshold, bound, chroma }?: ChromaSmearOptions): LookResult;
514
+ /** Options of {@link penumbra}. */
515
+ export interface PenumbraOptions {
516
+ /** The shadow penumbra mask. */
517
+ mask?: LookMask;
518
+ /** Where the plants are (the `plants` page mask): left out, so the grain is read on the ground alone. */
519
+ plants?: LookMask;
520
+ bound?: LookBound;
521
+ /**
522
+ * More frames of the shot whose penumbra ground is pooled with this one's (the shot's `probePool`), each its frame and
523
+ * masks or its {@link penumbraSample}: a far penumbra under a pixel wide leaves too few interior pixels in one frame
524
+ * (KB-LOOK-TV-POOLFAILS1, rail-line mid), as a shadow interior does for `bounce`.
525
+ */
526
+ pool?: ({
527
+ frame: LookImage;
528
+ penumbra: LookMask;
529
+ plants?: LookMask;
530
+ } | GrainSums)[];
531
+ }
532
+ /** A pooled frame's penumbra ground as {@link penumbra} pools it: its summed responses, so the frame and masks can go. */
533
+ export declare function penumbraSample(frame: LookImage, penumbraMask?: LookMask, plants?: LookMask): GrainSums;
534
+ /**
535
+ * The fewest interior pixels {@link penumbra} and {@link penumbraPlants} read a grain from: 2,055, where the estimate's
536
+ * relative standard error is 5 percent. Immerkaer's value is a mean of absolute Laplacian responses; for Gaussian noise
537
+ * each one's standard deviation is sqrt(pi / 2 - 1) = 0.756 of its mean, and a response shares pixels with the 8 around
538
+ * it, so about one in 9 is independent: (3 x 0.756 / 0.05)^2 = 2,055.
539
+ */
540
+ export declare const PENUMBRA_MIN_PIXELS: number;
541
+ /**
542
+ * T1 in shadow penumbras: the grain of the ground inside the `penumbra` mask, the `plants` mask left out (bound 0.7
543
+ * codes for the family), over at least {@link PENUMBRA_MIN_PIXELS} interior pixels. Plants in the penumbra are held by
544
+ * {@link penumbraPlants}.
545
+ */
546
+ export declare function penumbra(frame: LookImage, { mask, plants, bound, pool }?: PenumbraOptions): LookResult;
547
+ /** Options of {@link penumbraPlants}. */
548
+ export interface PenumbraPlantsOptions {
549
+ /** The shadow penumbra mask. */
550
+ penumbra: LookMask;
551
+ /** Where the plants are (the `plants` page mask). */
552
+ plants: LookMask;
553
+ bound?: LookBound;
554
+ }
555
+ /**
556
+ * T1 on plants in shadow penumbras: the grain of the plants inside the `penumbra` mask over the grain of the plants
557
+ * outside it, where no shadow filter runs (fully lit or fully shadowed), in the same frame (bound 1: the penumbra adds
558
+ * no noise to the plants' own detail). Each side reads at least {@link PENUMBRA_MIN_PIXELS} interior pixels.
559
+ */
560
+ export declare function penumbraPlants(frame: LookImage, { penumbra, plants, bound }: PenumbraPlantsOptions): LookResult;
561
+ import { type MovingFrames } from './look-motion.js';
562
+ export { shimmerMoving, reprojectionMotion, relativeViewProjections, depthFromDistance, motionBlur, PARALLAX_STEP, WATER_GAIN_RADIUS, type LookDistance, type LookMotion, type MovingFrames, } from './look-motion.js';
563
+ /** Options of the subject checks. */
564
+ export interface SilhouetteOptions {
565
+ /** The subject's mask: required. */
566
+ subject: LookMask;
567
+ bound?: LookBound;
568
+ }
569
+ /**
570
+ * T5: percent of the subject's outline pixels where the subject differs from what is behind it by at least `contrast`
571
+ * (15) L*: the mean L* of the subject pixels in the 3 x 3 window against the mean of the others.
572
+ */
573
+ export declare function silhouette(frame: LookImage, { subject, bound, contrast }: SilhouetteOptions & {
574
+ contrast?: number;
575
+ }): LookResult;
576
+ /**
577
+ * T5 at a glance: the frame reduced to 320 x 180 (box filter) and its L* cut into three values (thirds of 0 to 100); the
578
+ * percent of the subject's mask (a reduced pixel is the subject when half of it is) that sits in one value. A subject
579
+ * that reads as one shape sits in one.
580
+ */
581
+ export declare function silhouetteShape(frame: LookImage, { subject, bound }: SilhouetteOptions): LookResult;
582
+ /** Options of {@link bounce}. */
583
+ export interface BounceOptions {
584
+ /** Where the ground is in the sun. */
585
+ lit: LookMask;
586
+ /** Where the ground is in shadow. */
587
+ shadow: LookMask;
588
+ /**
589
+ * The surface colour of each pixel, RGBA sRGB coded (an albedo AOV): the lit and shadowed ground are then compared
590
+ * within strata of like albedo. Unset, all ground is one stratum.
591
+ */
592
+ albedo?: LookImage;
593
+ /**
594
+ * What is drawn over the scene's surfaces (an `over` AOV, 0 to 255: a flame's or smoke's coverage, as TAA's
595
+ * `reactiveMask` holds it): ground any of it covers is left out, since its colour is partly the effect's, not the
596
+ * ground's light (KB-LOOK-TV-TINTRES1). Unset, nothing is left out.
597
+ */
598
+ over?: LookMask;
599
+ /** The frame's colours before its 8 bits, read in its place ({@link PreciseFrame}). */
600
+ precise?: PreciseFrame;
601
+ /**
602
+ * The scene's light before its haze and tone map ({@link RadianceFrame}): each pixel's luminance is read from it in
603
+ * place of the frame's, so the airlight a haze adds alike to the lit and the shadowed ground, and the tone curve, no
604
+ * longer lift the shadowed side's share (KB-LOOK-TV-HAZEBOUNCE1). The frame still gives b* for `shadowTint`. Every
605
+ * pooled frame then needs its own. Unset, the luminance is the frame's.
606
+ */
607
+ radiance?: RadianceFrame;
608
+ /**
609
+ * More frames of the shot whose ground is pooled with this one's, for shadow interiors too small in one frame; the
610
+ * result's detail then gives `frames`, and `se` follows them ({@link GroundFrame}).
611
+ */
612
+ pool?: (GroundFrame | GroundSample)[];
613
+ bound?: LookBound;
614
+ }
615
+ /**
616
+ * The share of the frame's shorter side kept clear of a ground mask's edge by {@link bounce} and {@link shadowTint}:
617
+ * 1/360, 3 pixels at 1080p and 1 at 360p (at least 1).
618
+ */
619
+ export declare const GROUND_INSET: number;
620
+ /**
621
+ * The albedo of a probe's masks: `albedo-r`, `albedo-g` and `albedo-b` (grey masks of one sRGB coded channel each, as
622
+ * the shot tool writes an AOV) as one RGBA image, or undefined without all three.
623
+ */
624
+ export declare function albedoOf(frame: {
625
+ width: number;
626
+ height: number;
627
+ }, masks: Record<string, LookMask>): LookImage | undefined;
628
+ /**
629
+ * The fewest interior pixels on each side, lit and shadowed, T6 reads once an `over` mask has left out the ground effects
630
+ * are drawn over: 30, the usual floor for treating a sample mean as normal (R. V. Hogg, E. A. Tanis and D. L.
631
+ * Zimmerman, "Probability and Statistical Inference", 9th ed., Pearson, 2015, section 5.6), which `detail.se` assumes.
632
+ */
633
+ export declare const GROUND_MIN_PIXELS = 30;
634
+ /** Levels per sRGB channel of the albedo strata {@link bounce} and {@link shadowTint} compare within: 16 (16 codes). */
635
+ export declare const GROUND_ALBEDO_LEVELS = 16;
636
+ /**
637
+ * The side of the frame's blocks T6 compares lit and shadowed ground within, as a share of the frame's shorter side:
638
+ * 1/10, 108 pixels at 1080p. A shadow's ratio is read across its own edge, where the light other than the sun's beam is
639
+ * the same on both sides (G. D. Finlayson, S. D. Hordley, C. Lu and M. S. Drew, "On the removal of shadows from
640
+ * images", IEEE TPAMI 28(1), 59-68, 2006, https://doi.org/10.1109/TPAMI.2006.18; illumination varies slowly across an
641
+ * image, E. H. Land and J. J. McCann, "Lightness and Retinex theory", JOSA 61(1), 1-11, 1971,
642
+ * https://doi.org/10.1364/JOSA.61.000001). Across a whole frame it is not: in the timber-valley rail-line shot the sun
643
+ * is 1.6 percent of the ground's light and the haze the fire lights from below brightens one side of the frame, so 74
644
+ * shadowed pixels a frame beside the fire read 137 percent of the lit road across the frame and 95 percent beside
645
+ * themselves (KB-LOOK-TV-POOLFAILS1).
646
+ */
647
+ export declare const GROUND_BLOCK: number;
648
+ /**
649
+ * The ground pixels of one albedo stratum, lit side first: counts and sums of Y and b* and of their squares, and of the
650
+ * albedo's luminance A (1 a pixel without an albedo), its square and Y x A.
651
+ */
652
+ export interface GroundStratum {
653
+ n: [number, number];
654
+ Y: [number, number];
655
+ b: [number, number];
656
+ /** Sums of squares of Y and b*, for the standard error. */
657
+ Y2: [number, number];
658
+ b2: [number, number];
659
+ /** Sums of the albedo's linear luminance, of its square and of Y times it: what each side's light is read over. */
660
+ A: [number, number];
661
+ A2: [number, number];
662
+ YA: [number, number];
663
+ }
664
+ /**
665
+ * The frame's colours before its 8 bits (the shot tool's precise frame, `.rgb32f`): RGB floats, sRGB coded 0 to 1,
666
+ * row 0 at the top. T6 reads it in place of the 8-bit frame, whose blue codes are 0.4 b* apart at dark ground.
667
+ */
668
+ export interface PreciseFrame {
669
+ width: number;
670
+ height: number;
671
+ data: Float32Array;
672
+ }
673
+ /**
674
+ * The scene's light before its haze and tone map: one float a pixel, its linear luminance at any one scale (the shot
675
+ * tool's `radiance` light image, from the `texture` of a `@margoengine/sky/aov` `fogInputCapture` given as a sky's `fog.keepInput`), row 0 at the top.
676
+ */
677
+ export interface RadianceFrame {
678
+ width: number;
679
+ height: number;
680
+ data: Float32Array;
681
+ }
682
+ /**
683
+ * A frame's ground reduced to its albedo strata ({@link groundSample}): what {@link bounce} and {@link shadowTint} read of
684
+ * a pooled frame, a few numbers in place of its frame and masks.
685
+ */
686
+ export interface GroundSample {
687
+ readonly strata: ReadonlyMap<number, Readonly<GroundStratum>>;
688
+ /** Ground interior pixels its `over` mask left out; undefined without one. */
689
+ readonly covered?: number;
690
+ /** True where its luminance came from a {@link RadianceFrame}. */
691
+ readonly radiance?: boolean;
692
+ }
693
+ /** One more frame of a shot whose ground {@link bounce} and {@link shadowTint} pool with the probe's. */
694
+ export interface GroundFrame {
695
+ /** The frame, 8-bit; unused where `precise` is given. */
696
+ frame?: LookImage;
697
+ precise?: PreciseFrame;
698
+ /** The scene's light before its haze and tone map ({@link BounceOptions.radiance}). */
699
+ radiance?: RadianceFrame;
700
+ lit: LookMask;
701
+ shadow: LookMask;
702
+ albedo?: LookImage;
703
+ /** What is drawn over the surfaces ({@link BounceOptions.over}). */
704
+ over?: LookMask;
705
+ }
706
+ /** A frame's ground as {@link bounce} and {@link shadowTint} pool it: its strata, so the frame and masks can go. */
707
+ export declare function groundSample(frame: GroundFrame): GroundSample;
708
+ /**
709
+ * T6: the light on the shadowed ground as a percent of the lit ground's, in linear light (each side's luminance over its
710
+ * albedo's luminance with `albedo`, its mean luminance without), each averaged over
711
+ * its mask's interior (pixels the mask covers whole, {@link GROUND_INSET} in from the edges, where the frame mixes both
712
+ * sides). Shadow that holds 10 to 35 percent of the sunlit value carries bounce and sky light; under 10 is crushed,
713
+ * over 35 flat. With `albedo` the lit and shadowed ground are compared surface for like surface ({@link GROUND_ALBEDO_LEVELS}).
714
+ */
715
+ export declare function bounce(frame: LookImage, { lit, shadow, bound }: BounceOptions): LookResult;
716
+ /**
717
+ * T6: how much cooler (lower b*) the shadowed ground is than the lit ground, in CIE b* points (at least 3), over the
718
+ * masks' interiors and, with `albedo`, surface for like surface, as {@link bounce}.
719
+ */
720
+ export declare function shadowTint(frame: LookImage, { lit, shadow, bound }: BounceOptions): LookResult;
721
+ /**
722
+ * The light a frame was shaded with, as the shot tool records it from the engine: the sun as core holds it and the
723
+ * diffuse light on level ground. Both are in the engine light's units, so level ground of albedo a takes
724
+ * a x `intensity` x `colour` x max(`direction`[1], 0) / pi from the sun and a x `ambient` from the sky.
725
+ */
726
+ export interface LookLight {
727
+ /** The sun (or moon): `direction` toward it, unit; `intensity`; `colour`, linear RGB. */
728
+ sun: {
729
+ direction: readonly number[];
730
+ intensity: number;
731
+ colour: readonly number[];
732
+ };
733
+ /** The diffuse light on level ground: irradiance over pi, linear RGB (the sky's harmonics, or core's ambient). */
734
+ ambient: readonly number[];
735
+ }
736
+ /**
737
+ * Erbs, Klein and Duffie's diffuse fraction of global horizontal light for an hourly clearness index `kt` ("Estimation
738
+ * of the diffuse radiation fraction for hourly, daily and monthly-average global radiation", Solar Energy 28(4),
739
+ * 293-302, 1982, https://doi.org/10.1016/0038-092X(82)90302-4).
740
+ */
741
+ export declare function erbsDiffuseFraction(kt: number): number;
742
+ /**
743
+ * The diffuse fraction up to which a sun counts as clear, where T6 keeps its sunlit limits (10 to 35 percent, 3 b*):
744
+ * {@link erbsDiffuseFraction} at the clearness index 0.65 above which a sky is clear (0 to 0.3 overcast, 0.3 to 0.65
745
+ * intermediate: A. H. Fakra, H. Boyer, F. Miranville, D. Bigot, "A simple evaluation of global and diffuse luminous
746
+ * efficacy for all sky conditions in tropical and humid climate", Renewable Energy 36(1), 298-306, 2011,
747
+ * https://arxiv.org/abs/1212.5259), 0.3336.
748
+ */
749
+ export declare const CLEAR_SUN_DIFFUSE: number;
750
+ /** What {@link lightBounds} gives: the T6 limits for a light and the diffuse fraction they follow. */
751
+ export interface LightBounds {
752
+ /** The share of level ground's light that is diffuse, 0 to 1: ambient luminance over ambient plus the sun's. */
753
+ diffuse: number;
754
+ bounce: [number, number];
755
+ shadowTint: [number, number];
756
+ }
757
+ /**
758
+ * The T6 limits that follow a frame's own light (KB-LOOK-TV-PALL1). Level ground in the open takes the sun's beam and
759
+ * the sky's diffuse light; a cast shadow loses the beam and keeps the sky it still sees plus the light bounced into it,
760
+ * both in proportion to the diffuse light. So the share a shadow holds scales with the diffuse fraction d of the lit
761
+ * ground's light, and the cooling it shows with the beam's share 1 - d. Up to {@link CLEAR_SUN_DIFFUSE} (a clear sun)
762
+ * the limits are `base` unchanged; above it `bounce` is base x d / CLEAR_SUN_DIFFUSE (the high end at most 100) and the
763
+ * low end of `shadowTint` base x (1 - d) / (1 - CLEAR_SUN_DIFFUSE). A smoke pall or an overcast sky, nearly all diffuse
764
+ * light, so asks for shadows near the lit ground and little tint, as measured under one (Garcia et al., Atmos. Meas.
765
+ * Tech. 19, 3151-3167, 2026, https://doi.org/10.5194/amt-19-3151-2026), and never for crushed shadows.
766
+ * `base` defaults to the checks' defaults (10 to 35 percent, 3 to 100 b*).
767
+ */
768
+ export declare function lightBounds(light: LookLight, base?: {
769
+ bounce?: LookBound;
770
+ shadowTint?: LookBound;
771
+ }): LightBounds;
772
+ /** T7 at night: the mean luma of the frame, in codes (at least 24, a night that still reads on a phone). */
773
+ export declare function nightLuma(frame: LookImage, { mask, bound }?: RegionOptions): LookResult;
774
+ /** T7 at night: the luma the brightest 1 percent of the frame reaches, in codes (over 180: a night has its lights). */
775
+ export declare function nightPeak(frame: LookImage, { mask, bound }?: RegionOptions): LookResult;