The intrabc gate counters are read only from the cfg(test) gates
Browse files at this commit424184726a687765936ddc4d155e0eb2dc453cabParent: 331a966- chore
- the intrabc gate counters are read only from the cfg(test) gates
2 changed files +4 -0
crates/ec-av1/src/encode.rsmodified+3 -0
| @@ -740,6 +740,7 @@ thread_local! { | ||
| 740 | 740 | } |
| 741 | 741 | |
| 742 | 742 | /// [`IBC_SHARE`] for the last key frame encoded on this thread. |
| 743 | +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates | |
| 743 | 744 | pub(crate) fn intrabc_source_share() -> f64 { |
| 744 | 745 | IBC_SHARE.with(std::cell::Cell::get) |
| 745 | 746 | } |
| @@ -2511,6 +2512,7 @@ thread_local! { | ||
| 2511 | 2512 | static INTRABC_FORCE: std::cell::Cell<Option<bool>> = const { std::cell::Cell::new(None) }; |
| 2512 | 2513 | } |
| 2513 | 2514 | |
| 2515 | +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates | |
| 2514 | 2516 | pub(crate) fn force_intrabc(value: Option<bool>) { |
| 2515 | 2517 | INTRABC_FORCE.with(|c| c.set(value)); |
| 2516 | 2518 | } |
| @@ -2723,6 +2725,7 @@ impl Drop for Ibc { | ||
| 2723 | 2725 | |
| 2724 | 2726 | /// Reads [`IBC_SEARCH`] and zeroes it, so a gate can attribute the counts to |
| 2725 | 2727 | /// its own encode. |
| 2728 | +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates | |
| 2726 | 2729 | pub(crate) fn take_intrabc_search() -> [usize; 3] { |
| 2727 | 2730 | std::array::from_fn(|i| IBC_SEARCH[i].swap(0, std::sync::atomic::Ordering::Relaxed)) |
| 2728 | 2731 | } |
crates/ec-av1/src/tile.rsmodified+1 -0
| @@ -357,6 +357,7 @@ fn note_intrabc(dv: (i32, i32)) { | ||
| 357 | 357 | |
| 358 | 358 | /// Reads [`INTRABC_HITS`] and zeroes it, so a gate can attribute the counts |
| 359 | 359 | /// to its own encode. |
| 360 | +#[allow(dead_code)] // read only from the `#[cfg(test)]` gates | |
| 360 | 361 | pub(crate) fn take_intrabc_hits() -> [usize; 7] { |
| 361 | 362 | std::array::from_fn(|i| INTRABC_HITS[i].swap(0, std::sync::atomic::Ordering::Relaxed)) |
| 362 | 363 | } |