MCPcopy Create free account
hub / github.com/RustCV/RustCV / new

Method new

rustcv-core/src/pixel_format.rs:10–12  ·  view source on GitHub ↗

从 ASCII 字符创建 FourCC

(a: u8, b: u8, c: u8, d: u8)

Source from the content-addressed store, hash-verified

8impl FourCC {
9 /// 从 ASCII 字符创建 FourCC
10 pub const fn new(a: u8, b: u8, c: u8, d: u8) -> Self {
11 Self((a as u32) | ((b as u32) << 8) | ((c as u32) << 16) | ((d as u32) << 24))
12 }
13
14 // 获取人类可读的字符串表示 (例如 "YUYV")
15 // pub fn to_string(&self) -> String {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected