forge
Explore
Log in

Don't you dare go Hollow

ec-ac3: drop comments added in 275e634a (no-comments rule); shift() pub(crate) so missing_docs stays quiet

Browse files at this commit

2aae8d42354af447ff56e601bf7c962ce1b0fb46Ahmet Kaan GümüşParent: 275e634
crates/ec-ac3/src/mantissa.rsmodified+1 -3
@@ -165,9 +165,7 @@ impl Mantissas {
165165 }
166166 }
167167
168-/// A mantissa after the exponent shift. ffmpeg shifts the integer mantissa
169-/// right, flooring, before the float conversion; so does this.
170-pub fn shift(mantissa: i32, exponent: u8) -> f32 {
168+pub(crate) fn shift(mantissa: i32, exponent: u8) -> f32 {
171169 (mantissa >> exponent) as f32 / 8_388_608.0
172170 }
173171
crates/ec-ac3/src/tables.rsmodified+1 -2
@@ -154,8 +154,7 @@ pub const QNTZTAB: [u32; 16] = [0, 5, 7, 3, 7, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14,
154154 pub const QUANT_LEVELS: [u32; 6] = [0, 3, 5, 7, 11, 15];
155155
156156 /// The `k`-th reconstruction level of a `levels`-level symmetric quantizer
157-/// (Tables 7.19-7.23), `(2k - (levels-1)) / levels` at 2^23 full scale,
158-/// truncated toward zero as ffmpeg's `SYMMETRIC_DEQUANT` is.
157+/// (Tables 7.19-7.23): the uniform midtread set `(2k - (levels-1)) / levels`.
159158 pub fn symmetric_level(levels: u32, k: u32) -> i32 {
160159 let levels = levels as i32;
161160 (2 * k as i32 - (levels - 1)) * (1 << 23) / levels