CN101989428B - Bit distribution method, coding method, decoding method, coder and decoder - Google Patents

Bit distribution method, coding method, decoding method, coder and decoder Download PDF

Info

Publication number
CN101989428B
CN101989428B CN2009101615252A CN200910161525A CN101989428B CN 101989428 B CN101989428 B CN 101989428B CN 2009101615252 A CN2009101615252 A CN 2009101615252A CN 200910161525 A CN200910161525 A CN 200910161525A CN 101989428 B CN101989428 B CN 101989428B
Authority
CN
China
Prior art keywords
subband
perception
ordering
energy
order
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.)
Expired - Fee Related
Application number
CN2009101615252A
Other languages
Chinese (zh)
Other versions
CN101989428A (en
Inventor
刘长娥
张德明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2009101615252A priority Critical patent/CN101989428B/en
Publication of CN101989428A publication Critical patent/CN101989428A/en
Application granted granted Critical
Publication of CN101989428B publication Critical patent/CN101989428B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention provides a bit distribution method comprising the following steps: carrying out perceptual sorting on all subbands of a signal according to the energy of the subband; according to the magnitude of frequency ranges corresponding to the subbands on a frequency domain and the energy difference of the subbands, adjusting the sequence of the subbands in the perceptual sorting; and distributing the bit resource according to the adjusted perceptual sorting sequence. The invention also provides a coding method, a coder, a bit distribution method, a decoding method and a decoder. By using the invention, the complexity of bit distribution can be lowered, and bit can be more reasonably distributed to the subbands with important perception, thereby ensuring that the coder and the decoder can generate better hearing feeling.

Description

比特分配方法、编码方法、解码方法、编码器及解码器Bit allocation method, encoding method, decoding method, encoder and decoder

技术领域 technical field

本发明涉及编解码技术,尤其涉及比特分配技术。The present invention relates to codec technology, in particular to bit allocation technology.

背景技术 Background technique

子带编码技术是目前常用的编解码技术之一。音频信号在频域上由低到高可被划分为多个频带,一个频带被称为一个子带,后续的编码、解码等工作均在子带的基础上进行。在编解码过程中,需要将有限的比特资源在子带间进行分配,通常情况下,子带获得的比特越多,量化时的误差就越小,编解码质量就越好,反之,如果子带获得的比特越少,则量化时的误差就越大,编解码质量就越差。The sub-band coding technology is one of the commonly used coding and decoding technologies at present. Audio signals can be divided into multiple frequency bands from low to high in the frequency domain. A frequency band is called a sub-band, and subsequent encoding, decoding, and other work are performed on the basis of sub-bands. In the process of encoding and decoding, limited bit resources need to be allocated between subbands. Generally, the more bits a subband obtains, the smaller the error in quantization and the better the quality of encoding and decoding. On the contrary, if the subband The less bits the band gets, the greater the error in quantization and the worse the quality of the codec.

比特分配一般以人耳的感知特性为准则。人耳的生理特性决定了人耳不是对所有频率的信号都有相同的敏感。具体表现为:一、人耳更易察觉低频信号的出现和变化,相比之下,不易察觉高频信号的出现和变化;二、当低频信号和高频信号同时出现时,人耳可能只能听到低频信号,而听不到高频信号,这种现象叫做“掩蔽效应”,它的发生与信号的频率、能量相关,当满足一定条件时,即会发生。对于人耳的这一特性,可以通过建立心理声学模型去模拟。人耳的另一个重要的听觉感知特性是,在安静的环境下,人耳只能听见幅值大于一定阈值的声音,而该阈值即是人耳刚能听见的声音幅值,这个阈值被称为人耳的绝对听阈(LTQ,Listening Threshold in Quiet)。LTQ曲线是随着频率而变化的,它能很好地反映人耳这种对不同频率的感知特性。在比特分配时,可以只考虑大于LTQ部分的幅值,这是因为人耳无法感知在LTQ之下的声音。The bit allocation is generally guided by the perceptual characteristics of the human ear. The physiological characteristics of the human ear determine that the human ear is not equally sensitive to signals of all frequencies. The specific manifestations are as follows: 1. The human ear is more likely to detect the appearance and change of low-frequency signals, compared with the appearance and change of high-frequency signals; 2. When low-frequency signals and high-frequency signals appear at the same time, the human ear may only be able to detect Hearing low-frequency signals but not hearing high-frequency signals, this phenomenon is called "masking effect". Its occurrence is related to the frequency and energy of the signal, and it will occur when certain conditions are met. This characteristic of the human ear can be simulated by establishing a psychoacoustic model. Another important auditory perception characteristic of the human ear is that in a quiet environment, the human ear can only hear sounds whose amplitude is greater than a certain threshold, and this threshold is the amplitude of the sound that the human ear can just hear. This threshold is called It is the absolute hearing threshold of the human ear (LTQ, Listening Threshold in Quiet). The LTQ curve changes with frequency, which can well reflect the perception characteristics of the human ear for different frequencies. When assigning bits, only the amplitude of the part greater than LTQ can be considered, because the human ear cannot perceive the sound below LTQ.

最优比特分配是将心理声学模型应用到分配过程中,使有限的比特资源尽可能多地分配给人耳易察觉、不被掩蔽的子带上,以达到人耳听觉感受的最优。另一方面,在不影响人耳听觉效果的前提下尽可能的减小编码码率,实现高效率的编码。The optimal bit allocation is to apply the psychoacoustic model to the allocation process, so that the limited bit resources can be allocated as much as possible to the sub-bands that are easy to detect and not masked by the human ear, so as to achieve the optimal hearing experience of the human ear. On the other hand, on the premise of not affecting the hearing effect of the human ear, the coding bit rate is reduced as much as possible to achieve high-efficiency coding.

目前,有多种比特分配方案可以用于比特分配。其中的两种比特分配方案如下:Currently, there are various bit allocation schemes that can be used for bit allocation. Two of the bit allocation schemes are as follows:

1.采用感知模型指导子带的比特分配。感知模型的本质是掩蔽阈值,掩蔽阈值的估计是实时的,过程如下:根据当前输入信号包含的频点范围,计算各频点的声压级(SPL),接着,计算各频点的传递函数(spread function),之后估计出掩蔽阈值,所有频点的掩蔽阈值最终决定各子带的掩蔽阈值。得到感知模型后,根据每个子带的信号幅度和子带的掩蔽阈值的信掩比(SMR)进行比特分配。1. A perceptual model is used to guide the bit allocation of the subbands. The essence of the perceptual model is the masking threshold, and the estimation of the masking threshold is real-time. The process is as follows: Calculate the sound pressure level (SPL) of each frequency point according to the frequency point range contained in the current input signal, and then calculate the transfer function of each frequency point (spread function), after which the masking threshold is estimated, and the masking threshold of all frequency points finally determines the masking threshold of each subband. After obtaining the perceptual model, bit allocation is performed according to the signal amplitude of each subband and the signal-to-mask ratio (SMR) of the sub-band's masking threshold.

2.采用嵌入式变速率编解码器,其4~12层为时域混叠消除(TDAC)编码器,在TDAC进行编码时将0~7000Hz频带内的修正的离散余弦变换(MDCT,Modified Discrete Cosine Transform)系数分成了18个子带,按照每个子带的量化能量大小进行感知重要性排序,量化能量越大,感知越重要,然后根据感知重要性的排序进行比特分配,利用反向填水原则的二分搜索法实现最优比特分配。其中,感知重要性高的子带会被优先编码在较低层传输,在解码端会被优先解码;感知重要性低的子带会被编码在较高层传输,有可能会因为传输信道的影响,在解码端接收不到较高层编码信息,这种情况下,就不能对其解码。2. Embedded variable rate codec is adopted, and its 4th to 12th layers are time domain aliasing cancellation (TDAC) encoders, and the Modified Discrete Cosine Transform (MDCT, Modified Discrete Cosine Transform) coefficients are divided into 18 sub-bands, and the perceptual importance is sorted according to the quantization energy of each sub-band. The greater the quantization energy, the more important the perception is, and then bit allocation is performed according to the perceptual importance ranking, using the reverse water filling principle The binary search method for optimal bit allocation. Among them, the subbands with high perceptual importance will be preferentially coded and transmitted at lower layers, and will be decoded preferentially at the decoding end; the subbands with low perceptual importance will be coded and transmitted at higher layers, which may be affected by the transmission channel , the higher-level coded information cannot be received at the decoding end, and in this case, it cannot be decoded.

本发明的发明人在实现本发明的过程中发现:在比特分配方案1中,为了达到高效编码的目的,需实时建立精细的感知模型,计算量大,随后,还需要进行多次循环迭代,以达到比特最优分配的目的,整个过程的计算复杂度非常高;在比特分配方案2中,只根据子带能量来衡量各子带的感知重要性,并未考虑到人耳对低频信号敏感度高、高频信号敏感度低的感知特性,也未考虑到低频信号掩盖高频信号的掩蔽效应,导致比特分配与感知特性不匹配,影响编解码质量。In the process of implementing the present invention, the inventors of the present invention found that in the bit allocation scheme 1, in order to achieve the purpose of high-efficiency coding, it is necessary to establish a fine perceptual model in real time, which requires a large amount of calculation, and then multiple iterations are required. In order to achieve the purpose of optimal bit allocation, the computational complexity of the whole process is very high; in bit allocation scheme 2, the perceptual importance of each sub-band is only measured according to the sub-band energy, and the sensitivity of the human ear to low-frequency signals is not considered The perceptual characteristics of high sensitivity and low sensitivity of high-frequency signals are not considered, and the masking effect of low-frequency signals covering high-frequency signals is not considered, resulting in a mismatch between bit allocation and perceptual characteristics, which affects the quality of encoding and decoding.

发明内容 Contents of the invention

本发明实施例提供比特分配方法、编码方法、解码方法、编码器及解码器,在降低感知模型的复杂度的同时,保证编解码器能产生较好的主观听觉效果。Embodiments of the present invention provide a bit allocation method, an encoding method, a decoding method, an encoder and a decoder, which can ensure that the codec can produce better subjective auditory effects while reducing the complexity of the perception model.

一种比特分配方法,包括:对信号的所有子带按照子带的能量的高低进行感知排序;根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序;将比特资源按照调整后的感知排序的顺序进行分配。A bit allocation method, comprising: perceptually sorting all subbands of a signal according to the energy level of the subbands; Order in sorting; allocates bits in the order of the adjusted perceptual sorting.

一种编码方法,包括:对信号的所有子带按照子带的能量的高低进行感知排序;根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序;将比特资源按照调整后的感知排序的顺序进行分配;根据比特分配的结果,对信号进行量化编码。A coding method, comprising: perceptually sorting all subbands of a signal according to the energy level of the subbands; The sequence in the sequence; the bit resources are allocated according to the adjusted perceptual sorting sequence; according to the bit allocation result, the signal is quantized and coded.

一种编码器,包括:排序单元,用于对信号的所有子带按照子带的能量的高低进行感知排序;调整单元,用于根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序;比特分配单元,用于将比特资源按照调整后的感知排序的顺序进行分配;量化编码单元,用于在所述比特分配单元将比特资源按照调整后的感知排序的顺序进行分配后,根据比特分配的结果,对信号进行量化编码。An encoder, comprising: a sorting unit for perceptually sorting all subbands of a signal according to the energy levels of the subbands; an adjustment unit for perceptually sorting the frequency bands corresponding to the subbands in the frequency domain and the energy of the subbands The difference between the subbands is adjusted in the order of the perceptual ordering; the bit allocation unit is used to allocate the bit resources according to the order of the adjusted perceptual ordering; the quantization coding unit is used to allocate the bit resources in the bit allocation unit according to After the adjusted order of perceptual sorting is allocated, the signal is quantized and coded according to the bit allocation result.

一种比特分配方法,包括:从码流中解码得到信号的每个子带的能量;对所有的子带按照子带的能量的高低进行感知排序;根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序;将比特资源按照调整后的感知排序的顺序进行分配。A bit allocation method, including: decoding the energy of each subband of the signal from the code stream; perceptually sorting all the subbands according to the energy level of the subbands; according to the level of the frequency band corresponding to the subband in the frequency domain The energy difference between subbands and subbands adjusts the order of the subbands in the perceptual ordering; the bit resources are allocated according to the order of the adjusted perceptual ordering.

一种解码方法,包括:从码流中解码得到信号的每个子带的能量;对所有的子带按照子带的能量的高低进行感知排序;根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序;将比特资源按照调整后的感知排序的顺序进行分配;根据比特分配的结果,从码流中解码得到信号。A decoding method, including: decoding the energy of each subband of a signal from a code stream; perceptually sorting all subbands according to the energy level of the subbands; Adjust the order of the subbands in the perceptual order according to the energy difference of the bands; allocate the bit resources according to the adjusted order of the perceptual order; decode the signal from the code stream according to the result of the bit allocation.

一种解码器,包括:第一解码单元,用于从码流中解码得到信号的每个子带的能量;排序单元,用于对所有的子带按照子带的能量的高低进行感知排序;调整单元,用于根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序;比特分配单元,用于将比特资源按照调整后的感知排序的顺序进行分配;第二解码单元,用于在所述比特分配单元将比特资源按照调整后的感知排序的顺序进行分配后,根据比特分配的结果,从码流中解码得到信号。A decoder, comprising: a first decoding unit, configured to decode the energy of each subband of a signal from a code stream; a sorting unit, configured to perceptually sort all subbands according to the energy level of the subbands; adjust The unit is used to adjust the order of the subbands in the perceptual sorting according to the difference between the frequency band corresponding to the subband in the frequency domain and the energy of the subbands; the bit allocation unit is used to arrange the bit resources according to the adjusted perceptual sorting Allocating in order; the second decoding unit is configured to, after the bit allocation unit allocates the bit resources according to the adjusted perceptual sorting order, decode the code stream to obtain the signal according to the result of the bit allocation.

在本发明的实施例中,对信号的所有子带按照子带的能量的高低进行感知排序后,可以根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序,这种情况下,实际上是按照子带的感知重要性对子带进行了排序。这样,在分配比特时,可以按照子带排列的顺序,优先为感知重要的子带分配比特。In the embodiment of the present invention, after perceptually sorting all the subbands of the signal according to the energy levels of the subbands, the subbands can be adjusted according to the difference between the frequency domain level of the frequency band corresponding to the subbands and the energy of the subbands. Order in perceptual ordering, in this case the subbands are actually ordered by their perceptual importance. In this way, when allocating bits, according to the order in which the subbands are arranged, bits may be preferentially allocated to perceptually important subbands.

当比特资源不足时,本发明实施例可以保证感知重要的子带能够获得比特并被量化以传递到解码端,解码端可以恢复出这类子带的信息,而这类子带对听觉感受的影响较大,其他感知次要的子带虽然可能得不到比特,解码端也可能恢复不出这类子带的信息,但由于这类子带对听觉感受影响很小,所以也不会造成很大的听觉误差。因此,通过本发明实施例便可以保证编解码器的听觉效果。When the bit resource is insufficient, the embodiment of the present invention can ensure that perceptually important subbands can obtain bits and be quantized to be transmitted to the decoding end, and the decoding end can restore the information of such subbands, and such subbands have a great influence on the auditory experience. The impact is relatively large. Although other perceptual sub-bands may not get bits, and the decoder may not be able to recover the information of such sub-bands, but since such sub-bands have little impact on auditory experience, they will not cause Large auditory error. Therefore, the auditory effect of the codec can be guaranteed through the embodiments of the present invention.

当比特资源较多时,如果为所有的子带分配过比特后,仍然有剩余比特,那么可以再次优先为感知重要的子带分配比特,这样,这类子带的量化精度将随着比特增加而提高,解码端恢复出的这类子带的信息将更加准确,越发接近原始信号。When there are more bit resources, if there are still remaining bits after allocating bits for all subbands, then the perceptually important subbands can be prioritized to allocate bits again, so that the quantization accuracy of such subbands will increase with the increase of bits. The information of such subbands recovered by the decoder will be more accurate and closer to the original signal.

附图说明 Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施方式。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention, and those skilled in the art can also obtain other implementation modes according to these drawings without any creative effort.

图1为本发明实施例的一种比特分配方法的流程图;Fig. 1 is the flowchart of a kind of bit allocation method of the embodiment of the present invention;

图2为本发明实施例的一种编码方法的流程图;FIG. 2 is a flowchart of an encoding method according to an embodiment of the present invention;

图3为本发明实施例的一种编码器的逻辑结构示意图;FIG. 3 is a schematic diagram of a logic structure of an encoder according to an embodiment of the present invention;

图4为本发明实施例的另一种比特分配方法的流程图;FIG. 4 is a flowchart of another bit allocation method according to an embodiment of the present invention;

图5为本发明实施例的一种解码方法的流程图;FIG. 5 is a flowchart of a decoding method according to an embodiment of the present invention;

图6为本发明实施例的一种解码器的逻辑结构示意图。FIG. 6 is a schematic diagram of a logic structure of a decoder according to an embodiment of the present invention.

具体实施方式 Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例可以分别从编码器和解码器的角度来描述。首先从编码器的角度来描述本发明实施例。The embodiments of the present invention can be described from the perspectives of an encoder and a decoder respectively. Firstly, the embodiment of the present invention is described from the perspective of an encoder.

首先对本发明实施例的一种比特分配方法进行说明。如图1所示,包括:Firstly, a bit allocation method in the embodiment of the present invention is described. As shown in Figure 1, including:

S101:对信号的所有子带按照子带的能量的高低进行感知排序。在实际应用中,对信号的所有子带既可以按照子带的能量由大到小的顺序进行排序,即,将能量大的子带排在能量小的子带之前,也可以按照子带的能量由小到大的顺序进行排序,即,将能量小的子带排在能量大的子带之前。S101: Perceptually sort all subbands of the signal according to the energy level of the subbands. In practical applications, all subbands of the signal can be sorted according to the energy of the subbands from large to small, that is, the subbands with high energy are arranged before the subbands with small energy, or the subbands can be sorted according to the energy of the subbands. The energy is sorted from small to large, that is, the subbands with small energy are arranged before the subbands with large energy.

能量可以用谱包络或其衍生值(例如量化值、经过LTQ加权后的量化值)表示。The energy can be represented by a spectral envelope or its derived value (eg quantized value, quantized value after LTQ weighting).

S102:根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序。S102: Adjust the order of the subbands in the perceptual sorting according to the difference between the frequency bands corresponding to the subbands in the frequency domain and the energy difference of the subbands.

根据能量大小对子带初步排序后,还可以同时根据子带对应的频段在频域上的高低和子带的能量的差值这两个因素调整子带在感知排序中的顺序。需要说明的是,这里的频段是指一段频率范围,例如,某个子带的频段为2kHz~6kHz。After the sub-bands are preliminarily sorted according to their energy, the order of the sub-bands in the perceptual sorting can also be adjusted according to two factors: the height of the frequency band corresponding to the sub-bands in the frequency domain and the energy difference of the sub-bands. It should be noted that the frequency band here refers to a frequency range, for example, the frequency band of a certain sub-band is 2kHz˜6kHz.

以根据能量由大到小的顺序对子带初步排序为例,如果任意一个第一子带在所述感知排序中的位置排在第二子带在所述感知排序中的位置之后,所述第二子带对应的频段与所述第一子带对应的频段相邻,并且所述第一子带对应的频段在频域上低于所述第二子带对应的频段,则比较所述第一子带的能量与所述第二子带的能量,如果所述第一子带的能量与所述第二子带的能量的差距达到了预先设置的门限值,则调换所述第一子带和所述第二子带在感知排序中的位置。例如,假设频段由低到高的各个子带为:子带1,子带2,子带3,子带4,...,根据子带的能量进行感知排序后,各个子带在感知排序中的顺序为:4,3,7,6,...。如果需要调换各个子带在感知排序中的顺序,则先确定出子带1在感知排序中的位置为4,与子带1相邻的子带2在感知排序中的位置为3;由于子带1在感知排序中的位置在子带2的位置之后,所以,再判断子带1和子带2的能量差距,如果能量差距达到预先设置的门限值,则调换子带1和子带2在感知排序中的位置,即,子带1在感知排序中的位置变更为3,子带2在感知排序中的位置变更为4;之后,确定出子带2在感知排序中变更后的位置在子带3的位置之前,所以不调换;之后,确定出子带3在感知排序中的位置在子带4的位置之后,再比较子带3和子带4的能量差距,如果能量差距未达到预先设置的门限值,则不调换子带3和子带4在感知排序中的位置,以此类推,最后调整后的顺序为:3,4,7,6,...。Taking the preliminary sorting of the subbands according to the order of energy from large to small as an example, if the position of any first subband in the perceptual sorting is ranked after the position of the second subband in the perceptual sorting, the The frequency band corresponding to the second subband is adjacent to the frequency band corresponding to the first subband, and the frequency band corresponding to the first subband is lower than the frequency band corresponding to the second subband in the frequency domain, then comparing the The energy of the first subband and the energy of the second subband, if the difference between the energy of the first subband and the energy of the second subband reaches a preset threshold value, swap the second subband A subband and the position of the second subband in perceptual ordering. For example, assuming that the subbands of the frequency band from low to high are: subband 1, subband 2, subband 3, subband 4, ..., after performing perceptual sorting according to the energy of the subbands, each subband is perceptually sorted The order in is: 4, 3, 7, 6, .... If it is necessary to exchange the order of each sub-band in the perceptual ordering, first determine that the position of sub-band 1 in the perceptual ordering is 4, and the position of sub-band 2 adjacent to sub-band 1 in the perceptual ordering is 3; The position of band 1 in the perceptual ranking is after the position of sub-band 2, so judge the energy gap between sub-band 1 and sub-band 2, and if the energy gap reaches the preset threshold value, swap sub-band 1 and sub-band 2 in The position in the perceptual sorting, that is, the position of sub-band 1 in the perceptual sorting is changed to 3, and the position of sub-band 2 in the perceptual sorting is changed to 4; after that, it is determined that the changed position of sub-band 2 in the perceptual sorting is The position of sub-band 3 is before, so it is not exchanged; after that, it is determined that the position of sub-band 3 in the perceptual ranking is after the position of sub-band 4, and then compare the energy gap between sub-band 3 and sub-band 4, if the energy gap does not reach the pre- If the threshold value is set, the positions of sub-band 3 and sub-band 4 in the perceptual ordering will not be exchanged, and so on, and the final adjusted order is: 3, 4, 7, 6, . . .

再以根据能量由小到大的顺序对子带初步排序为例,如果任意一个第一子带在所述感知排序中的位置排在第二子带在所述感知排序中的位置之前,所述第二子带对应的频段与所述第一子带对应的频段相邻,并且所述第一子带对应的频段在频域上高于所述第二子带对应的频段,则比较所述第一子带的能量与所述第二子带的能量,如果所述第一子带的能量与所述第二子带的能量的差距达到了预先设置的门限值,则调换所述第一子带和所述第二子带在感知排序中的位置。Taking the preliminary sorting of the subbands according to the order of energy from small to large as an example, if the position of any first subband in the perceptual sorting is ranked before the position of the second subband in the perceptual sorting, the The frequency band corresponding to the second sub-band is adjacent to the frequency band corresponding to the first sub-band, and the frequency band corresponding to the first sub-band is higher in the frequency domain than the frequency band corresponding to the second sub-band, then comparing the The energy of the first subband and the energy of the second subband, if the difference between the energy of the first subband and the energy of the second subband reaches a preset threshold value, the The positions of the first subband and the second subband in perceptual ordering.

当然,这里只是举例说明如何根据子带对应的频段在频域上的高低和子带的能量的差值,调整感知排序,在实际应用中,本领域技术人员完全可以根据实际需要来设计如何根据子带对应的频段在频域上的高低和子带的能量的差值,调整感知排序,这里不再一一举例说明。Of course, this is just an example to illustrate how to adjust the perceptual ranking according to the difference between the frequency band corresponding to the sub-band in the frequency domain and the energy of the sub-band. The difference between the height of the corresponding frequency band in the frequency domain and the energy of the sub-bands is used to adjust the perceptual ranking, and no examples are given here.

感知排序是比特分配过程中很重要的一个步骤,它决定了给各个子带分配比特的顺序。还是以根据能量由大到小的顺序对子带初步排序为例,当比特资源不足时,排序靠后的子带可能会分不到比特,分不到比特的子带也就不会被量化编码,解码器就会得不到未被量化编码的子带的信息,所以,这部分子带的质量便被损失掉了。如果合理的进行感知排序,那么重要的子带就会优先被分配比特,从而保证了重要的子带能够被量化编码,解码器因此可以得到重要的子带的信息。Perceptual ordering is a very important step in the bit allocation process, which determines the order in which bits are allocated to each subband. Or take the preliminary sorting of the subbands according to the order of energy from large to small as an example. When the bit resources are insufficient, the subbands in the lower order may not be allocated bits, and the subbands that cannot be allocated bits will not be quantized. Encoding, the decoder will not be able to obtain the subband information that has not been quantized and encoded, so the quality of this subband will be lost. If perceptual sorting is performed reasonably, important subbands will be assigned bits first, thereby ensuring that important subbands can be quantized and coded, and thus the decoder can obtain information about important subbands.

S103:将比特资源按照调整后的感知排序的顺序进行分配。S103: Allocate bit resources according to the adjusted order of perceptual ranking.

在分配比特时,按照子带在感知排序中的位置为子带分配比特。具体的,如果根据能量由大到小的顺序对子带初步排序,那么按照从前至后的顺序依次为子带分配比特。还是以子带排列顺序“子带1,子带2,子带3,子带4,子带5,...”为例,首先给子带1分配比特,之后给子带2分配比特,以此类推,按照先后顺序给子带分配比特。当然,如果根据能量由小到大的顺序对子带初步排序,那么按照从后至前的顺序依次为子带分配比特。还是以子带排列顺序“子带1,子带2,子带3,子带4,子带5,...”为例,首先为排在最后的子带分配比特,接着为排在倒数第2位的子带分配比特,以此类推,为子带5分配比特,为子带4分配比特,为子带3分配比特,为子带2分配比特,最后为子带1分配比特。When allocating bits, the subbands are allocated bits according to their positions in the perceptual ranking. Specifically, if the subbands are preliminarily sorted in descending order of energy, bits are allocated to the subbands in sequence from front to back. Still taking the order of subband arrangement "subband 1, subband 2, subband 3, subband 4, subband 5, ..." as an example, first assign bits to subband 1, and then assign bits to subband 2, By analogy, bits are allocated to the subbands in sequence. Of course, if the subbands are preliminarily sorted in ascending order of energy, bits are allocated to the subbands sequentially in order from back to front. Still taking the order of the subbands "subband 1, subband 2, subband 3, subband 4, subband 5, ..." as an example, first assign bits to the last subband, and then assign bits to the last subband Bits are allocated to the second subband, and so on, bits are allocated to subband 5, bits are allocated to subband 4, bits are allocated to subband 3, bits are allocated to subband 2, and finally bits are allocated to subband 1.

在实际应用中,进行过一次比特分配后,可能会有比特剩余,即还有未被分配的剩余比特,这种情况下,可以再根据调整后的感知排序的顺序给子带分配剩余的比特,直至所有的剩余比特都被分配完为止。例如,假设某种信号的子带的比特集合表为{6,9,12},这个比特集合表的意义是,当为这种信号的某个子带分配比特时,只能为这个子带分配6个比特、9个比特或12个比特,当然,为这种信号的子带分配的最大比特数就是12。再以根据能量由大到小的顺序对子带初步排序为例,假设在第一次比特分配时,为这种信号的子带2分配了9个比特,如果在第一次比特分配后还有未被分配的比特,并且排在子带2之前的所有子带都经过了第二次比特分配,那么在为子带2分配比特时,可以再为子带2分配3个比特,使子带2得到的比特数达到最大比特数,即12个比特。当然,如何分配剩余比特也可以由本领域技术人员根据实际需要而设计,这里不再一一举例说明。In practical applications, after a bit allocation, there may be bits remaining, that is, there are remaining bits that have not been allocated. In this case, the remaining bits can be allocated to the subbands according to the order of the adjusted perceptual sorting , until all remaining bits are allocated. For example, suppose the bit set table of a subband of a certain signal is {6, 9, 12}. The meaning of this bit set table is that when allocating bits to a certain subband of this signal, only this subband can be allocated 6 bits, 9 bits or 12 bits, of course, the maximum number of bits allocated for a subband of this signal is 12. Taking the preliminary sorting of the subbands according to the order of energy from large to small as an example, assuming that in the first bit allocation, 9 bits are allocated to subband 2 of this signal, if after the first bit allocation, there are still There are unallocated bits, and all subbands before subband 2 have undergone the second bit allocation, then when allocating bits for subband 2, 3 bits can be allocated for subband 2, so that the subband The number of bits obtained with 2 reaches the maximum number of bits, which is 12 bits. Of course, how to allocate the remaining bits can also be designed by those skilled in the art according to actual needs, and will not be illustrated here one by one.

显然,S101、S102和S103的执行主体是编码器。Obviously, the execution subject of S101, S102 and S103 is the encoder.

图1所示的方法中的S101、S102和S103可以应用于编码过程中,对此,本发明实施例提供一种编码方法。如图2所示,包括:S101, S102, and S103 in the method shown in FIG. 1 may be applied in an encoding process, and for this, an embodiment of the present invention provides an encoding method. As shown in Figure 2, including:

S201:对信号的所有子带按照子带的能量的高低进行感知排序;S201: Perceptually sort all subbands of the signal according to the energy level of the subbands;

S202:根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序;S202: Adjust the order of the subbands in the perceptual ranking according to the difference between the frequency band corresponding to the subband in the frequency domain and the energy difference of the subband;

S203:将比特资源按照调整后的感知排序的顺序进行分配;S203: Allocate the bit resources according to the adjusted perceptual order;

S204:根据比特分配的结果,对信号进行量化编码。S204: Quantize and encode the signal according to the bit allocation result.

图2所示的方法的相关描述可以参见图1所示的方法的相关描述,例如,S201的相关描述可以参见S101的相关描述,S202的相关描述可以参见S102的相关描述,S203的相关描述可以参见S103的相关描述,这里不再赘述。For the related description of the method shown in Figure 2, please refer to the related description of the method shown in Figure 1, for example, for the related description of S201, please refer to the related description of S101, for the related description of S202, please refer to the related Refer to the relevant description of S103, which will not be repeated here.

对应于图1所示的方法和图2所示的方法,本发明实施例提供了一种编码器。请再参见图3,包括:排序单元301,用于对信号的所有子带按照子带的能量的高低进行感知排序;调整单元302,用于根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序;比特分配单元303,用于将比特资源按照调整后的感知排序的顺序进行分配;量化编码单元304,用于在比特分配单元303将比特资源按照调整后的感知排序的顺序进行分配后,根据比特分配的结果,对信号进行量化编码。Corresponding to the method shown in FIG. 1 and the method shown in FIG. 2 , an embodiment of the present invention provides an encoder. Please refer to FIG. 3 again, including: a sorting unit 301, configured to perceptually sort all subbands of the signal according to the energy level of the subbands; The energy difference of the bands adjusts the order of the subbands in the perceptual ordering; the bit allocation unit 303 is used to allocate the bit resources according to the order of the adjusted perceptual ordering; the quantization encoding unit 304 is used for the bit allocation unit 303 After the bit resources are allocated according to the adjusted order of perceptual ordering, the signal is quantized and coded according to the bit allocation result.

图3所示的编码器的相关描述可以参见图1所示的方法的相关描述,例如,排序单元301的相关描述可以参见S101的相关描述,调整单元302的相关描述可以参见S102的相关描述,比特分配单元303的相关描述可以参见S103的相关描述,这里不再赘述。For the relevant description of the encoder shown in FIG. 3, please refer to the relevant description of the method shown in FIG. 1. For example, for the relevant description of the sorting unit 301, please refer to the relevant description of S101. For the related description of the bit allocating unit 303, refer to the related description of S103, which will not be repeated here.

这里需要说明的是,编码器在进行编码时,可以对每个子带的谱包络的量化值编码,这样,代表每个子带的能量的量化值就被编入码流中。It should be noted here that when encoding, the encoder may encode the quantized value of the spectral envelope of each subband, so that the quantized value representing the energy of each subband is encoded into the code stream.

图1所示的方法、图2所示的方法和图3所示的编码器都是从编码器的角度来描述的,上面提到过,本发明实施例还可以从解码器的角度来描述。The method shown in Figure 1, the method shown in Figure 2, and the encoder shown in Figure 3 are all described from the perspective of the encoder. As mentioned above, the embodiment of the present invention can also be described from the perspective of the decoder .

首先从解码器的角度对本发明实施例的一种比特分配方法进行说明。如图4所示,包括:First, a bit allocation method in the embodiment of the present invention is described from the perspective of a decoder. As shown in Figure 4, including:

S401:从码流中解码得到信号的每个子带的能量。S401: Decode the code stream to obtain the energy of each subband of the signal.

编码器对每个子带的谱包络的量化值编码后,量化值被编入码流中。对应的,解码器可以从码流中解码得到每个子带的谱包络的量化值,从而可以得到每个子带的能量。After the encoder encodes the quantized value of the spectral envelope of each subband, the quantized value is encoded into the code stream. Correspondingly, the decoder can decode the code stream to obtain the quantized value of the spectral envelope of each subband, so as to obtain the energy of each subband.

S402:对所有的子带按照子带的能量的高低进行感知排序。S402: Perceptually sort all the subbands according to the energy level of the subbands.

相关描述可以参见图1所示的方法中的S101的相关描述。For related descriptions, refer to related descriptions of S101 in the method shown in FIG. 1 .

S403:根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序。S403: Adjust the order of the subbands in the perceptual ranking according to the difference between the frequency bands corresponding to the subbands in the frequency domain and the energy difference of the subbands.

相关描述可以参见图1所示的方法中的S102的相关描述。For related descriptions, refer to the related descriptions of S102 in the method shown in FIG. 1 .

S404:将比特资源按照调整后的感知排序的顺序进行分配。S404: Allocate bit resources according to the adjusted order of perceptual ranking.

相关描述可以参见图1所示的方法中的S103的相关描述。For related descriptions, refer to related descriptions of S103 in the method shown in FIG. 1 .

图4所示的方法中的S401、S402、S403和S404可以应用于解码过程中,对此,本发明实施例还提供一种解码方法。如图5所示,包括:S401, S402, S403, and S404 in the method shown in FIG. 4 may be applied in a decoding process, and for this, an embodiment of the present invention further provides a decoding method. As shown in Figure 5, including:

S501:从码流中解码得到信号的每个子带的能量。S501: Decode the code stream to obtain the energy of each subband of the signal.

相关描述可以参见图4所示的方法中的S401的相关描述。For related descriptions, refer to related descriptions of S401 in the method shown in FIG. 4 .

S502:对所有的子带按照子带的能量的高低进行感知排序。S502: Perceptually sort all the subbands according to the energy level of the subbands.

相关描述可以参见图1所示的方法中的S101的相关描述。For related descriptions, refer to related descriptions of S101 in the method shown in FIG. 1 .

S503:根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序。S503: Adjust the order of the subbands in the perceptual sorting according to the difference between the frequency bands corresponding to the subbands in the frequency domain and the energy difference of the subbands.

相关描述可以参见图1所示的方法中的S102的相关描述。For related descriptions, refer to the related descriptions of S102 in the method shown in FIG. 1 .

S504:将比特资源按照调整后的感知排序的顺序进行分配。S504: Allocate the bit resources according to the adjusted perceptual order.

相关描述可以参见图1所示的方法中的S103的相关描述。For related descriptions, refer to related descriptions of S103 in the method shown in FIG. 1 .

S505:根据比特分配的结果,从码流中解码得到信号。S505: According to the bit allocation result, decode the code stream to obtain a signal.

对应于图4所示的方法和图5所示的方法,本发明实施例提供了一种解码器。请参见图6,包括:第一解码单元601,用于从码流中解码得到信号的每个子带的能量;排序单元602,用于对所有的子带按照子带的能量的高低进行感知排序;调整单元603,用于根据子带对应的频段在频域上的高低和子带的能量的差值,调整子带在感知排序中的顺序;比特分配单元604,用于将比特资源按照调整后的感知排序的顺序进行分配;第二解码单元605,用于在比特分配单元604将比特资源按照调整后的感知排序的顺序进行分配后,根据比特分配的结果,从码流中解码得到信号。Corresponding to the method shown in FIG. 4 and the method shown in FIG. 5 , an embodiment of the present invention provides a decoder. Please refer to FIG. 6, including: a first decoding unit 601, which is used to decode the energy of each subband of the signal from the code stream; a sorting unit 602, which is used to perceptually sort all subbands according to the energy level of the subbands The adjustment unit 603 is used to adjust the order of the sub-bands in the perceptual sorting according to the difference between the frequency bands corresponding to the sub-bands in the frequency domain and the energy of the sub-bands; the bit allocation unit 604 is used to allocate the bit resources according to the adjusted The second decoding unit 605 is configured to, after the bit allocation unit 604 allocates the bit resources according to the adjusted perceptual order, decode the bit stream to obtain the signal according to the bit allocation result.

图6所示的解码器的相关描述可以参见图1所示的方法及图4所示的方法的相关描述,例如,第一解码单元601的相关描述可以参见图4所示的方法中的S401的相关描述,排序单元602的相关描述可以参见图1所示的方法中的S101的相关描述,调整单元603的相关描述可以参见S102的相关描述,比特分配单元604的相关描述可以参见S103的相关描述,这里不再赘述。For the relevant description of the decoder shown in Figure 6, please refer to the relevant description of the method shown in Figure 1 and the method shown in Figure 4, for example, for the relevant description of the first decoding unit 601, please refer to S401 in the method shown in Figure 4 For the relevant description of the sorting unit 602, please refer to the relevant description of S101 in the method shown in FIG. 1. For the relevant description of the adjustment unit 603, please refer to the relevant description of S102. description, and will not be repeated here.

为使本领域技术人员更加清楚的理解本发明实施例,下面介绍一个优选实施例。In order to make those skilled in the art understand the embodiment of the present invention more clearly, a preferred embodiment is introduced below.

在编码端,得到的一组M点MDCT系数Y={y(j),j=0,...,K},被划分为N个子带band(i),i=0,...,N-1。每个子带内对应的MDCT系数的个数为nb_coef(i), Σ i nb _ coef ( i ) = M , i = 0 , . . . , N - 1 , 每个子带的谱包络为log_rms(i),编码端可用于MDCT系数量化的比特数为nb_bits_max。比特分配的方法如下:At the encoding end, the obtained set of M-point MDCT coefficients Y={y(j), j=0,...,K} is divided into N subbands band(i), i=0,..., N-1. The number of corresponding MDCT coefficients in each subband is nb_coef(i), Σ i nb _ coef ( i ) = m , i = 0 , . . . , N - 1 , The spectral envelope of each subband is log_rms(i), and the number of bits available for quantization of MDCT coefficients at the encoding end is nb_bits_max. The method of bit allocation is as follows:

编码端:Encoder:

(1)所有的子带谱包络首先被量化编码,放入码流。(1) All subband spectral envelopes are quantized and coded first, and put into the code stream.

(2)按谱包络log_rms(i)从大到小的顺序对所有子带进行排序,排序结果为ord[i],ord[i]=0,...,N-1,谱包络越大,ord[i]越小,感知越重要。(2) Sort all subbands according to the order of spectral envelope log_rms(i) from large to small, the sorting result is ord[i], ord[i]=0,..., N-1, spectral envelope The larger the value, the smaller the ord[i] and the more important the perception.

(3)按从低频到高频的顺序,依次判断各子带的感知顺序是否符合感知特性,判断过程如下:(3) According to the order from low frequency to high frequency, judge whether the perceptual sequence of each sub-band conforms to the perceptual characteristics in turn, and the judgment process is as follows:

If第i个子带的感知顺序ord[i]大于第i+1个子带的感知顺序ord[i+1]If the perceptual order ord[i] of the i-th sub-band is greater than the perceptual order ord[i+1] of the i+1-th sub-band

If第i个子带的谱包络log_rms(i)与第i+1个子带的谱包络log_rms(i)之差>ThreIf the difference between the spectral envelope log_rms(i) of the ith subband and the spectral envelope log_rms(i) of the i+1th subband>Thre

交换第i个子带和第i+1个子带的感知顺序Swap the perceptual order of the ith subband and the i+1th subband

Endend

Endend

需要说明的是:a)子带是按从低频到高频顺序排列的,因此,第i个子带相对第i+1个子带为低频带,第i+1个子带相对第i+2个子带为低频带,依次类推。b)Thre为能量差的阈值,可以采用经验值确定或优化算法确定,Thre∈R,在本实施例中,Thre=0.5。It should be noted that: a) The sub-bands are arranged in order from low frequency to high frequency, therefore, the i-th sub-band is the low-frequency band relative to the i+1-th sub-band, and the i+1-th sub-band is relative to the i+2-th sub-band for the low frequency band, and so on. b) Thre is the threshold of the energy difference, which can be determined by using empirical values or optimization algorithms, Thre∈R, in this embodiment, Thre=0.5.

(4)根据调整后的感知排序,依次给每个子带分配比特。子带内的每个MDCT系数理论上应分配到的比特数直接由该子带的谱包络所决定,每个子带理论上应分配到的比特数为:(4) Assign bits to each subband sequentially according to the adjusted perceptual ranking. The theoretical number of bits that should be allocated to each MDCT coefficient in a subband is directly determined by the spectral envelope of the subband. The theoretical number of bits that should be allocated to each subband is:

bit_rms(i)=log_rms(i)×nb_coef(i)bit_rms(i)=log_rms(i)×nb_coef(i)

根据最大比特数nb_bits_max,每个子带的最优比特分配为:According to the maximum number of bits nb_bits_max, the optimal bit allocation for each subband is:

batbat __ optopt (( ii )) == [[ nbnb __ bitsbits __ maxmax Mm ++ loglog __ rmsrms (( ii )) -- ΣbitΣ bit __ rmsrms (( ii )) Mm ]] ×× nbnb __ coefcoef (( ii ))

(5)如果还有比特资源剩余,则按子带的感知重要性进行再分配的过程如下:(5) If there are still bit resources remaining, the process of reallocating according to the perceptual importance of subbands is as follows:

a)如果剩余的比特资源数量allocatedbits<nb_bits_max且0≤i<N,则重复进行b~d步骤。a) If the number of remaining bit resources allocatedbits<nb_bits_max and 0≤i<N, repeat steps b to d.

b)按照感知重要性的顺序,从重要到不重要的顺序,选择子带band(ord[i])。b) Select the subbands band(ord[i]) in order of perceived importance, from important to unimportant.

c)已知的可能比特分配集合R={q_bit0,q_bit1,...},其中,q_bit0<q_bit1<...为子带可能分配到的比特个数。若该子带已分配到的比特资源为bat_bit(ord[i])=q_bitk,如果为该子带增加分配的比特,考虑到已知的可能分配到比特集合R,则该子带分配到的比特应为q_bitk+1c) Known possible bit allocation set R={q_bit 0 , q_bit 1 , ...}, where q_bit 0 <q_bit 1 <... is the number of bits that may be allocated to a subband. If the bit resource allocated to the subband is bat_bit(ord[i])=q_bit k , if the allocated bits are added to the subband, considering the known possible allocation to the bit set R, then the subband is allocated to The bits shall be q_bit k+1 .

d)如果allocatedbits+q_bitsk+1-q_bitsk≤nb_bits_max,则bat_bit(ord[i])=q_bitk+1,allocatedbits=allocatedbits+q_bitsk+1-q_bitsk,否则bat_bit(ord[i])=q_bitkd) If allocatedbits+q_bits k+1 -q_bits k ≤ nb_bits_max, then bat_bit(ord[i])=q_bit k+1 , allocatedbits=allocatedbits+q_bits k+1 -q_bits k , otherwise bat_bit(ord[i])= q_bit k .

(6)按照最终的比特分配结果bat_bit(i)对每个子带的MDCT系数进行量化编码,编入码流。(6) Quantize and encode the MDCT coefficients of each subband according to the final bit allocation result bat_bit(i), and encode them into the code stream.

解码端:Decoder:

(1)从接收到的码流中解码得到谱包络log_rms(i)。(1) Decode the received code stream to obtain the spectral envelope log_rms(i).

(2)采用和编码端(2)~(5)相同的手段确定每个子带分配到的比特数bat_bit(i)和子带的重要性排序ord[i]。(2) Determine the number of bits bat_bit(i) allocated to each subband and the order of importance ord[i] of the subbands by the same means as those at the encoding end (2)-(5).

(3)根据每个子带分配到的比特数bat_bit(i)和子带的重要性排序ord[i],依次从接收到的码流中解码得到每个子带的MDCT系数。(3) sort ord[i] according to the number of bits bat_bit(i) assigned to each sub-band and the importance of the sub-bands, and sequentially decode the received code stream to obtain the MDCT coefficients of each sub-band.

综上所述,本发明实施例综合子带的能量、频率这两种因素的影响,确定子带的感知排序,保证了感知重要的子带优先得到比特资源,使人耳听觉敏感的子带量化误差减小,大大提高了听测质量。同时,避免了心理声学模型的复杂计算,有效的降低了计算复杂度,延时小,资源消耗少。In summary, the embodiment of the present invention combines the influence of the energy and frequency of the subbands to determine the perceptual ordering of the subbands, ensuring that the perceptually important subbands are given priority to bit resources, and the subbands that are sensitive to the human ear Quantization errors are reduced, greatly improving listening quality. At the same time, the complex calculation of the psychoacoustic model is avoided, the calculation complexity is effectively reduced, the delay is small, and the resource consumption is small.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-OnlyMemory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM), etc.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications should also be It is regarded as the protection scope of the present invention.

Claims (22)

1. a Bit distribution method is characterized in that, comprising:
All subbands of signal are carried out the perception ordering according to the height of the energy of subband;
According to the difference of the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted;
The bit resource is distributed according to the order of adjusted perception ordering.
2. the method for claim 1 is characterized in that, all subbands of signal are carried out the perception ordering according to the height of the energy of subband be specially: all subbands to signal carry out the perception ordering according to the descending order of the energy of subband.
3. method as claimed in claim 2 is characterized in that, according to the difference of the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted specifically comprises:
If the position of any one first subband in said perception ordering comes after the position of second subband in said perception ordering; Frequency range and the corresponding adjacent frequency bands of said first subband that said second subband is corresponding; And the frequency range that said first subband is corresponding is lower than the corresponding frequency range of said second subband on frequency domain; The energy of the energy of then more said first subband and said second subband; If the gap of the energy of the energy of said first subband and said second subband has reached the threshold value that is provided with in advance, then change said first subband and said second subband position in the perception ordering.
4. like claim 2 or 3 described methods, it is characterized in that, the bit resource is distributed according to the order of adjusted perception ordering comprise: according to from front to back order allocation bit resource successively in the perception ordering.
5. method as claimed in claim 4; It is characterized in that; The bit resource distributed also according to the order of adjusted perception ordering comprise: if all distributed bit for each subband but also have unappropriated remaining bits; Then, all be assigned with until all remaining bits again according to the said unappropriated remaining bits of order assignment of said adjusted perception ordering.
6. the method for claim 1 is characterized in that, all subbands of signal are carried out the perception ordering according to the height of the energy of subband be specially: all subbands to signal carry out the perception ordering according to the ascending order of the energy of subband.
7. method as claimed in claim 6 is characterized in that, according to the difference of the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted specifically comprises:
If the position of any one first subband in said perception ordering comes before the position of second subband in said perception ordering; Frequency range and the corresponding adjacent frequency bands of said first subband that said second subband is corresponding; And the frequency range that said first subband is corresponding is higher than the corresponding frequency range of said second subband on frequency domain; The energy of the energy of then more said first subband and said second subband; If the gap of the energy of the energy of said first subband and said second subband has reached the threshold value that is provided with in advance, then change said first subband and said second subband position in the perception ordering.
8. like claim 6 or 7 described methods, it is characterized in that, the bit resource distributed according to the order of adjusted perception ordering comprise: according in the perception ordering from the back to preceding order allocation bit resource successively.
9. method as claimed in claim 8; It is characterized in that; The bit resource distributed also according to the order of adjusted perception ordering comprise: if all distributed bit for each subband but also have unappropriated remaining bits; Then, all be assigned with until all remaining bits again according to the said unappropriated remaining bits of order assignment of said adjusted perception ordering.
10. a coding method is characterized in that, comprising:
All subbands of signal are carried out the perception ordering according to the height of the energy of subband;
According to the difference of the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted;
The bit resource is distributed according to the order of adjusted perception ordering;
According to the result of Bit Allocation in Discrete, signal is carried out quantization encoding.
11. a scrambler is characterized in that, comprising:
Sequencing unit is used for all subbands of signal are carried out the perception ordering according to the height of the energy of subband;
Adjustment unit is used for the difference according to the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted;
The Bit Allocation in Discrete unit is used for the bit resource is distributed according to the order of adjusted perception ordering;
The quantization encoding unit is used for said Bit Allocation in Discrete unit distributes the bit resource according to the order of adjusted perception ordering after, according to the result of Bit Allocation in Discrete, signal being carried out quantization encoding.
12. a Bit distribution method is characterized in that, comprising:
Decoding obtains the energy of each subband of signal from code stream;
All subbands are carried out the perception ordering according to the height of the energy of subband;
According to the difference of the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted;
The bit resource is distributed according to the order of adjusted perception ordering.
13. method as claimed in claim 12 is characterized in that, all subbands of signal are carried out the perception ordering according to the height of the energy of subband be specially: all subbands to signal carry out the perception ordering according to the descending order of the energy of subband.
14. method as claimed in claim 13 is characterized in that, according to the difference of the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted specifically comprises:
If the position of any one first subband in said perception ordering comes after the position of second subband in said perception ordering; Frequency range and the corresponding adjacent frequency bands of said first subband that said second subband is corresponding; And the frequency range that said first subband is corresponding is lower than the corresponding frequency range of said second subband on frequency domain; The energy of the energy of then more said first subband and said second subband; If the gap of the energy of the energy of said first subband and said second subband has reached the threshold value that is provided with in advance, then change said first subband and said second subband position in the perception ordering.
15. like claim 13 or 14 described methods, it is characterized in that, the bit resource distributed according to the order of adjusted perception ordering comprise: according to from front to back order allocation bit resource successively in the perception ordering.
16. method as claimed in claim 15; It is characterized in that; The bit resource distributed according to the order of adjusted perception ordering comprise: if all distributed bit for each subband but also have unappropriated remaining bits; Then, all be assigned with until all remaining bits again according to the said unappropriated remaining bits of order assignment of said adjusted perception ordering.
17. method as claimed in claim 12 is characterized in that, all subbands of signal are carried out the perception ordering according to the height of the energy of subband be specially: all subbands to signal carry out the perception ordering according to the ascending order of the energy of subband.
18. method as claimed in claim 17 is characterized in that, according to the difference of the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted specifically comprises:
If the position of any one first subband in said perception ordering comes before the position of second subband in said perception ordering; Frequency range and the corresponding adjacent frequency bands of said first subband that said second subband is corresponding; And the frequency range that said first subband is corresponding is higher than the corresponding frequency range of said second subband on frequency domain; The energy of the energy of then more said first subband and said second subband; If the gap of the energy of the energy of said first subband and said second subband has reached the threshold value that is provided with in advance, then change said first subband and said second subband position in the perception ordering.
19. like claim 17 or 18 described methods, it is characterized in that, the bit resource distributed according to the order of adjusted perception ordering comprise: according in the perception ordering from the back to preceding order allocation bit resource successively.
20. method as claimed in claim 19; It is characterized in that; The bit resource distributed also according to the order of adjusted perception ordering comprise: if all distributed bit for each subband but also have unappropriated remaining bits; Then, all be assigned with until all remaining bits again according to the said unappropriated remaining bits of order assignment of said adjusted perception ordering.
21. a coding/decoding method is characterized in that, comprising:
Decoding obtains the energy of each subband of signal from code stream;
All subbands are carried out the perception ordering according to the height of the energy of subband;
According to the difference of the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted;
The bit resource is distributed according to the order of adjusted perception ordering;
According to the result of Bit Allocation in Discrete, decoding obtains signal from code stream.
22. a demoder is characterized in that, comprising:
First decoding unit is used for obtaining from code stream decoding the energy of each subband of signal;
Sequencing unit is used for all subbands are carried out the perception ordering according to the height of the energy of subband;
Adjustment unit is used for the difference according to the energy of the corresponding height of frequency range on frequency domain of subband and subband, the order of adjustment subband in perception is sorted;
The Bit Allocation in Discrete unit is used for the bit resource is distributed according to the order of adjusted perception ordering;
Second decoding unit is used for said Bit Allocation in Discrete unit distributes the bit resource according to the order of adjusted perception ordering after, and according to the result of Bit Allocation in Discrete, decoding obtains signal from code stream.
CN2009101615252A 2009-07-31 2009-07-31 Bit distribution method, coding method, decoding method, coder and decoder Expired - Fee Related CN101989428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101615252A CN101989428B (en) 2009-07-31 2009-07-31 Bit distribution method, coding method, decoding method, coder and decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101615252A CN101989428B (en) 2009-07-31 2009-07-31 Bit distribution method, coding method, decoding method, coder and decoder

Publications (2)

Publication Number Publication Date
CN101989428A CN101989428A (en) 2011-03-23
CN101989428B true CN101989428B (en) 2012-07-04

Family

ID=43745941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101615252A Expired - Fee Related CN101989428B (en) 2009-07-31 2009-07-31 Bit distribution method, coding method, decoding method, coder and decoder

Country Status (1)

Country Link
CN (1) CN101989428B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103915097B (en) * 2013-01-04 2017-03-22 中国移动通信集团公司 Voice signal processing method, device and system
CN115171709B (en) * 2022-09-05 2022-11-18 腾讯科技(深圳)有限公司 Speech coding, decoding method, device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4899384A (en) * 1986-08-25 1990-02-06 Ibm Corporation Table controlled dynamic bit allocation in a variable rate sub-band speech coder
EP0551705A2 (en) * 1992-01-15 1993-07-21 Ericsson GE Mobile Communications Inc. Method for subbandcoding using synthetic filler signals for non transmitted subbands
US5664056A (en) * 1991-08-02 1997-09-02 Sony Corporation Digital encoder with dynamic quantization bit allocation
JP2003015698A (en) * 2001-06-29 2003-01-17 Matsushita Electric Ind Co Ltd Audio signal encoding device and audio signal decoding device
CN1419349A (en) * 2001-11-13 2003-05-21 松下电器产业株式会社 Phonetic coder, phonetic decoder and phonetic coding/decoding method
CN101261835A (en) * 2008-04-25 2008-09-10 清华大学 Multi-vector and multi-codebook size joint optimization method based on superframe mode

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4899384A (en) * 1986-08-25 1990-02-06 Ibm Corporation Table controlled dynamic bit allocation in a variable rate sub-band speech coder
US5664056A (en) * 1991-08-02 1997-09-02 Sony Corporation Digital encoder with dynamic quantization bit allocation
EP0551705A2 (en) * 1992-01-15 1993-07-21 Ericsson GE Mobile Communications Inc. Method for subbandcoding using synthetic filler signals for non transmitted subbands
JP2003015698A (en) * 2001-06-29 2003-01-17 Matsushita Electric Ind Co Ltd Audio signal encoding device and audio signal decoding device
CN1419349A (en) * 2001-11-13 2003-05-21 松下电器产业株式会社 Phonetic coder, phonetic decoder and phonetic coding/decoding method
CN101261835A (en) * 2008-04-25 2008-09-10 清华大学 Multi-vector and multi-codebook size joint optimization method based on superframe mode

Also Published As

Publication number Publication date
CN101989428A (en) 2011-03-23

Similar Documents

Publication Publication Date Title
CN101853663B (en) Bit allocation method, encoding device and decoding device
EP3174049B1 (en) Audio signal coding method and device
US8972270B2 (en) Method and an apparatus for processing an audio signal
EP3457400B1 (en) Voice audio encoding device, voice audio decoding device, voice audio encoding method, and voice audio decoding method
JP3186292B2 (en) High efficiency coding method and apparatus
RU2636697C1 (en) Device and method for coding
EP3762923B1 (en) Audio coding
KR20080093994A (en) Computer-implemented method and computer readable medium in audio encoder and audio decoder
CN101751926A (en) Signal coding and decoding method and device, and coding and decoding system
CN103544957A (en) Method and device for bit distribution of sound signal
US20090132238A1 (en) Efficient method for reusing scale factors to improve the efficiency of an audio encoder
JP2018205766A (en) Method, encoder, decoder, and mobile device
EP4503021A1 (en) Speech encoding method and apparatus, speech decoding method and apparatus, computer device and storage medium
CN101217037A (en) Method and system for source control of encoding rate of audio signal
CN101562015A (en) Audio-frequency processing method and device
CN112037802B (en) Audio coding method and device based on voice endpoint detection, equipment and medium
EP3621071B1 (en) Signal processing method and apparatus
CN101989428B (en) Bit distribution method, coding method, decoding method, coder and decoder
US20040158456A1 (en) System, method, and apparatus for fast quantization in perceptual audio coders
KR101301245B1 (en) A method and apparatus for adaptive sub-band allocation of spectral coefficients
US20090043572A1 (en) Pulse allocating method in voice coding
CN101800050A (en) Audio fine scalable coding method and system based on perception self-adaption bit allocation
CN106409303A (en) Method and device for processing signal
US11881227B2 (en) Audio signal compression method and apparatus using deep neural network-based multilayer structure and training method thereof
CN102479514B (en) Coding method, decoding method, apparatus and system thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120704

Termination date: 20190731