/** How the decoded pixels reached the luma codes. */ export type DepthPreviewLumaPath = /** The decoder's own luma plane: the codes exactly as decoded. */ "plane" /** * The browser converted the frame to RGB first, and the green channel * stands in for luma. A range or matrix conversion can move codes. */ | "rgb"; /** One decoded preview frame's luma, one byte per map pixel. */ export interface DepthPreviewLuma { readonly luma: Uint8Array; readonly width: number; readonly height: number; readonly path: DepthPreviewLumaPath; } /** A buffer reused from one copy to the next, grown as needed. */ export interface DepthPreviewLumaScratch { buffer: ArrayBuffer; } /** * Copies a decoded preview frame's luma codes out of it, mapped through * `correction` when one is given. The frame stays open; its owner closes * it. */ export declare function readVideoFrameLuma(frame: VideoFrame, scratch: DepthPreviewLumaScratch, correction?: Uint8Array | null): Promise; /** Copies decoded preview frames' luma out, wherever that costs least. */ export interface DepthPreviewLumaCopier { /** * Takes the frame and closes it once its luma is out; the promise answers * null when the frame was lost on the way, handed to a worker that then * failed. Answers null itself, synchronously and leaving the frame * untouched, when it cannot take the frame: the page copies it instead. */ copy(frame: VideoFrame, correction: Uint8Array | null): Promise | null; readonly offMainThread: boolean; destroy(): void; } /** A copier that never declines: the page always takes the frame. */ export interface MainThreadLumaCopier extends DepthPreviewLumaCopier { copy(frame: VideoFrame, correction: Uint8Array | null): Promise; } /** * Copies on the page, one frame at a time through one scratch buffer. Each * copy reports the main-thread time it took. */ export declare function createMainThreadLumaCopier(): MainThreadLumaCopier; //# sourceMappingURL=preview-luma.d.ts.map