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

Method get_src_ptr

rustcv-backend-msmf/src/stream.rs:395–407  ·  view source on GitHub ↗
(
        &self,
        scanline0: *mut u8,
        pitch: i32,
        src_pitch: usize,
        total_height: usize,
    )

Source from the content-addressed store, hash-verified

393 /// Gets the source pointer, handling negative pitch (bottom-up images).
394 #[inline]
395 unsafe fn get_src_ptr(
396 &self,
397 scanline0: *mut u8,
398 pitch: i32,
399 src_pitch: usize,
400 total_height: usize,
401 ) -> *const u8 {
402 if pitch < 0 {
403 scanline0.sub((total_height - 1) * src_pitch)
404 } else {
405 scanline0
406 }
407 }
408
409 /// Copies a single row from source to destination.
410 #[inline]

Callers 2

copy_planar_dataMethod · 0.80
copy_packed_dataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected