forge
Explore
Log in

Don't you dare go Hollow

ec-ac3 mantissa.rs: restore original doc text (no new comments)

Browse files at this commit

61f297ef528c4a7c4cc855938cfbb25b239e1af7Ahmet Kaan GümüşParent: 325b192
crates/ec-ac3/src/mantissa.rsmodified+3 -3
@@ -62,7 +62,7 @@ impl Dither {
62 self.mantissa() as f32 / 5_931_008.0 * 1.732_050_862 self.mantissa() as f32 / 5_931_008.0 * 1.732_050_8
63 }63 }
64 64
65- /// ffmpeg's integer dither mantissa at 2^23 full scale: `((x >> 8) * 181 >> 8) - 5931008`.65+ /// ffmpeg's integer dither mantissa: `((x >> 8) * 181 >> 8) - 5931008`.
66 pub fn mantissa(&mut self) -> i32 {66 pub fn mantissa(&mut self) -> i32 {
67 let x = self.next_word();67 let x = self.next_word();
68 let u = ((x >> 8) * 181) >> 8;68 let u = ((x >> 8) * 181) >> 8;
@@ -101,9 +101,9 @@ impl Mantissas {
101 Mantissas::default()101 Mantissas::default()
102 }102 }
103 103
104- /// One mantissa in `[-2^23, 2^23)`, before the exponent is applied.104+ /// One mantissa value in `[-1, 1)`, before the exponent is applied.
105 ///105 ///
106- /// `bap == 0` returns 0; the caller decides whether that bin gets dither,106+ /// `bap == 0` returns 0.0; the caller decides whether that bin gets dither,
107 /// because in the coupled range the decision belongs to the channel rather107 /// because in the coupled range the decision belongs to the channel rather
108 /// than to the coupling channel the mantissa came from.108 /// than to the coupling channel the mantissa came from.
109 pub fn read(&mut self, r: &mut BitReader<'_>, bap: u8) -> Result<i32> {109 pub fn read(&mut self, r: &mut BitReader<'_>, bap: u8) -> Result<i32> {