This application is based on and claims priority to GB Application No. 1820620.1 for “DISCRETE DITHER” filed Dec. 18, 2018, the entire contents of which are incorporated herein by reference.
The invention relates to the quantisation of audio signals using dither, and particularly to the reduction of noise.
It is well known that quantisation of audio can result in objectionable artifacts. These are commonly ameliorated by incorporating a suitable noise signal known as dither into the quantiser. Addition of dither with a rectangular probability density function (RPDF) spanning one quantisation step makes the resultant quantisation error uncorrelated with the signal but the dithered quantiser may still exhibit noise modulation. Changing the dither to a triangular probability density function (TPDF) spanning two quantisation steps also removes the noise modulation.
However these steps come with a noise penalty, a RPDF dithered quantiser is typically 3 dB noisier than an undithered quantiser and a TPDF dithered quantiser 4.77 dB noisier.
It is an object of the current invention to reduce the noise penalty in certain circumstances whilst still removing all noise modulation.
The invention pertains to reducing the wordwidth of audio by one bit. For example, this might be reducing 17 bit audio to 16 bits. Or it might be to subtractively embed data into the audio as a fragile watermark.
According to a first aspect of the invention, there is provided a quantisation method for reducing the wordwidth of audio by one bit 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%.
In this way, the noise introduced into the output audio is constant yet less than would be expected from the common practice of TPDF dithered quantisation.
According to a second aspect of the invention, there is provided a quantisation method for burying one bit of data in a pair of signal samples comprising the steps of: identifying two possible 2-tuples of output values both of which convey said one bit of data, and pseudo-randomly choosing one of the two possible 2-tuples with 50% probability.
In this way there is uncertainty and hence quantisation error in the output regardless of whether the pair of signal values would be interpreted as containing the desired bit of data or not. There is therefore the possibility of avoiding the noise modulation that would arise if the method specified no signal modification in the eventuality that the signal pair already conveys the desired bit. And yet since the selection is between two possibilities rather than the four neighbours that naturally occur in two dimensions, the noise can be lower than expected.
According to a third aspect of the invention, there is provided a non-transitory computer readable medium comprising instructions that when executed by one or more processors, cause said one or more processors to implement the method of the first aspect.
According to a fourth aspect of the invention, there is provided a non-transitory computer readable medium comprising instructions that when executed by one or more processors, cause said one or more processors to implement the method of the second aspect.
Examples of the present invention will now be described in detail with reference to the accompanying drawings, in which:
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
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Δ2 this is achieved in the prior art by increasing the noise power up to 0.25Δ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 +Δ.
When the input (1) is already quantised to one more bit than the output (2) there are only two cases to consider:
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.
If we now reconsider the two cases:
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.
One possible implementation of this is shown in
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%}.
The offset (12) can also be incorporated into the pseudorandom noise before adding to the signal.
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−(k+1)Δ and the pseudorandom noise might take values 2−knΔ with probability (2k−|n|)2−2k for integer −2k<n<2k. As k increases, this approaches a continuous TPDF distribution and the variance advantage over a normal TPDF dithered quantiser decreases.
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 24th bit as a fragile watermark. Reducing the variance of this embedding increases the transparency of the watermark.
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.
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.
A prior art approach is illustrated in
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 Δ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.
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.
According to the invention however, we introduce an offset of 0.5Δ on both samples, as illustrated in
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.
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.
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.
Number | Date | Country | Kind |
---|---|---|---|
1820620 | Dec 2018 | GB | national |
Number | Name | Date | Kind |
---|---|---|---|
7031401 | Lambert | Apr 2006 | B2 |
10686996 | Liu | Jun 2020 | B2 |
20110135218 | Moore | Jun 2011 | A1 |
Number | Date | Country |
---|---|---|
2451474 | Feb 2009 | GB |
Entry |
---|
Great Britain Combined Search and Examination Report dated Jul. 23, 2019 which was issued in connection with GB 1820620.1 which was filed on Dec. 18, 2018. |
Pengfei Wan: “High Bit-Precision Image Acquisition and Reconstruction by Planned Sensor Distortion”, IEEE International Conference on Image Processing, 2014, pp. 1773-1777. |
Yevhen Zolotavkin: “A New Two-Dimensional Quantization Method for Digital Image Watermarking”, 17th International Conference on Advanced Communication Technology, pp. 155-160. |
J. Robert Stuart: “The Genial Art of Dithering”, J. Audio Eng. Soc., vol. 67, No. 5, May 2019. |
Number | Date | Country | |
---|---|---|---|
20200195272 A1 | Jun 2020 | US |