---
title: "init(referencing:planeIndex:overrideSize:pixelFormat:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/vimage/pixelbuffer/init(referencing:planeindex:overridesize:pixelformat:)"
---

# init(referencing:planeIndex:overrideSize:pixelFormat:)

Initializes a pixel buffer by refencing the data from a single plane of a multiplane Core Video pixel buffer.

## Declaration

```swift
init(referencing lockedCVPixelBuffer: CVPixelBuffer, planeIndex: Int, overrideSize: vImage.Size? = nil, pixelFormat: Format.Type = Format.self)
```

## Parameters

- `lockedCVPixelBuffer`: The locked Core Video pixel buffer. Use doc://com.apple.documentation/documentation/CoreVideo/CVPixelBufferLockBaseAddress(_:_:) and doc://com.apple.documentation/documentation/CoreVideo/CVPixelBufferUnlockBaseAddress(_:_:) to lock and unlock the pixel buffer.
- `planeIndex`: The index of the plane that the function references.
- `overrideSize`: An optional size that overrides the size returned by doc://com.apple.documentation/documentation/CoreVideo/CVPixelBufferGetHeightOfPlane(_:_:) and doc://com.apple.documentation/documentation/CoreVideo/CVPixelBufferGetWidthOfPlane(_:_:). Use this parameter if you intend to pass the buffer to the any-to-any converter that requires all buffers to be the same size.
- `pixelFormat`: The pixel format of the initialized buffer.

## See Also

### Creating a pixel buffer from a Core Video buffer

- [init(copying:cvImageFormat:cgImageFormat:pixelFormat:)](accelerate/vimage/pixelbuffer/init(copying:cvimageformat:cgimageformat:pixelformat:).md)
- [init(referencing:converter:destinationPixelFormat:)](accelerate/vimage/pixelbuffer/init(referencing:converter:destinationpixelformat:).md)
