Systems and methods for generating a dither
Electronic devices, circuitry, and methods are provided to efficiently generate a dither signal. An electronic device may include an output device, such as a speaker, to output a media signal, such as an audio signal, based on dithered media data, such as dithered audio data. The electronic device may include dithering circuitry to generate a dither signal, based on a first pseudorandom signal from a first linear feedback shift register and a second pseudorandom signal from a second linear feedback shift register, to add to the media signal to generate the dithered media signal.
1 . An electronic device comprising:
a speaker configured to output an audio signal based on dithered audio data; and
dithering circuitry configured to generate a dither signal to add to the audio signal to generate the dithered audio signal, wherein the dithering circuitry comprises:
a first pseudorandom signal generator comprising a first linear feedback shift register configured to generate a first pseudorandom signal;
a second pseudorandom signal generator comprising a second linear feedback shift register configured to generate a second pseudorandom signal;
first bit reversal circuitry configured to reverse a bit order of the second pseudorandom signal;
first bitwise XOR circuitry configured to apply a bitwise exclusive OR to the first pseudorandom signal and the second pseudorandom signal;
floating point conversion circuitry configured to pack a result of the bitwise exclusive OR into a mantissa of a floating point value; and
subtraction circuitry configured to subtract a value from the floating point value to generate the dither signal.
2 . The electronic device of claim 1 , wherein the dither signal comprises a rectangular dither within a defined interval.
3 . The electronic device of claim 1 , wherein the dithering circuitry comprises:
the first linear feedback shift register configured to generate a third pseudorandom signal; and
the second linear feedback shift register configured to generate a fourth pseudorandom signal.
4 . The electronic device of claim 3 , wherein the dithering circuitry comprises:
the first bit reversal circuitry configured to reverse a bit order of the fourth pseudorandom signal; and
the first bitwise XOR circuitry configured to apply a bitwise exclusive OR to the third pseudorandom signal and the fourth pseudorandom signal.
5 . The electronic device of claim 4 , wherein the dithering circuitry comprises:
addition circuitry to add a result of the bitwise exclusive OR of the first pseudorandom signal and the second pseudorandom signal to the bitwise exclusive OR of the third pseudorandom signal and the fourth pseudorandom signal; and
the floating point conversion circuitry configured to pack a result of the addition circuitry into the mantissa of the floating point value.
6 . The electronic device of claim 1 , wherein the dithering circuitry comprises:
a third pseudorandom signal generator comprising a third linear feedback shift register configured to generate a third pseudorandom signal;
a fourth pseudorandom signal generator comprising a fourth linear feedback shift register configured to generate a fourth pseudorandom signal;
second bit reversal circuitry configured to reverse a bit order of the fourth pseudorandom signal; and
second bitwise XOR circuitry configured to apply a bitwise exclusive OR to the third pseudorandom signal and the fourth pseudorandom signal.
7 . The electronic device of claim 6 , wherein the dithering circuitry comprises addition circuitry configured to add a result of the bitwise exclusive OR of the first pseudorandom signal and the second pseudorandom signal to the bitwise exclusive OR of the third pseudorandom signal and the fourth pseudorandom signal.
8 . The electronic device of claim 7 , wherein the dithering circuitry comprises the floating point conversion circuitry configured to pack a result of the addition circuitry into the mantissa of the floating point value.
9 . The electronic device of claim 8 , wherein the dithering circuitry comprises the subtraction circuitry configured to subtract the value from the floating point value to generate the dither signal.
10 . The electronic device of claim 9 , wherein the dither signal comprises a triangular dither within a defined interval.
11 . Dithering circuitry comprising:
a first linear feedback shift register based pseudorandom signal generator configured to generate a first pseudorandom signal;
a second linear feedback shift register based pseudorandom signal generator configured to generate a second pseudorandom signal;
first bit reversal circuitry configured to reverse a bit order of the second pseudorandom signal;
first bitwise XOR circuitry configured to apply a bitwise exclusive OR to the first pseudorandom signal and the second pseudorandom signal;
floating point conversion circuitry configured to pack a first value based on a result of the bitwise exclusive OR into a mantissa of a floating point value; and
subtraction circuitry configured to subtract a second value from the floating point value to generate a dither signal.
12 . The dithering circuitry of claim 11 , wherein the dither signal comprises a rectangular dither within a defined interval.
13 . The dithering circuitry of claim 11 , comprising:
a third linear feedback shift register based pseudorandom signal generator configured to generate a third pseudorandom signal;
a fourth linear feedback shift register based pseudorandom signal generator configured to generate a fourth pseudorandom signal;
second bit reversal circuitry configured to reverse a bit order of the fourth pseudorandom signal;
second bitwise XOR circuitry configured to apply a bitwise exclusive OR to the third pseudorandom signal and the fourth pseudorandom signal;
addition circuitry configured to add the result of the bitwise exclusive OR of the first pseudorandom signal and the second pseudorandom signal to the bitwise exclusive OR of the third pseudorandom signal and the fourth pseudorandom signal;
wherein the floating point conversion circuitry is configured to pack the result of the addition circuitry into the mantissa of the floating point value.
14 . The dithering circuitry of claim 13 , wherein the dither signal comprises a triangular dither within a defined interval.
15 . The dithering circuitry of claim 11 , wherein the first linear feedback shift register based pseudorandom signal generator and the second linear feedback shift register based pseudorandom signal generator respectively comprise:
a shift register;
bitwise AND circuitry;
first XOR circuitry; and
second XOR circuitry.
16 . The dithering circuitry of claim 11 , wherein the first linear feedback shift register based pseudorandom signal generator is associated with a first polynomial.
17 . The dithering circuitry of claim 11 , wherein the second linear feedback shift register based pseudorandom signal generator is associated with a second polynomial.
18 . One or more tangible, non-transitory computer-readable media storing instructions that, when executed by processing circuitry, are configured to cause the processing circuitry to:
generate a first pseudorandom signal using a first linear feedback shift register;
generate a second pseudorandom signal using a second linear feedback shift register;
reverse a bit order of the second pseudorandom signal using first bit reversal circuitry;
apply a first bitwise exclusive OR to the first pseudorandom signal and the second pseudorandom signal using first bitwise XOR circuitry;
pack a first value into a mantissa of a floating point value based on a result of the first bitwise XOR circuitry; and
subtract a second value from the floating point value to generate a dither signal.
19 . The one or more tangible, non-transitory computer-readable media of claim 18 , wherein the instructions, when executed by the processing circuitry, are configured to cause the processing circuitry to:
generate a third pseudorandom signal using a third linear feedback shift register;
generate a fourth pseudorandom signal using a fourth linear feedback shift register;
reverse a bit order of the fourth pseudorandom signal using second bit reversal circuitry;
apply a second bitwise exclusive OR to the third pseudorandom signal and the fourth pseudorandom signal using second bitwise XOR circuitry;
add the result of the bitwise exclusive OR of the first pseudorandom signal and the second pseudorandom signal to a bitwise exclusive XOR of the third pseudorandom signal and the fourth pseudorandom signal using addition circuitry; and
pack a result of the addition circuitry into the mantissa of the floating point value.
20 . The one or more tangible, non-transitory computer-readable media of claim 18 , wherein the dither signal comprises a rectangular dither or a triangular dither.