Skip to main content

Module sample

Module sample 

Source
Expand description

Full re-export of zenpixels core types (zero module name collisions!). Integer sample interpretation, exact code-depth evidence, and native code planes.

Storage width, code depth, and bit placement are independent: an unshifted 10-bit code in a u16 sample is not a normalized 16-bit value.

  • SampleEncoding describes the integer storage type, significant bit depth, and low-bit shift of one coded component without implying range or color meaning.
  • ExactDepth carries proven evidence that the current samples of a canonical U8/U16 image survive re-quantization to a lower depth under either the full-range (divisibility-nesting) or narrow-range (power-of-two) canonical mapping, tracking color and alpha depths independently.
  • CodePlane reads unpacked integer codes from borrowed native codec planes (u8 or u16, planar or interleaved) without copying or allocating.
  • ChromaSiting and ChromaSubsampling describe declared chroma sample locations and subsampling ratios without silently assuming defaults.

Structs§

CodePlane
Integer codes of one component in a borrowed plane, without normalization or color claims.
CodePlaneMut
Mutable view of one integer component in a borrowed plane, without normalization or color claims.
ExactDepth
Proven exact code depth of the current samples of a canonical U8/U16 image.
InterleavedCodeLayout
Geometry and component selection for borrowing one component from an interleaved code plane.
SampleEncoding
Checked interpretation of one integer code in a stored sample.

Enums§

ChromaSiting
Declared chroma sample location relative to the luma sample grid.
ChromaSubsampling
Chroma resolution relative to the complete luma plane.
CodePlaneError
Codes cannot be read from a plane as requested.
ExactDepthError
An exact-depth statement is impossible for its storage, range, or layout.
SampleEncodingError
An integer sample description cannot fit its declared storage.

Functions§

full_range_grid_nests
Whether the full-range src_bits integer code grid embeds exact inside the dst_bits full-range grid (2^src_bits - 1 divides 2^dst_bits - 1, iff src_bits divides dst_bits).
narrow_range_grid_nests
Whether the narrow-range src_bits integer code grid embeds exact inside the dst_bits narrow-range grid (power-of-two scaling requires src_bits >= 8 and dst_bits >= src_bits).