Skip to content
VERASPEC
Repository
VER 1.0 — The Visual Embedding Recordstable

§4 Layer 0 — Canonical Pixel Normalization Pipeline (CPNP-1)

CPNP-1 is asset-level and model-agnostic. Its output is the Canonical Buffer. Producers MUST execute the following steps in order:

  • Decode the Asset with a conformant decoder into RGB or RGBA at full resolution. Undecodable inputs MUST be rejected. Decoding MUST occur in a sandboxed context (§12).
  • Apply EXIF/TIFF Orientation (values 2–8) to the buffer; an absent tag is value 1. The tag is thereby consumed; Layer 1 MUST NOT observe it again.
  • Color-manage: if an ICC profile is embedded, convert to sRGB (IEC 61966-2-1) with relative colorimetric intent and black-point compensation, then discard the profile. If absent, assume sRGB. Implementations SHOULD use a CMM with lcms2-compatible rounding; cross-CMM bit-exactness for ICC-managed inputs is not guaranteed in 1.0 (a pinned reference CMM is tracked for 1.1). Profile-absent sRGB inputs are bit-stable across implementations.
  • HDR: if the container carries an SDR base rendition (gain-map formats such as Ultra HDR), use it and set hdr_present: true. PQ/HLG-only sources are out of scope for CPNP-1.
  • Alpha: if present, composite over opaque white (255, 255, 255) per channel in the encoded (gamma) domain — out = round(src·α + 255·(1−α)), α = A/255 — and set alpha_present: true. Gamma-domain compositing is chosen for determinism and ecosystem consistency, not colorimetric ideality. Alpha is consumed.
  • Quantize to 8 bits per channel, clamp to [0, 255], round half up.
  • The result is the Canonical Buffer: full resolution, top-to-bottom row-major, interleaved sRGB8. No resizing. No cropping. Model-specific resizing belongs to Space preprocessing (§6), never to CPNP.
text
pixel_hash := SHA-256( UTF-8("VER1:" + width + ":" + height + ":sRGB8:") + raw_bytes )

Rationale. Normalization is asset-level and model-agnostic; preprocessing is space-level and model-specific. Conflating the two is the industry default and is precisely why “the same model” disagrees across libraries — bicubic vs. Lanczos, antialias flags, BGR/RGB order. CPNP draws the line where it belongs. The width/height header in the hash preimage prevents dimension-confusion collisions between buffers of identical byte length.