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(
11067 } else {11067 } else {
11068 &RECT4_SPLIT_DEPTH2_HITS11068 &RECT4_SPLIT_DEPTH2_HITS
11069 };11069 };
11070- which.with(|c| c.set(c.get() + 1));11070+ hit_do! { which.with(|c| c.set(c.get() + 1)); }
11071 let modes = RectStripModes {11071 let modes = RectStripModes {
11072 skip,11072 skip,
11073 mode,11073 mode,
@@ -12079,7 +12079,7 @@ fn decode_block_rect64(
12079 } else {12079 } else {
12080 &RECT4_SPLIT_DEPTH2_HITS12080 &RECT4_SPLIT_DEPTH2_HITS
12081 };12081 };
12082- which.with(|c| c.set(c.get() + 1));12082+ hit_do! { which.with(|c| c.set(c.get() + 1)); }
12083 }12083 }
12084 if crate::envflags::env_flag!("EC_SBPART_DUMP64") {12084 if crate::envflags::env_flag!("EC_SBPART_DUMP64") {
12085 eprintln!(12085 eprintln!(
@@ -23235,7 +23235,7 @@ fn read_single_ref(
23235 ALTREF_FRAME => &ALTREF_HITS,23235 ALTREF_FRAME => &ALTREF_HITS,
23236 _ => unreachable!("read_single_ref only ever returns LAST_FRAME..=ALTREF_FRAME"),23236 _ => unreachable!("read_single_ref only ever returns LAST_FRAME..=ALTREF_FRAME"),
23237 };23237 };
23238- c.with(|v| v.set(v.get() + 1));23238+ hit_do! { c.with(|v| v.set(v.get() + 1)); }
23239 }23239 }
23240 ref_frame23240 ref_frame
23241 }23241 }