pub struct ReadingThresholds {Show 56 fields
pub sharp_shelf_db: f64,
pub full_band: f64,
pub natural_limit: f64,
pub inner_shelf_db: f64,
pub high_step_db: f64,
pub clear_db: f64,
pub min_windows: usize,
pub min_seconds: f64,
pub few_seconds_over: f64,
pub consistent_share: f64,
pub transcode_share: f64,
pub cluster_hz: f64,
pub ceiling: f64,
pub mixed_share: f64,
pub lower_rate_edges: Vec<f64>,
pub other_rate_edges: Vec<RateEdge>,
pub mono_correlation: f64,
pub mono_side_db: f64,
pub confidence_cap: f64,
pub quiet_dbfs: f64,
pub high_bitrate_kbps: u32,
pub profiles: Vec<EncoderProfile>,
pub aac_grid_z: f64,
pub aac_grid_segments_agreeing: usize,
pub mp3_grid_z: f64,
pub mp3_grid_segments_agreeing: usize,
pub uncut_grid_segments_agreeing: usize,
pub mp2_grid_z: f64,
pub mp2_all_agreeing_grid_z: f64,
pub mp2_uncut_grid_z: f64,
pub mp2_grid_segments_agreeing: usize,
pub vorbis_grid_z: f64,
pub vorbis_grid_segments_agreeing: usize,
pub wma_grid_z: f64,
pub wma_grid_segments_agreeing: usize,
pub ac3_grid_z: f64,
pub ac3_grid_segments_agreeing: usize,
pub part_grid_z: f64,
pub part_grid_segments: usize,
pub lone_grid_z: f64,
pub block_phase_segments: usize,
pub other_rate_aac_z: f64,
pub mp3_whole_steps: usize,
pub mp3_whole_steps_segments: usize,
pub aac_whole_steps: usize,
pub aac_whole_steps_segments: usize,
pub opus_grid_frames: usize,
pub opus_uncut_frames: usize,
pub opus_shifted_frames: usize,
pub opus_shifted_uncut_frames: usize,
pub opus_unfiltered_frames: usize,
pub opus_short_frames: usize,
pub opus_short_uncut_frames: usize,
pub fraunhofer_steps: FraunhoferSteps,
pub opus_hybrid_steps: usize,
pub opus_hybrid_share: f64,
}Expand description
Thresholds the measures are read with.
A reading is quick, so these can be swept over audio measured once.
No value is checked against a range. One outside what its field describes, or not a number, gives a reading that means nothing, and no panic.
Fields§
§sharp_shelf_db: f64Least drop in dB across the cutoff for an encoder’s low-pass.
A smaller drop is a natural roll-off.
full_band: f64Fraction of the top from which a cutoff counts as full band.
A cutoff at or above this fraction of the band’s top counts as reaching it. Set below
MeasureThresholds::full_band, it counts as full some windows that measuring never
searched for inner steps.
natural_limit: f64Fraction of the top under which a gentle roll-off is not judged.
Content that rolls off gently below it is band-limited by nature, and the reading says it cannot tell.
inner_shelf_db: f64Least inner step in dB that reads as a band-limited layer.
A step of at least this size inside a full band is a band-limited layer under it.
high_step_db: f64Least step in dB at a top-bitrate cutoff that casts doubt.
Such a step under a band that reaches the top reads as something the analyzer cannot tell, which costs an honest file nothing. Honest spectra step by a decibel or two there.
clear_db: f64Height in dB over the cutoff line that makes a band content.
The band above a step is content only at this height or more. Nearer the line it is the recording’s noise floor, hiss or dither.
min_windows: usizeFewest non-silent windows a reading needs.
min_seconds: f64Fewest seconds of non-silent audio a reading needs.
few_seconds_over: f64Seconds past min_seconds with little to go on.
Within this many seconds over min_seconds a reading says it has little to go on. There
each second moves the shares its rules compare by about 2.5 percent, so a few odd
seconds can tip it.
Share of windows at the top of the band for consistent content.
At least this share of windows must reach the top for the content to be consistent with its claim.
Share of windows that stop at one encoder cutoff for a transcode.
cluster_hz: f64Distance in Hz at which a cutoff still shares the common one.
ceiling: f64Percentile of a lossy file’s cutoffs read as its encoder’s ceiling.
Share of windows each of two sources has for mixed sources.
lower_rate_edges: Vec<f64>Band tops in Hz of the sample rates audio is commonly made at.
Content that stops with a cliff at one, in a file whose band reaches past it, was made at that rate.
other_rate_edges: Vec<RateEdge>Band edges of rates some old equipment recorded at.
They are left out of lower_rate_edges because they sit on encoder cutoffs (18.9 kHz
beside 192 kbps MP3’s). A cliff at one reads as that encoder, with a limitation naming the
rate.
mono_correlation: f64Correlation above which two channels hold the same audio.
It applies together with a side channel at or below mono_side_db.
mono_side_db: f64Side-to-mid level in dB at or below which channels match.
At or below this level of the side channel relative to the mid channel, the two channels hold the same audio.
confidence_cap: f64Highest confidence a reading has, from 0 to 1.
A reading by a grid has this confidence itself, so a cap that is negative or not a number is the confidence of such a reading.
quiet_dbfs: f64Median window level in dBFS under which a file is quiet.
A quiet file makes a reading less sure.
high_bitrate_kbps: u32Bitrate in kbit/s from which a cutoff may be a filter.
Profiles at this bitrate and above cut where some recordings are filtered when they are made, so a sharp shelf there reads as something the analyzer cannot tell, never as a transcode.
profiles: Vec<EncoderProfile>Cutoffs of common lossy encoder settings, lowest first.
aac_grid_z: f64Robust z over which the AAC scan finds a frame grid.
It is compared with CodecScan::z. A lower value finds more
grids in decodes that hide them, such as clipped ones, and finds them in more lossless
files whose counts happen to dip at one offset.
aac_grid_segments_agreeing: usizeFewest segments that put their lowest count at the file’s offset, for an AAC grid.
It is compared with CodecScan::segments_agreeing. A decode carries one grid from start
to end, so every segment finds it at the same offset. The segments of a lossless file can
agree on an offset too, so agreement alone is no grid: it only narrows what the z
threshold finds. A file that holds a lossy section only in part falls short, and so does
a Vorbis decode, whose grid the AAC scan finds at an offset that moves between segments.
mp3_grid_z: f64Robust z over which the MP3 scan finds a frame grid.
It is compared with CodecScan::z, as aac_grid_z is.
mp3_grid_segments_agreeing: usizeFewest segments that put their lowest count at the file’s offset, for an MP3 grid.
It is compared with CodecScan::segments_agreeing, as aac_grid_segments_agreeing is.
uncut_grid_segments_agreeing: usizeFewest segments that agree, for a grid in part of the file at an uncut decode’s offset.
An encoder’s delay puts the grid of its decode at a fixed offset when the start was not
cut (Family), a libvorbis stream’s long blocks sit at one place
within each 128 samples, and an AC-3 stream’s first block starts at the first sample.
Fewer segments than the codec’s own threshold asks for (aac_grid_segments_agreeing and
those of MP3, Vorbis and AC-3) show a grid in part of the file there, with the same z, as
the segments of a lossless file rarely agree on that one offset.
mp2_grid_z: f64Robust z over which the MP2 scan finds a frame grid.
It is compared with CodecScan::z of
Scan::mp2.
mp2_all_agreeing_grid_z: f64Robust z over which an MP2 count every segment agrees on finds a frame grid.
The MP2 scan counts at 32 phases, so three segments share one by chance far more often than three share an offset of another codec’s grid, and four far less often than three.
mp2_uncut_grid_z: f64Robust z over which an MP2 count at an uncut decode’s phase finds a frame grid.
An MP2 decode whose start was not cut has its count at one phase of the 32, which the segments of a lossless file rarely agree on. An MP3 decode’s count can sit there too, so it applies where MP3’s quantizer steps show in no segment.
mp2_grid_segments_agreeing: usizeFewest segments that put their lowest count at the file’s phase, for an MP2 grid.
It is compared with CodecScan::segments_agreeing, as mp3_grid_segments_agreeing is.
vorbis_grid_z: f64Robust z over which the Vorbis scan finds a frame grid.
It is compared with CodecScan::z of
Scan::vorbis.
vorbis_grid_segments_agreeing: usizeFewest segments whose lowest count sits a whole number of steps from the file’s offset.
A Vorbis stream’s short blocks move its long ones by 128 samples each, so its segments
rarely share an offset and always share one modulo 128. It is compared with the
segments of CodecScan::segment_offset that
do.
wma_grid_z: f64Robust z over which the WMA scan finds a frame grid.
It is compared with CodecScan::z of
Scan::wma.
wma_grid_segments_agreeing: usizeFewest segments that put their lowest count at the file’s offset, for a WMA grid.
It is compared with CodecScan::segments_agreeing, as mp3_grid_segments_agreeing is.
ac3_grid_z: f64Robust z over which the AC-3 scan finds a frame grid.
It is compared with CodecScan::z of
Scan::ac3.
ac3_grid_segments_agreeing: usizeFewest segments that put their lowest count at the file’s offset, for an AC-3 grid.
It is compared with CodecScan::segments_agreeing, as mp3_grid_segments_agreeing is.
part_grid_z: f64Robust z a segment’s own count passes to show a grid in part of the file.
It is compared with each of CodecScan::segment_z
whose segment puts its lowest count at the file’s offset, where no grid shows in the
file as a whole.
part_grid_segments: usizeFewest segments that pass part_grid_z, for a grid in part of the file, one at least.
lone_grid_z: f64Robust z one segment’s own count passes to show a grid in part of the file by itself.
It applies where the file’s offset is one an uncut decode has, as
uncut_grid_segments_agreeing does. One segment of a lossless file can stand far out at
some offset, and rarely at that one.
The scan at the other rate takes one such segment too, for a decode converted afterwards.
block_phase_segments: usizeFewest segments whose subband count is lowest at a block-aligned phase, for a grid.
It is compared with the segments of Scan::mp2 whose phase is
one an uncut MP3 or Vorbis decode has. Their blocks start a whole number of the
filterbank’s 32 samples apart, so every segment’s count is lowest at the same phase,
however little it stands out. The reading names Vorbis where a segment sits at the
phase only its decodes have, and MP3 otherwise.
It is compared too with the segments at the phase an uncut MP2 decode has, which read as MP2 where MP3’s quantizer steps show in none.
other_rate_aac_z: f64Robust z over which the AAC scan at the other rate finds a frame grid.
It is compared with the z of OtherRate::aac and of
OtherRate::aac_sine, with the agreement
aac_grid_segments_agreeing asks for. Decodes of other codecs dip further at the other
rate than lossless files do at their own, so it stands over aac_grid_z.
mp3_whole_steps: usizeFewest scalefactor bands on whole steps in a segment, for an MP3 grid.
It is compared with each of
Mp3Steps::segment_whole, the bands on whole
steps of MP3’s quantizer, where no count stands out enough for a grid: as many segments
as mp3_grid_segments_agreeing must reach it, one at least. A band of lossless audio
lands on a whole step by chance a few times in a file.
mp3_whole_steps_segments: usizeFewest segments that reach mp3_whole_steps, for an MP3 grid in part of the file.
One at least. It applies where fewer segments reach it than a grid in the whole file asks for. One segment is enough where its lowest count is at the file’s offset and that offset is one an uncut decode has.
aac_whole_steps: usizeFewest scalefactor bands on whole steps in a segment, for an AAC grid.
It is compared with each of
AacSteps::segment_whole, the bands on whole
steps of AAC’s quantizer, under each window. The steps show a grid no count stands out
enough for, and name the window of one a count found.
aac_whole_steps_segments: usizeFewest segments that reach aac_whole_steps, for an AAC grid, one at least.
opus_grid_frames: usizeFewest frames on Opus’s lattice at one offset, for an Opus grid.
It is compared with OpusScan::frames, the count over
the four segments. A frame of lossless audio lands on the lattice by chance at some
offset in some files, never at the same offset often.
opus_uncut_frames: usizeFewest frames on Opus’s lattice in the windows, for an Opus grid.
It is compared with OpusScan::uncut_frames, the
count on the one grid a decode has when nothing was cut from its start.
opus_shifted_frames: usizeFewest frames on Opus’s lattice at another level, at one offset.
It is compared with OpusShifted::frames, the count
over the four segments, where neither count at the decoder’s own level makes an Opus
grid. The search for the level gives chance more frames than opus_grid_frames meets.
opus_shifted_uncut_frames: usizeFewest frames on Opus’s lattice at another level in the windows.
It is compared with
OpusShifted::uncut_frames, as
opus_shifted_frames is with its count.
opus_unfiltered_frames: usizeFewest frames on Opus’s lattice once the pitch post-filter is taken off, in the windows.
It is compared with OpusUnfiltered::frames,
where no count at the decoder’s level, at another level or of frames under 20 ms makes
an Opus grid. The search for the filter gives chance more frames than opus_uncut_frames
meets.
opus_short_frames: usizeFewest frames under 20 ms on Opus’s lattice at one offset.
It is compared with OpusShort::frames of each
length, the count over the four segments, where no count of 20 ms frames makes an Opus
grid.
opus_short_uncut_frames: usizeFewest frames under 20 ms on Opus’s lattice in the windows.
It is compared with OpusShort::uncut_frames
of each length, as opus_short_frames is with its count.
fraunhofer_steps: FraunhoferStepsWeights that read an MP3 grid at offset 1 as Fraunhofer’s encoder.
opus_hybrid_steps: usizeFewest different pairs of steps among Opus’s hybrid frames.
It is compared with OpusHybrid::steps and with
OpusHybrid::uncut_steps, where no other count
makes an Opus grid. The frames counted must meet opus_hybrid_share too.
Fewest hybrid frames as a share of the frames tested, from 0 to 1.
The two bands a hybrid frame is tested on land on the lattice by chance in a few frames
of a hundred, which in a long file is more pairs of steps than opus_hybrid_steps.
Trait Implementations§
Source§impl Clone for ReadingThresholds
impl Clone for ReadingThresholds
Source§impl Debug for ReadingThresholds
impl Debug for ReadingThresholds
Source§impl Default for ReadingThresholds
impl Default for ReadingThresholds
Source§impl<'de> Deserialize<'de> for ReadingThresholdswhere
ReadingThresholds: Default,
impl<'de> Deserialize<'de> for ReadingThresholdswhere
ReadingThresholds: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ReadingThresholds
impl PartialEq for ReadingThresholds
Source§impl Serialize for ReadingThresholds
impl Serialize for ReadingThresholds
impl StructuralPartialEq for ReadingThresholds
Auto Trait Implementations§
impl Forget for ReadingThresholds
impl Freeze for ReadingThresholds
impl Move for ReadingThresholds
impl RefUnwindSafe for ReadingThresholds
impl Send for ReadingThresholds
impl Sync for ReadingThresholds
impl Unpin for ReadingThresholds
impl UnsafeUnpin for ReadingThresholds
impl UnwindSafe for ReadingThresholds
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more