#[non_exhaustive]pub enum DecodeError {
FrameHeader(FrameHeaderError),
CodedHeader(CodedHeaderError),
Macroblock(MacroblockError),
MbCoeffs {
index: usize,
source: MbCoeffError,
},
Frame(FrameError),
Unsupported(&'static str),
TruncatedFirstPartition {
available: usize,
declared: usize,
},
TruncatedPartitionSizes,
TruncatedDctPartition {
index: usize,
available: usize,
declared: usize,
},
ZeroDimension,
FrameTooLarge {
pixels: u64,
cap: u64,
},
}Expand description
Errors surfaced by decode_vp8.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FrameHeader(FrameHeaderError)
The §9.1 uncompressed header could not be parsed.
CodedHeader(CodedHeaderError)
The §19.2 boolean-coded frame header could not be parsed.
Macroblock(MacroblockError)
The §11 / §19.3 macroblock prediction layer could not be parsed.
MbCoeffs
The §13 residual-coefficient layer could not be parsed.
Fields
source: MbCoeffErrorThe underlying token-decode error.
Frame(FrameError)
The §14.2 per-MB reconstruction step rejected its inputs.
Unsupported(&'static str)
The frame is not a key frame — interframes are not yet supported. VP8 P-frames need §16 motion-vector decoding, §16.2 mv_ref tree resolution, and the reference-frame compositor (none of which are landed yet). Callers that receive this on a P-frame should treat the stream as un-decodable past the last key frame.
TruncatedFirstPartition
The first partition declared in the frame tag extends past the end of the supplied input bytes (truncated packet).
Fields
TruncatedPartitionSizes
One of the 3-byte DCT-partition size prefixes could not be read (truncated packet).
TruncatedDctPartition
A declared DCT partition extends past the end of the supplied input bytes (truncated packet).
Fields
ZeroDimension
width or height from the §9.1 key-frame size words was zero —
a valid VP8 key frame describes at least one pixel.
FrameTooLarge
The §9.1 key-frame width × height product exceeds the caller’s
configured pixel cap. Raised before any plane / macroblock-grid
allocation so a tiny header declaring an enormous frame is rejected
without the decoder ever attempting the allocation. pixels is the
declared product (width as u64 * height as u64), cap the
configured maximum.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()