X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-itu%2Fsrc%2Fcodecs%2Fh264%2Fsets.rs;h=61cf0a8994a84f147dc0be06d8aa0498444cae54;hb=497aa09d91eadb4b8bc8126cdab695946d5ef9db;hp=5bd51a955e395abb3c96405203901648779fff0d;hpb=4a1ca15c9298340e8f2cb2ad6016109375cc45b9;p=nihav.git diff --git a/nihav-itu/src/codecs/h264/sets.rs b/nihav-itu/src/codecs/h264/sets.rs index 5bd51a9..61cf0a8 100644 --- a/nihav-itu/src/codecs/h264/sets.rs +++ b/nihav-itu/src/codecs/h264/sets.rs @@ -44,13 +44,10 @@ pub struct SeqParameterSet { } pub fn is_high_profile(profile: u8) -> bool { - match profile { - 100 | 110 | 122 | 244 | 44 | 83 | 86 | 118 | 128 | 138 | 139 | 134 | 125 => true, - _ => false, - } + matches!(profile, 100 | 110 | 122 | 244 | 44 | 83 | 86 | 118 | 128 | 138 | 139 | 134 | 125) } -#[allow(clippy::cyclomatic_complexity)] +#[allow(clippy::cognitive_complexity)] pub fn parse_sps(src: &[u8]) -> DecoderResult { let mut br = BitReader::new(src, BitReaderMode::BE); let mut sps: SeqParameterSet = unsafe { std::mem::zeroed() };