Input sample rate in Hz. Selects the oversampling factor so the oversampled rate reaches BS.1770-5's ≥192 kHz requirement (Annex 2, p.18). Defaults to 48 kHz (the rate the verbatim FIR is quoted at → 4×).
Readonly firThe polyphase FIR actually used (verbatim at 4×, generated for >4×).
Private Readonly historyReadonly oversampleOversampling factor chosen for the input sample rate (≥4; ≥192 kHz).
Private peakPrivate write
Streaming 4× polyphase true-peak detector for ONE channel (ITU-R BS.1770-5 Annex 2). Maintains a 12-sample input history so successive blocks join seamlessly, runs every phase of the polyphase FIR per input sample (giving the 4× oversampled stream), rectifies, and tracks the running max.
The verbatim coefficients are quoted at 48 kHz. At higher input rates fewer oversampling phases are needed for the same accuracy (Annex 2: 96 kHz → 2× suffices); this 4× design is the conservative default at any rate.