WO2007077280A1 - System and method for the rapid perceptual quantification and scalable coding of audio signals - Google Patents
System and method for the rapid perceptual quantification and scalable coding of audio signals Download PDFInfo
- Publication number
- WO2007077280A1 WO2007077280A1 PCT/ES2006/070190 ES2006070190W WO2007077280A1 WO 2007077280 A1 WO2007077280 A1 WO 2007077280A1 ES 2006070190 W ES2006070190 W ES 2006070190W WO 2007077280 A1 WO2007077280 A1 WO 2007077280A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- values
- spectrogram
- prediction
- quantification
- signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
- G10L19/04—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
- G10L19/16—Vocoder architecture
- G10L19/18—Vocoders using multiple modes
- G10L19/24—Variable rate codecs, e.g. for generating different qualities using a scalable representation such as hierarchical encoding or layered encoding
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
- G10L19/02—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
- G10L19/02—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
- G10L19/032—Quantisation or dequantisation of spectral components
Definitions
- the present invention fits within the perceptual encoders, for the storage or transmission of digital audio files or images efficiently, without noticeable losses. It focuses on audio compression, but the principles on which it is based can be extended directly to image compression.
- the present invention is based on the same principles that have been used, for example, in the different ISO / MPEG standards (MP3, AAC, etc. see references [1] and [2]) for audio compression, well known. This includes: sampling and digitization of short audio segments over time, transformation of these into the spectral domain using FFT, DCT, MDCT, Wavelet, etc., calculation of auditory masking thresholds and quantification and coding of samples in the spectral domain depending on these thresholds.
- the quantification and coding process is performed in such a way that the resulting file can be decoded at a certain bit rate.
- This has its advantages in certain areas, for example if the decoding is done by reading the file from an optical medium (eg a CD whose reading speed) or from a network link at a constant transmission rate (for example, a telephone link).
- decoding at a constant bit rate loses its meaning when the data access speed is not constant and / or this is much higher than that required to decode the data in real time (eg a hard disk , or a CD or DVD reading a song encoded in MP3) or if the transmission is through a packet switching network (eg Internet), the latter being precisely the most common cases.
- constant rate coding makes it difficult for said coding to be optimal for the signal to be encoded. For example, if a 128 Kbps rate is set, we would be wasting bits in the simplest parts (eg silences or simple low-frequency sounds) and vice versa, in more complex parts where more bits might be needed for an encoding transparent (that is, with inaudible distortion), quality would have to be sacrificed. There are techniques to solve this problem in part, such as bit reserve or coding using a bitrate variable, but inevitably complicate both the encoder and the decoder and are also far from being optimal.
- the quantification and coding process of the most common current standards is based on OCF (Optimum Coding in the Frequency Domairi) [3], so that the spectral coefficients of each critical band are quantified and encoded by Huffman coding following an iterative process implemented through two nested loops.
- the internal loop is about assigning the largest possible quantification step to each critical band so that the quantization noise remains below the masking threshold in said critical band.
- the external loop verifies that, once Huffman coding of the coefficients in each of the critical bands has been performed, the maximum number of bits allowed for each audio segment is not exceeded (set by the bit rate: a typical value is 128 Kbps for the MP3). Otherwise, the cycle begins again with a larger quantification step.
- a solution to these described problems is proposed: optimal coding not dependent on a bit reading rate, but exclusively on the characteristics of the signal to be encoded and on a quality criterion; scalability based on the auditory model and a hierarchy based on more or less unpleasant perception models of the distortion introduced; spectral prediction, and even prediction based on physical modeling and / or instrument samples, so that it would be necessary to quantify perceptually and encode only the prediction residue, plus the parameters of said model and / or samples.
- the system proposed in the present invention shares many of the characteristics of the best known audio perceptual compressors.
- the system proposed here presents two fundamental novel characteristics: on the one hand, the system of quantification of the spectral values, attending to the model of auditory masking, and on the other the ability to perform an efficient predictive coding in the spectral domain .
- the steps to follow for the encoding of an audio signal are described below, with special emphasis on the quantification method:
- the time domain signal typically coded with PCM, is segmented into computationally manageable audio parts, i.e. of a few seconds. This segmentation can be done automatically or manually, according to formal criteria, choosing musically homogeneous parts, since this
- Each audio part is further subdivided into segments of suitable length for transformation to a suitable domain to apply a model of auditory masking.
- the most common transforms are: FFT, DCT, MDCT, 110 Wavelet, etc.
- the philosophy of this system is to generate, from the transformed segments, the spectrogram image.
- This will be a grayscale image of a variable size, depending on the length of the corresponding audio part. For example, a
- 115 spectrogram generated from the 256-point DCT of the successive segments of about 8 seconds of audio would have a size of 256x1380 points. It is interesting to use DCT, MDCT (or Wavelet transformations with real spectral coefficients), separating the coefficients into module + signs. In this way, we obtain spectral values similar to those of the FFT module, but whose phase (signs) is much more
- phase of the FFT each sign, that is, each phase value, can be encoded with a single bit
- any binary compressor obtains compression ratios of the order of 1:20 for these signs .
- Wavelet transform can also be advantageous, provided that a suitable auditory masking model is available for it.
- the resulting masking would be the maximum between the original and the result of the convolution. You can even define a different scattering function for each frequency (row).
- the next step is to quantify the values of the signal so that the quantization noise at each point is below the corresponding threshold.
- 175 masking threshold allows in each case. If the initial step is the value of the complete dynamic range, (for example, using 16 bits of quantification, 65535) and in subsequent iterations the step is divided by 2, the privileged values would be those corresponding to the multiples of the step in each iteration, that is, the powers of 2 and their multiples.
- any other set of privileged values could be used, and even adaptively chosen, after signal analysis.
- a possible quantification algorithm would be the following:
- spectral value 185 a) Normalize and scale the total spectral values, for example using the dynamic range allowed by 16 quantization bits, so that the maximum corresponds to 65535 and the minimum to 0. b) Perform the same operation with the masking thresholds 190 corresponding to each spectral value. c) Define the total dynamic range as initial quantification step, in this case 65535. d) Divide each spectral value of the signal by said step and separate the quotient and the rest. If the rest is greater than half the step of
- the powers of 2 respond reasonably well to the dynamics of the audio signals 220: the distance between two of them is smaller for small values and greater for large ones, which are less likely.
- the multiples of the powers of two also have an interesting structure, for example:
- 256 x 3 768 (01100000000)
- 256 x 5 1280 (10100000000)
- 256 x 6 1536 (11000000000)
- 256 x 7 1792 (11100000000)
- step d) The divisions that are made in step d) are always by powers of 2, so they can be implemented simply by binary operations of
- This algorithm can be used in a general way for other sets of privileged values 255 without more than applying it on the preprocessed coefficients properly so that a unique correspondence between the desired privileged values and the powers of two and their multiples is established.
- bit planes are simply arrays of zeros or
- Fine grain scalability can easily be achieved by performing said separation in bit planes, subdividing each plane into segments of appropriate size and compressing each segment separately. These segments would be sorted in order of perceptual importance: typically, from the segments
- any decoding bit rate can be selected between, for example, 8 Kbps and 192 Kbps in 1 Kbps jumps. In the system proposed here it would be easy to achieve no only the scalability of fine grain,
- the scenario where scalability is probably most useful is streaming audio over the Internet.
- the number of transmission bits could be adjusted to the size of the payload of an IP packet, following the 310 TCP protocol, to dynamically adapt to the available bandwidth of each client, for example.
- the speed of coding through this system would make it especially suitable for real-time applications.
- the compression algorithm described here is 315 perfectly extensible to the case of image compression (it is, in fact, an image compression - spectrograms - in grayscale) as long as there is a adequate visual masking model.
- the FFT phase is a very irregular signal and very difficult to compress. That is why the MDCT is usually used, which is a transformation that generates real spectral coefficients, and whose module is similar to that of the FFT.
- the problem with the MDCT is that its module is phase sensitive. That is, the MDCT module of a pure tone is somewhat different depending on
- the note L ⁇ u has its fundamental frequency at 440 Hz, and the fundamental frequency of the rest of the notes is related to it by approximately whole fractions. If the size of the analysis window for spectrogram elaboration is such that the most probable frequencies produce produce approximately an integer number of periods in said windows, the
- SUBSTITUTE SHEET (RULE 26) it is necessary to use different analysis windows for each of the musically relevant frequencies. It would also be necessary for spectral transformation 365 to apply a perceptual masking model to the transformed coefficients. Fortunately, all this can be achieved through the Wavelet transform.
- Wavelet multi-resolution windows taking into account the relationships between the most important musical frequencies of the piece to be compressed, according to its scale (tempered, chromatic, oriental, ...) to its hue, etc.
- Base functions similar to sinusoids will be used, such as cosine wavelets or Morlet wavelets.
- 390 apply said predictive coding: a) in the time domain, before obtaining the spectrogram image, b) in the frequency domain, before quantifying, c) in the frequency domain, quantifying the residue and readjusting the prediction, d) in the frequency domain from the values already quantified, e) use prediction in each bit plane.
- LPC Linear Predictive Coding
- the signal could not be recovered from the quantified residue.
- a lossless spectral transformation can be used, such as intMDCT [5], and a predictive coding of the unquantified spectrogram can be performed. If a multiresolution transform is used (adjusting the
- the prediction can be more efficient and a compressor "practically without losses", or without losses with respect to spectral coefficients could be developed.
- predictive coding can be performed on the spectrogram rows. This would typically be done through the realization of a current value prediction filter whose coefficients would be the weights of a certain linear combination of the
- SUBSTITUTE SHEET (RULE 26) targets where the prediction would have failed. In this way, with a simple "XOR" operation between the prediction and the fault image we could obtain the original image. To obtain a compression gain, a priori, 500 would simply need to hit more points than if the prediction was simply an image of zeros or ones (ie not predicting). The prediction could be elaborated in a similar way to that suggested in a), b) or c), setting a threshold from which the prediction is considered 1 or 0.
- a very harmonic signal for example a violin note held for several seconds
- a series of horizontal white bands appear more or less equally spaced in frequency, corresponding to the harmonic tones that constitute the majority of the sound energy, plus a series of intermediate values that could be considered "inharmonious", that is, noise, somehow.
- This phenomenon also occurs in the human voice spectrogram, being well known and exploited in predictive voice encoders.
- 16 SUBSTITUTE SHEET (RULE 26) a column vector of the same length as the spectrogram columns. 530 b) An auxiliary column vector that is monotonously decreasing and of the same size as the columns thereof is added to the spectrogram matrix. c) The estimation vector is used to sort all the spectrogram columns according to it. Note that the auxiliary vector will be in turn untidy, so that if we now order the spectrogram according to said auxiliary vector, we will recover the original spectrogram. Therefore that vector must also be encoded, so that the decoder can use it.
- the spectrogram has sufficient temporal correlation, we will have that in 540 the new ordered image, the white bands corresponding to the harmonics are placed together at the top of the spectrogram, and the rest is a more or less noisy sequence of spectral values.
- the ordered spectral estimation vector typically has a gently decreasing structure from a certain frequency. That is, what would be a slightly colored white 545 noise. If it can be assumed that this situation is more or less stationary (which does not happen if, for example, there are percussion instruments), only the upper part of the spectrogram could be encoded and the lower part modeled as noise, coding the parameters of said model instead of the original values.
- Each of these parts is further subdivided into short segments of time, for example of about 11 ms. for the application of some mathematical transform that transforms the temporal samples into spectral coefficients, such as the MDCT (or, where appropriate, some 575 multiresolution transform appropriate to the frequency characteristics of the signal to be encoded, as explained).
- some mathematical transform that transforms the temporal samples into spectral coefficients, such as the MDCT (or, where appropriate, some 575 multiresolution transform appropriate to the frequency characteristics of the signal to be encoded, as explained).
- the coefficients module constitutes the image of the 580 spectrogram module.
- the signs can be saved in a binary image of the same size, where 1 corresponds to the positive numbers and 0 to the negative ones or those that have a null module.
- a prediction model for the spectrogram rows can be developed so that what is quantified is the prediction residue, taking into account the original masking threshold at that point, and using the sum of this quantified residue plus the prediction for
- each of these bit planes subdivide each of these bit planes into smaller sections and establish a hierarchy that orders those planes from the most important to the least important. For example, 600 taking as more important the sections of the plane of more significant bits located in lower frequencies and as less important the sections of the plane of less significant bits located in higher frequencies.
- each section of the spectrogram will be decompressed, as well as the image of signs, they will be ordered again according to the criteria chosen in step 6 and the inverse transform will be performed to the one used in step 2 to obtain the corresponding signal in the 620 time domain.
- the 630 quantification-coding method is less complex and much more computationally efficient (and therefore much faster to perform) than those based on OCF, as is the case with the best-known audio compressors , such as MP3, AAC, etc.
- the proposed quantification-coding system allows scalable bit chains to be developed, as well as decodable bit chains at a constant bit rate, 635 also very efficiently, reaching quality / file size commitments at the state level of current art. Therefore, it could be interesting to use the present invention in any field, but particularly in the compression / transmission of scalable audio data in real time, development of compression and decompression devices of low cost and / or low energy consumption.
- MPEG "International standard IS 11172-3. Coding of moving pictures and associated audio for digital storage media at up to 1-5 Mbit / s, part 3: Audio," 1991.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Computational Linguistics (AREA)
- Spectroscopy & Molecular Physics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
Sistema y método para cuantificación perceptual rápida y codificación escalable de señales de audio System and method for rapid perceptual quantification and scalable coding of audio signals
a) SECTOR DE LA TÉCNICAa) TECHNICAL SECTOR
La presente invención se encuadra dentro de los codificadores perceptuales, para el almacenamiento o la transmisión de archivos digitales de audio o imágenes de forma eficiente, sin pérdidas perceptibles. Se centra en la compresión de audio, pero los principios en los que se basa se pueden extender de forma directa a la compresión de imágenes.The present invention fits within the perceptual encoders, for the storage or transmission of digital audio files or images efficiently, without noticeable losses. It focuses on audio compression, but the principles on which it is based can be extended directly to image compression.
b) ESTADO DE LA TÉCNICAb) STATE OF THE TECHNIQUE
La presente invención se basa en los mismos principios que se vienen utilizando, por ejemplo, en los distintos estándares ISO/MPEG (MP3, AAC, etc. ver referencias [1] y [2]) para la compresión de audio, sobradamente conocidos. Esto incluye: muestreo y digitalización de segmentos cortos de audio en el tiempo, transformación de éstos al dominio espectral utilizando FFT, DCT, MDCT, Wavelet, etc., cálculo de umbrales de enmascaramiento auditivo y cuantificación y codificación de las muestras en el dominio espectral en función de dichos umbrales.The present invention is based on the same principles that have been used, for example, in the different ISO / MPEG standards (MP3, AAC, etc. see references [1] and [2]) for audio compression, well known. This includes: sampling and digitization of short audio segments over time, transformation of these into the spectral domain using FFT, DCT, MDCT, Wavelet, etc., calculation of auditory masking thresholds and quantification and coding of samples in the spectral domain depending on these thresholds.
En la mayoría de los codificadores actuales, el proceso de cuantificación y codificación se realiza de forma tal que el archivo resultante se puede decodificar a una determinada tasa de bits. Esto tiene sus ventajas en determinados ámbitos, por ejemplo si la decodificación se realiza leyendo el archivo desde un soporte óptico (p.ej. un CD cuya velocidad de lectura) o desde un enlace de red a una tasa de transmisión constante (por ejemplo, un enlace telefónico). Sin embargo, la decodificación a tasa de bits constante pierde su sentido cuando la velocidad de acceso a los datos no es constante y/o ésta es es mucho mayor que la necesaria para decodificar los datos en tiempo real (p.ej. un disco duro, o un CD o DVD leyendo una canción codificada en MP3) o si la transmisión es a través de una red de conmutación de paquetes (p.ej. Internet), siendo estos últimos casos precisamente los más habituales. La desventaja de la codificación a tasa constante es que dificulta que dicha codificación sea óptima para la señal a codificar. Por ejemplo, si se fija una tasa de 128 Kbps, estaríamos desperdiciando bits en las partes más simples (p.ej. silencios o sonidos sencillos de baja frecuencia) y al revés, en partes más complejas donde quizás fuesen necesarios más bits para una codificación transparente (esto es, con distorsión inaudible), se tendría que sacrificar la calidad. Existen técnicas para solventar en parte este problema, como bit reservoir o codificación mediante variable bitrate, pero complican inevitablemente tanto el codificador como el decodificador y además distan de ser óptimas.In most current encoders, the quantification and coding process is performed in such a way that the resulting file can be decoded at a certain bit rate. This has its advantages in certain areas, for example if the decoding is done by reading the file from an optical medium (eg a CD whose reading speed) or from a network link at a constant transmission rate (for example, a telephone link). However, decoding at a constant bit rate loses its meaning when the data access speed is not constant and / or this is much higher than that required to decode the data in real time (eg a hard disk , or a CD or DVD reading a song encoded in MP3) or if the transmission is through a packet switching network (eg Internet), the latter being precisely the most common cases. The disadvantage of constant rate coding is that it makes it difficult for said coding to be optimal for the signal to be encoded. For example, if a 128 Kbps rate is set, we would be wasting bits in the simplest parts (eg silences or simple low-frequency sounds) and vice versa, in more complex parts where more bits might be needed for an encoding transparent (that is, with inaudible distortion), quality would have to be sacrificed. There are techniques to solve this problem in part, such as bit reserve or coding using a bitrate variable, but inevitably complicate both the encoder and the decoder and are also far from being optimal.
Por otro lado, el proceso de cuantificación y codificación de los estándares actuales más habituales está basado en OCF (Optimum Coding in the Frequency Domairi) [3], de modo que los coeficientes espectrales de cada banda crítica se cuantifican y codifican mediante codificación Huffman siguiendo un proceso iterativo implementado mediante dos bucles anidados. En el bucle interno se trata de asignar el escalón de cuantificación más grande posible a cada banda crítica de modo que el ruido de cuantificación permanezca por debajo del umbral de enmascaramiento en dicha banda crítica. El bucle externo comprueba que, una vez realizada la codificación Huffman de los coeficientes en cada una de las bandas críticas, no se supere el número máximo de bits permitido para cada segmento de audio (fijado por la tasa de bits: un valor típico es 128 Kbps para el MP3). En caso contrario, el ciclo comienza de nuevo con un escalón de cuantificación más grande.On the other hand, the quantification and coding process of the most common current standards is based on OCF (Optimum Coding in the Frequency Domairi) [3], so that the spectral coefficients of each critical band are quantified and encoded by Huffman coding following an iterative process implemented through two nested loops. The internal loop is about assigning the largest possible quantification step to each critical band so that the quantization noise remains below the masking threshold in said critical band. The external loop verifies that, once Huffman coding of the coefficients in each of the critical bands has been performed, the maximum number of bits allowed for each audio segment is not exceeded (set by the bit rate: a typical value is 128 Kbps for the MP3). Otherwise, the cycle begins again with a larger quantification step.
Este proceso no sólo es muy costoso computacionalmente sino que dificulta mucho la escalabilidad de la decodificación (esto es, que se pueda definir una jerarquía en los bits codificados de forma que transmitiendo sólo "los bits más importantes" podamos decodificar una señal similar a la original, si bien más o menos degradada dependiendo de la cantidad de bits de los que se prescinda) puesto que una vez asignadas las palabras código Huffman ya no es posible establecer cuáles son los bits más o menos significativos de los coeficientes.This process is not only very computationally expensive but it also makes the scalability of decoding very difficult (that is, that a hierarchy can be defined in the coded bits so that by transmitting only "the most important bits" we can decode a signal similar to the original , although more or less degraded depending on the number of bits that are dispensed with) since once the Huffman code words have been assigned, it is no longer possible to establish which are the more or less significant bits of the coefficients.
Para evitar esto, se han desarrollado recientemente algunos sistemas de codificación escalable, pero normalmente no hacen un uso tan eficiente del modelo deTo avoid this, some scalable coding systems have been recently developed, but they usually do not make such an efficient use of the
2 HOJA DE SUSTITUCIÓN (REGLA 26) enmascaramiento auditivo como los algoritmos no escalables. Además el problema de definir dicha jerarquía de bits más importantes no es nada trivial, puesto que cuando la degradación de la señal es inevitable, la cantidad de distorsión introducida es una medida fuertemente subjetiva.2 SUBSTITUTE SHEET (RULE 26) auditory masking as non-scalable algorithms. Moreover, the problem of defining said hierarchy of most important bits is not trivial, since when the degradation of the signal is inevitable, the amount of distortion introduced is a strongly subjective measure.
Por otro lado, a pesar de que las señales musicales tienen una evidente redundancia tanto temporal (ritmos y armonías que se repiten) como espectral (la propia estructura de las notas musicales es, básicamente, un tono fundamental y varios armónicos a frecuencias múltiplos de la de éste), aún no se ha elaborado con éxito algún codificador comercial que explote estas características, con la posible excepción del MPEG-2 AAC, que incluye cierta capacidad de predicción basándose en las muestras cercanas a aquella que se quiere codificar.On the other hand, although the musical signals have an obvious redundancy both temporal (rhythms and harmonies that are repeated) and spectral (the structure of the musical notes itself is basically a fundamental tone and several harmonics at multiple frequencies of the of this), a commercial encoder that exploits these characteristics has not yet been successfully developed, with the possible exception of the MPEG-2 AAC, which includes some predictability based on the samples close to the one to be encoded.
En la presente invención se propone una solución a estos problemas descritos: codificación óptima no dependiente de una tasa de lectura de bits, sino exclusivamente de las características de la señal a codificar y de un criterio de calidad; escalabilidad basada en el modelo auditivo y en una jerarquía atendiendo a modelos de percepción más o menos desagradable de la distorsión introducida; predicción espectral, e incluso predicción en base a modelado físico y/o a muestras de instrumentos, de forma que se tendría que cuantificar perceptualmente y codificar solamente el residuo de predicción, más los parámetros de dicho modelo y/o las muestras.In the present invention, a solution to these described problems is proposed: optimal coding not dependent on a bit reading rate, but exclusively on the characteristics of the signal to be encoded and on a quality criterion; scalability based on the auditory model and a hierarchy based on more or less unpleasant perception models of the distortion introduced; spectral prediction, and even prediction based on physical modeling and / or instrument samples, so that it would be necessary to quantify perceptually and encode only the prediction residue, plus the parameters of said model and / or samples.
c) DESCRIPCIÓN DETALLADA DE LA INVENCIÓNc) DETAILED DESCRIPTION OF THE INVENTION
El sistema que se propone en la presente invención comparte muchas de las características de los compresores perceptuales de audio más conocidos. Sin embargo, el sistema que aquí se propone presenta dos características novedosas fundamentales: por un lado, el sistema de cuantificación de los valores espectrales, atendiendo al modelo de enmascaramiento auditivo, y por otro la capacidad de realizar una codificación predictiva eficiente en el dominio espectral. A continuación se describen los pasos a seguir para la codificación de una señal de audio, haciendo especial hincapié en el método de cuantificación:The system proposed in the present invention shares many of the characteristics of the best known audio perceptual compressors. However, the system proposed here presents two fundamental novel characteristics: on the one hand, the system of quantification of the spectral values, attending to the model of auditory masking, and on the other the ability to perform an efficient predictive coding in the spectral domain . The steps to follow for the encoding of an audio signal are described below, with special emphasis on the quantification method:
3 HOJA DE SUSTITUCIÓN (REGLA 26) Segmentación de la señal temporal y generación del espectrograma de cada parte3 SUBSTITUTE SHEET (RULE 26) Segmentation of the temporal signal and spectrogram generation of each part
100100
La señal en el dominio del tiempo, típicamente codificada con PCM, se segmenta en partes de audio computacionalmente manejables, i.e. de unos pocos segundos. Esta segmentación se puede hacer de forma automática o manual, atendiendo a criterios formales, eligiendo partes musicalmente homogéneas, puesto que elloThe time domain signal, typically coded with PCM, is segmented into computationally manageable audio parts, i.e. of a few seconds. This segmentation can be done automatically or manually, according to formal criteria, choosing musically homogeneous parts, since this
105 favorece la capacidad de compresión del algoritmo.105 favors the compression capacity of the algorithm.
Cada parte de audio se subdivide a su vez en en segmentos de longitud adecuada para su transformación a un dominio adecuado para aplicar un modelo de enmascaramiento auditivo. Las transformadas más comunes son: FFT, DCT, MDCT, 110 Wavelet, etc.Each audio part is further subdivided into segments of suitable length for transformation to a suitable domain to apply a model of auditory masking. The most common transforms are: FFT, DCT, MDCT, 110 Wavelet, etc.
La filosofía de este sistema es generar, a partir de los segmentos transformados, la imagen del espectrograma. Ésta será una imagen en escala de grises de un tamaño variable, según la longitud de la parte de audio a que corresponda. Por ejemplo, unThe philosophy of this system is to generate, from the transformed segments, the spectrogram image. This will be a grayscale image of a variable size, depending on the length of the corresponding audio part. For example, a
115 espectrograma generado a partir de la DCT de 256 puntos de los sucesivos segmentos de unos 8 segundos de audio tendría un tamaño de 256x1380 puntos. Es interesante usar DCT, MDCT (o transformaciones Wavelet con coeficientes espectrales reales), separando los coeficientes en módulo + signos. De este modo, obtenemos unos valores espectrales similares a los del módulo de la FFT, pero cuya fase (signos) es mucho más115 spectrogram generated from the 256-point DCT of the successive segments of about 8 seconds of audio would have a size of 256x1380 points. It is interesting to use DCT, MDCT (or Wavelet transformations with real spectral coefficients), separating the coefficients into module + signs. In this way, we obtain spectral values similar to those of the FFT module, but whose phase (signs) is much more
120 fácil de codificar que la fase de la FFT (cada signo, es decir, cada valor de fase, se puede codificar con un solo bit), de modo que cualquier compresor binario obtiene para dichos signos relaciones de compresión del orden de 1:20. Teniendo esto en cuenta, y dado que los modelos de enmascaramiento más usuales prescinden de la fase, el resto del algoritmo se centrará en comprimir el módulo de la transformada correspondiente.120 easy to encode that the phase of the FFT (each sign, that is, each phase value, can be encoded with a single bit), so that any binary compressor obtains compression ratios of the order of 1:20 for these signs . With this in mind, and given that the most usual masking models dispense with the phase, the rest of the algorithm will focus on compressing the corresponding transform module.
125 En este sentido cabe señalar que la transformada Wavelet también puede resultar ventajosa, siempre que se disponga de un modelo de enmascaramiento auditivo adecuado para la misma.125 In this regard, it should be noted that the Wavelet transform can also be advantageous, provided that a suitable auditory masking model is available for it.
Se elabora de modo similar una imagen del mismo tamaño que el espectrograma 130 donde a cada punto se asigne el valor correspondiente que toma el umbral deAn image of the same size as spectrogram 130 is elaborated in a similar manner where the corresponding value of the threshold of
4 HOJA DE SUSTITUCIÓN (REGLA 26) enmascaramiento. Para ello se puede utilizar alguno de los modelos psicoacústicos propuestos en el estándar MPEG/ Audio [1], o cualquier otro. En caso de que se utilicen para el modelo transformadas de más de 256 puntos, habría que diezmar adecuadamente, si bien lo más razonable (y experimentalmente da buen resultado) sería 135 utilizar la misma transformada (p.ej. MDCT con overlapping del 50%) con el mismo número de puntos (p.ej. 256) tanto para el cálculo del umbral de enmascaramiento como para el espectrograma de la propia señal.4 SUBSTITUTE SHEET (RULE 26) masking For this, one of the psychoacoustic models proposed in the MPEG / Audio standard [1], or any other, can be used. If more than 256 points are used for the model, it would be necessary to tithe properly, although the most reasonable (and experimentally good result) would be 135 to use the same transform (eg MDCT with 50% overlapping ) with the same number of points (eg 256) both for the calculation of the masking threshold and for the spectrogram of the signal itself.
La MDCT tiene la ventaja sobre la DCT de que la compactación de coeficientesThe MDCT has the advantage over the DCT of compacting coefficients
140 es algo mayor al realizarse un enventanado previo a la señal en el dominio del tiempo, además de favorecer la redundancia temporal entre las columnas de la imagen140 is somewhat greater when a poisoning is performed prior to the time domain signal, in addition to favoring the temporal redundancy between the columns of the image
(interesante en la codificación predictiva) gracias al overlapping temporal. Sin embargo, tiene la desventaja de que en casos extremos, incluso con MDCT de sólo 256 puntos podría percibirse pre-eco (la MDCT de 256 puntos procede del solape de dos ventanas(interesting in predictive coding) thanks to temporary overlapping. However, it has the disadvantage that in extreme cases, even with only 256-point MDCT could be perceived pre-echo (the 256-point MDCT comes from the overlap of two windows
145 de 512 puntos, lo cual ya es un tamaño suficientemente grande para notar los efectos del pre-eco). Se puede utilizar cualquiera de las técnicas existentes {Temporal Noise145 of 512 points, which is already a size large enough to notice the effects of the pre-echo). You can use any of the existing techniques {Temporal Noise
Shaping, por ejemplo) para evitar el pre-echo.Shaping, for example) to avoid pre-echo.
La disposición del la imagen de los sucesivos umbrales de enmascaramientoThe arrangement of the image of the successive masking thresholds
150 simultáneo para cada segmento permite aplicar modelos de enmascaramiento temporal de forma directa: por ejemplo, eligiendo una función de dispersión adecuada150 simultaneous for each segment allows to apply temporary masking models directly: for example, choosing a suitable dispersion function
(típicamente una función escalón con pendiente decreciente a partir de éste y de la duración adecuada -200 ms corresponerían a 20 o 30 columnas del espectrograma, por ejemplo-) y convolucionándola directamente con cada fila de la imagen. El umbral de(typically a step function with decreasing slope from this and of the appropriate duration -200 ms would correspond to 20 or 30 columns of the spectrogram, for example-) and convolving it directly with each row of the image. The threshold of
155 enmascaramiento resultante sería el máximo entre el original y el resultado de la convolución. Se puede incluso definir una función de dispersión distinta para cada frecuencia (fila).The resulting masking would be the maximum between the original and the result of the convolution. You can even define a different scattering function for each frequency (row).
Una vez que se tienen la imagen del espectrograma de la señal y la del umbral de 160 enmascaramiento, el siguiente paso es cuantificar los valores de la señal de forma que el ruido de cuantificación en cada punto quede por debajo del umbral correspondiente.Once you have the image of the spectrogram of the signal and the threshold of 160 masking, the next step is to quantify the values of the signal so that the quantization noise at each point is below the corresponding threshold.
5 HOJA DE SUSTITUCIÓN (REGLA 26) Sistema de cuantificación5 SUBSTITUTE SHEET (RULE 26) Quantification system
165 Este es uno de los puntos clave del sistema. Típicamente, usaríamos 16 bits para cuantifícar los valores espectrales (experimentalmente se observa que es suficiente, aunque en algún caso extremo podrían utilizarse más bits sin cambiar sustancialmente el algoritmo). Por tanto, tendríamos, en principio 65536 valores de cuantificación posibles. La clave del presente algoritmo es definir una serie de "valores privilegiados" y165 This is one of the key points of the system. Typically, we would use 16 bits to quantify the spectral values (experimentally it is found to be sufficient, although in some extreme cases more bits could be used without substantially changing the algorithm). Therefore, we would have, in principle 65536 possible quantification values. The key to this algorithm is to define a series of "privileged values" and
170 aprovechar el margen de ruido de cuantificación que permite el umbral de enmascaramiento para intentar que el valor final de la señal cuantificada en cada punto sea uno de estos valores privilegiados. Una forma de asignar valores privilegiados sería ir subdividiendo el rango dinámico utilizando escalones cada vez más pequeños, y en cada iteración tratar de codificar tantos coeficientes como sea posible, siempre que el170 take advantage of the quantization noise margin allowed by the masking threshold to try to make the final value of the quantized signal at each point one of these privileged values. One way to assign privileged values would be to subdivide the dynamic range using increasingly smaller steps, and in each iteration try to code as many coefficients as possible, provided that the
175 umbral de enmascaramiento lo permita en cada caso. Si el escalón inicial es el valor del rango dinámico completo, (por ejeplo, usando 16 bits de cuantificación, 65535) y en las sucesivas iteraciones el escalón se va dividiendo por 2, los valores privilegiados serían los correspondientes a los múltiplos del escalón en cada iteración, es decir, las potencias de 2 y sus múltiplos.175 masking threshold allows in each case. If the initial step is the value of the complete dynamic range, (for example, using 16 bits of quantification, 65535) and in subsequent iterations the step is divided by 2, the privileged values would be those corresponding to the multiples of the step in each iteration, that is, the powers of 2 and their multiples.
180180
En cualquier caso, podría utilizarse cualquier otro conjunto de valores privilegiados, e incluso elegirlos de forma adaptativa, previo análisis de la señal. Para el caso de la selección de las potencias de dos y sus múltiplos como conjunto de valores privilegiados, un posible algoritmo de cuantificación sería el siguiente:In any case, any other set of privileged values could be used, and even adaptively chosen, after signal analysis. In the case of the selection of the powers of two and their multiples as a set of privileged values, a possible quantification algorithm would be the following:
185 a) Normalizar y escalar el total de valores espectrales, por ejemplo utilizando el rango dinámico que permiten 16 bits de cuantificación, de forma que el máximo corresponda a 65535 y el mínimo a 0. b) Hacer la misma operación con los umbrales de enmascaramiento 190 correspondientes a cada valor espectral. c) Definir como escalón inicial de cuantificación el total del rango dinámico, en este caso 65535. d) Dividir cada valor espectral de la señal por dicho escalón y separar el cociente y el resto. Si el resto es mayor que la mitad del escalón de185 a) Normalize and scale the total spectral values, for example using the dynamic range allowed by 16 quantization bits, so that the maximum corresponds to 65535 and the minimum to 0. b) Perform the same operation with the masking thresholds 190 corresponding to each spectral value. c) Define the total dynamic range as initial quantification step, in this case 65535. d) Divide each spectral value of the signal by said step and separate the quotient and the rest. If the rest is greater than half the step of
195 cuantificación, se define un nuevo resto como: resto = escalón-resto, y se195 quantification, a new remainder is defined as: remainder = step-rest, and
6 HOJA DE SUSTITUCIÓN (REGLA 26) aumenta el cociente en una unidad (con esto último lo que hacemos es cuantificar al escalón más cercano, por encima o por debajo), e) Ese resto va a ser el error de cuantificación en caso de que utilicemos dicho escalón para cuantificar. Por tanto, si para una muestra dada dicho resto es 200 menor que el umbral de enmascaramiento, cuantificamos esa muestra al valor que resulte de multiplicar el cociente por el escalón actual. En caso contrario, se divide el escalón por 2 y se vuelve al paso d) hasta que todas las muestras estén cuantificadas.6 SUBSTITUTE SHEET (RULE 26) increase the quotient in one unit (with the latter what we do is quantify to the nearest step, above or below), e) That remainder will be the quantification error in case we use said step to quantify. Therefore, if for a given sample this remainder is 200 less than the masking threshold, we quantify that sample to the value that results from multiplying the quotient by the current step. Otherwise, divide the step by 2 and return to step d) until all samples are quantified.
205205
De este modo lo que conseguimos es tratar de que las muestras tomen el valor de los escalones (que serán las potencias de dos), o de múltiplos de los mismos, siempre que el umbral de enmascaramiento lo permita. Los valores privilegiados serán por tanto las potencias de 2 y sus múltiplos, ordenados estos últimos jerárquicamente desde elIn this way, what we achieve is to try to get the samples to take the value of the steps (which will be the powers of two), or multiples thereof, as long as the masking threshold allows it. The privileged values will therefore be the powers of 2 and their multiples, the latter ordered hierarchically from the
210 escalón más grande al más pequeño. La elección de este conjunto de valores privilegiados presenta numerosas ventajas:210 step larger to smaller. The choice of this set of privileged values has numerous advantages:
1. La expresión de las potencias de 2 en lenguaje binario es del tipo 0...010...0, es decir, sólo un 1 rodeado de ceros. Este tipo de palabras son ideales para cualquier1. The expression of the powers of 2 in binary language is of type 0 ... 010 ... 0, that is, only 1 surrounded by zeros. These types of words are ideal for any
215 compresor binario, puesto que el símbolo 0 es mucho más probable que el 1, y por tanto habrá muchos ceros seguidos, lo que se podrá explotar para mejorar la compresión.215 binary compressor, since the symbol 0 is much more likely than 1, and therefore there will be many zeros in a row, which can be exploited to improve compression.
2. Las potencias de 2 responden razonablemente bien a la dinámica de las señales 220 de audio: la distancia entre dos de ellas es menor para valores pequeños y mayor para los grandes, que son menos probables.2. The powers of 2 respond reasonably well to the dynamics of the audio signals 220: the distance between two of them is smaller for small values and greater for large ones, which are less likely.
Los múltiplos de las potencias de dos también tienen una estructura interesante, por ejemplo:The multiples of the powers of two also have an interesting structure, for example:
225 256 (00100000000)225 256 (00100000000)
256 x 3 = 768 (01100000000) 256 x 5 = 1280 (10100000000) 256 x 6 = 1536 (11000000000) 256 x 7 = 1792 (11100000000)256 x 3 = 768 (01100000000) 256 x 5 = 1280 (10100000000) 256 x 6 = 1536 (11000000000) 256 x 7 = 1792 (11100000000)
7 HOJA DE SUSTITUCIÓN (REGLA 26) 2307 SUBSTITUTE SHEET (RULE 26) 230
En todos ellos encontramos que los 8 bits menos significativos son 0.In all of them we find that the least significant 8 bits are 0.
3. Las divisiones que se efectúan en el paso d) son siempre por potencias de 2, por lo que se pueden implementar sencillamente mediante operaciones binarias de3. The divisions that are made in step d) are always by powers of 2, so they can be implemented simply by binary operations of
235 desplazamiento: los bits más significativos son el cociente, y los menos significativos el resto.235 offset: the most significant bits are the quotient, and the least significant are the rest.
4. La expresión de las potencias de 2 en formato de punto flotante, tomando base 2, presenta siempre mantisa=l, con lo que en estos casos sólo hay que codificar el4. The expression of the powers of 2 in floating point format, taking base 2, always presents mantissa = l, so in these cases you just have to code the
240 exponente.240 exponent
En la práctica, para una codificación transparente de cualquier señal de audio, incluso señales complejas de música pop-rock, bastan alrededor de 100 valores (de los 65535 inicialmente posibles), de los cuales sólo unos 15 son los que efectivamente seIn practice, for a transparent coding of any audio signal, including complex signals of pop-rock music, about 100 values (of the 65535 initially possible) are enough, of which only about 15 are the ones that are actually
245 toman más del 90% de las veces, y de estos 15 la mayoría son potencias de 2. Esto puede dar una idea de lo eficiente que puede resultar en este caso una codificación Huffman, aritmética, o una codificación mediante separación en planos de bits, o algoritmos como el ZIP o el RAR, como efectivamente es el caso: para una determinada calidad se obtienen relaciones de compresión superiores a las que se obtienen utilizando245 take more than 90% of the time, and of these 15 the majority are powers of 2. This can give an idea of how efficient Huffman encoding, arithmetic, or encoding by bit plane separation can result in this case. , or algorithms such as ZIP or RAR, as is the case indeed: for a given quality compression ratios are obtained higher than those obtained using
250 el sistema de compresión MP3 propuesto por el instituto Fraunhofer. Parece lógico pensar que si se diseñase un compresor binario específico para este tipo de datos, la ganancia de compresión podría ser aún mucho mayor.250 the MP3 compression system proposed by the Fraunhofer institute. It seems logical to think that if a specific binary compressor was designed for this type of data, the compression gain could be even greater.
Este algoritmo se puede usar de forma general para otros conjuntos de valores 255 privilegiados sin más que aplicarlo sobre los coeficientes preprocesados adecuadamente para que se establezca una correspondencia unívoca entre los valores privilegiados deseados y las potencias de dos y sus múltiplos.This algorithm can be used in a general way for other sets of privileged values 255 without more than applying it on the preprocessed coefficients properly so that a unique correspondence between the desired privileged values and the powers of two and their multiples is established.
Tan interesante como la alta compresibilidad de los valores así cuantificados esAs interesting as the high compressibility of the values thus quantified is
260 la posibilidad de escalar dichos valores, esto es, seleccionar un subconjunto de los mismos de forma que la señal se pueda decodificar, aún a expensas de introducir inevitablemente cierta cantidad de distorsión. Tal como tenemos cuantificados los valores, esto se podría hacer de forma directa sencillamente eliminando los bits menos260 the possibility of scaling these values, that is, selecting a subset of them so that the signal can be decoded, even at the expense of inevitably introducing a certain amount of distortion. As we have the values quantified, this could be done directly by simply eliminating the least bits
8 HOJA DE SUSTITUCIÓN (REGLA 26) significativos. El proceso de escalado así descrito podría realizarse de varias formas, 265 entre las que destacan por su sencillez las dos siguientes:8 SUBSTITUTE SHEET (RULE 26) significant. The scaling process thus described could be carried out in several ways, 265 among which the following two stand out for their simplicity:
1. O bien partiendo de las muestras comprimidas (con RAR, por ejemplo), descomprimiéndolas, eliminando los bits menos significativos, y volviendo a comprimir. En este caso el escalado no es directo, pero siempre será mucho1. Or starting from compressed samples (with RAR, for example), decompressing them, eliminating the least significant bits, and compressing again. In this case the scaling is not direct, but it will always be a lot
270 más rápido que "recomprimir" la señal desde el comienzo.270 faster than "recompressing" the signal from the beginning.
2. O bien separando previamente las muestras en planos de bits (p.ej. 16 planos) y comprimiendo cada uno por separado. Para este caso, el algoritmo PNG es especialmente eficiente (cada plano no deja de ser una imagen2. Or by previously separating the samples into bit planes (eg 16 planes) and compressing each one separately. For this case, the PNG algorithm is especially efficient (each plane is still an image
275 binaria). De este modo, podemos escoger los bits más significativos directamente, sin necesidad de comprimir ni descomprimir.275 binary) In this way, we can choose the most significant bits directly, without compressing or decompressing.
Cabe destacar que, de nuevo, gracias a la estructura de las palabras binarias cuantificadas, buena parte de los planos de bits son sencillamente matrices de ceros oIt should be noted that, again, thanks to the structure of the quantized binary words, a good part of the bit planes are simply arrays of zeros or
280 con muy pocos unos, con lo cual, la compresión sigue siendo muy eficiente. Se puede conseguir fácilmente escalabilidad de grano fino (fine grain scalability) realizando dicha separación en planos de bits, subdividiendo cada plano en segmentos de tamaño adecuado y comprimiendo cada segmento por separado. Dichos segmentos se ordenarían por orden de importancia perceptual: típicamente, desde los segmentos280 with very few ones, so that compression is still very efficient. Fine grain scalability can easily be achieved by performing said separation in bit planes, subdividing each plane into segments of appropriate size and compressing each segment separately. These segments would be sorted in order of perceptual importance: typically, from the segments
285 correspondientes a los bits más significativos de las frecuencias más bajas a los bits menos significativos de los segmentos de las frecuencias más altas.285 corresponding to the most significant bits of the lowest frequencies to the least significant bits of the segments of the highest frequencies.
Esta división en planos de bits y secciones de los mismos ordenadas siguiendo algún criterio prefijado dota al sistema de escalabilidad sin que en el proceso deThis division into bit planes and sections thereof arranged according to some predetermined criteria endows the scalability system without in the process of
290 elección del número de bits de decodificación se añada coste computacional alguno, puesto que las secciones ya están comprimidas y ordenadas. La escalabilidad de grano fino, en la práctica, significa que se puede seleccionar una tasa de bits de decodificación cualquiera entre, por ejemplo, 8 Kbps y 192 Kbps en saltos de 1 Kbps. En el sistema que que se propone aquí sería sencillo conseguir no sólo la escalabilidad de grano fino,If the number of decoding bits is chosen, no computational cost is added, since the sections are already compressed and sorted. The scalability of fine grain, in practice, means that any decoding bit rate can be selected between, for example, 8 Kbps and 192 Kbps in 1 Kbps jumps. In the system proposed here it would be easy to achieve no only the scalability of fine grain,
295 sino la decodificación a tasa de bits constante: bastaría ir transmitiendo los segmentos de bits más significativos en orden hasta completar la tasa requerida. Nótese que la forma en que se consigue la tasa de decodificación constante deseada es mucho más295 but decoding at a constant bit rate: it would be enough to transmit the most significant bit segments in order until the required rate is completed. Note that the way in which the desired constant decoding rate is achieved is much more
9 HOJA DE SUSTITUCIÓN (REGLA 26) sencilla y mucho menos costosa computacionalmente que en los codificadores basados en OCF (MP3, AAC, etc.) ya que la cuantificación se realiza en un bucle que tiene9 SUBSTITUTE SHEET (RULE 26) simple and much less computationally expensive than in OCF-based encoders (MP3, AAC, etc.) since quantification is performed in a loop that has
300 como máximo 15 iteraciones para cada muestra espectral (unas 4 iteraciones de media, en cada una de las cuales se realizan solamente unas pocas operaciones binarias sencillas) y la codificación (p.ej. Huffman) sólo se realiza una vez, cuando todos los coeficientes están ya cuantificados. Experimentalmente se observa que el coste de cuantificación/codificación del presente algoritmo es prácticamente insignificanteA maximum of 15 iterations for each spectral sample (about 4 iterations on average, in each of which only a few simple binary operations are performed) and coding (eg Huffman) is only performed once, when all coefficients are already quantified. Experimentally it is observed that the cost of quantification / coding of the present algorithm is practically insignificant
305 comparado con el coste de la implementación mediante OCF.305 compared to the cost of implementation through OCF.
El escenario donde probablemente resulte más útil la escalabilidad es el streaming de audio por Internet. Mediante el sistema propuesto se podría ajustar el número de bits de transmisión al tamaño de la carga útil de un paquete IP, siguiendo el 310 protocolo TCP, para adaptarse dinámicamente al ancho de banda disponible de cada cliente, por ejemplo. La rapidez de la codificación mediante este sistema lo haría especialmente indicado para aplicaciones en tiempo real.The scenario where scalability is probably most useful is streaming audio over the Internet. Using the proposed system, the number of transmission bits could be adjusted to the size of the payload of an IP packet, following the 310 TCP protocol, to dynamically adapt to the available bandwidth of each client, for example. The speed of coding through this system would make it especially suitable for real-time applications.
Por otro lado, orno se puede ver, el algoritmo de compresión aquí descrito es 315 perfectamente extensible al caso de compresión de imágenes (es, de hecho, una compresión de imágenes -espectrogramas- en escala de grises) siempre y cuando se cuente con un modelo adecuado de enmascaramiento visual.On the other hand, orno can be seen, the compression algorithm described here is 315 perfectly extensible to the case of image compression (it is, in fact, an image compression - spectrograms - in grayscale) as long as there is a adequate visual masking model.
Finalmente, descomprimir la señal de audio original es también extremadamenteFinally, decompressing the original audio signal is also extremely
320 sencillo: basta descomprimir el archivo con los valores espectrales, multiplicarlos por su signo correspondiente, en caso de que se hayan comprimido aparte, y realizar la transformada inversa correspondiente. Esto tiene la ventaja de que el decodificador sería tan sencillo que podría incluirse en cada uno de los archivos comprimidos, de forma que estos pudiesen "autodescomprimirse". Por ejemplo, si optamos por la separación en320 simple: just unzip the file with the spectral values, multiply them by their corresponding sign, if they have been compressed separately, and perform the corresponding inverse transform. This has the advantage that the decoder would be so simple that it could be included in each of the compressed files, so that they could "self-decompress." For example, if we opt for separation in
325 planos de bits, básicamente sólo se necesitaría un pequeño programa que ejecutase varias veces (tantas como planos) la misma rutina de descompresión de una imagen binaria y después hiciese la transformada inversa de los valores resultantes.325 bit planes, basically it would only take a small program to execute the same decompression routine of a binary image several times (as many as planes) and then do the inverse transformation of the resulting values.
10 1010 10
HOJA DE SUSTITUCIÓN (REGLA 26) 330 Codificación predictivaSUBSTITUTE SHEET (RULE 26) 330 Predictive coding
Teniendo en cuenta que las señales musicales suelen tener una alta redundancia tanto temporal como frecuencial, como ya se ha dicho, cabe pensar que utilizando técnicas de predicción se podría conseguir comprimir la señal aún más.Taking into account that the musical signals usually have a high temporal and frequency redundancy, as has already been said, it can be thought that using prediction techniques could compress the signal even more.
335335
Para explotar de forma eficiente la correlación temporal de las muestras espectrales en el caso de las señales musicales es especialmente útil el uso de la transformada Wavelet. En los espectrogramas generados mediante el módulo de la FFT, los tonos puros sostenidos en el tiempo son líneas horizontales en el espectrograma a laTo efficiently exploit the temporal correlation of the spectral samples in the case of musical signals, the use of the Wavelet transform is especially useful. In spectrograms generated by the FFT module, pure tones sustained over time are horizontal lines in the spectrogram at
340 altura de la frecuencia correspondiente. Sin embargo, la fase de la FFT es una señal muy irregular y muy difícil de comprimir. Es por ello que se suele utilizar la MDCT, que es una transformación que genera coeficientes espectrales reales, y cuyo módulo es similar al de la FFT. El problema de la MDCT es que el módulo de la misma es sensible a la fase. Es decir, el módulo de la MDCT de un tono puro es algo diferente dependiendo de340 height of the corresponding frequency. However, the FFT phase is a very irregular signal and very difficult to compress. That is why the MDCT is usually used, which is a transformation that generates real spectral coefficients, and whose module is similar to that of the FFT. The problem with the MDCT is that its module is phase sensitive. That is, the MDCT module of a pure tone is somewhat different depending on
345 la fase de dicho tono. Esto provoca que el espectrograma generado mediante el módulo de la MDCT sea más irregular que el de una FFT para señales tonales, puesto que dicho módulo se ve afectado por la fase de la señal que depende a su vez de los puntos de corte del enventanado de la señal en el tiempo.345 the phase of said tone. This causes the spectrogram generated by the MDCT module to be more irregular than that of an FFT for tonal signals, since said module is affected by the phase of the signal which in turn depends on the cut-off points of the poisoning of The signal in time.
350 Dado que la mayoría de las señales de audio que se comprimen son musicales, es decir, con gran contenido armónico, sería muy interesante obtener espectrogramas en los que los tonos sostenidos en el tiempo fuesen líneas horizontales regulares en el espectrograma (lo cual facilitaría la codificación predictiva). Por otro lado las frecuencias musicalmente relevantes están en la mayoría de los casos relativamente bien350 Since most of the audio signals that are compressed are musical, that is, with high harmonic content, it would be very interesting to obtain spectrograms in which the tones sustained over time were regular horizontal lines on the spectrogram (which would facilitate the predictive coding). On the other hand, the musically relevant frequencies are in most cases relatively well.
355 definidas: p.ej. en la escala occidental la nota Lεu tiene su frecuencia fundamental en 440 Hz, y la frecuencia fundamental del resto de las notas se relaciona con ésta mediante fracciones aproximadamente enteras. Si el tamaño de la ventana de análisis para la elaboración del espectrograma es tal que las frecuencias más probables producen produjesen aproximadamente un número entero de períodos en dichas ventanas, la355 defined: eg on the western scale the note Lεu has its fundamental frequency at 440 Hz, and the fundamental frequency of the rest of the notes is related to it by approximately whole fractions. If the size of the analysis window for spectrogram elaboration is such that the most probable frequencies produce produce approximately an integer number of periods in said windows, the
360 diferencia de fase entre dos coeficientes que representan a la misma frecuencia en ventanas temporales consecutivas sería pequeña y el espectrograma presentaría lineas horizontales más o menos regulares cuando los tonos se sostienen en el tiempo. Para360 phase difference between two coefficients representing the same frequency in consecutive time windows would be small and the spectrogram would present more or less regular horizontal lines when the tones are sustained over time. For
HOJA DE SUSTITUCIÓN (REGLA 26) ello es necesario utilizar distintas ventanas de análisis para cada una de las frecuencias musicalmente relevantes. Sería asimismo necesario que la transformación espectral 365 permitiera aplicar a los coeficientes transformados un modelo de enmascaramiento perceptual. Afortunadamente todo esto se puede conseguir mediante la transformada Wavelet.SUBSTITUTE SHEET (RULE 26) it is necessary to use different analysis windows for each of the musically relevant frequencies. It would also be necessary for spectral transformation 365 to apply a perceptual masking model to the transformed coefficients. Fortunately, all this can be achieved through the Wavelet transform.
Se propone para ello el siguiente procedimiento:The following procedure is proposed for this:
370 a) Partiendo de la señal en el dominio del tiempo, elegir la frecuencia de muestreo de forma tal que el tamaño de la ventana multirresolución Wavelet más grande corresponda con un número pequeño de períodos de la frecuencia musicalmente relevante más baja de la señal.370 a) Starting from the signal in the time domain, choose the sampling frequency so that the size of the largest Wavelet multi-resolution window corresponds to a small number of periods of the lowest musically relevant frequency of the signal.
375 b) Generar el resto de ventanas multirresolución Wavelet teniendo en cuenta las relaciones entre las frecuencias musicales más importantes de la pieza a comprimir, de acuerdo a su escala (temperada, cromática, oriental,...) a su tonalidad, etc. Se utilizarán funciones base similares a sinusoides, como por ejemplo cosine wavelets o Morlet wavelets.375 b) Generate the rest of Wavelet multi-resolution windows taking into account the relationships between the most important musical frequencies of the piece to be compressed, according to its scale (tempered, chromatic, oriental, ...) to its hue, etc. Base functions similar to sinusoids will be used, such as cosine wavelets or Morlet wavelets.
380 c) Generar la imagen del espectrograma de acuerdo con la transformación elegida. Cuantas más componentes tonales de las frecuencias musicales relevantes posea esta señal, mayor correlación temporal entre coeficientes espectrales existirá. d) Calcular el umbral de enmascaramiento, de acuerdo con la380 c) Generate the spectrogram image according to the chosen transformation. The more tonal components of the relevant musical frequencies this signal possesses, the greater the temporal correlation between spectral coefficients will exist. d) Calculate the masking threshold, according to the
385 transformación elegida, de forma análoga a como se ha descrito en la sección anterior.385 transformation chosen, analogously as described in the previous section.
De este modo, tendremos un espectrograma cuyas filas serán susceptibles de aplicar sobre ellas algún tipo de codificación predictiva. Hay múltiples formas deIn this way, we will have a spectrogram whose rows will be capable of applying some kind of predictive coding on them. There are multiple ways of
390 aplicar dicha codificación predictiva: a) en el dominio del tiempo, antes de obtener la imagen del espectrograma, b) en el dominio de la frecuencia, antes de cuantificar, c) en el dominio de la frecuencia, cuantificando el residuo y reajustando la predicción, d) en el dominio de la frecuencia a partir de los valores ya cuantificados, e) utilizar predicción en cada plano de bits. Vamos a analizar cada una de ellas:390 apply said predictive coding: a) in the time domain, before obtaining the spectrogram image, b) in the frequency domain, before quantifying, c) in the frequency domain, quantifying the residue and readjusting the prediction, d) in the frequency domain from the values already quantified, e) use prediction in each bit plane. Let's analyze each one of them:
395395
12 HOJA DE SUSTITUCIÓN (REGLA 26) a) Predicción en el tiempo. La idea sería utilizar algún método de predicción lineal (por ejemplo, estimar cada muestra basándose en una combinación lineal de muestras anteriores) de modo que sólo hubiese que codificar perceptualmente el residuo de predicción. Sin embargo, esto tiene un grave inconveniente: para12 SUBSTITUTE SHEET (RULE 26) a) Time prediction. The idea would be to use some linear prediction method (for example, to estimate each sample based on a linear combination of previous samples) so that only the prediction residue had to be coded perceptually. However, this has a serious drawback: for
400 recuperar la señal original en el decodificador se necesitarían los valores originales de la señal en el tiempo (que sirven para elaborar la predicción para las muestras siguientes), pero no dispondríamos de ellos exactamente, ya que hemos codificado el residuo con pérdidas, y por tanto, la combinación lineal de valores anteriores necesaria para regenerar la predicción de la muestra actual no400 recovering the original signal in the decoder would require the original values of the signal over time (which serve to make the prediction for the following samples), but we would not have them exactly, since we have encoded the waste with losses, and by therefore, the linear combination of previous values necessary to regenerate the prediction of the current sample does not
405 sería la misma que se utilizó para predecir en el codificador, y se irían arrastrando los errores hacia delante. En cualquier caso, suponiendo que se pudiera elaborar en destino la predicción sin ningún tipo de error, o que ese error se pudiese mantener dentro de unos límites tolerables, todo lo que tendríamos que hacer sería codificar el residuo con el mismo umbral de enmascaramiento405 would be the same one that was used to predict in the encoder, and the errors would be dragged forward. In any case, assuming that the prediction could be made at destination without any error, or that this error could be maintained within tolerable limits, all we would have to do would be to encode the residue with the same masking threshold.
410 de la propia señal (nótese que, de poderse recuperar la predicción sin error, el único error sería el correspondiente al de cuantificación del residuo), lo cual sería muy ventajoso, porque la energía del residuo sería mucho menor, los valores espectrales en general más pequeños, y por tanto, el margen de libertad que permite el umbral de enmascaramiento sería proporcionalmente mayor, y la410 of the signal itself (note that, if the prediction could be recovered without error, the only error would be that corresponding to the quantification of the residue), which would be very advantageous, because the energy of the residue would be much lower, the spectral values in general smaller, and therefore, the margin of freedom allowed by the masking threshold would be proportionately greater, and the
415 codificación más eficiente. Es por ello que sería interesante utilizar, en vez de415 more efficient coding. That is why it would be interesting to use, instead of
LPC (Linear Predictive Coding), alguna otra forma de predecir la señal que no dependa de la recuperación exitosa de muestras anteriores, sino que se pueda generar de forma independiente. Por ejemplo, se podría elaborar (automática o manualmente) una predicción paramétrica de cada instrumento, por ejemplo aLPC (Linear Predictive Coding), some other way to predict the signal that does not depend on the successful recovery of previous samples, but can be generated independently. For example, a parametric prediction of each instrument could be developed (automatically or manually), for example at
420 partir de muestras de los mismos (bombo, caja, charles, etc. en una batería) o mediante modelado físico (por ejemplo, averiguar los modos de vibración de un determinado instrumento resolviendo la correspondiente ecuación diferencial y codificar solamente los parámetros necesarios para modelar su sonido a partir de dichos modos). En el caso extremo, se puede de elaborar un modelo de la señal420 from samples of them (bass drum, box, charles, etc. in a battery) or by physical modeling (for example, finding out the vibration modes of a given instrument by solving the corresponding differential equation and coding only the parameters necessary to model its sound from these modes). In the extreme case, a signal model can be developed
425 musical a codificar utilizando un lenguaje paramétrico estructurado como MIDI o SAOL (ver estándar MPEG-4 [4]) tratando de imitar en lo posible la señal natural original. Una vez conseguido dicho modelo, se resta a la señal original, y se codifica la diferencia (residuo) utilizando el umbral de enmascaramiento de la señal original, siendo necesario codificar también los parámetros del modelo.425 musical to be encoded using a structured parametric language such as MIDI or SAOL (see MPEG-4 standard [4]) trying to imitate the original natural signal as much as possible. Once this model is achieved, the original signal is subtracted, and the difference (residue) is encoded using the masking threshold of the original signal, and it is also necessary to code the model parameters.
13 HOJA DE SUSTITUCIÓN (REGLA 26) 430 Esto tiene la ventaja añadida de que el modelo suena bastante "natural" por si mismo, y el residuo se puede codificar con muy pocos bits sin que haya una distorsión notable.13 SUBSTITUTE SHEET (RULE 26) 430 This has the added advantage that the model sounds quite "natural" by itself, and the residue can be encoded with very few bits without noticeable distortion.
b) Predicción en el dominio de la frecuencia, antes de cuantificar. Sib) Prediction in the frequency domain, before quantifying. Yes
435 observamos la imagen del espectrograma de una señal musical, especialmente utilizando Wavelets y ajustando adecuadamente la frecuencia de muestreo, tal como se ha planteado anteriormente, se puede ver claramente una repetición espacial de patrones temporales que coinciden con las partes musicales que son parecidas, por ejemplo, compases sucesivos o tonos que se mantienen en el435 we look at the spectrogram image of a musical signal, especially using Wavelets and properly adjusting the sampling frequency, as stated above, you can clearly see a spatial repetition of temporal patterns that match the musical parts that are similar, by example, successive measures or tones that remain in the
440 tiempo generando líneas horizontales en el espectrograma. Esto hace pensar que su codificación sencillamente como imágenes o datos sin ningún tipo de estructura es de algún modo ineficiente. En cualquier caso, la predicción lineal en el dominio espectral antes de cuantificar tendría un funcionamiento equivalente y los mismos problemas que la predicción en el dominio del tiempo:440 time generating horizontal lines on the spectrogram. This suggests that its coding simply as images or data without any structure is somewhat inefficient. In any case, the linear prediction in the spectral domain before quantifying would have equivalent performance and the same problems as the prediction in the time domain:
445 no se podría recuperar la señal a partir del residuo cuantificado. Sin embargo, se puede aprovechar la predicción en este punto para realizar un codificador sin pérdidas. Para ello, se puede utilizar una transformación espectral sin pérdidas, como intMDCT [5], y realizar una codificación predictiva del espectrograma sin cuantificar. Si se utiliza una transformada multirresolución (ajustando la445 the signal could not be recovered from the quantified residue. However, you can take advantage of the prediction at this point to make a lossless encoder. For this, a lossless spectral transformation can be used, such as intMDCT [5], and a predictive coding of the unquantified spectrogram can be performed. If a multiresolution transform is used (adjusting the
450 frecuencia de muestreo y los tamaños de las ventanas, tal como se ha explicado) la predicción puede ser más eficiente y se podría elaborar un compresor "prácticamente sin perdidas", o sin perdidas respecto a los coeficientes espectrales.450 sampling frequency and window sizes, as explained) the prediction can be more efficient and a compressor "practically without losses", or without losses with respect to spectral coefficients could be developed.
455 c) Predicción en el dominio de la frecuencia cuantificando el residuo y reajustando la predicción. En este caso sí se puede solventar el problema de no poder recuperar exactamente las muestras de la predicción lineal a partir de las muestras anteriores, puesto que ahora sí que podemos disponer de las mismas cuantificadas definitivamente a partir del modelo perceptual. Aprovechando la455 c) Prediction in the frequency domain by quantifying the residue and readjusting the prediction. In this case, the problem of not being able to recover exactly the samples of the linear prediction from the previous samples can be solved, since now we can have them definitively quantified from the perceptual model. Taking advantage of the
460 correlación temporal existente entre los coeficientes espectrales, se puede realizar una codificación predictiva sobre las filas del espectrograma. Esto se haría típicamente a través de la realización de un filtro de predicción del valor actual cuyos coeficientes serían los pesos de una cierta combinación lineal de los460 temporal correlation between the spectral coefficients, predictive coding can be performed on the spectrogram rows. This would typically be done through the realization of a current value prediction filter whose coefficients would be the weights of a certain linear combination of the
14 HOJA DE SUSTITUCIÓN (REGLA 26) valores anteriores. Esto es, en esencia, una codificación predictiva lineal (LPC).14 SUBSTITUTE SHEET (RULE 26) previous values. This is, in essence, a linear predictive coding (LPC).
465 Sin embargo en este caso no se puede proceder de este modo (utilizando el filtro de predicción), puesto que al cuantificar cada columna del espectrograma estamos modificando a su vez la predicción de los valores siguientes. Por ello habría que prodecer paso a paso, elaborando la predicción no a partir de los valores del espectrograma original, sino a través de la suma de la predicción y el465 However, in this case it is not possible to proceed in this way (using the prediction filter), since by quantifying each column of the spectrogram we are modifying the prediction of the following values. Therefore, it would be necessary to proceed step by step, preparing the prediction not from the values of the original spectrogram, but through the sum of the prediction and the
470 residuo cuantificado (teniendo en cuenta el umbral de enmascaramiento, tal como se ha descrito) de las muestras anteriores que correspondan. La ventaja de todo esto es que si la predicción es suficientemente buena, el residuo será mucho más pequeño que la propia señal y habrá más probabilidades de que, o bien sus valores estén por debajo del umbral de enmascaramiento y se cuantifiquen a470 quantified residue (taking into account the masking threshold, as described) of the corresponding previous samples. The advantage of all this is that if the prediction is good enough, the residue will be much smaller than the signal itself and it will be more likely that either its values are below the masking threshold and quantified to
475 cero, o bien el margen relativo entre los valores a cuantificar y el umbral de enmascaramiento sea más favorable y se tomen más a menudo los valores privilegiados. En ambos casos estaríamos aumentando la capacidad de compresión global del sistema. Nótese que en este caso sí se puede recuperar la predicción de forma exacta en el decodificador, y que, por tanto, la única fuente475 zero, or the relative margin between the values to be quantified and the masking threshold is more favorable and privileged values are taken more often. In both cases we would be increasing the overall compression capacity of the system. Note that in this case the prediction can be retrieved exactly in the decoder, and therefore, the only source
480 de error provendrá de la cuantificación del residuo, por lo que es perfectamente válido cuantificar dicho residuo con el umbral de enmascaramiento calculado para la señal original.480 of error will come from the quantification of the residue, so it is perfectly valid to quantify said residue with the masking threshold calculated for the original signal.
d) Predicción en el dominio de la frecuencia a partir de los valores ya 485 cuantifϊcados. Sería similar a la del apartado b) pero con la ventaja de que el residuo de predicción no puede tomar cualquier valor, sino sólo aquellos que sean diferencia entre dos que sean posibles valores de cuantificación.d) Prediction in the frequency domain from the values already 485 quantified. It would be similar to that of section b) but with the advantage that the prediction residue cannot take any value, but only those that are difference between two that are possible quantification values.
e) Predicción en cada plano de bits. Si observamos las imágenes binarias que 490 resultan de separar en planos de bits la imagen del espectrograma cuantificado, se puede ver también claramente una repetición espacial de patrones temporales que coinciden con las partes musicales que son parecidas, por ejemplo, compases sucesivos. De nuevo, esto hace pensar que la codificación de estas imágenes sencillamente como imágenes binarias sin ningún tipo de estructura es 495 de algún modo ineficiente. Hacer una predicción en este caso cuenta además con la ventaja de que sólo se puede acertar o fallar en la predicción, es decir, el residuo de predicción sería, por ejemplo, una imagen negra (aciertos) con puntose) Prediction in each bit plane. If we look at the binary images that 490 result from separating the quantified spectrogram image in bit planes, a spatial repetition of temporal patterns that match similar musical parts, for example, successive measures, can also be clearly seen. Again, this suggests that the coding of these images simply as binary images without any structure is 495 somewhat inefficient. Making a prediction in this case also has the advantage that the prediction can only be successful or fail, that is, the prediction residue would be, for example, a black image (hits) with dots.
15 1515 15
HOJA DE SUSTITUCIÓN (REGLA 26) blancos donde la predicción hubiese fallado. De este modo, con una sencilla operación "XOR" entre la predicción y la imagen de fallos podríamos obtener la imagen original. Para obtener una ganancia de compresión, a priori, 500 simplemente se necesitaría acertar en más puntos que si la predicción fuese simplemente una imagen de ceros o de unos (i.e. no predecir). La predicción se podría elaborar de modo semejante a lo sugerido en los apartados a), b) o c), fijando un umbral a partir del cual la predicción se considera 1 ó 0.SUBSTITUTE SHEET (RULE 26) targets where the prediction would have failed. In this way, with a simple "XOR" operation between the prediction and the fault image we could obtain the original image. To obtain a compression gain, a priori, 500 would simply need to hit more points than if the prediction was simply an image of zeros or ones (ie not predicting). The prediction could be elaborated in a similar way to that suggested in a), b) or c), setting a threshold from which the prediction is considered 1 or 0.
505505
Nótese que algunas de estas técnicas no son excluyentes, y que se pueden aplicar en cascada. Por ejemplo, se puede hacer una predicción en el tiempo, cuantificar el residuo y volver a hacer codificación predictiva sobre los valores cuantificados o sobre los planos de bits, puesto que el residuo suele estar aún bastante correlado con la señal, y exhibe parecidos rasgos de redundancia frecuencial y temporal. 510Note that some of these techniques are not exclusive, and can be cascaded. For example, you can make a prediction over time, quantify the residual and redo predictive coding on the quantized values or on the bit planes, since the residue is usually still quite correlated with the signal, and exhibits similar traits of frequency and temporal redundancy. 510
Ordenación del espectro y modelado de ruidoSpectrum management and noise modeling
Si observamos la imagen del espectrograma de una señal muy armónica (por ejemplo una nota de violín sostenida durante varios segundos) se aprecia que tiene una 515 serie de máximos periódicos en frecuencia y que se sostienen a su vez en el tiempo. Es decir, que en el espectrograma aparecen una serie de bandas blancas horizontales más o menos equiespaciadas en frecuencia, correspondientes a los tonos armónicos que constituyen la mayor parte de la energía del sonido, mas una serie de valores intermedios que podrían considerarse "inarmónicos", es decir, ruido, de alguna manera. 520 Este fenómeno se produce también en el espectrograma de la voz humana, siendo bien conocido y explotado en los codificadores predictivos de voz.If we look at the spectrogram image of a very harmonic signal (for example a violin note held for several seconds) it can be seen that it has a 515 series of periodic maximums in frequency and that they are sustained in turn over time. That is to say, in the spectrogram a series of horizontal white bands appear more or less equally spaced in frequency, corresponding to the harmonic tones that constitute the majority of the sound energy, plus a series of intermediate values that could be considered "inharmonious", that is, noise, somehow. 520 This phenomenon also occurs in the human voice spectrogram, being well known and exploited in predictive voice encoders.
Se puede tratar de mejorar la compresión de las muestras cuantificadas del modo siguiente: 525An attempt may be made to improve the compression of the quantified samples as follows: 525
a) Se hace una estimación del espectro a lo largo de varios segundos. Por ejemplo, haciendo simplemente la media aritmética de las filas, obteniendoa) An estimate of the spectrum is made over several seconds. For example, simply doing the arithmetic mean of the rows, obtaining
16 HOJA DE SUSTITUCIÓN (REGLA 26) un vector columna de la misma longitud que las columnas del espectrograma.. 530 b) Se añade a la matriz del espectrograma un vector columna auxiliar que sea monótonamente decreciente y del mismo tamaño que las columnas del mismo. c) Se utiliza el vector de estimación para ordenar todas las columnas del espectrograma en función de éste. Nótese que el vector auxiliar quedará a su 535 vez desordenado, de forma que si ordenamos ahora el espectrograma en función de dicho vector auxiliar, recuperamos el espectrograma original. Por tanto ese vector también habrá que codificarlo, para que el decodificador lo pueda utilizar. d) Si el espectrograma tiene suficiente correlación temporal, tendremos que en 540 la nueva imagen ordenada, las bandas blancas correspondientes a los armónicos se sitúan juntas en la parte superior del espectrograma, y el resto es una sucesión mas o menos ruidosa de valores espectrales. El vector de estimación espectral ordenado, típicamente tiene una estructura suavemente decreciente a partir de determinada frecuencia. Es decir, lo que sería un ruido 545 blanco ligeramente coloreado. Si se puede asumir que esta situación es mas o menos estacionaria (lo cual no ocurre si, por ejemplo, hay instrumentos de percusión) se podría codificar solamente la parte superior del espectrograma y modelar como ruido la parte inferior, codificando los parámetros de dicho modelo en lugar de los valores originales. 550 e) En el caso de que sí haya instrumentos de percusión en la señal, se puede utilizar otro método: una vez ordenado el espectrograma como se ha descrito, seleccionar, una de cada N columnas y repetirla N veces a partir de cierta frecuencia (se buscará aquella frecuencia a partir de la cual los valores comiencen a ser claramente más pequeños). De este modo sólo tendremos 555 que codificar una de cada N columnas (a partir de determinada frecuencia) consiguiendo relaciones de compresión de más o menos 1:N adicional, a partir de dicha frecuencia. De este modo, aunque haya fuertes ataques (golpes de caja, por ejemplo) estos se mantienen unos milisegundos (típicamente N sería 2, 3 ó 4 para una MDCT de 256 puntos), y no se percibe 560 excesivamente la repetición, máxime si tenemos en cuenta que podemos guardar los signos originales, con lo cual, realmente sólo estaríamos16 SUBSTITUTE SHEET (RULE 26) a column vector of the same length as the spectrogram columns. 530 b) An auxiliary column vector that is monotonously decreasing and of the same size as the columns thereof is added to the spectrogram matrix. c) The estimation vector is used to sort all the spectrogram columns according to it. Note that the auxiliary vector will be in turn untidy, so that if we now order the spectrogram according to said auxiliary vector, we will recover the original spectrogram. Therefore that vector must also be encoded, so that the decoder can use it. d) If the spectrogram has sufficient temporal correlation, we will have that in 540 the new ordered image, the white bands corresponding to the harmonics are placed together at the top of the spectrogram, and the rest is a more or less noisy sequence of spectral values. The ordered spectral estimation vector typically has a gently decreasing structure from a certain frequency. That is, what would be a slightly colored white 545 noise. If it can be assumed that this situation is more or less stationary (which does not happen if, for example, there are percussion instruments), only the upper part of the spectrogram could be encoded and the lower part modeled as noise, coding the parameters of said model instead of the original values. 550 e) If there are percussion instruments in the signal, another method can be used: once the spectrogram has been ordered as described, select one of each N columns and repeat it N times from a certain frequency ( that frequency will be sought after which the values begin to be clearly smaller). In this way we will only have 555 to encode one of each N columns (from a certain frequency) achieving compression ratios of plus or minus 1: N additional, from that frequency. In this way, although there are strong attacks (cash hits, for example) these are maintained for a few milliseconds (typically N would be 2, 3 or 4 for a 256-point MDCT), and the repetition is not excessively perceived 560, especially if we have in mind that we can save the original signs, with which, we would really only be
17 HOJA DE SUSTITUCIÓN (REGLA 26) repitiendo la envolvente del espectro. En vez de simplemente repetir, también se podrían interpolar los valores intermedios.17 SUBSTITUTE SHEET (RULE 26) repeating the spectrum envelope. Instead of simply repeating, intermediate values could also be interpolated.
565565
d) Exposición detallada de un modo de realizar la invenciónd) Detailed presentation of a way of carrying out the invention
1. Partiendo de una señal de audio digital codificada usando PCM, segmentar dicha señal en partes de una duración del orden de varios segundos según un criterio de homogeneidad en las propiedades de dicha señal. 5701. Starting from a digital audio signal encoded using PCM, segment said signal into parts of the order of several seconds according to a criterion of homogeneity in the properties of said signal. 570
2. Cada una de estas partes se subdividen a su vez en segmentos cortos de tiempo, por ejemplo de unos 11 ms. para la aplicación de alguna transformada matemática que transforme las muestras temporales en coeficientes espectrales, como por ejemplo la MDCT (o, en su caso, alguna transformada 575 multirresolución adecuada a las características frecuenciales de la señal a codificar, tal como se ha explicado).2. Each of these parts is further subdivided into short segments of time, for example of about 11 ms. for the application of some mathematical transform that transforms the temporal samples into spectral coefficients, such as the MDCT (or, where appropriate, some 575 multiresolution transform appropriate to the frequency characteristics of the signal to be encoded, as explained).
3. Realizar dicha transformación separando el módulo y los signos de los coeficientes MDCT. El módulo de los coeficientes constituye la imagen del 580 módulo del espectrograma. Los signos se pueden guardar en una imagen binaria del mismo tamaño, donde el 1 corresponda a los números positivos y el 0 a los negativos o aquellos que tengan módulo nulo.3. Perform this transformation by separating the module and the signs of the MDCT coefficients. The coefficients module constitutes the image of the 580 spectrogram module. The signs can be saved in a binary image of the same size, where 1 corresponds to the positive numbers and 0 to the negative ones or those that have a null module.
4. Utilizar los coeficientes MDCT para el cálculo del umbral de enmascaramiento 585 en cada punto del espectrograma.4. Use the MDCT coefficients to calculate the masking threshold 585 at each point of the spectrogram.
5. Utilizar el margen que proporciona el umbral de enmascaramiento en cada punto para cuantificar uno a uno los coeficientes espectrales, tratando de que tomen alguno de los valores privilegiados, tal como se ha explicado en la sección 590 anterior. Alternativamente, se puede elaborar un modelo de predicción para las filas del espectrograma de modo que lo que se cuantifique sea el residuo de predicción, teniendo en cuenta el umbral de enmascaramiento original en ese punto, y se utilice la suma de este residuo cuantificado más la predicción para5. Use the margin provided by the masking threshold at each point to quantify the spectral coefficients one by one, trying to take some of the privileged values, as explained in section 590 above. Alternatively, a prediction model for the spectrogram rows can be developed so that what is quantified is the prediction residue, taking into account the original masking threshold at that point, and using the sum of this quantified residue plus the prediction for
18 HOJA DE SUSTITUCIÓN (REGLA 26) elaborar las prediccciones de los coeficientes siguientes. Los coeficientes del 595 modelo de predicción se almacenarán como información colateral.18 SUBSTITUTE SHEET (RULE 26) elaborate the predictions of the following coefficients. The coefficients of the 595 prediction model will be stored as collateral information.
6. Separar el espectrograma cuantificado en planos de bits, subdividir cada uno de estos planos de bits en secciones más pequeñas y establecer una jerarquía que ordene dichos planos del más importante al menos importante. Por ejemplo, 600 tomando como más importantes las secciones del plano de bits más significativos situadas en frecuencias más bajas y como menos importantes las secciones del plano de bits menos significativos situadas en frecuencias más altas.6. Separate the quantified spectrogram into bit planes, subdivide each of these bit planes into smaller sections and establish a hierarchy that orders those planes from the most important to the least important. For example, 600 taking as more important the sections of the plane of more significant bits located in lower frequencies and as less important the sections of the plane of less significant bits located in higher frequencies.
605605
7. Comprimir cada una de estas secciones utilizando un compresor de imágenes binarias adecuado.7. Compress each of these sections using a suitable binary image compressor.
8. Comprimir del mismo modo la imagen de los signos del espectrograma obtenida en el paso 3. 6108. Likewise compress the image of the spectrogram signs obtained in step 3. 610
9. Almacenar dichas imágenes así como la forma de ordenar las secciones del espectrograma y la información del modelo de predicción en su caso, lo cuál será suficiente para la decodificación de cada una de las partes de la señal tal como se obtienen en el paso 1. 6159. Store these images as well as how to sort the spectrogram sections and the prediction model information, where appropriate, which will be sufficient for decoding each of the parts of the signal as obtained in step 1 .615
10. Para decodificar cada parte se procederá a la descompresión de cada una de las secciones del espectrograma, así como de la imagen de signos, se ordenarán de nuevo de acuerdo al criterio elegido en el paso 6 y se realizará la transformada inversa a la empleada en el paso 2 para obtener la correspondiente señal en el 620 dominio del tiempo.10. In order to decode each part, the decompression of each section of the spectrogram will be decompressed, as well as the image of signs, they will be ordered again according to the criteria chosen in step 6 and the inverse transform will be performed to the one used in step 2 to obtain the corresponding signal in the 620 time domain.
11. Finalmente se ensamblan todas las partes obteniéndose la señal decodificada final.11. Finally all the parts are assembled obtaining the final decoded signal.
625625
19 HOJA DE SUSTITUCIÓN (REGLA 26) e) Aplicabilidad industrial de la invención19 SUBSTITUTE SHEET (RULE 26) e) Industrial applicability of the invention
Existen varias características que distinguen la presente invención de otras similares para la compresión de señales de audio. Por un lado, el método de 630 cuantificación-codificación es menos complejo y mucho más eficiente computacional- mente (y, por tanto, mucho más rápido de efectuar) que aquellos basados en OCF, como es el caso de los compresores de audio más conocidos, como el MP3, el AAC, etc. Por otro lado, el sistema de cuantificación-codificación propuesto permite elaborar cadenas de bits escalables, así como cadenas de bits decodificables a una tasa de bits constante, 635 de forma también muy eficiente, alcanzando compromisos de calidad/tamaño de archivo al nivel del estado del arte actual. Por ello podría ser interesante el uso de la presente invención en cualquier ámbito, pero particularmente en el de la compresión/transmisión de datos de audio escalables en tiempo real, elaboración de dispositivos de compresión y descompresión de bajo coste y/o bajo consumo energético. 640There are several features that distinguish the present invention from similar ones for the compression of audio signals. On the one hand, the 630 quantification-coding method is less complex and much more computationally efficient (and therefore much faster to perform) than those based on OCF, as is the case with the best-known audio compressors , such as MP3, AAC, etc. On the other hand, the proposed quantification-coding system allows scalable bit chains to be developed, as well as decodable bit chains at a constant bit rate, 635 also very efficiently, reaching quality / file size commitments at the state level of current art. Therefore, it could be interesting to use the present invention in any field, but particularly in the compression / transmission of scalable audio data in real time, development of compression and decompression devices of low cost and / or low energy consumption. 640
Por otro lado, está claro que un porcentaje muy alto de las señales de audio que se comprimen son señales musicales. Este tipo de señales tienen unas características de redundancia frecuencial/temporal que también pueden ser explotadas. En la presente invención se trata de aprovechar esto utilizando análisis multirresolución y ajustando la 645 frecuencia de muestreo de forma que la compresión de señales con gran contenido armónico sea más eficiente, tal como se ha explicado. El hecho de optimizar la compresión de las señales musicales también diferencia el sistema propuesto de otros sistemas de compresión de audio más generales.On the other hand, it is clear that a very high percentage of the audio signals that are compressed are musical signals. These types of signals have frequency / temporal redundancy characteristics that can also be exploited. The present invention seeks to take advantage of this using multiresolution analysis and adjusting the 645 sampling rate so that the compression of signals with high harmonic content is more efficient, as explained. Optimizing the compression of musical signals also differentiates the proposed system from other more general audio compression systems.
650650
f) Referenciasf) References
[1] MPEG, "International standard IS 11172-3. Coding of moving pictures and associated audio for digital storage media at up to 1-5 Mbit/s, part 3: Audio," 1991.[1] MPEG, "International standard IS 11172-3. Coding of moving pictures and associated audio for digital storage media at up to 1-5 Mbit / s, part 3: Audio," 1991.
[2] M. Bosi, K. Brandenburg, S. Quackenbush, L. Fielder, K. Akagiri, H. Fuchs, M. Dietz, J. Herré, G. Davidson, y Y. Oikawa, "ISO/IEC MPEG-2 advanced audio coding," J. Audio Eng. Soc, vol. 45, no. 10, pp. 789-814,[2] M. Bosi, K. Brandenburg, S. Quackenbush, L. Fielder, K. Akagiri, H. Fuchs, M. Dietz, J. Herré, G. Davidson, and Y. Oikawa, "ISO / IEC MPEG- 2 advanced audio coding, "J. Audio Eng. Soc, vol. 45, no. 10, pp. 789-814,
20 HOJA DE SUSTITUCIÓN (REGLA 26) 1997.20 SUBSTITUTE SHEET (RULE 26) 1997
[3] K. Brandenburg, "OCF — A new coding algorithm for high quality sound signáis," Proc. ICASSP-87, IEEE Press, pp. 5.1.1-5.1.4, 1987.[3] K. Brandenburg, "OCF - A new coding algorithm for high quality sound you mean," Proc. ICASSP-87, IEEE Press, pp. 5.1.1-5.1.4, 1987.
[4] B. L. Vercoe, W. G. Gardner, y E. D. Scheirer, "Structured audio: The creation, transmission and rendering of parametric sound representations," Proc. IEEE, vol. 85, no. 5, pp. 922-940, 1998.[4] B. L. Vercoe, W. G. Gardner, and E. D. Scheirer, "Structured audio: The creation, transmission and rendering of parametric sound representations," Proc. IEEE, vol. 85, no. 5, pp. 922-940, 1998.
[5] R. Geiger, J. Herré, J. Koller, and K. Brandenburg, "IntMDCT - A link between perceptual and lossless audio coding," in Proc ofthe IEEE International Confon Acoustics, Speech and Signal Processing, 2002, VoI. 2, May 2002, pp.1813-1816, Orlando, FL.[5] R. Geiger, J. Herré, J. Koller, and K. Brandenburg, "IntMDCT - A link between perceptual and lossless audio coding," in Proc of the IEEE International Confon Acoustics, Speech and Signal Processing, 2002, VoI. 2, May 2002, pp. 1813-1816, Orlando, FL.
21 HOJA DE SUSTITUCIÓN (REGLA 26) 21 SUBSTITUTE SHEET (RULE 26)
Claims
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| ES200503001A ES2296489B1 (en) | 2005-12-02 | 2005-12-02 | SCALABLE METHOD OF AUDIO AND IMAGE COMPRESSION. |
| ESP200503001 | 2005-12-02 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2007077280A1 true WO2007077280A1 (en) | 2007-07-12 |
Family
ID=38227941
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/ES2006/070190 Ceased WO2007077280A1 (en) | 2005-12-02 | 2006-12-03 | System and method for the rapid perceptual quantification and scalable coding of audio signals |
Country Status (2)
| Country | Link |
|---|---|
| ES (1) | ES2296489B1 (en) |
| WO (1) | WO2007077280A1 (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5040217A (en) * | 1989-10-18 | 1991-08-13 | At&T Bell Laboratories | Perceptual coding of audio signals |
| US20020111801A1 (en) * | 1999-05-27 | 2002-08-15 | America Online, Inc., A Delaware Corporation | Method and system for reduction of quantization-induced block-discontinuities and general purpose audio codec |
| US20050231396A1 (en) * | 2002-05-10 | 2005-10-20 | Scala Technology Limited | Audio compression |
-
2005
- 2005-12-02 ES ES200503001A patent/ES2296489B1/en not_active Expired - Fee Related
-
2006
- 2006-12-03 WO PCT/ES2006/070190 patent/WO2007077280A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5040217A (en) * | 1989-10-18 | 1991-08-13 | At&T Bell Laboratories | Perceptual coding of audio signals |
| US20020111801A1 (en) * | 1999-05-27 | 2002-08-15 | America Online, Inc., A Delaware Corporation | Method and system for reduction of quantization-induced block-discontinuities and general purpose audio codec |
| US20050231396A1 (en) * | 2002-05-10 | 2005-10-20 | Scala Technology Limited | Audio compression |
Non-Patent Citations (2)
| Title |
|---|
| BOSI M. ET AL.: "ISO/IEC MPEG-2 advanced audio coding", JOURNAL OF THE AUDIO ENGINEERING SOCIETY, vol. 45, October 1997 (1997-10-01), pages 789 - 812, XP000730161 * |
| BRANDENBURG K.: "OCF-A new coding algorithm for high quality sound signals", PROCEEDINGS: ICASSP 87. 1987 INTERNATIONAL CONFERENCE ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING (CAT. NO87CH23960), vol. 1, 1987, pages 141 - 144, XP003015376 * |
Also Published As
| Publication number | Publication date |
|---|---|
| ES2296489B1 (en) | 2009-04-01 |
| ES2296489A1 (en) | 2008-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| RU2326450C2 (en) | Method and device for vector quantisation with reliable prediction of linear prediction parameters in voice coding at variable bit rate | |
| KR101343267B1 (en) | Method and apparatus for audio coding and decoding using frequency segmentation | |
| JP6262820B2 (en) | Efficient decoding of digital media spectral data using wide-sense perceptual similarity | |
| EP2479750B1 (en) | Method for hierarchically filtering an input audio signal and method for hierarchically reconstructing time samples of an input audio signal | |
| ES2433043T3 (en) | Switching the ACELP to TCX encoding mode | |
| CN101297356B (en) | Audio compression | |
| US7680670B2 (en) | Dimensional vector and variable resolution quantization | |
| JP5456310B2 (en) | Changing codewords in a dictionary used for efficient coding of digital media spectral data | |
| ES2628127T3 (en) | Advanced quantifier | |
| BR112014032265B1 (en) | DEVICE AND METHOD FOR FREELY SELECTABLE FREQUENCY CHANGES IN THE SUB-BAND DOMAIN | |
| CN101821800A (en) | Vector quantization apparatus, vector inverse quantization apparatus, and method thereof | |
| JPWO2007114290A1 (en) | Vector quantization apparatus, vector inverse quantization apparatus, vector quantization method, and vector inverse quantization method | |
| CN102158692A (en) | Encoding method, decoding method, encoder and decoder | |
| JP3557164B2 (en) | Audio signal encoding method and program storage medium for executing the method | |
| WO2007077280A1 (en) | System and method for the rapid perceptual quantification and scalable coding of audio signals | |
| US20100292986A1 (en) | encoder | |
| US20100280830A1 (en) | Decoder | |
| AU2011205144B2 (en) | Scalable compressed audio bit stream and codec using a hierarchical filterbank and multichannel joint coding | |
| Al-Azawi et al. | Compression of Audio Using Transform Coding. | |
| Kandadai | Perceptual Audio Coding that Scales to Low Bitrates | |
| Liu | The perceptual impact of different quantization schemes in G. 719 | |
| Raad | Scalable and perceptual audio compression | |
| Adistambha et al. | Embedded lossless audio coding using linear prediction and cascade coding | |
| Marie | Docteur en Sciences | |
| Moreno | Variable frame size for vector quantization and application to speech coding |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 06841797 Country of ref document: EP Kind code of ref document: A1 |