# High Dynamic Range Recording
The human eye can see more colors and perceive a wide range of luminance than what can be stored or reproduced with the legacy Standard Definition (SDR) color spaces.
High Dynamic Range (HDR) video technology bridges the gap between storage/reproduction of video content and human perception by representing colors and contrast seen in the real world.

HDR videos enhance visual quality with the following technology improvements:
>
>
> - 10-bits to encode luminance and chrominance signals ensure higher fidelity
> - Wide color gamut enhances color perception
> - Non-linear quantization of luminance (OETF/EOTF) enables compression and storage of very high levels of luminance and therefore increasing peak brightness and contrast ratios
> - Per-scene or per-frame metadata further enhances details by adapting the luminance levels to the ambient lighting of the scenes
Capturing video stream with HDR retains rich colors and enhanced luminance ranges: brighter with detailed highlights; darker with detailed shadows.
Starting with Android-13, applications can discover HDR capabilities for Camera and Video on the phone in order to enable HDR recording mode reliably.
To setup an HDR capture pipeline on a device that supports this capability, applications must first check if the Camera can support 10-bit capabilities
by looking up [DYNAMIC_RANGE_TEN_BIT](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT) for the specific camera-id.
The following image shows API changes to the Camera and MediaCodec pipelines setup to capture and encode in HDR mode.
The Preview stream setup is similar for Camera, in that applications must configure HDR mode on the Preview stream as well.
The Display/GPU are required to handle the HDR surface correctly for rendering.

HDR Capture[](https://docs.qualcomm.com/doc/80-56386-10/topic/hdr_recording.html#id2)
For additional details, refer to the [Android Developer Guide on HDR capture](https://developer.android.com/training/camera2/hdr-video-capture).
## Android-13 API changes[](https://docs.qualcomm.com/doc/80-56386-10/topic/hdr_recording.html#android-13-api-changes)
| API | Usage |
| --- | --- |
| COLOR\_FormatYUVP010 | MediaCodec encoders can now advertise support for P010 format (both in surface and bytebuffer modes) |
| DynamicRangeProfiles | This Camera object contains the HDR capability information supported on the device. Apps can use this to check the supported profiles
HLG10 - mandatory profile (the device is expected to support at least this)
HDR10, HDR10\_PLUS - HDR10 standard profiles (optional)
DOLBY\_VISION\_\* - DolbyVision 8 and 10 bit profiles (optional) |
| HEVCProfileMain10HDR10
HEVCProfileMain10HDR10Plus | These profiles existed before Android T only for the decoder.
Android T allows encoders to expose these profiles and Apps will be able to set these profiles |
| OutputConfiguration#setDynamicRangeProfile(long) | Set one of the supported HDR profiles to request a HDR stream from camera |
| | |
- Refer following sample applications:
- - [Setting up the encoder for HDR10 recording](https://github.com/quic/android-on-snapdragon/blob/master/video/sample-apps/app/src/main/java/com/example/VideoSampleApp/Hdr10Encode.java).
- [Setting up the encoder for HDR10+ recording](https://github.com/quic/android-on-snapdragon/blob/master/video/sample-apps/app/src/main/java/com/example/VideoSampleApp/Hdr10PlusEncode.java).
Last Published: Jun 13, 2023
[Previous Topic
Encoder Statistics](https://docs.qualcomm.com/bundle/publicresource/80-56386-10/topics/encoder_statistics.md) [Next Topic
High Dynamic Range Playback](https://docs.qualcomm.com/bundle/publicresource/80-56386-10/topics/hdr_playback.md)