Skip to main content

decode

Function decode 

Source
pub fn decode(
    src: &[u8],
    profile: &Profile,
    canceled: &AtomicBool,
) -> Result<DecodedImage, DecodeError>
Expand description

Decode a CLCL (separate Cb/Cr nibble-plane) frame to BGRA8 output.

§Arguments

  • src — Raw pixel data: w × h Y bytes, then w × h / 2 packed-Cb bytes, then w × h / 2 packed-Cr bytes.
  • profile — The profile describing this frame’s dimensions.

§Returns

Ok(DecodedImage) on success, or a DecodeError on failure.

§Errors

§Panics

Never panics.