MCPcopy Create free account
hub / github.com/Recordscript/recordscript / data

Method data

libs/scrap/src/common/mod.rs:470–482  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

468 }
469 }
470 fn data(&self) -> (&[u8], &[u8], &[u8]) {
471 unsafe {
472 let stride = self.stride();
473 let planes = self.planes();
474 let h = (self.height() as usize + 1) & !1;
475 let n = stride[0] as usize * h;
476 let y = slice::from_raw_parts(planes[0], n);
477 let n = stride[1] as usize * (h >> 1);
478 let u = slice::from_raw_parts(planes[1], n);
479 let v = slice::from_raw_parts(planes[2], n);
480 (y, u, v)
481 }
482 }
483}

Callers 1

validMethod · 0.45

Implementers 2

vpxcodec.rslibs/scrap/src/common/vpxcodec.rs
aom.rslibs/scrap/src/common/aom.rs

Calls 3

strideMethod · 0.45
planesMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected