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

Function clip

rustcv-backend-v4l2/examples/camera_view.rs:202–210  ·  view source on GitHub ↗
(val: i32)

Source from the content-addressed store, hash-verified

200#[cfg(target_os = "linux")]
201#[inline]
202fn clip(val: i32) -> u32 {
203 if val < 0 {
204 0
205 } else if val > 255 {
206 255
207 } else {
208 val as u32
209 }
210}
211
212#[cfg(target_os = "linux")]
213fn dump_capabilities(dev_path: &str) -> anyhow::Result<()> {

Callers 1

yuyv_to_rgb32Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected