#import #import #import #import "DYUniforms.h" #import "DYToolState.h" @interface DYRenderer : NSObject /// Decode and upload before committing a host parameter. The renderer retains /// the immutable selected contents independently of the thumbnail cache. - (NSProgress *)prepareLUTPath:(NSString *)path completion:(void (^)(NSError *error))completion; - (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths error:(NSError**)error; - (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths error:(NSError**)error; - (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider error:(NSError**)error; - (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider error:(NSError**)error; - (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools error:(NSError**)error; - (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools error:(NSError**)error; // Latest full-frame face rectangles and render time, copied under a short lock. - (NSDictionary*)mosaicFaceSnapshot; - (NSData*)preview; /// Latest final-output bins for the inspector's visible curve controls. - (NSData*)outputHistogram; /// Bins from this instance's most recent final output at the requested time. - (NSData*)canvasHistogramAtTime:(CMTime)time; /// Latest completed spider density raster. Requests a coalesced background refresh. - (NSData*)outputSpiderScope; /// Exact-time final output for the OSC, cached per sample. - (NSData*)canvasSpiderScopeAtTime:(CMTime)time; /// Display-encoded float RGBA, 320×180, with the visually top row first. /// Analysis preview retains the host texture's original row order separately. - (NSData*)lookLUTPreview; /// Standard and HD samples from the same capture, under one lock. - (NSDictionary*)lookLUTPreviewFrames; - (void)invalidatePreview; /// Conversion/statistics run while visible; retain one small final-output /// sample per instance so opening a paused workspace needs no parameter edit. - (BOOL)scopeEnabled; - (void)setScopeEnabled:(BOOL)enabled; - (void)setScopeEnabled:(BOOL)enabled atTime:(CMTime)time frameDuration:(CMTime)frameDuration exclusiveEnd:(BOOL)exclusiveEnd; /// Call after the final destination render succeeds, while the tile is valid. /// Only the small GPU readback waits here; conversion/statistics are coalesced /// on a worker. No main-queue wait or host API is performed by this method. - (void)captureScopeTile:(FxImageTile *)tile atTime:(CMTime)time; /// Straight float RGBA, 320x180, visually top row first. Consult metadata domain. - (NSData *)scopePreview; /// Includes waveform/parade RGBA8 rasters, histogram and honest color-domain labels. - (NSDictionary *)scopeMetadata; - (NSDictionary*)colorContext; - (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools colorManagement:(NSDictionary*)state hostPrimaries:(NSInteger)primaries error:(NSError**)error; - (BOOL)renderHostSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools colorManagement:(NSDictionary*)state hostPrimaries:(NSInteger)primaries atTime:(CMTime)time error:(NSError**)error; - (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools colorManagement:(NSDictionary*)state error:(NSError**)error; @end