X-Git-Url: https://git.nihav.org/?p=nihav.git;a=blobdiff_plain;f=nihav-realmedia%2Fsrc%2Fcodecs%2Frv3040.rs;h=bbaabdf87b738c12fe444b79067176e2b4269090;hp=762d05459b3b11172f9f89b3c2aa321d8ac1086a;hb=6f2630992fe340ad1a122ec10c649f756e478185;hpb=f44bddc9b5520507c7571b89763de668238d790a diff --git a/nihav-realmedia/src/codecs/rv3040.rs b/nihav-realmedia/src/codecs/rv3040.rs index 762d054..bbaabdf 100644 --- a/nihav-realmedia/src/codecs/rv3040.rs +++ b/nihav-realmedia/src/codecs/rv3040.rs @@ -91,18 +91,13 @@ impl MBType { } } pub fn is_fwd(self) -> bool { - match self { + matches!(self, MBType::MBP16x16 | MBType::MBP16x16Mix | MBType::MBP16x8 | MBType::MBP8x16 | MBType::MBP8x8 | - MBType::MBForward => true, - _ => false, - } + MBType::MBForward) } pub fn is_bwd(self) -> bool { - match self { - MBType::MBBidir | MBType::MBBackward => true, - _ => false, - } + matches!(self, MBType::MBBidir | MBType::MBBackward) } pub fn has_mv_dir(self, fwd: bool) -> bool { match self { @@ -113,10 +108,7 @@ impl MBType { } } pub fn is_nomv(self) -> bool { - match self { - MBType::MBIntra | MBType::MBIntra16 | MBType::MBSkip | MBType::MBDirect => true, - _ => false, - } + matches!(self, MBType::MBIntra | MBType::MBIntra16 | MBType::MBSkip | MBType::MBDirect) } /*pub fn is_16x16(self) -> bool { match self { @@ -1057,7 +1049,7 @@ impl RV34Decoder { } Ok(()) } - fn fill_deblock_flags(&self, sstate: &SState, mb_pos: usize, mbinfo: &mut Vec) { + fn fill_deblock_flags(&self, sstate: &SState, mb_pos: usize, mbinfo: &mut [RV34MBInfo]) { let mbt = mbinfo[mb_pos].mbtype; let mut hmvmask = 0; let mut vmvmask = 0;