DISCRETE DITHER
20200195272 ยท 2020-06-18
Inventors
Cpc classification
International classification
Abstract
Quantisation methods are provided which employ dither techniques to reduce the noise penalty in certain circumstances whilst still removing noise modulation. One method relates to reducing the wordwidth of audio by one bit, while another method relates to burying one bit of data in a pair of signal samples.
Claims
1. A quantisation method for reducing the wordwidth of audio by one bit, the method comprising the step of: pseudo-randomly choosing one of two adjacent output values such that the probability of choosing one of them is 75% and the probability of choosing the other is 25%.
2. A quantisation method for burying one bit of data in a pair of signal samples, the method comprising the steps of: identifying two possible 2-tuples of output values both of which convey said one bit of data pseudo-randomly; and choosing one of the two possible 2-tuples with 50% probability.
3. The quantisation method according to claim 2, wherein said two possible 2-tuples differ by exactly one quantisation step in both dimensions.
4. A non-transitory computer readable medium comprising instructions for reducing the wordwidth of audio by one bit that, when executed by one or more processors, cause said one or more processors to: pseudo-randomly choose one of two adjacent output values such that the probability of choosing one of them is 75% and the probability of choosing the other is 25%.
5. The non-transitory computer readable medium according to claim 4, wherein said two possible 2-tuples differ by exactly one quantisation step in both dimensions
6. A non-transitory computer readable medium comprising instructions for burying one bit of data in a pair of signal samples that, when executed by one or more processors, cause said one or more processors to: identify two possible 2-tuples of output values both of which convey said one bit of data pseudo-randomly; and choose one of the two possible 2-tuples with 50% probability.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Examples of the present invention will now be described in detail with reference to the accompanying drawings, in which:
[0014]
[0015]
[0016]
[0017]
[0018]
DETAILED DESCRIPTION
[0019]
[0020] It is well known that if the overall expected error of the dithered quantiser is required to be zero, then the noise power from the dithered quantisation cannot be less than the values shown in
[0021] It is also well known that it is further desirable for the dithered quantiser to have constant noise power. Since when the input level is exactly midway between permissible output values, the noise power cannot be less than 0.25.sup.2 this is achieved in the prior art by increasing the noise power up to 0.25.sup.2 for other input values by randomly selecting from 3 output values. One way to implement this is by making the pseudo-random noise source (10) have a triangular pdf (probability density function) spanning to +.
[0022] When the input (1) is already quantised to one more bit than the output (2) there are only two cases to consider: [0023] i) The input is x+0.5 for some permissible output value x. In this case both the above recipes lead to choosing an output of x with 50% probability or x+1 with 50% probability. The output value has mean x+0.5 which matches the input, and variance 0.25.sup.2. [0024] ii) The input is some permissible output value x. In this case the RPDF recipe outputs x with 100% probability. This has zero variance, which differs from the prior case and hence the RPDF recipe exhibits noise modulation. The TPDF recipe outputs one of {x1,x, x+1} with probability {25%, 50%, 25%}. This still preserves the mean output value but increases the variance to 0.25.sup.2 which removes the noise modulation.
[0025] According to the invention, the dithered quantiser incorporates a constant offset of 0.25. A small DC offset is immaterial to audio, but this small but crucial relaxation allows the variance to be constant but at a lower level than the triangular dithered prior art.
[0026] If we now reconsider the two cases: [0027] i) The input is x+0.5 for some permissible output value x. We output x with 25% probability or x+1 with 75% probability. The mean output is x+0.75 but the variance is 0.1875.sup.2 [0028] ii) The input is some permissible output value x. We output x with 75% probability or x+1 with 25% probability. The mean output is x+0.25 and the variance is 0.1875.sup.2
[0029] We thus have a constant expected error from the dithered quantiser and a constant variance of the output. However, this variance is 1.25 dB lower than that produced by a triangular dithered quantiser.
[0030] One possible implementation of this is shown in
[0031] The pseudo-random noise can take discrete values instead of continuous with exactly the same outcome. Possible ways of achieving the outcome described above are 4 equally possible values {0.375, 0.125, 0.375} or 3 unequally probable values {0.5, 0, 0.5} with probabilities {25%, 50%, 25%}.
[0032] The offset (12) can also be incorporated into the pseudorandom noise before adding to the signal.
[0033] The above procedure generalises to the case where the input precision exceeds the output by k bits where k>1. In this case the offset (12) is chosen as 2.sup.(k+1) and the pseudorandom noise might take values 2.sup.kn with probability (2.sup.k|n|)2.sup.2k for integer 2.sup.k<n<2.sup.k. As k increases, this approaches a continuous TPDF distribution and the variance advantage over a normal TPDF dithered quantiser decreases.
[0034] One scenario where quantisation reducing precision by a single bit can occur is embedding data into the audio lsb (least significant bit), for example into the 24.sup.th bit as a fragile watermark. Reducing the variance of this embedding increases the transparency of the watermark.
[0035] In this scenario, the desired data bit can be subtracted from an audio sample. This is then quantised to 23 bits as described above and the desired data bit added back. This subtractive method ensures that the lsb of the audio holds the desired data and yet the whole procedure has constant expected error (independent of both the data bit and the original audio lsb) and a small variance.
[0036] The invention is also applicable for embedding data at a lower data rate, for example one data bit in a single stereo sample (or two consecutive samples on a single channel). This might be done by defining the embedded data bit to be the XOR of the lsbs of the two samples.
[0037] A prior art approach is illustrated in
[0038] We first consider if the pair of lsbs already convey the desired value. If they do not, then one lsb needs changing to embed the value. There are four ways to do this with minimum error, by adding or subtracting A from either channel. The expected error is held zero by making adding and subtracting equally likely, the error variance is .sup.2 and can be distributed evenly across both channels by randomly choosing which channel to alter. The net result is that the four neighbours are chosen each with 25% probability.
[0039] If they do contain the correct value, then the sample pair can be left unchanged. But if we are to have constant variance, then with 50% probability we must alter both samples by . There are four ways to do this, which we do with 25% probability each.
[0040] According to the invention however, we introduce an offset of 0.5 on both samples, as illustrated in
[0041] Further relevant information may be found in J. R. Stuart and P. G. Craven, The Gentle Art of Dithering, J. Audio Eng. Soc., vol. 67, no. 5, pp. 278-299, (2019 May), particularly the Appendix, the contents of which are incorporated herein by reference.
[0042] Any of the methods described herein may be implemented by one or more processors executing instructions stored on a non-transitory data storage device or computer readable medium, the instructions causing the one or more processors to implement the respective methods.
[0043] Numerous modifications, adaptations and variations to the embodiments described herein will become apparent to a person skilled in the art having the benefit of the present disclosure, and such modifications, adaptations and variations that result in additional embodiments of the present invention are also within the scope of the accompanying claims.