---
title: "init(sourceFrame:previousFrame:previousOutputFrame:opticalFlow:submissionMode:destinationFrame:)"
framework: videotoolbox
role: symbol
role_heading: Initializer
path: "videotoolbox/vtsuperresolutionscalerparameters/init(sourceframe:previousframe:previousoutputframe:opticalflow:submissionmode:destinationframe:)"
---

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

Creates a new super-resolution scaler parameters instance.

## Declaration

```swift
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 doc://com.apple.videotoolbox/documentation/VideoToolbox/VTSuperResolutionScalerParameters/SubmissionMode-swift.enum.
- `destinationFrame`: User-allocated pixel buffer that receives the results.

## Discussion

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