pub struct HevcBackendCaps {
pub bit_depths: &'static [u8],
pub chroma_formats: &'static [ChromaFormat],
pub supports_sao: bool,
pub supports_deblock: bool,
pub supports_lossless: bool,
pub supports_alpha: bool,
}Expand description
Declared capabilities of a HevcEncoder backend, used by callers (e.g.
bpg-tools) to validate a request before doing any expensive work
(image loading, color conversion, CTU padding) and to keep CLI help/README
claims honest. A backend must not silently downgrade or ignore an
unsupported request: HevcEncoder::encode_still still returns
EncodeError::Unsupported for anything outside these bounds, but
caps() lets callers fail fast with a clear message.
Fields§
§bit_depths: &'static [u8]Sample bit depths this backend can encode (e.g. &[8, 10, 12]).
chroma_formats: &'static [ChromaFormat]Chroma subsampling formats this backend can encode.
supports_sao: boolWhether the backend can apply Sample Adaptive Offset for extra RD gain (the decoder can always decode SAO; this is about the encoder choosing to use it).
supports_deblock: boolWhether the backend can apply in-loop deblocking for extra RD gain.
supports_lossless: boolWhether the backend can produce a lossless (transquant-bypass) bitstream.
supports_alpha: boolWhether the backend can encode an alpha plane.
Implementations§
Source§impl HevcBackendCaps
impl HevcBackendCaps
Sourcepub fn supports_bit_depth(&self, bit_depth: u8) -> bool
pub fn supports_bit_depth(&self, bit_depth: u8) -> bool
Whether bit_depth is one of Self::bit_depths.
Sourcepub fn supports_chroma_format(&self, chroma_format: ChromaFormat) -> bool
pub fn supports_chroma_format(&self, chroma_format: ChromaFormat) -> bool
Whether chroma_format is one of Self::chroma_formats.