Crate ultrahdr_sys

Crate ultrahdr_sys 

Source

Re-exports§

pub use self::uhdr_img_fmt as uhdr_img_fmt_t;
pub use self::uhdr_color_gamut as uhdr_color_gamut_t;
pub use self::uhdr_color_transfer as uhdr_color_transfer_t;
pub use self::uhdr_color_range as uhdr_color_range_t;
pub use self::uhdr_codec as uhdr_codec_t;
pub use self::uhdr_img_label as uhdr_img_label_t;
pub use self::uhdr_enc_preset as uhdr_enc_preset_t;
pub use self::uhdr_codec_err as uhdr_codec_err_t;
pub use self::uhdr_mirror_direction as uhdr_mirror_direction_t;

Structs§

uhdr_codec_private
uhdr_compressed_image
\brief Compressed Image Descriptor
uhdr_error_info
\brief Detailed return status
uhdr_gainmap_metadata
\brief Gain map metadata.
uhdr_mem_block
\brief Buffer Descriptor
uhdr_raw_image
\brief Raw Image Descriptor

Enums§

uhdr_codec
\brief List of supported codecs
uhdr_codec_err
\brief Algorithm return codes
uhdr_color_gamut
\brief List of supported color gamuts
uhdr_color_range
\brief List of supported color ranges
uhdr_color_transfer
\brief List of supported color transfers
uhdr_enc_preset
\brief uhdr encoder usage parameter
uhdr_img_fmt
\brief List of supported image formats
uhdr_img_label
\brief Image identifiers in gain map technology
uhdr_mirror_direction
\brief List of supported mirror directions.

Constants§

UHDR_LIB_VERSION
UHDR_LIB_VER_MAJOR
UHDR_LIB_VER_MINOR
UHDR_LIB_VER_PATCH
UHDR_PLANE_PACKED
UHDR_PLANE_U
UHDR_PLANE_UV
UHDR_PLANE_V
UHDR_PLANE_Y

Functions§

uhdr_add_effect_crop
\brief Add crop effect
uhdr_add_effect_mirror
\brief Add mirror effect
uhdr_add_effect_resize
\brief Add resize effect
uhdr_add_effect_rotate
\brief Add rotate effect
uhdr_create_decoder
\brief Create a new decoder instance. The instance is initialized with default settings. To override the settings use uhdr_dec_set_*()
uhdr_create_encoder
\brief Create a new encoder instance. The instance is initialized with default settings. To override the settings use uhdr_enc_set_*()
uhdr_dec_get_base_image
\brief Get base image (compressed)
uhdr_dec_get_exif
\brief Get exif information
uhdr_dec_get_gainmap_height
\brief Get gainmap image height
uhdr_dec_get_gainmap_image
\brief Get gain map image (compressed)
uhdr_dec_get_gainmap_metadata
\brief Get gain map metadata
uhdr_dec_get_gainmap_width
\brief Get gainmap image width
uhdr_dec_get_icc
\brief Get icc information
uhdr_dec_get_image_height
\brief Get base image height
uhdr_dec_get_image_width
\brief Get base image width
uhdr_dec_probe
\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().
uhdr_dec_set_image
\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.
uhdr_dec_set_out_color_transfer
\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.
uhdr_dec_set_out_img_format
\brief Set output image color format
uhdr_dec_set_out_max_display_boost
\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.
uhdr_decode
\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().
uhdr_enable_gpu_acceleration
\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
uhdr_enc_set_compressed_image
\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.
uhdr_enc_set_exif_data
\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.
uhdr_enc_set_gainmap_gamma
\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.
uhdr_enc_set_gainmap_image
\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.
uhdr_enc_set_gainmap_scale_factor
\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.
uhdr_enc_set_min_max_content_boost
\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.
uhdr_enc_set_output_format
\brief Set output image compression format. Selects the compression format for encoding base image and gainmap image. Default configuration is #UHDR_CODEC_JPG
uhdr_enc_set_preset
\brief Set encoding preset. Tunes the encoder configurations for performance or quality. Default configuration is #UHDR_USAGE_BEST_QUALITY.
uhdr_enc_set_quality
\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.
uhdr_enc_set_raw_image
\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.
uhdr_enc_set_target_display_peak_brightness
\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.
uhdr_enc_set_using_multi_channel_gainmap
\brief Enable/Disable multi-channel gainmap. By default multi-channel gainmap is enabled.
uhdr_encode
\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().
uhdr_get_decoded_gainmap_image
\brief Get gain map image
uhdr_get_decoded_image
\brief Get final rendition image
uhdr_get_encoded_stream
\brief Get encoded ultra hdr stream
uhdr_release_decoder
\brief Release decoder instance. Frees all allocated storage associated with decoder instance.
uhdr_release_encoder
\brief Release encoder instance. Frees all allocated storage associated with encoder instance.
uhdr_reset_decoder
\brief Reset decoder instance. Clears all previous settings and resets to default state and ready for re-initialization and usage
uhdr_reset_encoder
\brief Reset encoder instance. Clears all previous settings and resets to default state and ready for re-initialization and usage

Type Aliases§

uhdr_codec_private_t
\brief ultrahdr codec context opaque descriptor
uhdr_compressed_image_t
\brief Compressed Image Descriptor
uhdr_error_info_t
\brief Detailed return status
uhdr_gainmap_metadata_t
\brief Gain map metadata.
uhdr_mem_block_t
\brief Buffer Descriptor
uhdr_raw_image_t
\brief Raw Image Descriptor