11#ifndef PACS_ENCODING_COMPRESSION_HEVC_CODEC_HPP
12#define PACS_ENCODING_COMPRESSION_HEVC_CODEC_HPP
49 "1.2.840.10008.1.2.4.107";
53 "1.2.840.10008.1.2.4.108";
80 [[nodiscard]] std::string_view
name() const noexcept override;
81 [[nodiscard]]
bool is_lossy() const noexcept override;
100 [[nodiscard]]
int quality() const noexcept;
108 std::span<const uint8_t> pixel_data,
113 std::span<const uint8_t> compressed_data,
Abstract base class for image compression codecs.
HEVC/H.265 codec implementation for video-encoded multi-frame DICOM.
std::string_view transfer_syntax_uid() const noexcept override
Returns the Transfer Syntax UID supported by this codec.
static constexpr std::string_view kTransferSyntaxUIDMain10
DICOM Transfer Syntax UID for HEVC/H.265 Main 10 Profile / Level 5.1.
hevc_codec(bool main10=false, int quality=kDefaultQuality)
Constructs an HEVC codec instance.
hevc_codec(const hevc_codec &)=delete
bool is_lossy() const noexcept override
Checks if this codec produces lossy compression.
int quality() const noexcept
Gets the current quality setting (CRF).
hevc_codec(hevc_codec &&) noexcept
std::string_view name() const noexcept override
Returns a human-readable name for the codec.
hevc_codec & operator=(const hevc_codec &)=delete
bool is_main10_profile() const noexcept
Checks if this codec is configured for Main 10 Profile.
bool can_decode(const image_params ¶ms) const noexcept override
Checks if this codec can decode data with given parameters.
bool can_encode(const image_params ¶ms) const noexcept override
Checks if this codec supports the given image parameters.
static constexpr std::string_view kTransferSyntaxUIDMain
DICOM Transfer Syntax UID for HEVC/H.265 Main Profile / Level 5.1.
codec_result decode(std::span< const uint8_t > compressed_data, const image_params ¶ms) const override
Decompresses compressed pixel data.
codec_result encode(std::span< const uint8_t > pixel_data, const image_params ¶ms, const compression_options &options={}) const override
Compresses uncompressed pixel data.
static constexpr int kDefaultQuality
Default quality for lossy encoding (CRF value, 0-51, lower = better)
Compression quality settings for lossy codecs.
Parameters describing image pixel data.