forge
Explore
Log in

Don't you dare go Hollow

The intrabc gate counters are read only from the cfg(test) gates

Browse files at this commit

424184726a687765936ddc4d155e0eb2dc453cabAhmet Kaan GümüşParent: 331a966
  • chore
    • the intrabc gate counters are read only from the cfg(test) gates
Show full message
chore(av1): the intrabc gate counters are read only from the cfg(test) gates
crates/ec-av1/src/encode.rsmodified+3 -0
@@ -740,6 +740,7 @@ thread_local! {
740740 }
741741
742742 /// [`IBC_SHARE`] for the last key frame encoded on this thread.
743+#[allow(dead_code)] // read only from the `#[cfg(test)]` gates
743744 pub(crate) fn intrabc_source_share() -> f64 {
744745 IBC_SHARE.with(std::cell::Cell::get)
745746 }
@@ -2511,6 +2512,7 @@ thread_local! {
25112512 static INTRABC_FORCE: std::cell::Cell<Option<bool>> = const { std::cell::Cell::new(None) };
25122513 }
25132514
2515+#[allow(dead_code)] // read only from the `#[cfg(test)]` gates
25142516 pub(crate) fn force_intrabc(value: Option<bool>) {
25152517 INTRABC_FORCE.with(|c| c.set(value));
25162518 }
@@ -2723,6 +2725,7 @@ impl Drop for Ibc {
27232725
27242726 /// Reads [`IBC_SEARCH`] and zeroes it, so a gate can attribute the counts to
27252727 /// its own encode.
2728+#[allow(dead_code)] // read only from the `#[cfg(test)]` gates
27262729 pub(crate) fn take_intrabc_search() -> [usize; 3] {
27272730 std::array::from_fn(|i| IBC_SEARCH[i].swap(0, std::sync::atomic::Ordering::Relaxed))
27282731 }
crates/ec-av1/src/tile.rsmodified+1 -0
@@ -357,6 +357,7 @@ fn note_intrabc(dv: (i32, i32)) {
357357
358358 /// Reads [`INTRABC_HITS`] and zeroes it, so a gate can attribute the counts
359359 /// to its own encode.
360+#[allow(dead_code)] // read only from the `#[cfg(test)]` gates
360361 pub(crate) fn take_intrabc_hits() -> [usize; 7] {
361362 std::array::from_fn(|i| INTRABC_HITS[i].swap(0, std::sync::atomic::Ordering::Relaxed))
362363 }