# HevcConfig

Artifact: [androidx.media3:media3-extractor](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/extractor/HevcConfig.java+class:androidx.media3.extractor.HevcConfig)

*** ** * ** ***


```
@UnstableApi
public final class HevcConfig
```

<br />

*** ** * ** ***

HEVC configuration data.

## Summary

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#bitdepthChroma()` The bit depth of the chroma samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#bitdepthLuma()` The bit depth of the luma samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#codecs()` An RFC 6381 codecs string representing the video format, or `null` if not known. |
| `final @https://developer.android.com/reference/androidx/media3/common/C.ColorRange int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#colorRange()` The `https://developer.android.com/reference/androidx/media3/common/C.ColorRange` of the video or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.ColorSpace https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#colorSpace()` The `https://developer.android.com/reference/androidx/media3/common/C.ColorSpace` of the video or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.ColorTransfer https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#colorTransfer()` The `https://developer.android.com/reference/androidx/media3/common/C.ColorTransfer` of the video or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#decodedHeight()` The height of each decoded picture, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#decodedWidth()` The width of each decoded picture, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#height()` The height of each cropped decoded picture, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `final https://developer.android.com/reference/java/util/List.html<byte[]>` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#initializationData()` List of buffers containing the codec-specific data to be provided to the decoder. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#maxNumReorderPics()` The `sps_max_num_reorder_pics` value. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#maxSubLayers()` The `sps_max_sub_layers_minus1 + 1` value: the number of temporal sub-layers. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#nalUnitLengthFieldLength()` The length of the NAL unit length field in the bitstream's container, in bytes. |
| `final float` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#pixelWidthHeightRatio()` The pixel width to height ratio. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.StereoMode https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#stereoMode()` The `https://developer.android.com/reference/androidx/media3/common/C.StereoMode` of the video or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/container/NalUnitUtil.H265VpsData` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#vpsData()` The parsed representation of VPS data or `null` if not available. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#width()` The width of each cropped decoded picture, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/media3/extractor/HevcConfig` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#parse(androidx.media3.common.util.ParsableByteArray)(https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray data)` Parses HEVC configuration data. |
| `static https://developer.android.com/reference/androidx/media3/extractor/HevcConfig` | `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig#parseLayered(androidx.media3.common.util.ParsableByteArray,androidx.media3.container.NalUnitUtil.H265VpsData)(https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray data, https://developer.android.com/reference/androidx/media3/container/NalUnitUtil.H265VpsData vpsData)` Parses L-HEVC configuration data. |

## Public fields

### bitdepthChroma

```
public final int bitdepthChroma
```

The bit depth of the chroma samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

### bitdepthLuma

```
public final int bitdepthLuma
```

The bit depth of the luma samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

### codecs

```
public final @Nullable String codecs
```

An RFC 6381 codecs string representing the video format, or `null` if not known.

See `https://developer.android.com/reference/androidx/media3/common/Format#codecs()`.

### colorRange

```
public final @C.ColorRange int colorRange
```

The `https://developer.android.com/reference/androidx/media3/common/C.ColorRange` of the video or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### colorSpace

```
@C.ColorSpace
public final int colorSpace
```

The `https://developer.android.com/reference/androidx/media3/common/C.ColorSpace` of the video or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### colorTransfer

```
@C.ColorTransfer
public final int colorTransfer
```

The `https://developer.android.com/reference/androidx/media3/common/C.ColorTransfer` of the video or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### decodedHeight

```
public final int decodedHeight
```

The height of each decoded picture, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

### decodedWidth

```
public final int decodedWidth
```

The width of each decoded picture, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

### height

```
public final int height
```

The height of each cropped decoded picture, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

### initializationData

```
public final List<byte[]> initializationData
```

List of buffers containing the codec-specific data to be provided to the decoder.

See `https://developer.android.com/reference/androidx/media3/common/Format#initializationData()`.

### maxNumReorderPics

```
public final int maxNumReorderPics
```

The `sps_max_num_reorder_pics` value.

If a different value is present for each layer (due to `
sps_sub_layer_ordering_info_present_flag`), this value is the max of the values for all the layers.

### maxSubLayers

```
public final int maxSubLayers
```

The `sps_max_sub_layers_minus1 + 1` value: the number of temporal sub-layers.

### nalUnitLengthFieldLength

```
public final int nalUnitLengthFieldLength
```

The length of the NAL unit length field in the bitstream's container, in bytes.

### pixelWidthHeightRatio

```
public final float pixelWidthHeightRatio
```

The pixel width to height ratio.

### stereoMode

```
@C.StereoMode
public final int stereoMode
```

The `https://developer.android.com/reference/androidx/media3/common/C.StereoMode` of the video or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### vpsData

```
public final @Nullable NalUnitUtil.H265VpsData vpsData
```

The parsed representation of VPS data or `null` if not available.

### width

```
public final int width
```

The width of each cropped decoded picture, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

## Public methods

### parse

```
public static HevcConfig parse(ParsableByteArray data)
```

Parses HEVC configuration data.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray data` | A `https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray`, whose position is set to the start of the HEVC configuration data to parse. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig` | A parsed representation of the HEVC configuration data. |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/ParserException` | If an error occurred parsing the data. |

### parseLayered

```
public static HevcConfig parseLayered(ParsableByteArray data, NalUnitUtil.H265VpsData vpsData)
```

Parses L-HEVC configuration data.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray data` | A `https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray`, whose position is set to the start of the L-HEVC configuration data to parse. |
| `https://developer.android.com/reference/androidx/media3/container/NalUnitUtil.H265VpsData vpsData` | A parsed representation of VPS data. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/extractor/HevcConfig` | A parsed representation of the L-HEVC configuration data. |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/ParserException` | If an error occurred parsing the data. |