A portion of the disclosure of this patent document including any priority documents contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
One or more implementations relate generally to digital communications, and more specifically to eliminating quantization distortion in audio codecs.
The present application incorporates by reference U.S. Patent Application No. 61/384,154, which is assigned to the assignees of the present application.
The subject matter discussed in the background section should not be assumed to be prior art merely as a result of its mention in the background section. Similarly, a problem mentioned in the background section or associated with the subject matter of the background section should not be assumed to have been previously recognized in the prior art. The subject matter in the background section merely represents different approaches.
The transmission and storage of computer data increasingly relies on the use of codecs (coder-decoders) to compress/decompress digital media files to reduce the file sizes to manageable sizes to optimize transmission bandwidth and memory use. Transform coding is a common type of data compression for data that reduces signal bandwidth through the elimination of certain information in the signal. Sub-band coding is a type of transform coding that breaks a signal into a number of different frequency bands and encodes each one independently as a first step in data compression for audio and video signals. Transform coding is typically lossy in that the output is of lower quality than the original input. Many present compressors fail to remedy problems associated with compression artifacts, which are noticeable distortion effects caused by the application of lossy data compression, such as pre-echo, warbling, or ringing in audio signals, or ghost images in video data.
Many sub-band audio codecs, such as MP3, can partition a frame of audio data into multiple (possibly overlapping) blocks in order to more accurately represent transient signals, which are signals that change abruptly in time. Such partitioning helps eliminate distortions caused by quantization that would otherwise spread over the entire frame, creating an artifact known as “pre-echo.” Pre-echo and similar effects are caused when distortion artifacts are audible before the temporal event that caused them. One solution to eliminate pre-echo artifacts is to partition the audio frames into a large number of relatively small blocks. When the bit rate is limited, however, all of the bits may be spent coding the transient (at least in some portions of the spectrum). This leaves no bits available for the surrounding blocks, and causes a “partial collapse” wherein none of the energy in one or more regions of the spectrum in one or more blocks is coded. This partial collapse leaves a hole in the band that can be just as audible as any pre-echo artifact. This problem is especially acute in codecs that utilize small blocks and encode multiple small blocks (e.g., up to eight blocks) at one time.
What is needed, therefore, is a system to detect and fill coding holes created by collapsed blocks that are not encoded due to lack of available bits, so as to avoid any partial collapse artifacts, while attempting to ensure that no pre-echo artifacts are introduced.
In the following drawings like reference numbers are used to refer to like elements. Although the following figures depict various examples, the one or more implementations are not limited to the examples depicted in the figures.
Embodiments are generally directed to systems and methods for coding digital audio that include mechanisms for detecting and filling coding holes caused by partial collapse situations in which no bits are available to code frame portions surrounding a portion containing a transient signal. The collapsed frame portions (or “tiles”) are filled with pseudo-random noise that is randomly generated by the system or derived from neighboring blocks to represent background noise.
Any of the embodiments described herein may be used alone or together with one another in any combination. The one or more implementations encompassed within this specification may also include embodiments that are only partially mentioned or alluded to or are not mentioned or alluded to at all in this brief summary or in the abstract. Although various embodiments may have been motivated by various deficiencies with the prior art, which may be discussed or alluded to in one or more places in the specification, the embodiments do not necessarily address any of these deficiencies. In other words, different embodiments may address different deficiencies that may be discussed in the specification. Some embodiments may only partially address some deficiencies or just one deficiency that may be discussed in the specification, and some embodiments may not address any of these deficiencies.
Aspects of the one or more embodiments described herein may be implemented on one or more computers or processor-based devices executing software instructions. The computers may be networked in a peer-to-peer or other distributed computer network arrangement (e.g., client-server), and may be included as part of an audio and/or video processing and playback system.
Embodiments are directed to a multi-block audio coding scheme implemented in a codec (coder-decoder) system.
In an embodiment, and in connection with the PVQ function 112, the encoder 100 uses a technique known as band folding, which delivers a similar effect to the spectral band replication by reusing coefficients of lower bands for higher bands, while also reducing algorithmic delay and computational complexity.
In an embodiment, the codec represented by
For the embodiment of
After transformation to the frequency domain, the coefficients are grouped by frequency into a number of bands, whose size may vary to match properties of the human ear. This accounts for psycho acoustic effects associated with audio signal processing. Each band may further group coefficients into tiles, where each tile contains coefficients from distinct periods of time. In general, a block encompasses data from a particular segment of time over all frequencies, and a band encompasses data from a particular set of frequencies over all the blocks in the frame. A tile comprises data from a particular segment of time and a particular set of frequencies.
In an embodiment, the basis functions corresponding to coefficients within an individual tile decay to zero or nearly zero outside of the time period that a particular tile corresponds to, in order to minimize their magnitude outside this period to avoid leakage and reduce the occurrence of pre-echo artifacts. The tiles are then quantized, coded, and transmitted to a decoder. As part of the codebook used in the quantization process, different portions of the band may be coded explicitly. Other portions may be produced by a linear combination of the content of one or more prior bands (possibly requiring TF-resolution changes, such as described in U.S. Patent App. No. 61/384,154) if the number of tiles in the source band is not the same as the number of tiles in the band to which it is being copied. In an embodiment, certain portions of a band may be filled with pseudorandom noise.
In an embodiment, the codec processes signals that are organized in relatively small blocks.
The use of relatively small blocks (or tiles) in the codec may give rise to a problem of partial collapse which is caused when none of the energy in one or more tiles is coded due to bitrate limits that cause all of the bits to be used coding a transient signal. Partial collapse can lead to a hole in a band that is often as audible as a pre-echo artifact. To prevent encoder-decoder mismatch, the decoder and the encoder must both come to the same conclusion about which tiles in which bands have collapsed through the course of band signal processing. Any mismatch can affect the coding of present or future audio frames and makes testing and validation difficult. If all calculations are performed with fixed-point arithmetic, then a decoder can track exactly which tiles are entirely filled with zeros (a “collapse”), although this is an unnecessary limitation to the precision of the signal processing on a machine with fast floating point operations. In addition, even though it is frequently possible for the encoder to skip some of the reconstruction steps the decoder must perform such sample-level tracking would prevent the encoder from skipping these steps.
In an embodiment, the codec maintains one flag per block per band to indicate whether or not a corresponding band has collapsed. In a typical use case, the encoder may segment a single audio frame into eight overlapping blocks and run eight complete MDCT operations, and then partition the output of each of these MDCT operations into 21 bands. In this case, there would be 168 (8×21) tiles, each of which has an associated flag. At the end of the flag tracking process, there is one flag per block per band that indicates whether or not a particular tile has collapsed. This allows the decoder to inject pseudorandom noise using an estimated energy level before it runs the inverse MDCT process to avoid collapse.
The flags are propagated between bands when portions of them are copied to another band, and possibly split or merged during any requisite TF-resolution changes. In general, tracking at the tile level instead of the sample level requires much less computational overhead. Although this process may fail to identify some small number collapses, by following a set of simple flag coding rules, it will not detect a collapse that does not exist. As shown in
In an embodiment, the flag tracking component 220 sets a flag for each tile of the frame indicating whether or not the tile is collapsed. The flag tracking component causes the decoder to fill any collapsed tiles with pseudorandom noise if another flag, a feature enable bit, is set to enable filling of the collapsed tiles.
The rules for maintaining these flags are explained with reference to
Any tile that is not marked as non-collapsed is marked “collapsed” and is denoted with a flag value 0.
Under certain conditions, a tile can be explicitly coded and yet still collapse due to insufficient bits. The use of vector quantization (VQ) involves coding a single codeword that represents multiple coefficient values. A given codeword might mean, “among all these coefficients, there is one non-zero value of magnitude A at position X,” while another codeword, which requires more bits, might mean, “among all these coefficients, there are two non-zero values, with magnitudes A and B, located at positions X and Y, respectively.”
If a codeword spans multiple tiles, but an encoder only has enough bits for the former kind of codeword, then only one tile will have a non-zero coefficient, despite the fact that there is an explicit codeword coding the value of the coefficients in the other tiles (that value being zero). Even if the encoder has enough bits to use the latter kind of codeword, it might choose locations X and Y that are both in the same tile, leaving the other tile zero. The decoder does not know if there really was no energy in those other tiles, or if the encoder just did not have enough bits to use a codeword that would have contained a non-zero value in them.
An encoder may also sometimes signal that there is some energy in a partition, but not actually code any VQ codeword for it. In this situation, the decoder will fill the partition with a linear combination of the content of other bands or with pseudorandom noise. This is possible because the decoder knows how much energy should be present in the partition. If instead the encoder signals that there is no energy in a partition, a decoder does not know if there really was no energy, or if the encoder just did not have enough bits to quantize that energy with sufficient resolution to indicate that it was non-zero.
In an embodiment, a component of the encoder enables the flag tracking feature, and the flag tracking component 220 of the decoder performs the marking of the tiles based solely on other values it has decoded from the bitstream from the encoder. The decoder then fills the “collapsed” marked tiles in order to prevent the zero-coded tile from forming a hole in the frame, which may be perceived as a compression artifact.
In the case of variable TF resolution system, the TF resolution change may either increase the number of tiles by splitting a tile into two or more tiles (increase the time resolution) or decrease the number of tiles by combining two or more tile into a single tile. When the content of a band is subjected to a TF-resolution change that increases the time resolution (increases the number of tiles), then all of output tiles produced from a single input tile copy the same flag as the input tile they were derived from. When the content of a band is subjected to a TF-resolution change that decreases the time resolution (decreases the number of tile), then each output tile is marked “not-collapsed” if any of the input tiles it is derived from were marked “not-collapsed”. Thus, as shown in
The rules dictating the setting of the collapse flag are summarized in Table 1 below:
As stated above, collapsed tiles are filled with pseudorandom noise at an estimated energy level. As shown in
Assuming that the feature is enabled, each collapsed tile is filled with noise at an energy level that is proportional to an estimate of background noise based on previous frames. In an embodiment, for each collapsed tile in a band, a threshold reconstruction level is computed using the bit allocation in that band and the energy in that band relative to the energy of the same band in one or more prior frames. The use of the bit allocation ensures that the reconstruction level is below an estimate of the quantization noise floor, while the band energy comparisons ensure that the reconstruction level is not louder than previous signal content in that band.
Using the energy from more than one prior frame provides additional safety against introducing pre-echo, since the energy of a band with small blocks (as are typically used to code transients) may fluctuate from frame to frame due to leakage, even if the underlying signal would be relatively stable if a longer analysis window were used.
Using the estimated energy level so derived, the decoder fills the contents of the tile with pseudorandom noise. In the preferred embodiment, this noise is composed of coefficients with the value of ±1, scaled so as to achieve the desired reconstruction level. This avoids the need for a separate renormalization step, and avoids the (otherwise highly unlikely) possibility that the pseudorandom noise is all exactly zero.
In act 506, the process applies any applicable TF resolution changes to convert bands used as input to band folding to the current band's time resolution, and propagates their collapse flags in accordance with the rules. The band portions are then filled with explicitly coded coefficients, a linear combination of the content of other bands, or pseudorandom noise at an explicitly coded energy level, act 508. The presence of zero or non-zero coefficients is only used to mark the portions of a band that are explicitly coded, thus in act 510, the process marks tiles as collapsed or non-collapsed in accordance with the rules. As shown in act 512, in the case of variable TF resolution processing, combined tiles are marked as collapsed or non-collapsed in accordance with defined rules, such as those of Table 1. If the enable feature bit is set, each collapsed tile is filled with a noise signal with an estimated energy level that is derived from an estimate based on previous frames, act 514.
The filling of a collapsed tile with pseudorandom noise prevents the tile from constituting a hole in the frame, and thus eliminates or reduces the possibility that the tile will create a compression artifact during the decode process.
In general, any application TF resolution changes performed between the forward MDCT operations in the encoder and the inverse MDCT operations in an embodiment of the decoder do not impact the number of flags to be set for a particular portion of a frame. Such TF-resolution changes do however have an impact on how the flags are computed. For example, assume that a band (denoted Band 6) is coded with increased frequency (reduced time) resolution, e.g., four tiles instead of eight, and these tiles are “explicitly coded,” and assume further that only the first of the four tiles has a non-zero coefficient, and thus the four flags are set as follows (where X=Not Collapsed and O=Collapsed):
Band 6:
In the decoder a TF-resolution change is applied to map the four tiles that were coded back to the eight tiles that will be used as input to the eight inverse MDCTs. This change increases the time resolution, and so triggers the rule “all of the output tiles produced from a single input tile copy the same flag as the input tile they were derived from.” In this case, the result is eight flags, set as follows:
Band 6:
As a second example, a band (denoted Band 7) is coded with increased time (decreased frequency) resolution, e.g., 16 tiles instead of eight. In particular, assume that we explicitly code that all the energy of the band lies in the first tile, but there are not any bits left over to code the actual coefficients in that tile. Instead, the coefficients from Band 6 are copied. This example, is the “linear combination of the content of one or more other bands” case, and for purposes of illustration—in this case a trivial linear combination.
First, the decoder applies a TF-resolution change to Band 6 so that it has the same time resolution as Band 7. This change increases the time resolution, so it triggers the same rule as before:
Band 6:
The coefficients of the first tile are then copied into the first tile of band 7. The rule here is “each output tile is set to ‘not-collapsed’ if the flag for any of the corresponding tiles used as input to the linear combination are marked ‘not-collapsed.’” In this case there is just one tile used as input, the first tile of band 6, so that flag is copied over. The other 15 flags for band 7 are set to “collapsed”, as they belong an explicitly coded portion of the band with no non-zero coefficients:
Band 7:
Then, as with band 6, a TF-resolution change is applied to map the 16 tiles that were coded back to the eight tiles that will be used as input to the inverse MDCTs. This change decreases the time resolution, and so triggers the rule “each output tile is marked ‘not collapsed’ if any of the input tiles it is derived from were marked ‘not collapsed.’” So the result is eight flags, set as follows:
Band 7:
In an embodiment, the final output of the flag tracking process uses the flags with a TF-resolution corresponding to the time resolution of the original MDCTs (i.e., 8 tiles):
Band 6:
Band 7:
It is also possible for an embodiment to inject pseudorandom noise at an estimated energy level into a partition as soon as it determines that it has collapsed, instead of waiting until immediately prior to the inverse MDCTs. However, this could cause false harmonics if those partitions contribute to a linear combination of bands used to fill higher bands. It is also possible to use a different set of TF resolution changes to change the time resolution of the blocks. E.g., an embodiment could keep a band at its coded time resolution, instead of immediately converting to the time resolution of the MDCTs, and only convert to that time resolution after filling in the holes created by collapses. The rules defined for tracking flag changes apply equally well in these cases.
For purposes of the present description, the terms “component,” “module,” “function,” and “process,” may be used interchangeably to refer to a processing unit that performs a particular function and that may be implemented through computer program code (software), digital or analog circuitry, computer firmware, or any combination thereof.
It should be noted that the various functions disclosed herein may be described using any number of combinations of hardware, firmware, and/or as data and/or instructions embodied in various machine-readable or computer-readable media, in terms of their behavioral, register transfer, logic component, and/or other characteristics. Computer-readable media in which such formatted data and/or instructions may be embodied include, but are not limited to, physical (non-transitory), non-volatile storage media in various forms, such as optical, magnetic or semiconductor storage media.
As described herein, embodiments are directed to a method and system of coding an audio signal, comprising: partitioning the audio signal into a plurality of tiles, wherein each tile comprises data from a particular segment of time and a particular set of frequencies of the audio signal; determining an energy value for each tile corresponding to a signal component in a respective tile; marking a tile as not collapsed or collapsed based on the energy value in that tile; and filling all tiles marked as collapsed with pseudorandom noise.
Embodiments are further directed to a method and system of coding an audio signal to reduce compression artifacts in an audio codec, comprising: dividing frames of the audio signal into a plurality of tiles, wherein each tile comprises data from a particular segment of time and a particular set of frequencies of the audio signal; combining or separating the tiles into tile partitions based on a variable time-frequency resolution method; determining whether or not any of the tile partitions represents a hole in a frame of the audio signal due to insufficient bits available to code a particular tile partition by examining a state of a frequency coefficient derived for the particular tile; and filling any tile partition that does not contain a non-zero frequency coefficient with pseudorandom noise.
Unless the context clearly requires otherwise, throughout the description and the claims, the words “comprise,” “comprising,” and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is to say, in a sense of “including, but not limited to.” Words using the singular or plural number also include the plural or singular number respectively. Additionally, the words “herein,” “hereunder,” “above,” “below,” and words of similar import refer to this application as a whole and not to any particular portions of this application. When the word “or” is used in reference to a list of two or more items, that word covers all of the following interpretations of the word: any of the items in the list, all of the items in the list and any combination of the items in the list.
While one or more implementations have been described by way of example and in terms of the specific embodiments, it is to be understood that one or more implementations are not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements as would be apparent to those skilled in the art. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
This application claims priority to provisional U.S. Provisional Patent Application No. 61/450,041, filed on Mar. 7, 2011 and entitled “Method and System for Avoiding Partial Collapse in Multi-Block Audio Coding,” which is incorporated herein in its entirety.
Number | Name | Date | Kind |
---|---|---|---|
5079547 | Fuchigama et al. | Jan 1992 | A |
5778339 | Sonohara et al. | Jul 1998 | A |
5845241 | Owechko | Dec 1998 | A |
5960388 | Nishiguchi et al. | Sep 1999 | A |
5983172 | Takashima et al. | Nov 1999 | A |
6018707 | Nishiguchi et al. | Jan 2000 | A |
6064954 | Cohen et al. | May 2000 | A |
6463097 | Held et al. | Oct 2002 | B1 |
6567777 | Chatterjee | May 2003 | B1 |
6934676 | Wang et al. | Aug 2005 | B2 |
6993477 | Goyal | Jan 2006 | B1 |
7242976 | Minato | Jul 2007 | B2 |
7275036 | Geiger et al. | Sep 2007 | B2 |
7343287 | Geiger et al. | Mar 2008 | B2 |
7447631 | Truman et al. | Nov 2008 | B2 |
7454330 | Nishiguchi et al. | Nov 2008 | B1 |
7483836 | Taori et al. | Jan 2009 | B2 |
7583804 | Suzuki et al. | Sep 2009 | B2 |
7630882 | Mehrotra et al. | Dec 2009 | B2 |
7761290 | Koishida et al. | Jul 2010 | B2 |
7979271 | Bessette | Jul 2011 | B2 |
8195730 | Geiger et al. | Jun 2012 | B2 |
8364471 | Yoon et al. | Jan 2013 | B2 |
8463599 | Ramabadran et al. | Jun 2013 | B2 |
8494863 | Biswas et al. | Jul 2013 | B2 |
8554818 | Zhang et al. | Oct 2013 | B2 |
8620674 | Thumpudi et al. | Dec 2013 | B2 |
20050216262 | Fejzo | Sep 2005 | A1 |
20060031064 | Liljeryd et al. | Feb 2006 | A1 |
20070016405 | Mehrotra et al. | Jan 2007 | A1 |
20070040710 | Tomic | Feb 2007 | A1 |
20070063877 | Shmunk et al. | Mar 2007 | A1 |
20070211804 | Haupt et al. | Sep 2007 | A1 |
20070282603 | Bessette | Dec 2007 | A1 |
20080010064 | Takeuchi et al. | Jan 2008 | A1 |
20080031463 | Davis | Feb 2008 | A1 |
20080033731 | Vinton et al. | Feb 2008 | A1 |
20080126104 | Seefeldt et al. | May 2008 | A1 |
20080140393 | Kim et al. | Jun 2008 | A1 |
20100023336 | Shmunk | Jan 2010 | A1 |
20100286991 | Hedelin et al. | Nov 2010 | A1 |
20110035214 | Morii | Feb 2011 | A1 |
20110173012 | Rettelbach et al. | Jul 2011 | A1 |
20110178795 | Bayer et al. | Jul 2011 | A1 |
20110264454 | Ullberg et al. | Oct 2011 | A1 |
20120029924 | Duni et al. | Feb 2012 | A1 |
20120029925 | Duni et al. | Feb 2012 | A1 |
20130117028 | Kim | May 2013 | A1 |
20130218577 | Taleb et al. | Aug 2013 | A1 |
Entry |
---|
Lee, GunWoo, et al. “Quality Improvement of Very Low Bit Rate HE-AAC Using Linear Prediction Module.” Audio Engineering Society Convention 125. Audio Engineering Society, 2008. |
International Searching Authority, International Search Report and Written Opinion May 30, 2012 (PCT/US12/28124). |
International Searching Authority, International Search Report and Written Opinion Jun. 4, 2012 (PCT/US12/28114). |
International Searching Authority, International Search Report and Written Opinion Jun. 6, 2012 (PCT/US12/28120). |
International Preliminary Report on Patentability dated Sep. 19, 2013 in PCT Application No. PCT/US2012/028114. |
International Preliminary Report on Patentability dated Sep. 19, 2013 in PCT Application No. PCT/US2012/028120. |
International Preliminary Report on Patentability dated Sep. 19, 2013 in PCT Application No. PCT/US2012/028124. |
International Searching Authority, International Search Report and Written Opinion Feb. 2, 2012 (PCT/US11/52026). |
Valin et al. “A full-bandwidth audio codec with low complexity and very low delay.” Proc. EUSIPCO, 2009. |
Valin et al. “A high-quality speech and audio codec with less than 10-ms delay.” Audio, Speech, and Language Processing, IEEE Transactions on 18.1 (2010): 58-67. |
Valin et al. “Constrained-Energy Lapped Transform (CELT) Codec”, IETF Internet Draft, Jul. 4, 2009. |
Kruger et al. “On Logarithmic spherical vector quantization.” Information Theory and Its Applications, 2008. ISITA 2008. International Symposium on. IEEE, 2008. |
Number | Date | Country | |
---|---|---|---|
20120232908 A1 | Sep 2012 | US |
Number | Date | Country | |
---|---|---|---|
61450041 | Mar 2011 | US |