DynamicRangeProfiles


public final class DynamicRangeProfiles
extends Object

java.lang.Object
   ↳ android.hardware.camera2.params.DynamicRangeProfiles


Immutable class with information about supported 10-bit dynamic range profiles.

An instance of this class can be queried by retrieving the value of CameraCharacteristics.REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES.

All camera devices supporting the CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT capability must advertise the supported 10-bit dynamic range profiles in getSupportedProfiles()

Some devices may not be able to support 8-bit and/or 10-bit output with different dynamic range profiles within the same capture request. Such device specific constraints can be queried by calling getProfileCaptureRequestConstraints(long). Do note that unsupported combinations will result in IllegalArgumentException when trying to submit a capture request. Capture requests that only reference outputs configured using the same dynamic range profile value will never fail due to such constraints.

Summary

Constants

long DOLBY_VISION_10B_HDR_OEM

This is the camera mode for the default Dolby Vision capture mode for the specific device.

long DOLBY_VISION_10B_HDR_OEM_PO

This is the power optimized mode for 10-bit Dolby Vision HDR device specific capture Mode.

long DOLBY_VISION_10B_HDR_REF

This is a camera mode for Dolby Vision capture optimized for a more scene accurate capture.

long DOLBY_VISION_10B_HDR_REF_PO

This is the power optimized mode for 10-bit Dolby Vision HDR Reference Mode.

long DOLBY_VISION_8B_HDR_OEM

This is the 8-bit version of device specific tuned and optimized Dolby Vision capture mode.

long DOLBY_VISION_8B_HDR_OEM_PO

This is the power optimized mode for 8-bit Dolby Vision HDR device specific capture Mode.

long DOLBY_VISION_8B_HDR_REF

This is the 8-bit version of the Dolby Vision reference capture mode optimized for scene accuracy.

long DOLBY_VISION_8B_HDR_REF_PO

This is the power optimized mode for 8-bit Dolby Vision HDR Reference Mode.

long HDR10

10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.

long HDR10_PLUS

10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.

long HLG10

10-bit pixel samples encoded using the Hybrid log-gamma transfer function

All 10-bit output capable devices are required to support this profile.

long PUBLIC_MAX

long STANDARD

This the default 8-bit standard profile that will be used in case where camera clients do not explicitly configure a supported dynamic range profile by calling OutputConfiguration#setDynamicRangeProfile.

Public constructors

DynamicRangeProfiles(long[] elements)

Create a new immutable DynamicRangeProfiles instance.

Public methods

Set<Long> getProfileCaptureRequestConstraints(long profile)

Return a list of supported dynamic range profiles that can be referenced in a single capture request along with a given profile.

Set<Long> getSupportedProfiles()

Return a set of supported dynamic range profiles.

boolean isExtraLatencyPresent(long profile)

Check whether a given dynamic range profile is suitable for latency sensitive use cases.

Inherited methods

Constants

DOLBY_VISION_10B_HDR_OEM

Added in API level 33
public static final long DOLBY_VISION_10B_HDR_OEM

This is the camera mode for the default Dolby Vision capture mode for the specific device. This would be tuned by each specific device for consumer pleasing results that resonate with their particular audience. We expect that each specific device would have a different look for their default Dolby Vision capture.

Constant Value: 64 (0x0000000000000040)

DOLBY_VISION_10B_HDR_OEM_PO

Added in API level 33
public static final long DOLBY_VISION_10B_HDR_OEM_PO

This is the power optimized mode for 10-bit Dolby Vision HDR device specific capture Mode.

Constant Value: 128 (0x0000000000000080)

DOLBY_VISION_10B_HDR_REF

Added in API level 33
public static final long DOLBY_VISION_10B_HDR_REF

This is a camera mode for Dolby Vision capture optimized for a more scene accurate capture. This would typically differ from what a specific device might want to tune for a consumer optimized Dolby Vision general capture.

Constant Value: 16 (0x0000000000000010)

DOLBY_VISION_10B_HDR_REF_PO

Added in API level 33
public static final long DOLBY_VISION_10B_HDR_REF_PO

This is the power optimized mode for 10-bit Dolby Vision HDR Reference Mode.

Constant Value: 32 (0x0000000000000020)

DOLBY_VISION_8B_HDR_OEM

Added in API level 33
public static final long DOLBY_VISION_8B_HDR_OEM

This is the 8-bit version of device specific tuned and optimized Dolby Vision capture mode.

Constant Value: 1024 (0x0000000000000400)

DOLBY_VISION_8B_HDR_OEM_PO

Added in API level 33
public static final long DOLBY_VISION_8B_HDR_OEM_PO

This is the power optimized mode for 8-bit Dolby Vision HDR device specific capture Mode.

Constant Value: 2048 (0x0000000000000800)

DOLBY_VISION_8B_HDR_REF

Added in API level 33
public static final long DOLBY_VISION_8B_HDR_REF

This is the 8-bit version of the Dolby Vision reference capture mode optimized for scene accuracy.

Constant Value: 256 (0x0000000000000100)

DOLBY_VISION_8B_HDR_REF_PO

Added in API level 33
public static final long DOLBY_VISION_8B_HDR_REF_PO

This is the power optimized mode for 8-bit Dolby Vision HDR Reference Mode.

Constant Value: 512 (0x0000000000000200)

HDR10

Added in API level 33
public static final long HDR10

10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.

This profile utilizes internal static metadata to increase the quality of the capture.

Constant Value: 4 (0x0000000000000004)

HDR10_PLUS

Added in API level 33
public static final long HDR10_PLUS

10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.

In contrast to HDR10, this profile uses internal per-frame metadata to further enhance the quality of the capture.

Constant Value: 8 (0x0000000000000008)

HLG10

Added in API level 33
public static final long HLG10

10-bit pixel samples encoded using the Hybrid log-gamma transfer function

All 10-bit output capable devices are required to support this profile.

Constant Value: 2 (0x0000000000000002)

PUBLIC_MAX

Added in API level 33
public static final long PUBLIC_MAX

Constant Value: 4096 (0x0000000000001000)

STANDARD

Added in API level 33
public static final long STANDARD

This the default 8-bit standard profile that will be used in case where camera clients do not explicitly configure a supported dynamic range profile by calling OutputConfiguration#setDynamicRangeProfile.

Constant Value: 1 (0x0000000000000001)

Public constructors

DynamicRangeProfiles

Added in API level 33
public DynamicRangeProfiles (long[] elements)

Create a new immutable DynamicRangeProfiles instance.

This constructor takes over the array; do not write to the array afterwards.

Do note that the constructor is available for testing purposes only! Camera clients must always retrieve the value of CameraCharacteristics.REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES. for a given camera id in order to retrieve the device capabilities.

Parameters
elements long: An array of elements describing the map. It contains three elements per entry. The first element describes the supported dynamic range profile value. The second element contains a bitmap of concurrently supported dynamic range profiles within the same capture request. The third element contains a hint about extra latency associated with the corresponding dynamic range. Bitmap values of 0 indicate that there are no constraints. This value cannot be null.

Throws
IllegalArgumentException if the elements array length is invalid, not divisible by 3 or contains invalid element values
NullPointerException if elements is null

Public methods

getProfileCaptureRequestConstraints

Added in API level 33
public Set<Long> getProfileCaptureRequestConstraints (long profile)

Return a list of supported dynamic range profiles that can be referenced in a single capture request along with a given profile.

For example if assume that a particular 10-bit output capable device returns (STANDARD, HLG10, HDR10) as result from calling getSupportedProfiles() and getProfileCaptureRequestConstraints(long) returns (STANDARD, HLG10) when given an argument of STANDARD. This means that the corresponding camera device will only accept and process capture requests that reference outputs configured using HDR10 dynamic profile or alternatively some combination of STANDARD and HLG10. However trying to queue capture requests to outputs that reference both HDR10 and STANDARD/HLG10 will result in IllegalArgumentException.

The list will be empty in case there are no constraints for the given profile.

Parameters
profile long: Value is STANDARD, HLG10, HDR10, HDR10_PLUS, DOLBY_VISION_10B_HDR_REF, DOLBY_VISION_10B_HDR_REF_PO, DOLBY_VISION_10B_HDR_OEM, DOLBY_VISION_10B_HDR_OEM_PO, DOLBY_VISION_8B_HDR_REF, DOLBY_VISION_8B_HDR_REF_PO, DOLBY_VISION_8B_HDR_OEM, or DOLBY_VISION_8B_HDR_OEM_PO

Returns
Set<Long> non-modifiable set of dynamic range profiles This value cannot be null.

Throws
IllegalArgumentException If the profile argument is not within the list returned by getSupportedProfiles()

getSupportedProfiles

Added in API level 33
public Set<Long> getSupportedProfiles ()

Return a set of supported dynamic range profiles.

Returns
Set<Long> non-modifiable set of dynamic range profiles This value cannot be null.

isExtraLatencyPresent

Added in API level 33
public boolean isExtraLatencyPresent (long profile)

Check whether a given dynamic range profile is suitable for latency sensitive use cases.

Due to internal lookahead logic, camera outputs configured with some dynamic range profiles may experience additional latency greater than 3 buffers. Using camera outputs with such profiles for latency sensitive use cases such as camera preview is not recommended. Profiles that have such extra streaming delay are typically utilized for scenarios such as offscreen video recording.

Parameters
profile long: Value is STANDARD, HLG10, HDR10, HDR10_PLUS, DOLBY_VISION_10B_HDR_REF, DOLBY_VISION_10B_HDR_REF_PO, DOLBY_VISION_10B_HDR_OEM, DOLBY_VISION_10B_HDR_OEM_PO, DOLBY_VISION_8B_HDR_REF, DOLBY_VISION_8B_HDR_REF_PO, DOLBY_VISION_8B_HDR_OEM, or DOLBY_VISION_8B_HDR_OEM_PO

Returns
boolean true if the given profile is not suitable for latency sensitive use cases, false otherwise

Throws
IllegalArgumentException If the profile argument is not within the list returned by getSupportedProfiles()