\brief This function parses the bitstream that is registered with the decoder context and makes
image information available to the client via uhdr_dec_get_() functions. It does not decompress
the image. That is done by uhdr_decode().
\brief Add compressed image descriptor to decoder context. The function goes through all the
fields of the image descriptor and checks for their sanity. If no anomalies are seen then the
image is added to internal list. Repeated calls to this function will replace the old entry with
the current.
\brief Set output image color transfer characteristics. It should be noted that not all
combinations of output color format and output transfer function are supported. #UHDR_CT_SRGB
output color transfer shall be paired with #UHDR_IMG_FMT_32bppRGBA8888 only. #UHDR_CT_HLG,
#UHDR_CT_PQ shall be paired with #UHDR_IMG_FMT_32bppRGBA1010102. #UHDR_CT_LINEAR shall be paired
with #UHDR_IMG_FMT_64bppRGBAHalfFloat.
\brief Set output display’s HDR capacity. Value MUST be in linear scale. This value determines
the weight by which the gain map coefficients are scaled. If no value is configured, no weight is
applied to gainmap image.
\brief Decode process call
After initializing the decoder context, call to this function will submit data for decoding. If
the call is successful, the decoded output is stored internally and is accessible via
uhdr_get_decoded_image().
\brief Enable/Disable GPU acceleration.
If enabled, certain operations (if possible) of uhdr encode/decode will be offloaded to GPU.
NOTE: It is entirely possible for this API to have no effect on the encode/decode operation
\brief Add compressed image descriptor to encoder context. The function goes through all the
fields of the image descriptor and checks for their sanity. If no anomalies are seen then the
image is added to internal list. Repeated calls to this function will replace the old entry with
the current.
\brief Set Exif data that needs to be inserted in the output compressed stream. This function
does not generate or validate exif data on its own. It merely copies the supplied information
into the bitstream.
\brief Set encoding gamma of gainmap image. For multi-channel gainmap image, set gamma is used
for gamma correction of all planes separately. Default gamma value is 1.0.
\brief Add gain map image descriptor and gainmap metadata info that was used to generate the
aforth gainmap image to encoder context. The function internally goes through all the fields of
the image descriptor and checks for their sanity. If no anomalies are seen then the image is
added to internal list. Repeated calls to this function will replace the old entry with the
current.
\brief Set gain map scaling factor. The encoding process allows signalling a downscaled gainmap
image instead of full resolution. This setting controls the factor by which the renditions are
downscaled. For instance, gainmap_scale_factor = 2 implies gainmap_image_width =
primary_image_width / 2 and gainmap image height = primary_image_height / 2.
Default gain map scaling factor is 1.
NOTE: This has no effect on base image rendition. Base image is signalled in full resolution
always.
\brief Set min max content boost. This configuration is treated as a recommendation by the
library. It is entirely possible for the library to use a different set of values. Value MUST be
in linear scale.
\brief Set output image compression format. Selects the compression format for encoding base
image and gainmap image. Default configuration is #UHDR_CODEC_JPG
\brief Set quality factor for compressing base image and/or gainmap image. Default configured
quality factor of base image and gainmap image are 95 and 95 respectively.
\brief Add raw image descriptor to encoder context. The function goes through all the fields of
the image descriptor and checks for their sanity. If no anomalies are seen then the image is
added to internal list. Repeated calls to this function will replace the old entry with the
current.
\brief Set target display peak brightness in nits. This is used for configuring #hdr_capacity_max
of gainmap metadata. This value determines the weight by which the gain map coefficients are
scaled during decode. If this is not configured, then default peak luminance of HDR intent’s
color transfer under test is used. For #UHDR_CT_HLG, this corresponds to 1000 nits and for
#UHDR_CT_LINEAR and #UHDR_CT_PQ, this corresponds to 10000 nits.
\brief Encode process call
After initializing the encoder context, call to this function will submit data for encoding. If
the call is successful, the encoded output is stored internally and is accessible via
uhdr_get_encoded_stream().