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

Method use_i444

libs/scrap/src/common/codec.rs:397–414  ·  view source on GitHub ↗
(config: &EncoderCfg)

Source from the content-addressed store, hash-verified

395 }
396
397 pub fn use_i444(config: &EncoderCfg) -> bool {
398 let decodings = PEER_DECODINGS.lock().unwrap().clone();
399 let prefer_i444 = decodings
400 .iter()
401 .all(|d| d.1.prefer_chroma == Chroma::I444.into());
402 let i444_useable = match config {
403 EncoderCfg::VPX(vpx) => match vpx.codec {
404 VpxVideoCodecId::VP8 => false,
405 VpxVideoCodecId::VP9 => decodings.iter().all(|d| d.1.i444.vp9),
406 },
407 EncoderCfg::AOM(_) => decodings.iter().all(|d| d.1.i444.av1),
408 #[cfg(feature = "hwcodec")]
409 EncoderCfg::HWRAM(_) => false,
410 #[cfg(feature = "vram")]
411 EncoderCfg::VRAM(_) => false,
412 };
413 prefer_i444 && i444_useable && !decodings.is_empty()
414 }
415}
416
417impl Decoder {

Callers

nothing calls this directly

Calls 4

iterMethod · 0.80
is_emptyMethod · 0.80
cloneMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected