<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImage_YpCbCrPixelRange",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@S@vImage_YpCbCrPixelRange"
  },
  "title" : "vImage_YpCbCrPixelRange"
}
-->

# vImage_YpCbCrPixelRange

The description of range and clamping information for YpCbCr pixel formats.

```
struct vImage_YpCbCrPixelRange
```

## Overview

Y’CbCr formats frequently don’t use the entire representable range available to them to represent image data. While a *full range* video format does use the entire range, a *video range* format often leaves the extrema unused, except perhaps to represent values outside of the standard `Y'=[0,1]` `CbCr = [-0.5,0.5]` range. For example, an 8-bit video range format typically uses the range `[16,235]` for Y’ and `[16,240]` for Cb and Cr.

The following code shows examples of typical Y’CbCr pixel ranges:

```swift
// The 8-bit pixel range that's unclamped.
let pixelRange = vImage_YpCbCrPixelRange(Yp_bias: 16,
                                         CbCr_bias: 128,
                                         YpRangeMax: 235,
                                         CbCrRangeMax: 240,
                                         YpMax: 255,
                                         YpMin: 0,
                                         CbCrMax: 255,
                                         CbCrMin: 1)

 // The 8-bit pixel range that's clamped to video range.
let pixelRange = vImage_YpCbCrPixelRange(Yp_bias: 16,
                                         CbCr_bias: 128,
                                         YpRangeMax: 265,
                                         CbCrRangeMax: 240,
                                         YpMax: 235,
                                         YpMin: 16,
                                         CbCrMax: 240,
                                         CbCrMin: 16)
        
// The 8-bit pixel range that's clamped to full range.
let pixelRange = vImage_YpCbCrPixelRange(Yp_bias: 0,
                                         CbCr_bias: 128,
                                         YpRangeMax: 255,
                                         CbCrRangeMax: 255,
                                         YpMax: 255,
                                         YpMin: 1,
                                         CbCrMax: 255,
                                         CbCrMin: 0)
```

The bias is the prebias for YUV to RGB and the postbias for RGB to YUV.

## Topics

### Creating a Pixel Range

[`init(Yp_bias:CbCr_bias:YpRangeMax:CbCrRangeMax:YpMax:YpMin:CbCrMax:CbCrMin:)`](/documentation/Accelerate/vImage_YpCbCrPixelRange/init(Yp_bias:CbCr_bias:YpRangeMax:CbCrRangeMax:YpMax:YpMin:CbCrMax:CbCrMin:))

Returns a structure describing range and clamping information for Y’CbCr pixel formats.

[`init()`](/documentation/Accelerate/vImage_YpCbCrPixelRange/init())

### Pixel Range Properties

[`Yp_bias`](/documentation/Accelerate/vImage_YpCbCrPixelRange/Yp_bias)

The encoding for `Y' = 0.0` for this video format (varies by bit depth).

[`CbCr_bias`](/documentation/Accelerate/vImage_YpCbCrPixelRange/CbCr_bias)

The encoding for `{Cb, Cr} = 0.0` for this video format.

[`YpRangeMax`](/documentation/Accelerate/vImage_YpCbCrPixelRange/YpRangeMax)

The encoding for `Y' = 1.0` for this video format.

[`CbCrRangeMax`](/documentation/Accelerate/vImage_YpCbCrPixelRange/CbCrRangeMax)

The encoding for `{Cb, Cr} = 0.5` for this video format.

[`YpMax`](/documentation/Accelerate/vImage_YpCbCrPixelRange/YpMax)

The encoding for the maximum allowed Y’ value.

[`YpMin`](/documentation/Accelerate/vImage_YpCbCrPixelRange/YpMin)

The encoding of the minimum allowed Y’ value.

[`CbCrMax`](/documentation/Accelerate/vImage_YpCbCrPixelRange/CbCrMax)

The encoding of the maximum allowed `{Cb, Cr}` value.

[`CbCrMin`](/documentation/Accelerate/vImage_YpCbCrPixelRange/CbCrMin)

The encoding of the minimum allowed `{Cb, Cr}` value.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)