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 compression techniques 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.
Traditional sub-band audio codecs, such as MP3, use frequency transforms with very good frequency selectivity, such as MDCT (modified discrete cosine transform) operations. These codecs produce very compact representations of tonal signals, but atonal noise can be spread out into many bins, requiring a number of non-zero coefficients to represent this content. For low-bitrate audio coding, the high frequencies are often coded with very few bits, because they are generally perceptually less important than lower frequencies. Since these bands represent a disproportionately large range of frequencies, they cover a large number of transform coefficients, and any non-zero coefficients become very expensive to code in terms of bitrate. Often there are only enough bits for a relatively small number of non-zero coefficients, and the resulting coded signal can sound very tonal, even if the original input signal was not tonal. This can result in the creation of a type of distortion called “birdie” artifacts or musical noise. Birdie artifacts are common in low bitrate MP3 files and typically manifest as metallic tones that appear and disappear at random, and are mainly caused by quantizing the spectrum very coarsely, such that if there are many values in the spectrum that are random, only a few may end up being non-zero after quantization, creating noise that sounds like tones.
Current methods of reducing distortion caused by birdie artifacts include using low-pass filters to reduce the amount of signal to quantize. This approach however does not eliminate these artifacts if the effect is seen in the passband of the filter.
What is needed, therefore, is a method and system that more effectively eliminates birdie artifacts than provided in current audio coding systems.
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 dynamically spreading transform coefficients over multiple frequencies based on the available bitrate of an audio codec to reduce the overall tonality of the signal when there are only enough bits to code a relatively small number of non-zero coefficients. This helps to eliminate “birdie” artifacts and similar compression artifacts and replaces the artifacts with more natural sounding content. When the bitrate is increased, the magnitude of the spreading is reduced and the efficiency of the original frequency-selective transform for tonal signals is restored. The method includes a two-step process that can achieve a high degree of spreading using an invertible process with very low computational complexity. Additional side information gives the encoder further control over the degree of the spreading based on properties of the original signal, to allow the accurate representation of the input signal, which may happen to be very tonal in the high frequencies.
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 an audio coding scheme implemented in a codec (coder-decoder) system. The audio coding scheme operates on a spectrum and is invertible. In an overall process of the two-step coefficient spreading method, the spectrum of frequency coefficients is rotated based on a defined rotation angle, and is then quantized. The rotation transform operation is then reversed so that a previously sparse spectrum (i.e., one with mostly zero values) becomes one that has many non-zero values.
In an embodiment, and in connection with the PVQ function 112, the encoder 100 uses a technique known as band folding, which delivers an effect similar to 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 frequency coefficients are grouped 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 that band corresponding to 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 bands 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.
Due to memory and complexity issues, a band may be decomposed into one or more partitions, with each partition covering some subset of coefficients, which are coded as a single unit.
In an embodiment, a coefficient spreading process 220 in the decoder 200 applies a spreading process to each partition separately if the number of bits used to code the partition is sufficiently low, as compared to a defined threshold. A gain factor, g, is computed as some function of one or more of the following: the number of bits used to code the partition, the number of coefficients in the partition, the size of the codebook(s) used to code the coefficients, and other implied or coded side information, and any other suitable parameters. In a preferred embodiment, the gain starts out near one and approaches zero as the size of the codebook used to code the partition increases. In addition, there are three selectable levels of spreading, which are signaled once per audio frame, and a fourth level that disables spreading entirely. The spreading function may also be disabled once the number of bits used to code the partition is sufficiently high.
In partitions where the spreading function is enabled, a two-step spreading process proceeds as shown in
The dequantized coefficients are then grouped into a linear array, act 406. These dequantized coefficients may be re-ordered so that all of the coefficients from a single tile are contiguous. Members of the contiguous array may be separated from each other by a distance referred to as a “stride” or “stride length” or “stride interval,” with adjacent members being separated by a stride of 1. In an embodiment, each tile is processed independently in order to ensure that the spreading process does not introduce any pre-echo artifacts.
As shown in
s
l
=|√M+½|
where M is the number of coefficients from the current tile in the partition.
This optional first rotation step may be omitted if M is too small, i.e., smaller than a defined threshold number of coefficients. In an example implementation, the first step is omitted if M<8.
The process then proceeds with a second rotation step, act 410, in which a series of 2-D rotations by a second angle of θ is applied to successive pairs of coefficients in a tile separated by a “short stride” interval, ss. In an embodiment, the short stride interval length is always equal to one.
The rotations of the coefficient pairs by the angle θ in act 410 decay most quickly when θ is near zero, and decay more slowly as θ approaches π/4. For large bands, small amounts of spreading decay relatively quickly, only affecting a few nearby coefficients. By contrast, successive rotations by the first angle π/2−θ in the optional first rotation step decay more slowly when θ is near zero, and decay more quickly as θ approaches π/4. The combination of these two rotation steps thus allows for efficient, controlled spreading even in a large band, producing a relatively flat floor regardless of the amount of spreading employed.
If two rotation steps are applied, they may be applied by the decoder in any order, that is, as a long stride rotation followed by short stride rotation, or short stride rotation followed by long stride rotation. The encoder will then perform the inverse of these operations in reverse order. In general, an optional series of rotations is the one that has the long stride, and in an embodiment, the series with the short stride (adjacent coefficients) is the one that is always performed.
The coefficient spreading process uses a series of orthonormal transformations, and is thus invertible. In an embodiment, these orthonormal transformations are implemented in a decoder-side coefficient spreading component 220 in decoder 200. Thus, with reference to
For purposes of the present description, the terms “component,” “module,” 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.
Embodiments are directed to a method and system of transforming a first spectrum having few non-zero values into a spectrum having a large number of non-zero values, the sparse spectrum including a number N of points lying in a plane, with the method comprising: defining, in a processor-based device, a rotation angle for rotating successive pairs of points of the first spectrum, wherein the rotation angle is between π/4 and π/2; applying a first rotation operation using the rotation angle on a first set of successive pairs of points, wherein members of each pair of points of the first set of successive pairs of points are separated by a first stride length; and applying a second rotation operation using a second rotation angle on a different set of successive pairs of points, wherein members of each pair of points of the different set of successive pairs of points are separated by a second stride length.
Embodiments are also directed to a method and system of coding an audio signal in an audio coding system comprising a decoder circuit coupled to an encoder circuit, with the method comprising: grouping frequency domain coefficients generated by a transform function performed on an input audio signal into a plurality of partitions, wherein each partition spans some subset of frequencies in a band, and wherein each partition is coded by the processor-based device using a defined number of bits, and further wherein the frequency domain coefficients are coded using one or more codebooks; arranging the coefficients for a first partition into a linear array; computing a gain factor for the bits of first partition; deriving a rotation angle for successive pairs of coefficients of the linear array based on the gain factor, wherein the rotation angle is between π/4 and π/2; and applying one or more rotation operations to successive pairs of coefficients in the linear array using a defined rotation angle and a defined stride length for each rotation operation of the one or more rotation operations, wherein the one or more rotation operations includes a rotation operation in which the defined stride length is greater than a unity distance between members of the successive pairs of coefficients.
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. patent application No. 61/450,060, filed on Mar. 7, 2011 and entitled “Method and System for Two-Step Spreading for Tonal Artifact Avoidance in Audio Coding” which is incorporated herein in its entirety.
Number | Date | Country | |
---|---|---|---|
61450060 | Mar 2011 | US |