Contents

init(sourceFrame:previousFrame:previousOutputFrame:opticalFlow:submissionMode:destinationFrame:)

Creates a new super-resolution scaler parameters instance.

Declaration

init?(sourceFrame: VTFrameProcessorFrame, previousFrame: VTFrameProcessorFrame?, previousOutputFrame: VTFrameProcessorFrame?, opticalFlow: VTFrameProcessorOpticalFlow?, submissionMode: VTSuperResolutionScalerParameters.SubmissionMode, destinationFrame: VTFrameProcessorFrame)

Parameters

  • sourceFrame:

    Current source frame; must be non nil.

  • previousFrame:

    The previous source frame in presentation time order. For the first frame you can set this to nil.

  • previousOutputFrame:

    The previous output frame in presentation time order. For the first frame you can set this to nil.

  • opticalFlow:

    Optional VTFrameProcessorOpticalFlow object that contains forward and backward optical flow between the sourceFrame and previousFrame. You only need this if optical flow is pre-computed.

  • submissionMode:

    Provides a hint to let the processor know whether you are submitting frames in presentation sequence. For more information about supported modes see Submissionmode Swift.enum.

  • destinationFrame:

    User-allocated pixel buffer that receives the results.

Discussion

Returns nil if sourceFrame or destinationFrame is nil, or if sourceFrame and reference frames have different pixel formats.