forge
Explore
Log in

Don't you dare go Hollow

Gate the three reference-through-a-LocalKey counter bumps too

Browse files at this commit

06bf0800a8a626ea831e3f16a227250c440e8010Ahmet Kaan GümüşParent: 3c710ec
  • perf
    • gate the three reference-through-a-LocalKey counter bumps too
Show full message
perf(av1): gate the three reference-through-a-LocalKey counter bumps too
crates/ec-av1/src/decode.rsmodified+3 -3
@@ -11067,7 +11067,7 @@ fn decode_block_rect4(
1106711067 } else {
1106811068 &RECT4_SPLIT_DEPTH2_HITS
1106911069 };
11070- which.with(|c| c.set(c.get() + 1));
11070+ hit_do! { which.with(|c| c.set(c.get() + 1)); }
1107111071 let modes = RectStripModes {
1107211072 skip,
1107311073 mode,
@@ -12079,7 +12079,7 @@ fn decode_block_rect64(
1207912079 } else {
1208012080 &RECT4_SPLIT_DEPTH2_HITS
1208112081 };
12082- which.with(|c| c.set(c.get() + 1));
12082+ hit_do! { which.with(|c| c.set(c.get() + 1)); }
1208312083 }
1208412084 if crate::envflags::env_flag!("EC_SBPART_DUMP64") {
1208512085 eprintln!(
@@ -23235,7 +23235,7 @@ fn read_single_ref(
2323523235 ALTREF_FRAME => &ALTREF_HITS,
2323623236 _ => unreachable!("read_single_ref only ever returns LAST_FRAME..=ALTREF_FRAME"),
2323723237 };
23238- c.with(|v| v.set(v.get() + 1));
23238+ hit_do! { c.with(|v| v.set(v.get() + 1)); }
2323923239 }
2324023240 ref_frame
2324123241 }