Skip to main content

DEFAULT_MAX_PIXELS

Constant DEFAULT_MAX_PIXELS 

Source
pub const DEFAULT_MAX_PIXELS: u64 = _; // 268_435_456u64
Expand description

Default ceiling on a decoded frame’s pixel count — 256 mebipixels.

Why this number. The largest picture anything ships is 8K UHD (7680×4320 ≈ 33 Mpx); 16K×16K, which nothing does, is 268 Mpx. This default sits exactly there: every real frame passes, and the hand-written header claiming 100000×100000 (10 Gpx) is refused before a byte is allocated — by libavcodec first, since the same number is written to AVCodecContext.max_pixels, and by this crate second.

FFmpeg’s own default for that option is INT_MAX, i.e. no ceiling worth the name. Overriding it is the point.