@class FigMetalContext; @protocol MTLComputePipelineState, MTLTexture, MTLCommandQueue, MTLBuffer; @interface LKTFlowGPU : NSObject { FigMetalContext *_mtlContext; id _commandQueue; id _computePipelines[22]; unsigned long long _maxThreadExecutionWidth; struct CGSize { double width; double height; } _ref_pyr_size[10]; struct CGSize { double width; double height; } _aux_pyr_size[10]; id _I_tex[2][10]; id _I_u32_alias_tex[2][10]; struct __CVBuffer { } *_G0_pxbuf; struct __CVBuffer { } *_G1_pxbuf; id _G0_tex[10]; id _G1_tex[10]; struct __CVBuffer { } *_C0_pxbuf; struct __CVBuffer { } *_C1_pxbuf; id _C0_tex[10]; id _C1_tex[10]; id _Adiagb_buf[2]; id _Ixy_buf[2]; id _idt_buf; struct __CVBuffer { } *_w_pxbuf; id _w_tex[10]; struct __CVBuffer *_uv_fwd_pxbuf[2]; struct __CVBuffer *_uv_bwd_pxbuf[2]; id _uv_fwd_tex[2][10]; id _uv_bwd_tex[2][10]; id _uv_fwd_u32_alias_tex[2][10]; id _uv_bwd_u32_alias_tex[2][10]; int _current_frame_index; id _uv_fwd_tex_user_ref; id _uv_bwd_tex_user_ref; id _kpt_buf; id _icp_param_tform_buf; id _icp_param_tform_extra_buf; id _icp_loss_buf; id _icp_reduc_buf; float _icp_regularizer_term[10]; id _w_icp_tex_user_ref; id _icp_derivatives_tg_sum; id _icp_active_tg_indices_tex; } @property (readonly, nonatomic) BOOL isValid; @property (nonatomic) int inputPixelFormat; @property (readonly, nonatomic) struct CGSize { double width; double height; } ref_size; @property (readonly, nonatomic) struct CGSize { double width; double height; } aux_size; @property (readonly, nonatomic) int nscales; @property (readonly, nonatomic) int streamFrameCount; @property (nonatomic) int nwarpings; @property (readonly, nonatomic) int nscales_icp; @property (nonatomic) int warping_scheme_icp; @property (nonatomic) struct parametric_transform { float params[8]; int length_params; } p; @property (nonatomic) int decimation_factor_icp; @property (nonatomic) int flow_upper_most_scale; @property (nonatomic) BOOL useNonLocalRegularization; @property (nonatomic) int nlreg_radius; @property (nonatomic) int nlreg_padding; @property (nonatomic) float nlreg_sigma_l; @property (nonatomic) float nlreg_sigma_c; @property (nonatomic) float nlreg_sigma_w; @property (nonatomic) BOOL isBidirectional; @property (readonly, nonatomic) id keypoints; + (void)_computeScalingFactor:(id)a0 dst_tex:(id)a1 scale_xy_inv:(void *)a2 coeff:(float *)a3; - (void)waitUntilCompleted; - (void)reset; - (void)dealloc; - (void)setPreset:(long long)a0; - (void).cxx_destruct; - (int)_setupBuffer; - (int)_computeFeaturesDerivativesWithCommandBuffer:(id)a0 in_tex:(id)a1 out_tex:(id)a2; - (int)_computeFeaturesWithCommandBuffer:(id)a0 in_tex:(id)a1 out_tex:(id)a2; - (int)_computeOpticalFlow; - (int)_doNLRegularizationWithCommandBuffer:(id)a0 in_uv_tex:(id)a1 join_tex:(id)a2 w_tex:(id)a3 out_uv_tex:(id)a4; - (int)_zeroFlowWithCommandBuffer:(id)a0 uv_tex:(id)a1; - (int)estimateFlowFromReference:(struct __CVBuffer { } *)a0 target:(struct __CVBuffer { } *)a1; - (void)_setDefaultParameters; - (void)_setupPipelines; - (int)_doSolverWithCommandBuffer:(id)a0 scale:(int)a1 in_uv_tex:(id)a2 in_G0_tex:(id)a3 in_G1_tex:(id)a4 in_C0_tex:(id)a5 in_C1_tex:(id)a6 out_uv_tex:(id)a7 out_w_tex:(id)a8; - (int)_downscale2XWithCommandBuffer:(id)a0 in_tex:(id)a1 out_tex:(id)a2; - (int)_enqueueFlowConsistencyWithCommandBuffer:(id)a0 in_uv0_tex:(id)a1 in_uv1_tex:(id)a2 out_uv_tex:(id)a3; - (int)_enqueueKeypointsFromFlowWithCommandBuffer:(id)a0 in_uv_fwd_tex:(id)a1 in_uv_bwd_tex:(id)a2 out_kpt_buf:(id)a3 block_size:(int)a4 bidirectional_error:(float)a5 out_num_keypoints:(unsigned short *)a6; - (int)_initMemory:(int)a0 height:(int)a1 nscales:(int)a2; - (id)initWithMetalContext:(id)a0 width:(int)a1 height:(int)a2 nscales:(int)a3; - (void)_computeICPThreadgroupsForDecimation:(unsigned long long)a0 threadsPerThreadgroupForUniform:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a1 threadsPerThreadgroupForPass1:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a2 threadgroupsPerGridForPass1:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a3; - (int)_initMemoryICP:(int)a0; - (int)_setupBufferICP; - (struct { void /* unknown type, empty encoding */ x0[3]; })_parametricTransformToMatrix3x3; - (int)_setupBufferLKT; - (int)_computeActiveThreadgroupsWithCommandBuffer:(id)a0; - (int)_computeFeaturesAndTGSumWithCommandBuffer:(id)a0 in_tex:(id)a1 out_tex:(id)a2; - (int)_computeHomographyWithCommandBuffer:(id)a0 in_tex0:(id)a1 in_tex1:(id)a2 in_tex2:(id)a3 weight_tex:(id)a4 regularizer_term:(float)a5 decimation_factor:(unsigned long long)a6 scale:(unsigned long long)a7 nwarp:(unsigned long long)a8; - (int)_computeICPResiduals:(id)a0 flow:(id)a1; - (void)_computeICPThreadgroupsForActivation:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a0; - (void)_computeICPThreadgroupsWithSize:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; })a0 computePipeline:(id)a1 threadsPerThreadgroup:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a2 threadgroupsPerGrid:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a3 debug_string:(char *)a4; - (void)_computeICPThreadgroupsWithSize:(struct CGSize { double x0; double x1; })a0 threadsPerThreadgroupForPass1:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a1 threadgroupsPerGridForPass1:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a2 threadsPerThreadgroupForPass2:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a3 threadgroupsPerGridForPass2:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a4 threadsPerThreadgroupForPass3:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a5 threadgroupsPerGridForPass3:(struct { unsigned long long x0; unsigned long long x1; unsigned long long x2; } *)a6; - (int)_computeICPWeights:(id)a0 weights:(id)a1 flow:(id)a2; - (int)_computeOpticalFlowBidirectional; - (void)_copyTransfromFromGPU; - (void)_copyTransfromToGPU; - (int)_createImagePyramidWithCommandBuffer:(id)a0 in_pixelbuf:(struct __CVBuffer { } *)a1 I_idx:(int)a2; - (int)_getICPNWarp:(int)a0 scale:(int)a1; - (int)_initICPWeightsWithCommandBuffer:(id)a0; - (void)_matrix3x3ToParametricTransform:(struct { void /* unknown type, empty encoding */ x0[3]; })a0; - (int)_panoRegistration:(struct { void /* unknown type, empty encoding */ x0[3]; })a0 metadata:(id)a1; - (void)_resampleHomography:(id)a0 to:(id)a1; - (void)_resampleTransform:(id)a0 to:(id)a1; - (int)_resampleTransformWithCommandBuffer:(id)a0 from:(id)a1 to:(id)a2; - (void)_resetLoss; - (void)_setDefaultParametersICP; - (void)_setICPRegularizerTerms:(id)a0; - (void)_setParametricTransformFromGyro:(struct { void /* unknown type, empty encoding */ x0[3]; })a0; - (int)_setupBufferDerivatives; - (int)_setupBufferPyramids; - (int)computeKeypointsFromForwardFlow:(struct __CVBuffer { } *)a0 backwardFlow:(struct __CVBuffer { } *)a1 bidirectionalError:(float)a2 blockSize:(int)a3 outNumKeypoints:(unsigned short *)a4; - (int)estimateFlowStream:(struct __CVBuffer { } *)a0; - (int)estimatePanoRegistration:(struct __CVBuffer { } *)a0 metadata:(id)a1 initTForm:(struct { void /* unknown type, empty encoding */ x0[3]; })a2; - (int)getMaxNumberOfScales; - (struct { void /* unknown type, empty encoding */ x0[3]; })getParametricTransform; - (id)initWithMetalContext:(id)a0 ICPtransform:(long long)a1 width:(int)a2 height:(int)a3 nscales:(int)a4 flowUpperMostScale:(int)a5; - (int)resetCurrentFrameIndex; - (int)setICPWeights:(id)a0; - (int)setOutputUV:(struct __CVBuffer { } *)a0; - (int)setOutputUVForward:(struct __CVBuffer { } *)a0 backward:(struct __CVBuffer { } *)a1; - (void)setPresetICP:(long long)a0 withRegularizerTerms:(id)a1 decimation_factor:(int)a2; @end