DynamicRangeProfiles
class DynamicRangeProfiles
kotlin.Any | |
↳ | 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 android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES
.
All camera devices supporting the android.hardware.camera2.CameraCharacteristics#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
. 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 | |
---|---|
static Long |
This is the camera mode for the default Dolby Vision capture mode for the specific device. |
static Long |
This is the power optimized mode for 10-bit Dolby Vision HDR device specific capture Mode. |
static Long |
This is a camera mode for Dolby Vision capture optimized for a more scene accurate capture. |
static Long |
This is the power optimized mode for 10-bit Dolby Vision HDR Reference Mode. |
static Long |
This is the 8-bit version of device specific tuned and optimized Dolby Vision capture mode. |
static Long |
This is the power optimized mode for 8-bit Dolby Vision HDR device specific capture Mode. |
static Long |
This is the 8-bit version of the Dolby Vision reference capture mode optimized for scene accuracy. |
static Long |
This is the power optimized mode for 8-bit Dolby Vision HDR Reference Mode. |
static Long |
10-bit pixel samples encoded using the SMPTE ST 2084 transfer function. |
static Long |
10-bit pixel samples encoded using the SMPTE ST 2084 transfer function. |
static Long |
10-bit pixel samples encoded using the Hybrid log-gamma transfer function |
static Long | |
static Long |
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 |
Public constructors | |
---|---|
DynamicRangeProfiles(elements: LongArray) Create a new immutable DynamicRangeProfiles instance. |
Public methods | |
---|---|
MutableSet<Long!> |
getProfileCaptureRequestConstraints(profile: Long) Return a list of supported dynamic range profiles that can be referenced in a single capture request along with a given profile. |
MutableSet<Long!> |
Return a set of supported dynamic range profiles. |
Boolean |
isExtraLatencyPresent(profile: Long) Check whether a given dynamic range profile is suitable for latency sensitive use cases. |
Constants
DOLBY_VISION_10B_HDR_OEM
static val DOLBY_VISION_10B_HDR_OEM: Long
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.
Value: 64L
DOLBY_VISION_10B_HDR_OEM_PO
static val DOLBY_VISION_10B_HDR_OEM_PO: Long
This is the power optimized mode for 10-bit Dolby Vision HDR device specific capture Mode.
Value: 128L
DOLBY_VISION_10B_HDR_REF
static val DOLBY_VISION_10B_HDR_REF: Long
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.
Value: 16L
DOLBY_VISION_10B_HDR_REF_PO
static val DOLBY_VISION_10B_HDR_REF_PO: Long
This is the power optimized mode for 10-bit Dolby Vision HDR Reference Mode.
Value: 32L
DOLBY_VISION_8B_HDR_OEM
static val DOLBY_VISION_8B_HDR_OEM: Long
This is the 8-bit version of device specific tuned and optimized Dolby Vision capture mode.
Value: 1024L
DOLBY_VISION_8B_HDR_OEM_PO
static val DOLBY_VISION_8B_HDR_OEM_PO: Long
This is the power optimized mode for 8-bit Dolby Vision HDR device specific capture Mode.
Value: 2048L
DOLBY_VISION_8B_HDR_REF
static val DOLBY_VISION_8B_HDR_REF: Long
This is the 8-bit version of the Dolby Vision reference capture mode optimized for scene accuracy.
Value: 256L
DOLBY_VISION_8B_HDR_REF_PO
static val DOLBY_VISION_8B_HDR_REF_PO: Long
This is the power optimized mode for 8-bit Dolby Vision HDR Reference Mode.
Value: 512L
HDR10
static val HDR10: Long
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.
Value: 4L
HDR10_PLUS
static val HDR10_PLUS: Long
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.
Value: 8L
HLG10
static val HLG10: Long
10-bit pixel samples encoded using the Hybrid log-gamma transfer function
All 10-bit output capable devices are required to support this profile.
Value: 2L
STANDARD
static val STANDARD: Long
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
.
Value: 1L
Public constructors
DynamicRangeProfiles
DynamicRangeProfiles(elements: LongArray)
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 android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES
. for a given camera id in order to retrieve the device capabilities.
Parameters | |
---|---|
elements |
LongArray: 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 . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
if the elements array length is invalid, not divisible by 3 or contains invalid element values |
java.lang.NullPointerException |
if elements is null |
Public methods
getProfileCaptureRequestConstraints
fun getProfileCaptureRequestConstraints(profile: Long): MutableSet<Long!>
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
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.
Return | |
---|---|
MutableSet<Long!> |
non-modifiable set of dynamic range profiles This value cannot be null . |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
If the profile argument is not within the list returned by getSupportedProfiles() |
getSupportedProfiles
fun getSupportedProfiles(): MutableSet<Long!>
Return a set of supported dynamic range profiles.
Return | |
---|---|
MutableSet<Long!> |
non-modifiable set of dynamic range profiles This value cannot be null . |
isExtraLatencyPresent
fun isExtraLatencyPresent(profile: Long): Boolean
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.
Return | |
---|---|
Boolean |
true if the given profile is not suitable for latency sensitive use cases, false otherwise |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
If the profile argument is not within the list returned by getSupportedProfiles() |