Scalable lossless audio codec and authoring tool
Abstract
An audio codec losslessly encodes audio data into a sequence of analysis windows in a scalable bitstream. This is suitably done by separating the audio data into MSB and LSB portions and encoding each with a different lossless algorithm. An authoring tool compares the buffered payload to an allowed payload for each window and selectively scales the losslessly encoded audio data, suitably the LSB portion, in the non-conforming windows to reduce the encoded payload, hence buffered payload. This approach satisfies the media bit rate and buffer capacity constraints without having to filter the original audio data, reencode or otherwise disrupt the lossless bitstream.
Claims
exact text as granted — not AI-modified1 . A method of encoding and authoring audio data, comprising:
losslessly encoding the audio data in a sequence of analysis windows into a scalable bitstream; comparing a buffered payload for the encoded audio data to an allowed payload for each window; and scaling the losslessly encoded audio data in the non-conforming windows so that the buffered payload for the bitstream does not exceed the allowed payload, said scaling operation introducing loss into the encoded data in those windows.
2 . The method of claim 1 , wherein the audio data is separated into most significant bit (MSB) and least significant (LSB) portions for each analysis window and encoded with different lossless algorithms.
3 . The method of claim 2 , wherein the audio data is separated by;
Assigning a minimum MSB bit width (Min MSB); Computing a cost function for the audio data in the analysis window; if the cost function exceeds a threshold, computing an LSB bit width of at least one bit that satisfies the Min MSB; and if the cost function does not exceed the threshold, assigning the LSB bit width to be zero bits.
4 . The method of claim 3 , further comprising;
Computing a max LSB bit width (Max LSB) as the bit width of the audio data minus Min MSB; Computing an L ∞ norm as the maximum absolute amplitude of the audio data in the analysis window; Computing Max Amp as the number of bits needed to represent a sample with value equal to −L ∞ ; Computing a squared L2 norm as the sum of the squared amplitudes of the audio data in the analysis window; If Max Amp does not exceed Min MSB and the L2 norm does not exceed a threshold, setting the LSB bit width to zero bits; If Max Amp does not exceed Min MSB but the L2 norm does exceed the threshold, setting the LSB bit width to the Max LSB bit width divided by a scaling factor; If Max Amp exceeds the Min MSB, setting the LSB bit width to the Max Amp minus Min MSB.
5 . The method of claim 4 , wherein the LSB bit width is limited to a maximum LSB bit width (Max LSB) determined by a word width of the audio data and Min MSB.
6 . The method of claim 2 , wherein an LSB bit width and the encoded MSB and LSB portions are packed into a bitstream for each analysis window.
7 . The method of claim 2 , wherein the MSB portion is encoded with a lossless algorithm that includes decorrelation between multiple audio channels and adaptive prediction within each audio channel.
8 . The method of claim 2 , wherein the LSB portion is encoded with a lossless algorithm that replicates the bits for the PCM samples.
9 . The method of claim 2 , wherein the LSB portion is encoded with a lossless algorithm that uses low order prediction and entropy coding.
10 . The method of claim 2 , wherein the analysis windows are frames, each frame comprising a header for storing the LSB bit widths and one or more segments, each segment comprising one or more channel sets, each channel set comprising one or more audio channels, each channel comprising one or more frequency extensions, said lowest frequency extension including encoded MSB and LSB portions.
11 . The method of claim 10 , wherein the bitstream has a distinct MSB and LSB split for each channel in each channel set in each frame.
12 . The method of claim 11 , wherein said higher frequency extensions include only encoded LSB portions.
13 . The method of claim 2 , wherein the bitstream is authored by,
Packing the losslessly encoded MSB portions into the bitstream for all the windows; Packing the losslessly encoded LSB portions into the bitstream for the conforming windows; Scaling the losslessly encoded LSB portions for any non-conforming windows to make them conform; and Packing the now lossy encoded LSB portions for the now conforming windows into the bitstream.
14 . The method of claim 13 , wherein the LSB portions are scaled by,
calculating an LSB bit width reduction for the analysis window; decoding the LSB portions in the non-conforming windows; reducing the LSB portions by the LSB bit width reduction by discarding that number of LSBs; encoding the modified LSB portions with the lossless encoding algorithm; packing the encoded LSB portions; and packing the modified LSB bit widths and the LSB bit width reduction into the bitstream.
15 . The method of claim 14 , wherein the lossless encoding is simple bit replication, wherein the LSB portions are reduced by,
adding dither to each LSB portion so as to dither the next LSB past the LSB bit width reduction; and shifting the LSB portion to the right by the LSB bit width reduction.
16 . The method of claim 14 , wherein the LSB bit width reduction is just enough that the buffered payload does not exceed the allowed payload.
17 . The method of claim 14 , wherein the audio data includes multiple channels, said LSB bit width reduction being calculated for each channel in accordance with a channel prioritization rule.
18 . A method of encoding a scalable, lossless bitstream for audio data, comprising:
determining a breakpoint that separates audio data into an MSB and an LSB portion for an analysis window; losslessly encoding the MSB portions; losslessly encoding the LSB portions; packing the encoded MSB portions and LSB portions into a lossless bitstream; and packing the bit widths of the LSB portions into the lossless bitstream.
19 . The method of claim 18 , wherein the breakpoint is determined by;
Assigning a minimum MSB bit width (Min MSB); Computing a cost function for the audio data in the analysis window; if the cost function exceeds a threshold, computing an LSB bit width of at least one bit that satisfies the Min MSB; and if the cost function does not exceed the threshold, assigning the LSB bit width to be zero bits.
20 . The method of claim 18 , wherein the LSB portions are encoded with a lossless algorithm that replicates the bits of the audio data.
21 . A method of authoring an audio bitstream onto a media, comprising:
a) determining a scheme for laying out the encoded audio data from a bitstream onto a media for a decoder buffer, said bitstream including losslessly encoded MSB and LSB portions in a sequence of analysis windows; b) calculating a buffered payload for the encoded audio data for the next analysis window; c) if the buffered payload is within an allowed payload for an analysis window, packing the losslessly encoded MSB and LSB portions into a modified bitstream; d) if the buffered payload exceeds the allowed payload for an analysis window,
packing the losslessly encoded MSB portion into the modified bitstream;
scaling the losslessly encoded LSB portion to a lossy encoded LSB portion so that the buffered payload is within the allowed payload; and
packing the lossy encoded LSB portion into the modified bitstream with its scaling information; and
e) repeating steps b through d for each analysis window.
22 . The method of claim 21 , wherein the LSB portions are scaled by,
calculating an LSB bit width reduction for the analysis window; decoding the LSB portions in the non-conforming windows; reducing the LSB portions by the LSB bit width reduction by discarding that number of LSBs; encoding the modified LSB portions with the lossless encoding algorithm; packing the encoded LSB portions; and packing the modified LSB bit widths and the LSB bit width reduction into the bitstream.
23 . The method of claim 22 , wherein the lossless encoding and decoding is simple bit replication, wherein the LSB portions are reduced by,
adding dither to each LSB portion so as to dither the next LSB past the LSB bit width reduction; and shifting the LSB portion to the right by the LSB bit width reduction.
24 . An article of manufacture comprising a bitstream separated into a sequence of analysis windows of encoded audio data stored on a media, the audio data in each said analysis window being losslessly encoded except as necessary to reduce the buffered payload of said analysis window to no more than an allowed payload.
25 . The article of manufacture of claim 24 , wherein some of the analysis windows include losslessly encoded MSB and LSB portions and the remaining analysis windows include losslessly encoded MSB portions and lossy encoded LSB portions.
26 . The article of manufacture of claim 25 , wherein the bitstream includes header information containing the modified bit widths of the LSB portions and the bit width reduction of the LSB portions.
27 . The article of manufacture of claim 26 , wherein the LSB portions are losslessly and lossy encoded using bit replication.
28 . The article of manufacture of claim 27 , wherein the bit width reduction of the LSB portions is just enough that the buffered payload does not exceed the allowed payload.
29 . A method of decoding an audio bitstream, comprising:
receiving a bitstream as a sequence of analysis windows comprising header information including an LSB bit width and an LSB bit width reduction and audio data including losslessly encoded MSB portions and either losslessly encoded or scaled LSB portions so that a buffered payload of each analysis window is within an allowed payload; extracting the LSB bit width and the LSB bit width reduction for each analysis window; extracting the losslessly encoded MSB portions and decoding them into PCM audio data; extracting either the losslessly encoded or scaled LSB portions and decoding them into PCM audio data; assembling the MSB and LSB portions for each PCM audio sample; using the LSB bit width and LSB bit width reduction to translate the assembled PCM audio data to an original bit width word; and outputting the PCM audio data for each analysis window.
30 . The method of claim 29 , wherein the losslessly encoded and scaled LSB portions are decoded by bit replication.
31 . A decoder chip configured to receive a bitstream and output PCM audio data, said chip configured to execute the steps of:
extracting an LSB bit width and an LSB bit width reduction for each analysis window in the bitstream; extracting losslessly encoded MSB portions and decoding them into PCM audio data; extracting either losslessly encoded or scaled LSB portions and decoding them into PCM audio data; assembling the MSB and LSB portions for each PCM audio sample; using the LSB bit width and LSB bit width reduction to translate the assembled PCM audio data to an original bit width word; and outputting the PCM audio data for each analysis window.
32 . An audio decoder, comprising:
a controller for reading encoded audio data from a bitstream on a media; a buffer for buffering a plurality of analysis windows of the encoded audio data; and a DSP chip for decoding the encoded audio data and outputting PCM audio data for each successive analysis window, said DSP chip configured to decode analysis windows comprising header information including LSB bit widths and LSB bit width reductions and audio data including losslessly encoded MSB portions and losslessly encoded or scaled LSB portions, wherein the buffered payload does not exceed an allowed payload determined by the peak bit rate supported by the media and the capacity of the buffer.
33 . The audio decoder of claim 32 , wherein the DSP chip executes the steps of:
extracting the LSB bit width and the LSB bit width reduction for each analysis window in the bitstream; extracting the losslessly encoded MSB portions and decoding them into PCM audio data; extracting either the losslessly encoded or the scaled LSB portions and decoding them into PCM audio data; assembling the MSB and LSB portions for each PCM audio sample; using the LSB bit width and LSB bit width reduction to translate the assembled PCM audio data to an original bit width word; and outputting the PCM audio data for each analysis window.
34 . A method of encoding a scalable, lossless bitstream for M-bit audio data that is backward compatible with a lossy core decoder, comprising:
encoding the M-bit audio data into a lossy M-bit corestream; packing the lossy M-bit corestream into a bitstream; decoding the M-bit corestream into a reconstructed core signal; separating the M-bit audio data into M-N bit MSB and N-bit LSB portions; packing the N-bit LSB portion into the bitstream; right shifting the reconstructed core signal by N bits to align it with the MSB portion; subtracting the reconstructed core signal from the MSB portion to form an M-N bit residual signal; losslessly encoding the residual signal; packing the encoded residual signal into the bitstream; and packing the bit widths of the LSB portions into the lossless bitstream.
35 . The method of claim 34 , further comprising adding dither to the reconstructed core signal prior to right shifting and packing a dither parameter into the bitstream.Join the waitlist — get patent alerts
Track US2011106546A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.