CN102801427A - Encoding and decoding method and system for variable-rate lattice vector quantization of source signal - Google Patents
Encoding and decoding method and system for variable-rate lattice vector quantization of source signal Download PDFInfo
- Publication number
- CN102801427A CN102801427A CN2012102799912A CN201210279991A CN102801427A CN 102801427 A CN102801427 A CN 102801427A CN 2012102799912 A CN2012102799912 A CN 2012102799912A CN 201210279991 A CN201210279991 A CN 201210279991A CN 102801427 A CN102801427 A CN 102801427A
- Authority
- CN
- China
- Prior art keywords
- vector
- quantization
- source signal
- variable rate
- bit allocation
- 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.)
- Granted
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
技术领域 technical field
本发明涉及源信号编码领域,更具体地,涉及源信号变速率格矢量量化的编解码方法和系统。The present invention relates to the field of source signal coding, more specifically, to a codec method and system for source signal variable-rate lattice vector quantization.
背景技术 Background technique
现有的数字源信号的编码通常采用的是变换编码,其将待编码的信号分成为帧的采样块,并采用诸如离散傅立叶变换、离散余弦变换等线性正交变换对每帧信号进行处理,求取变换系数,然后对变化系数进行量化,以进一步提高压缩效果。The coding of existing digital source signals usually adopts transform coding, which divides the signal to be coded into sampling blocks of frames, and uses linear orthogonal transforms such as discrete Fourier transform and discrete cosine transform to process each frame signal, Calculate the transformation coefficient, and then quantize the variation coefficient to further improve the compression effect.
在量化方法中常用的一种方法是矢量量化方法,在其中,将几个采样系数组在一起形成一个矢量,且以一个码本项对每个矢量进行近似(量化)。为量化输入矢量所选择的码本项通常是根据“距离最小”准则得出的码本中最近的邻点。在码本集合中增加更多的码本会增加比特率和复杂性,但会降低量化的平均失真。One method commonly used among quantization methods is the vector quantization method, in which several sampling coefficients are grouped together to form a vector, and each vector is approximated (quantized) with a codebook entry. The codebook entry chosen for quantizing the input vector is usually the nearest neighbor in the codebook according to the "minimum distance" criterion. Adding more codebooks in the codebook set increases the bit rate and complexity, but reduces the average distortion of quantization.
另一方面,为了适应源的不断变化的特征,通常使用自适应比特分配。通过自适应比特分配,可使用不同的码本尺寸来量化源矢量。在变换编码中,在不超过量化所有系数的可用比特数的最大值情况下,分配给源矢量的比特数通常取决于该矢量相对于同一帧中其他矢量的能量。图1和图2详细描述了常见的变速率量化编、解码器的量化框图。图1和图2中示出的变速率量化编码器和解码器使用多个码本,它们通常具有不同的比特率,以量化源矢量x。通常通过对信号进行变换并获取所有的变换系数或其子集,来获得源矢量。On the other hand, to adapt to the changing characteristics of the source, adaptive bit allocation is usually used. With adaptive bit allocation, different codebook sizes can be used to quantize the source vectors. In transform coding, the number of bits allocated to a source vector usually depends on the energy of that vector relative to other vectors in the same frame, without exceeding the maximum number of bits available to quantize all coefficients. Figure 1 and Figure 2 describe in detail the quantization block diagrams of common variable-rate quantization encoders and decoders. The variable rate quantization encoder and decoder shown in Figures 1 and 2 use multiple codebooks, usually with different bit rates, to quantize the source vector x. The source vector is usually obtained by transforming the signal and obtaining all or a subset of the transform coefficients.
图1中示出了常见的变速率量化编码器,其关键部件是用Q表示的量化器,该量化器用于选择一个码本号n和一个码矢索引i来表征源矢量x的量化值y。码本号n指明编码器选择的码本,而索引i表示在该特定码本中选择的码矢量。A common variable-rate quantization encoder is shown in Figure 1, and its key component is a quantizer denoted by Q, which is used to select a codebook number n and a code vector index i to represent the quantized value y of the source vector x . The codebook number n designates the codebook selected by the encoder, while the index i represents the codevector selected in that particular codebook.
通常,将适当的无损编码技术分别应用于块En和Ei中的n和i(即,图1中的En和Ei),以便在将它们复合在复用器MUN中以存储或通过通信信道传输之前,减少被编码的码本号nE和索引iE的平均比特率。Typically, appropriate lossless coding techniques are applied to n and i in blocks En and E i respectively (i.e., En and E i in Fig. The average bit rate of the encoded codebook number n E and index i E is reduced before transmission over the communication channel.
图2示出了变速率量化解码器。该解码器的输入端提供了用于将二进制码nE和iE分离解复用器DEMUX;该解码器还包括无损解码模块(即,Dn和Di),在其中解码nE和iE为码本号n和索引i;该解码器还包括接收码本号n和索引i并进行逆量化的逆量化器(用Q-1表示),其使用码本号和索引来恢复源矢量x的量化值y。不同的n值通常产生不同的比特分配从而产生不同的比特率,每维所需比特数(即,码本比特率)的定义为:分配给源矢量的比特数与源矢量的维数的比值。Figure 2 shows a variable rate quantization decoder. The input of the decoder provides a demultiplexer DEMUX for separating the binary codes n E and i E ; the decoder also includes lossless decoding modules (i.e., D n and D i ), in which n E and i E is codebook number n and index i; the decoder also includes an inverse quantizer (denoted by Q −1 ) that receives codebook number n and index i and performs inverse quantization, which uses codebook number and index to recover the source vector The quantized value y of x. Different values of n usually result in different bit allocations resulting in different bit rates, and the number of bits required per dimension (i.e., the codebook bit rate) is defined as the ratio of the number of bits allocated to the source vector to the dimension of the source vector .
通常,码本的构建可以采用以下多种方法:Usually, the construction of the codebook can adopt the following methods:
一种流行的方法是根据源的分布,采用训练算法(如k均值算法)来优化码本项。该方法得到非结构化码本,其对于待量化的每个源矢量通常必须进行存储和穷举搜索。因此,该方法的缺点是内存需求大,且计算复杂,它随码本比特率的增加而成指数增长。如果变速率方法基于上述非结构化的码本,则内存需求大和计算复杂的缺陷会进一步加大,因为通常需要为每个可能的位分配特定的码本。A popular approach is to employ a training algorithm such as the k-means algorithm to optimize the codebook entries according to the distribution of the sources. This approach results in an unstructured codebook, which typically must be stored and exhaustively searched for each source vector to be quantized. Therefore, the disadvantage of this method is the large memory requirement and the computational complexity, which grows exponentially with the bit rate of the codebook. If the variable-rate method is based on the above-mentioned unstructured codebook, the disadvantage of large memory requirement and computational complexity is further exacerbated, since a specific codebook usually needs to be assigned to each possible bit.
另一种方法是使用格矢量量化器,其降低了搜索复杂度,并且在许多情况下,可以有效地减少存储需求。格矢量量化是一种代数型矢量量化器,它的特点是在多维信号空间中,构造一种有规律的网络,网络中的点称为格点,并以格点进行矢量量化,把信号空间划分为胞腔。由于网络是有规律的,故格点和胞腔也是有规律的。格矢量量化器的主要优点是容易构造码书,且可以进行高维量化。图3示出了二维空间中的例子,其中基本矢量是v1和v2,该例子中使用的格是基本的六角形点阵,用Α2表示,该图中用十字标识的所有点可如下获得:Another approach is to use a lattice vector quantizer, which reduces search complexity and, in many cases, can effectively reduce storage requirements. Lattice vector quantization is an algebraic vector quantizer, which is characterized by constructing a regular network in the multi-dimensional signal space. Divided into cells. Since the network is regular, the lattice points and cells are also regular. The main advantage of the lattice vector quantizer is that it is easy to construct a codebook, and it can perform high-dimensional quantization. Figure 3 shows an example in two-dimensional space, where the basic vectors are v1 and v2, the grid used in this example is a basic hexagonal lattice, represented by Α2 , all points marked with crosses in this figure can be as follows get:
y=k1v1+k2v2 (1)y=k1v1+k2v2 (1)
其中,y是空间格点,且k1和k2可以是任何整数。注意到图3只是表示空间格点的一个子集,因为该空间格点本身可无穷扩展。Wherein, y is a spatial grid point, and k1 and k2 can be any integers. Note that Figure 3 only represents a subset of the spatial grid points, because the spatial grid points themselves can be infinitely expanded.
当选择某一空间格点来构造量化码本时,通常选择格点的某一子集来获得具有给定(有限)比特数的码本,使用格点的好处是在确定码本内的所有格点的源矢量x的最近邻点时,存在快速码本搜索算法,并且与其他非结构化的码本相比,可以极大减少复杂性。此外,使用格点无需存储码本,因为码本可以从生成矩阵中获得。When a certain spatial grid point is selected to construct a quantized codebook, a certain subset of the grid points is usually selected to obtain a codebook with a given (limited) number of bits. The advantage of using a grid point is that all When the nearest neighbor of the source vector x of the lattice point, there is a fast codebook search algorithm, and compared with other unstructured codebooks, the complexity can be greatly reduced. Furthermore, using lattice points eliminates the need to store a codebook, since the codebook can be obtained from the generator matrix.
格矢量量化中经常使用的格点是D8格。D8是由8维整数格的Z8格点v=(v1,…,v8)组成,且满足即:The grid often used in lattice vector quantization is the D8 lattice. D8 is composed of Z8 lattice points v=(v 1 ,…,v 8 ) of 8-dimensional integer lattice, and satisfies Right now:
D8格中任意8维格点y可以通过如下的方法生成:Any 8-dimensional grid point y in the D8 grid can be generated by the following method:
y=[k1 k2…k8]GD8 (3)y=[k 1 k 2 …k 8 ]G D8 (3)
其中k1,k2,...,k8是有符号的整数,GD8是生成矩阵,定义为:where k 1 , k 2 , ..., k 8 are signed integers, G D8 is a generator matrix defined as:
容易验证GD8是生成矩阵的逆矩阵为:It is easy to verify that G D8 is the inverse matrix of the generating matrix for:
该逆矩阵在获取D8格点y的坐标时非常有用。This inverse matrix is very useful in obtaining the coordinates of the D8 grid point y.
发明内容 Contents of the invention
为了解决传统的变速率矢量量化器因随码本个数的增加而导致存储空间增加、且在量化过程中因需要对码本进行全搜索以获得最好的量化矢量而使其搜索的运算复杂度高等缺陷,本发明特给出了以下技术方案。In order to solve the traditional variable-rate vector quantizer, the storage space increases with the increase of the number of codebooks, and the search operation is complicated because the codebook needs to be fully searched to obtain the best quantized vector during the quantization process. High degree of defects, the present invention provides the following technical solutions.
本发明解决其技术问题采用的第一技术方案是,构造一种源信号变速率格矢量量化的编码方法,包括:The first technical solution adopted by the present invention to solve the technical problems is to construct a coding method for source signal variable rate lattice vector quantization, including:
S1,将输入源信号从时域变换到频域以获得谱系数和控制信息;S1, transforming the input source signal from the time domain to the frequency domain to obtain spectral coefficients and control information;
S2,对所述谱系数进行分组和比特分配以获得比特分配信息;S2. Perform grouping and bit allocation on the spectral coefficients to obtain bit allocation information;
S3,基于所述比特分配信息,格矢量量化所述谱系数;S3. Based on the bit allocation information, lattice vector quantize the spectral coefficients;
S4,将量化索引、所述比特分配信息、所述控制信息打包成编码比特流.S4, packing the quantization index, the bit allocation information, and the control information into an encoded bit stream.
在本发明所述的源信号变速率格矢量量化的编码方法中,所述步骤S3进一步包括:In the encoding method of source signal variable rate lattice vector quantization according to the present invention, the step S3 further includes:
S31,对于所述谱系数,计算偏移矢量;S31. For the spectral coefficients, calculate an offset vector;
S32,对所述偏移矢量进行缩放,得到缩放矢量;S32. Scaling the offset vector to obtain a scaling vector;
S33,在D8格空间中搜索与所述缩放矢量最临近的格点;S33, searching for a grid point closest to the scaling vector in the D8 grid space;
S34,计算所述最临近的格点坐标;S34, calculating the coordinates of the nearest grid point;
S35,利用所述坐标计算D8格矢量;S35, using the coordinates to calculate the D8 grid vector;
S36,比较所述D8格矢量与所述最临近的格点是否一致,如果一致,则量化结束,输出所述坐标;如果不一致,则对所述缩放矢量执行逼近量化。S36. Comparing whether the D8 grid vector is consistent with the nearest grid point, if they are consistent, the quantization ends, and the coordinates are output; if they are not consistent, approximate quantization is performed on the scaled vector.
在本发明所述的源信号变速率格矢量量化的编码方法中,所述步骤S36中的逼近量化进一步包括:In the encoding method of source signal variable rate lattice vector quantization described in the present invention, the approximation quantization in the step S36 further includes:
S361,将所述缩放矢量再次缩放,得到再次缩放矢量,运用步骤S33-S35计算得到第二最临近的格点、所述第二最临近的格点坐标,和第二D8格矢量;S361, re-scale the scaling vector to obtain a re-scaling vector, and use steps S33-S35 to calculate and obtain the second closest grid point, the second closest grid point coordinates, and the second D8 grid vector;
S362,比较所述第二D8格矢量与所述第二最临近的格点是否相等,如果不相等,则重复步骤S361,直至所述第二D8格矢量与所述第二最临近的格点相等。S362, comparing whether the second D8 grid vector is equal to the second nearest grid point, if not, repeat step S361 until the second D8 grid vector is equal to the second nearest grid point equal.
在本发明所述的源信号变速率格矢量量化的编码方法中,所述步骤S36中的逼近量化进一步包括:In the encoding method of source signal variable rate lattice vector quantization described in the present invention, the approximation quantization in the step S36 further includes:
S363,运用步骤S33-S35计算得到第三D8格矢量、第三最临近的格点和第三最临近的格点坐标;S363, using steps S33-S35 to calculate the third D8 grid vector, the third nearest grid point and the third nearest grid point coordinates;
S364,比较所述第三D8格矢量与所述第三最临近的格点,如果两者不相等,则量化结束,输出所述第三最临近的格点坐标及量化比特数;如果两者相等,则重复步骤S363直至两者不相等,最后输出所述第三最临近的格点坐标及量化比特数。S364, comparing the third D8 grid vector with the third nearest grid point, if the two are not equal, the quantization ends, outputting the third nearest grid point coordinates and the number of quantization bits; if both If they are equal, repeat step S363 until they are not equal, and finally output the coordinates of the third nearest grid point and the number of quantization bits.
在本发明所述的源信号变速率格矢量量化的编码方法中,在所述步骤S31中,所述偏移矢量满足:In the encoding method of source signal variable rate lattice vector quantization described in the present invention, in the step S31, the offset vector satisfies:
其中,表示偏移矢量,yp表示所述谱系数的子矢量,a=(2-6 2-6…2-6)。in, represents the offset vector, y p represents the sub-vector of the spectral coefficient, a=(2 −6 2 −6 …2 −6 ).
在本发明所述的源信号变速率格矢量量化的编码方法中,在所述步骤S32中,所述缩放矢量满足:In the encoding method of source signal variable rate lattice vector quantization according to the present invention, in the step S32, the scaling vector satisfies:
其中,表示所述缩放矢量,β(p)=2R(p)/6表示缩放因子,R(p)表示每个所述谱系数的子矢量分配的量化比特数。in, represents the scaling vector, β(p)=2 R(p) /6 represents the scaling factor, and R(p) represents the number of quantized bits allocated to each sub-vector of the spectral coefficient.
在本发明所述的源信号变速率格矢量量化的编码方法中,R(p)满足:In the coding method of source signal variable rate lattice vector quantization described in the present invention, R (p) satisfies:
其中,所述谱系数的个数为N,将所述N个谱系数分成L个8维子矢量,ψ表示一帧源信号总的量化编码比特数,Ω表示帧源信号经过比特分配算法后剩余比特数为Ω。Wherein, the number of spectral coefficients is N, and the N spectral coefficients are divided into L 8-dimensional sub-vectors, ψ represents the total number of quantized coding bits of a frame source signal, and Ω represents the frame source signal after the bit allocation algorithm The number of remaining bits is Ω.
本发明解决其技术问题采用的第二技术方案是,构造一种源信号变速率格矢量量化的编码系统,包括:The second technical solution adopted by the present invention to solve its technical problems is to construct a coding system for source signal variable rate lattice vector quantization, including:
正交变换模块,用于将输入源信号从时域变换到频域以获得谱系数和控制信息;Orthogonal transformation module for transforming the input source signal from the time domain to the frequency domain to obtain spectral coefficients and control information;
谱系数分组和比特分配模块、用于对所述谱系数进行分组和比特分配以获得比特分配信息;A spectral coefficient grouping and bit allocation module, configured to group and bit allocate the spectral coefficients to obtain bit allocation information;
格矢量量化模块,用于基于所述比特分配信息,格矢量量化所述谱系数;A lattice vector quantization module, configured to perform lattice vector quantization on the spectral coefficients based on the bit allocation information;
编码比特流模块,用于将量化索引、所述比特分配信息、所述控制信息打包成编码比特流。The coded bit stream module is configured to pack the quantization index, the bit allocation information, and the control information into a coded bit stream.
本发明解决其技术问题采用的第三技术方案是,构造一种源信号变速率格矢量量化的解码方法,包括:The third technical solution adopted by the present invention to solve the technical problems is to construct a decoding method for source signal variable rate lattice vector quantization, including:
S1,接收编码比特流进行解码以获得解码比特流;S1, receiving and decoding the coded bit stream to obtain the decoded bit stream;
S2,对所述解码比特流进行比特分配和量化索引解码;S2. Perform bit allocation and quantization index decoding on the decoded bit stream;
S3,基于解码的量化索引进行逆格矢量量化得到重建量化矢量;S3, performing inverse lattice vector quantization based on the decoded quantization index to obtain a reconstructed quantized vector;
S4,基于所述控制信息对所述重建量化矢量进行逆正交变换得到重建信号。S4. Perform inverse orthogonal transformation on the reconstructed quantization vector based on the control information to obtain a reconstructed signal.
本发明解决其技术问题采用的第四技术方案是,构造一种源信号变速率格矢量量化的解码模块,包括:The fourth technical solution adopted by the present invention to solve the technical problems is to construct a decoding module of source signal variable rate lattice vector quantization, including:
编码比特流解码模块,用于接收编码比特流进行解码以获得解码比特流;An encoded bitstream decoding module, configured to receive the encoded bitstream for decoding to obtain the decoded bitstream;
比特分配和量化索引解码模块,用于对所述解码比特流进行比特分配和量化索引解码;A bit allocation and quantization index decoding module, configured to perform bit allocation and quantization index decoding on the decoded bit stream;
逆格矢量量化模块,用于基于解码的量化索引进行逆格矢量量化得到重建量化矢量;An inverse lattice vector quantization module, configured to perform inverse lattice vector quantization based on the decoded quantization index to obtain a reconstructed quantized vector;
逆正交变换模块,用于基于所述控制信息对所述重建量化矢量进行逆正交变换得到重建信号。An inverse orthogonal transform module, configured to perform inverse orthogonal transform on the reconstructed quantized vector based on the control information to obtain a reconstructed signal.
相比于传统的变速率矢量量化器存储多个矢量码本,本发明方法无需存储矢量码本;此外,存在快速算法,其运算复杂度较传统矢量量化大幅度降低,即具有低运算复杂度的优点;第三,还具有可以实现变比速率量化的优点。Compared with the traditional variable rate vector quantizer storing multiple vector codebooks, the method of the present invention does not need to store vector codebooks; in addition, there is a fast algorithm, and its computational complexity is greatly reduced compared with traditional vector quantization, that is, it has low computational complexity Third, it also has the advantage of being able to realize variable ratio rate quantization.
本领域技术人员应该意识到,前述概括仅仅是为了提供本发明的特定方面的简单描述。通过结合附图并参照权利要求和以下优选实施例的详细描述,能够获得对本发明的更完全的理解。It should be appreciated by those skilled in the art that the foregoing summary is merely intended to provide a brief description of certain aspects of the invention. A more complete understanding of the present invention can be obtained by referring to the claims and the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
附图说明 Description of drawings
下面将结合附图及实施例对本发明作进一步说明,附图中:The present invention will be further described below in conjunction with accompanying drawing and embodiment, in the accompanying drawing:
图1是传统的变速率量化编码器的量化框图;Fig. 1 is the quantization block diagram of traditional variable rate quantization coder;
图2是传统的变速率量化解码器的量化框图;Fig. 2 is the quantization block diagram of traditional variable rate quantization decoder;
图3是表示某空间格点的一个子集;Fig. 3 is a subset representing a certain spatial lattice point;
图4A示出了根据本发明一个实施例的编码器的框图;Figure 4A shows a block diagram of an encoder according to one embodiment of the invention;
图4B示出了根据本发明一个实施例的解码器的框图;Figure 4B shows a block diagram of a decoder according to one embodiment of the present invention;
图5示出了根据本发明一个实施例的量化方法的流程图;以及Figure 5 shows a flowchart of a quantization method according to one embodiment of the present invention; and
图6示出了根据本发明一个实施例的逆量化方法的流程图。Fig. 6 shows a flowchart of an inverse quantization method according to an embodiment of the present invention.
具体实施方式 Detailed ways
本发明的主要目的是提供一种用于基于空间D8格点的源信号变速率量化技术(例如,包括量化方法和量化系统等),该量化技术与现有技术相比,能够实现变速率量化,且无需存储空间和运算复杂度低。该量化技术能够应用于各种变速率编码系统和可分级编码系统。为了叙述简便却不致混淆,本发明实施例可能省略了对本领域技术人员所公知的内容,例如比特分配算法、谱系数分组算法、格矢量量化的索引编解码算法等。The main purpose of the present invention is to provide a kind of source signal variable rate quantization technology (for example, including quantization method and quantization system etc.) based on space D8 grid point, this quantization technology can realize variable rate quantization compared with prior art , and requires no storage space and low computational complexity. The quantization technique can be applied to various variable rate coding systems and scalable coding systems. In order to simplify the description without causing confusion, the embodiments of the present invention may omit content known to those skilled in the art, such as bit allocation algorithm, spectral coefficient grouping algorithm, index encoding and decoding algorithm of lattice vector quantization, and the like.
在根据本发明的一个优选实施例中,源信号变速率格矢量量化的编码器主要包括:正交变换模块101、谱系数分组与比特分配模块102和格矢量量化模块103和编码比特流模块104。而源信号变速率格矢量量化的解码器为源信号变速率格矢量量化的编码器的逆系统,主要包括编码比特流解码模块204、比特分配和量化索引解码模块201、逆格矢量量化模块202和正交变换模块203。图4示意性示出了整个编解码器的框图。In a preferred embodiment according to the present invention, the encoder of source signal variable rate lattice vector quantization mainly includes:
具体而言,在图4A中,根据本发明的一个实施例,在编码端,在模块101中,利用诸如离散余弦变换(DCT)、改进的离散余弦变换(MDCT)等的正交变换之一将输入的原始信号从时域变换到频域,得到谱系数和控制信息;接下来,在模块102中,对谱系数进行分组以及比特分配,获得比特分配信息;然后,在模块103中,基于比特分配信息,对谱系数进行格矢量量化;最后,将控制信息、比特分配信息以及量化索引在模块104打包成编码比特流,输入信道或存储。Specifically, in FIG. 4A, according to an embodiment of the present invention, at the encoding end, in
图4B中,根据本发明的一个实施例,在解码端,在模块204中,将接收到的编码比特流进行解码,并结合模块201进行比特分配和量化索引解码;在模块202中,根据模块201中解码的量化索引进行逆格矢量量化得到重建的量化矢量;最后,在模块203中,重建的量化矢量在控制信息的控制下进行逆正交变换,得到重建信号。In Fig. 4B, according to an embodiment of the present invention, at the decoding end, in
在图5中,详细示出了本发明的一个更具体的实现过程。假定一帧信号经过诸如离散傅立叶变换、离散余弦变换等线性正交变换之一处理后得到的谱系数个数为N,将上述N个谱系数分成L个8维子矢量(即,满足8×L=N),假定每一个8维子矢量分配的量化比特数为R(p)比特/维(p=0,1,...,L-1),一帧信号总的量化编码比特数为ψ,经过比特分配算法后剩余比特数为Ω,编码端量化步骤如下:In Fig. 5, a more specific implementation process of the present invention is shown in detail. Assuming that the number of spectral coefficients obtained after a frame of signal is processed by one of linear orthogonal transforms such as discrete Fourier transform and discrete cosine transform is N, the above N spectral coefficients are divided into L 8-dimensional sub-vectors (that is, satisfying 8× L=N), assuming that the number of quantized bits allocated to each 8-dimensional sub-vector is R(p) bits/dimension (p=0,1,...,L-1), the total number of quantized coding bits of a frame signal is ψ, the number of remaining bits after the bit allocation algorithm is Ω, and the quantization steps at the encoding end are as follows:
在步骤301中,根据总编码码率和所选择的量化比特分配算法确定每一个8维子矢量分配的量化比特数为R(p)比特/维(p=0,1,...,L-1),R(p)应满足如下的限制:In step 301, according to the total coding rate and the selected quantization bit allocation algorithm, the number of quantization bits allocated to each 8-dimensional sub-vector is determined as R(p) bits/dimension (p=0,1,...,L -1), R(p) should meet the following restrictions:
接下来,在步骤302中,对某一任意的8维矢量yp=(yp,1 yp,2…yp,8),p=0,···L-1,将其减去某一偏移矢量a=(2-6 2-6…2-6),得到偏移后的矢量 Next, in step 302, for an arbitrary 8-dimensional vector y p =(y p, 1 y p, 2 ... y p, 8 ), p=0,...L-1, subtract a certain offset vector a=(2 -6 2 -6 …2 -6 ) from it to get the offset vector
在步骤303中,对上述步骤得出的偏移矢量进行缩放得到缩放矢量其中缩放因子β(p)=2R(p)/6,则 In step 303, for the offset vector obtained in the above steps Scale to get the scaled vector where scaling factor β(p)=2 R(p) /6, then
在步骤304中,在D8格空间中搜索与缩放矢量最临近格点V,其满足:In step 304, search and scale vector in D8 grid space The nearest grid point V, which satisfies:
在步骤305中,计算D8格格点V在R(p)比特/维的Voronoi扩展截断坐标k=(k1 k2…k8),其中0≤ki≤2R(p)-1,i=1,2,…,8,k的计算为:In step 305, calculate the Voronoi extended truncated coordinate k=(k 1 k 2 ...k 8 ) of the D8 grid point V in R(p) bits/dimension, where 0≤k i ≤2 R(p) -1, i =1, 2,...,8, the calculation of k is:
其中是D8格的逆生成矩阵,见式(5)。in is the inverse generator matrix of D8 lattice, see formula (5).
在步骤306中,根据给定坐标k=(k1 k2…k8)计算x=kGD8和z=r-1x(其中GD8是D8格的生成矩阵,见式4),并在D8格空间中搜索与缩放矢量z最临近格点λ,然后计算D8格矢量c:In step 306, x=kG D8 and z=r -1 x are calculated according to the given coordinates k=(k 1 k 2 ...k 8 ) (where G D8 is the generator matrix of D8 lattice, see formula 4), and in In the D8 grid space, search and scale the vector z closest to the grid point λ, and then calculate the D8 grid vector c:
c=x-rλ (10)c=x-rλ (10)
在步骤307中,比较格矢量c和V,如果c和V一致,则坐标k=(k1 k2…k8)就是缩放矢量的最佳坐标,量化结束。如果c和V不一致,那么矢量为局外点,此时需要逐次逼近的来量化。In step 307, compare the grid vector c and V, if c and V are consistent, then the coordinate k=(k 1 k 2 ...k 8 ) is the scaling vector The best coordinates, quantization ends. If c and V are inconsistent, then the vector is an outlier point, which needs to be quantified by successive approximation.
接下来,运用上述步骤303~306的方法,逐次逼近。在步骤308中,将矢量缩放2,即在步骤309、310中,在D8格空间中搜索与缩放矢量最临近格点u,计算u的坐标j,即:Next, use the methods in steps 303-306 above to perform successive approximation. In step 308, the vector Zoom 2, i.e. In steps 309, 310, search and scale the vector in the D8 grid space The nearest grid point u, calculate the coordinate j of u, that is:
在步骤311、312中,利用坐标j计算得到D8格矢量c′,比较格矢量c′和u,如果c′和u不相等,则重复步骤308到步骤312,直至c′和u相等。In steps 311 and 312, the D8 grid vector c' is calculated using the coordinate j, and the grid vector c' and u are compared. If c' and u are not equal, then steps 308 to 312 are repeated until c' and u are equal.
在步骤313中,计算缩放矢量其中m=3、4、5或6;在步骤314中,计算 In step 313, the scaling vector is calculated Where m=3, 4, 5 or 6; in step 314, calculate
在步骤315中,在D8格空间中搜索与缩放矢量最临近格点u′,计算u′的坐标j′,即:In step 315, search and scale vector in D8 grid space The nearest grid point u', calculate the coordinate j' of u', that is:
在步骤316中,利用坐标j′计算得到D8格矢量c″,比较格矢量c″和u′,如果c″和u′相等则k=j′,并且重复步骤314到步骤316。如果c″和u′不相等,则停止循环。In step 316, utilize coordinate j ' to calculate and obtain D8 grid vector c ", compare grid vector c " and u ', if c " and u ' are equal then k=j ', and repeat step 314 to step 316. If c " and u' are not equal, then stop the loop.
在步骤318中,将每一个8维子矢量分配的量化比特数为R(p)比特/维(p=0,1....,L-1)和D8格坐标kp编码后传到解码端。In step 318, the number of quantized bits allocated to each 8-dimensional sub-vector is R(p) bits/dimension (p=0,1....,L-1) and the D8 grid coordinate k p is encoded and passed to decoder side.
相对上述编码端量化的方法,图6示出了解码端逆量化的流程图,具体实施步骤如下:Compared with the above quantization method at the encoding end, Fig. 6 shows a flow chart of inverse quantization at the decoding end, and the specific implementation steps are as follows:
在步骤401、402中,从编码的码流中解码得到每一个8维子矢量分配的量化比特数为R(p)比特/维(p=0,1,...,L-1)和D8格坐标kp。In
接下来,在步骤403中,对给定坐标kp=(kp,1 kp,2…kp,8)计算x=kGD8,并在D8格空间中搜索与缩放矢量z最临近格点λ,然后计算D8格矢量 Next, in
然后,在步骤404中,对矢量进行逆缩放得到缩放因子为β(p)=2R(p)/6:Then, in
最后,在步骤405中,将矢量加上偏移矢量a=(2-6 2-6…2-6),得到重建矢量 Finally, in
需要说明的是,本发明不局限于对频谱系数进行量化,还适用于语音编码中LPC系数的量化。此外,本发明能够应用于各种变速率编码系统和可分级编码系统,具有广泛的适用性。It should be noted that the present invention is not limited to the quantization of spectral coefficients, and is also applicable to the quantization of LPC coefficients in speech coding. In addition, the present invention can be applied to various variable-rate coding systems and scalable coding systems, and has wide applicability.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210279991.2A CN102801427B (en) | 2012-08-08 | 2012-08-08 | Encoding and decoding method and system for variable-rate lattice vector quantization of source signal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210279991.2A CN102801427B (en) | 2012-08-08 | 2012-08-08 | Encoding and decoding method and system for variable-rate lattice vector quantization of source signal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102801427A true CN102801427A (en) | 2012-11-28 |
| CN102801427B CN102801427B (en) | 2015-05-06 |
Family
ID=47200412
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201210279991.2A Expired - Fee Related CN102801427B (en) | 2012-08-08 | 2012-08-08 | Encoding and decoding method and system for variable-rate lattice vector quantization of source signal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102801427B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105957533A (en) * | 2016-04-22 | 2016-09-21 | 杭州微纳科技股份有限公司 | Speech compression method, speech decompression method, audio encoder, and audio decoder |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070168197A1 (en) * | 2006-01-18 | 2007-07-19 | Nokia Corporation | Audio coding |
| CN101165777A (en) * | 2006-10-18 | 2008-04-23 | 宝利通公司 | Fast LVQ |
| CN101266795A (en) * | 2007-03-12 | 2008-09-17 | 华为技术有限公司 | A method and device for implementing lattice vector quantization encoding and decoding |
| CN102081926A (en) * | 2009-11-27 | 2011-06-01 | 中兴通讯股份有限公司 | Method and system for encoding and decoding lattice vector quantization audio |
-
2012
- 2012-08-08 CN CN201210279991.2A patent/CN102801427B/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070168197A1 (en) * | 2006-01-18 | 2007-07-19 | Nokia Corporation | Audio coding |
| CN101165777A (en) * | 2006-10-18 | 2008-04-23 | 宝利通公司 | Fast LVQ |
| CN101266795A (en) * | 2007-03-12 | 2008-09-17 | 华为技术有限公司 | A method and device for implementing lattice vector quantization encoding and decoding |
| CN102081926A (en) * | 2009-11-27 | 2011-06-01 | 中兴通讯股份有限公司 | Method and system for encoding and decoding lattice vector quantization audio |
Non-Patent Citations (1)
| Title |
|---|
| 张勇等: "基于高斯格型矢量量化的导谱频率参数量化方法", 《数据采集与处理》, vol. 24, no. 5, 30 September 2009 (2009-09-30) * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105957533A (en) * | 2016-04-22 | 2016-09-21 | 杭州微纳科技股份有限公司 | Speech compression method, speech decompression method, audio encoder, and audio decoder |
| CN105957533B (en) * | 2016-04-22 | 2020-11-10 | 杭州微纳科技股份有限公司 | Voice compression method, voice decompression method, audio encoder and audio decoder |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102801427B (en) | 2015-05-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN1659785B (en) | Method and system for multi-rate lattice vector quantization of a signal | |
| CN102687403B (en) | Encoders and decoders that compress underutilized code space using arithmetic stages | |
| US8521540B2 (en) | Encoding and/or decoding digital signals using a permutation value | |
| US6349152B1 (en) | Table-based compression with embedded coding | |
| CN101292427B (en) | Method and device for vector quantization, encoding and decoding | |
| CN103280221B (en) | A kind of audio lossless compressed encoding, coding/decoding method and system of following the trail of based on base | |
| CN102222505A (en) | Hierarchical audio coding and decoding methods and systems and transient signal hierarchical coding and decoding methods | |
| WO2007083264A1 (en) | Audio coding | |
| CN101842988A (en) | Symbol plane encoding/decoding based on dynamic computation of probability tables | |
| US6567781B1 (en) | Method and apparatus for compressing audio data using a dynamical system having a multi-state dynamical rule set and associated transform basis function | |
| CN102158692B (en) | Encoding method, decoding method, encoder and decoder | |
| CN101609674B (en) | Method, device and system for coding and decoding | |
| US10212421B2 (en) | Method and device for digital data compression with sign bit removal | |
| CN102572426A (en) | A method and device for data processing | |
| US6330283B1 (en) | Method and apparatus for video compression using multi-state dynamical predictive systems | |
| Boopathi et al. | Image compression: Wavelet transform using radial basis function (rbf) neural network | |
| CN101266795A (en) | A method and device for implementing lattice vector quantization encoding and decoding | |
| CN102801427B (en) | Encoding and decoding method and system for variable-rate lattice vector quantization of source signal | |
| CN102129074A (en) | Satellite SAR original data anti-saturation vector compression coding and decoding method | |
| Amin et al. | Vector quantization based lossy image compression using wavelets–a review | |
| Chao et al. | Image compression with a vector speck algorithm | |
| Raut et al. | Analyzing image compression with efficient transforms & multistage vector quantization using radial basis function neural network | |
| Chen | A lattice vector quantization using a geometric decomposition | |
| Dhannoon et al. | Color image compression using polynomial and quadtree coding techniques | |
| Antonini et al. | Adaptive entropy-constrained lattice vector quantization for multiresolution image coding |
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 | ||
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20220516 Address after: 510530 No. 10, Nanxiang 2nd Road, Science City, Luogang District, Guangzhou, Guangdong Patentee after: Guangdong Guangsheng research and Development Institute Co.,Ltd. Address before: 518057 6th floor, software building, No. 9, Gaoxin Zhongyi Road, high tech Zone, Nanshan District, Shenzhen, Guangdong Province Patentee before: SHENZHEN RISING SOURCE TECHNOLOGY Co.,Ltd. |
|
| 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: 20150506 |