WO2011003233A1 - 编码方法、装置与系统、解码方法、装置与系统 - Google Patents

编码方法、装置与系统、解码方法、装置与系统 Download PDF

Info

Publication number
WO2011003233A1
WO2011003233A1 PCT/CN2009/072670 CN2009072670W WO2011003233A1 WO 2011003233 A1 WO2011003233 A1 WO 2011003233A1 CN 2009072670 W CN2009072670 W CN 2009072670W WO 2011003233 A1 WO2011003233 A1 WO 2011003233A1
Authority
WO
WIPO (PCT)
Prior art keywords
vector
codebook
vectors
code stream
codeword
Prior art date
Application number
PCT/CN2009/072670
Other languages
English (en)
French (fr)
Inventor
肖玮
马付伟
谢敏杰
王凤玲
张清
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2009/072670 priority Critical patent/WO2011003233A1/zh
Priority to CN2009801590126A priority patent/CN102422541B/zh
Publication of WO2011003233A1 publication Critical patent/WO2011003233A1/zh

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction

Definitions

  • the present invention relates to communication technologies, and more particularly to an encoding method, apparatus and system, decoding method, apparatus and system. Background technique
  • High-efficiency coding technology which can encode the data processed by a series of processes with the least number of bits on the encoding end and transmit it to the decoder, so that the decoder can correctly decode and reconstruct the data, and ensure the reconstructed data and The data encoded at the encoding end is identical.
  • High-efficiency coding technology is the core technology in video and audio codec.
  • the existing Huffman Coding (HC) and Arithmetic Coding (AC) are efficient coding techniques. And it is lossless coding.
  • USAC Unified Speech and Audio Coding
  • MPEG Moving Picture Experts Group
  • USAC's goal is to design new high-quality encoders that can handle both voice and music signals.
  • FIG. 1 is a schematic structural diagram of a prior art USAC encoder
  • FIG. 2 is a schematic structural diagram of a prior art USAC decoder.
  • the USAC encoder and the USAC decoder are respectively encoders and decoders based on the USAC standard.
  • the USAC encoder classifies the input signal.
  • the input signal belongs to a music signal, it is encoded by a frequency domain (hereinafter referred to as FD) encoder, and is normalized. After quantization and other coding pre-processing, the coefficients to be encoded are obtained, and then encoded by an AC encoder. If the input coefficient of the speech signal is to be encoded, the linear prediction domain (LPD) encoder is used for encoding, and after normalization and quantization preprocessing, the coefficients to be encoded are obtained, and then adopted.
  • the AC encoder encodes. As shown in FIG. 2, at the decoding end, the USAC decoder uses an AC decoder to decode the received code stream, and performs dequantization, denormalization, etc. decoding.
  • the FD decoder is used to decode the music signal stream, or the LPD decoder is used to decode the speech signal stream.
  • the AC encoder pre-stores the cumulative frequency between all vectors to describe the correlation between the vectors, and when the coefficients to be encoded are received, the coefficients to be encoded are obtained from the AC encoder. Correlation between adjacent vectors, and according to the correlation between adjacent vectors, the encoding coefficients are encoded by a context-based arithmetic coding method. As shown in FIG. 3, it is a coding schematic of the prior art USAC encoder.
  • A represents a 4-dimensional vector that has been encoded/decoded but not as context information
  • B represents a 4-dimensional vector that has not been encoded/decoded
  • C represents a 4-dimensional vector that has been encoded/decoded as context information
  • D represents the current edit / Decoded 4D vector.
  • the specific encoding process of the USAC encoder is as follows: Decompose the received coefficients to be encoded into several 4-dimensional vectors; decompose each vector into one or more levels of bit planes; for each vector, extract the highest level of its bit plane And according to the correlation between adjacent vectors, it is coded based on the context-based probability calculation method; for the lower-level bit plane after extracting the highest level 2 plane, a unified probability distribution table is used for arithmetic coding.
  • coding efficiency is mainly determined by the algorithm complexity and storage space of the encoder.
  • the inventors have found that in the prior art, encoding an encoding coefficient using an AC encoder has at least the following problems:
  • the AC encoder consumes a large amount of storage space to represent all the cumulative probabilities to describe the correlation between adjacent vectors.
  • the current correlation storage capacity is from 15k to 100k, which reduces the coding efficiency. . Since the storage space increases with the increase of the vector dimension, the storage space of the existing AC encoder is limited. From the practical application situation, it is difficult to realize the 4D using the existing AC coding technology. The encoding of the above vector. Summary of the invention
  • Embodiments of the present invention provide an encoding method, an apparatus and system, a decoding method, a device, and a system, In order to reduce the storage space of the encoding device required to encode the same vector, the encoding efficiency of the encoding device is improved.
  • the first code stream includes a side information code stream, a vector code stream and a symbol code stream, the vector code stream including a subcode stream corresponding to the plurality of vectors;
  • the coefficients to be encoded are recovered according to the plurality of vectors.
  • An encoding apparatus includes: a first encoding module, configured to encode symbol information in the obtained coefficients to be encoded, obtain a symbol code stream, and respectively encode a bit plane level of a maximum component among the plurality of vectors into which the coefficients to be encoded are decomposed, Obtaining a side information stream;
  • a second encoding module configured to sequentially obtain and encode a position index of the codeword matching the multiple vectors in the basic codebook in the basic codebook, to obtain a plurality of subcode streams, where the corner code is in the codebook
  • the usage probability of the vector corresponding to the codeword in the preset time period is greater than the preset value
  • a first combining module configured to combine the plurality of subcode streams to obtain a vector code stream
  • a second combining module configured to merge the side information code stream, the vector code stream, and the symbol code stream , get the first stream.
  • An encoding system provided by an embodiment of the present invention includes an arithmetic coding encoder, which is used to encode a coefficient to be encoded of a current frame input data, to obtain a second code stream, and an encoding device provided by the foregoing embodiment of the present invention, for encoding Transmitting a coefficient to be encoded of the current frame input data to obtain a first code stream;
  • a first receiving device configured to receive a coefficient to be encoded of the current frame input data, and send the coefficient to be encoded to the encoding device and the encoding device;
  • a statistical device configured to count a first total number of bits required to encode a coefficient to be encoded of the current frame input data by using the encoding device, and to calculate a code to be encoded by using the arithmetic coding encoder to encode the current frame input data The second total number of bits required for the coefficient;
  • a comparing means configured to compare whether the first total number of bits is greater than the second total number of bits; and transmitting means, configured to: according to the comparison result of the comparing means, the first total number of bits is smaller than the second Setting a first identifier at a starting position of the first code stream, forming a first bit stream, and transmitting the first bit stream to a receiving end, where the first identifier is used to identify the first a bit stream; when the first total number of bits is greater than the second total number of bits, setting a second identifier at a starting position of the second code stream, forming a second bit stream, and the second bit And transmitting, to the receiving end, the second identifier is used to identify the second bit code stream; when the first total number of bits is equal to the second total number of bits, selecting the first according to a preset a code stream or the second code stream, and And correspondingly setting the first identifier or the second identifier at the starting position of the selected first code stream or the second code stream, and transmitting
  • a second receiving module configured to receive a first code stream, where the first code stream includes an edge information code stream, a vector code stream, and a symbol code stream, where the vector code stream includes a sub-code stream corresponding to multiple vectors;
  • a first decoding module configured to decode the side information code stream, and obtain a bit plane level of a maximum component of the plurality of vectors respectively;
  • a second decoding module configured to decode the plurality of sub-code streams according to a number of bit plane levels of the largest component of the plurality of vectors, to obtain codewords respectively matching the plurality of vectors in the basic codebook a location index in the base codebook;
  • a first obtaining module configured to respectively acquire an absolute value vector of the plurality of vectors according to the location index
  • a third decoding module configured to decode the symbol code stream to obtain symbol information of the plurality of vectors
  • a second acquiring module configured to respectively assign symbol information of the plurality of vectors to an absolute value of the plurality of vectors Vector, obtaining the plurality of vectors
  • a recovery module configured to recover a coefficient to be encoded according to the multiple vectors.
  • a decoding system provided by the embodiment of the present invention includes an arithmetic codec for decoding a second code stream, recovering a coefficient to be encoded of the current frame data, and a decoding device provided by the foregoing embodiment of the present invention. Decoding the first code stream to recover the coefficients to be encoded of the current frame data;
  • a second receiving device configured to receive a bit stream, where the bit stream is a first bit stream or a second bit stream, where the first bit stream includes a first identifier and the first bit stream, and the second bit The stream includes a second identifier and the second code stream;
  • An identifying device configured to identify the bit stream as a first bit stream or a second bit stream according to the first identifier or the second identifier included in the bitstream;
  • a decoding processing device configured to: in the bitstream, according to a recognition result of the identification device a bit stream, instructing the decoding device to decode the first code stream; and when the bit stream is a second bit stream, instructing the arithmetic codec to decode the second code stream.
  • a communication system includes an encoding device and a decoding device, where the encoding device is configured to encode symbol information in the obtained coefficients to be encoded, obtain a symbol code stream, and respectively obtain the coefficient to be encoded.
  • the decoding device is configured to receive a first code stream, and decode the side information code stream to obtain a bit plane level of a maximum component of the plurality of vectors; respectively, according to a bit plane of a largest component of the plurality of vectors a plurality of sub-code streams are decoded to obtain a position index of the codewords respectively matching the plurality of vectors in the base codebook in the base code outbook; and acquiring the locations according to the position index Decoding an absolute value vector of a plurality of vectors; decoding the symbol code stream to obtain symbol information of the plurality of vectors; and respectively assigning symbol information of the plurality of vectors to an absolute value vector of the plurality of vectors to obtain the a plurality of vectors; recovering coefficients to be encoded according to the plurality of vectors.
  • Another communication system provided by the embodiment of the present invention includes an encoding system and a decoding system, where the encoding system includes:
  • the first receiving device is configured to receive the coefficients to be encoded of the current frame input data, and send the coefficients to the arithmetic coding encoder and the encoding device respectively;
  • An arithmetic coding encoder configured to encode a coefficient to be encoded of the current frame input data, to obtain a second code stream
  • An encoding device configured to receive a coefficient to be encoded; encode symbol information in the coefficient to be encoded, obtain a symbol code stream, and respectively determine a bit plane level of a maximum component among the plurality of vectors into which the coefficient to be encoded is decomposed Encoding to obtain a side information code stream; sequentially obtaining the basic code book and said The position of the plurality of vector matched codewords in the base codebook is indexed and encoded to obtain a plurality of subcode streams, and the use probability of the vector corresponding to the codewords in the base code out codebook is greater than a preset in a preset time period. And combining the plurality of sub-code streams to obtain a vector code stream; combining the side information code stream, the vector code stream, and the symbol code stream to obtain a first code stream;
  • a statistical device configured to count a first total number of bits required to encode a coefficient to be encoded of the current frame input data by using the encoding device, and to calculate a code to be encoded by using the arithmetic coding encoder to encode the current frame input data The second total number of bits required for the coefficient;
  • a comparing means configured to compare whether the first total number of bits is greater than the second total number of bits; and transmitting means, configured to: according to the comparison result of the comparing means, the first total number of bits is smaller than the second Setting a first identifier at a starting position of the first code stream to form a first bit stream, and transmitting the first bit stream to the decoding system, where the first identifier is used to identify The first bit stream is a first bit stream; when the first total number of bits is greater than the second total number of bits, a second identifier is set at a starting position of the second code stream to form a second bit stream Transmitting the second bit stream to the decoding system, the second identifier is used to identify the second bit stream as a second code stream; and the first total number of bits is equal to the second total bit When the number is set according to a preset, the first code stream or the second code stream is selected, and the first identifier or the second identifier is set correspondingly at the starting position of the selected first code stream
  • the decoding system includes:
  • a second receiving device configured to receive a bit stream transmitted by the transmitting device, where the bit stream is a first bit stream or a second bit stream;
  • An identifying device configured to identify the bit stream as a first bit stream or a second bit stream according to the first identifier or the second identifier included in the bitstream;
  • a decoding processing device configured to: according to the recognition result of the identifying device, when the bit stream is the first bit stream, instruct the decoding device to decode the first code stream; and the bit stream is a second bit stream Instructing the arithmetic codec to decode the second code stream;
  • An arithmetic codec configured to decode the second code stream, and recover a coefficient to be encoded of the current frame data
  • Decoding means configured to receive the first code stream; decoding the side information code stream to obtain a bit plane level of a maximum component of the plurality of vectors; respectively, according to bits of a maximum component of the plurality of vectors Decoding the plurality of subcode streams to obtain a position index of the codewords respectively matching the plurality of vectors in the base codebook in the base codebook; and acquiring respectively according to the location index An absolute value vector of the plurality of vectors; decoding the symbol code stream to obtain symbol information of the plurality of vectors; and assigning symbol information of the plurality of vectors to an absolute value vector of the plurality of vectors, respectively Deriving a plurality of vectors; recovering coefficients to be encoded according to the plurality of vectors.
  • the encoding method, the device and the system, the decoding method, the device and the system provided by the above embodiments of the present invention may be composed of a vector having a usage probability greater than a preset value in a preset time period, and after receiving the coefficient to be encoded, Decomposing the coefficients to be encoded into a plurality of vectors, sequentially obtaining position indices of the codewords matching the plurality of vectors in the base codebook in the base codebook, and encoding the position index, therefore, only the storage base is needed in the encoding device.
  • the codebook does not need to store all the vectors and the correlation between them, and saves the coding device storage space required for encoding the same vector compared with the prior art; and, since only the position index needs to be encoded, In the prior art, in order to encode the coefficients to be encoded, the amount of data to be encoded and the number of bits required for encoding are reduced, the coding time is shortened, and the coding efficiency is improved.
  • 1 is a schematic structural view of a prior art USAC encoder
  • 2 is a schematic structural diagram of a prior art USAC decoder
  • FIG. 4 is a flow chart of an embodiment of an encoding method of the present invention.
  • Figure 5 is a flow chart of another embodiment of the encoding method of the present invention.
  • Figure 6a is a spectrum diagram of an audio signal of the present invention.
  • FIG. 6b is a schematic diagram of harmonics and unit pulses into which the audio signal shown in FIG. 6a is decomposed;
  • FIG. ⁇ is a flowchart of still another embodiment of the encoding method of the present invention.
  • Figure 8a is a schematic diagram of an absolute value vector (2, 1, 0, 3, 2, 1, 0, 1) of the present invention.
  • Figure 8b is a schematic diagram of the absolute value vectors (2, 5, 0, 7, 6, 1, 0, 1) and (2, 13, 4, 0, 3, 5, 1, 7) of the present invention.
  • FIG. 9b is a schematic structural diagram of a sub-vector code stream included in the sub-code stream of FIG. 9a;
  • FIG. 10 is a flowchart of still another embodiment of the encoding method of the present invention.
  • FIG. 11 is a flowchart of an embodiment of a decoding method of the present invention.
  • FIG. 12 is a flowchart of another embodiment of a decoding method according to the present invention.
  • FIG. 13 is a schematic structural diagram of an embodiment of an encoding apparatus according to the present invention.
  • FIG. 14 is a schematic structural view of another embodiment of an encoding apparatus according to the present invention.
  • Figure 15 is a schematic structural view of still another embodiment of the encoding device of the present invention.
  • 16 is a schematic structural diagram of still another embodiment of an encoding apparatus according to the present invention.
  • FIG. 17 is a schematic structural diagram of still another embodiment of an encoding apparatus according to the present invention.
  • FIG. 18 is a schematic structural diagram of an embodiment of an encoding system according to the present invention.
  • FIG. 19 is a schematic structural diagram of an embodiment of a decoding apparatus according to the present invention.
  • FIG. 20 is a schematic structural diagram of another embodiment of a decoding apparatus according to the present invention.
  • 21 is a schematic structural diagram of still another embodiment of a decoding apparatus according to the present invention.
  • FIG. 22 is a schematic structural diagram of still another embodiment of a decoding apparatus according to the present invention.
  • 23 is a schematic structural diagram of an embodiment of a decoding system according to the present invention.
  • 24 is a schematic structural diagram of an embodiment of a communication system according to the present invention.
  • FIG. 25 is a schematic structural diagram of another embodiment of a communication system according to the present invention. detailed description
  • FIG. 4 is a flow chart of an embodiment of an encoding method of the present invention. As shown in FIG. 4, the encoding method of this embodiment includes:
  • Step 101 Encode the obtained symbol information in the to-be-coded coefficient, obtain a symbol code stream, and encode the bit-plane level of the largest component among the plurality of vectors into which the coding coefficient is to be decomposed, to obtain the side information code stream.
  • the largest component is the component with the largest absolute value in the vector.
  • Step 102 Acquire a position index of the codeword matching the multiple vectors in the basic codebook in the base codebook and encode the same to obtain a plurality of subcode streams. The probability that the vector corresponding to the codeword in the codebook output code is greater than the preset value in the preset time period.
  • Step 103 Combine the plurality of sub-code streams to obtain a vector code stream.
  • Step 104 Combine the side information code stream, the vector code stream and the symbol code stream, and the combined code stream is referred to as a first code stream.
  • the coding method of the foregoing embodiment may be referred to as a Bitplane-vector Coding (hereinafter referred to as BC) method.
  • the first code stream may also be referred to as a BC code stream.
  • the usage probability in the preset time period may be greater than the pre-predetermined
  • the vector of the value is composed of the basic codebook.
  • the coefficient to be encoded may be decomposed into a plurality of vectors, and the position index of the codeword matching the multiple vectors in the basic codebook in the basic codebook is sequentially obtained.
  • encoding the location index therefore, only the basic codebook needs to be stored in the encoding device, and the required storage space is small; and, since only the location index needs to be encoded, the amount of data to be encoded and the coding station are reduced. The number of bits required shortens the encoding time and improves the coding efficiency.
  • step 101 may be implemented by: removing symbol information in a coefficient to be encoded, and obtaining an absolute value coefficient; decomposing the absolute value coefficient into a plurality of absolute value vectors having the same dimension; The bit plane series of the largest component of the plurality of absolute value vectors is encoded and obtained to obtain a side information code stream; and the symbol information is encoded to obtain a symbol code stream.
  • the plurality of vectors are specifically a plurality of absolute value vectors.
  • step 101 may also be implemented by: decomposing the coefficients to be encoded into a plurality of target vectors having the same dimension; sequentially calculating the number of bit planes of the largest component among the plurality of target vectors and performing Encoding, obtaining a side information code stream; respectively removing symbol information in the plurality of target vectors to obtain a plurality of absolute value vectors; and encoding the symbol information to obtain a symbol code stream.
  • the plurality of vectors are specifically a plurality of target vectors.
  • step 102 can be implemented in the following manner:
  • the location index in the code is encoded to obtain a subcode stream, wherein the location index includes an encoding mode identifier.
  • the coding mode identifier may be set in the first position of the location index, or may be set in other bits according to a preset setting; if there is no codeword matching the current vector in the basic codebook, the current vector is separately coded, and An encoding mode identifier is set at the start position of the code stream obtained by separately encoding, and a sub-code stream is obtained.
  • the coding mode identifier is used to identify the subcode stream as an encoding method for encoding the location cable or separately encoding the current vector.
  • the spectrum of the audio signal can be decomposed into harmonics and
  • the bit pulse that is, the vector obtained by decomposing the coefficients to be encoded in the spectrum can be expressed as a superposition of the harmonic vector and the unit pulse vector.
  • the harmonic is the most important part of the audio signal, and is the most important coding object in the audio signal.
  • the unit pulse can be used as auxiliary information to describe the details of the audio signal.
  • the value of each component in the unit pulse vector is 0 or 1.
  • the harmonic vector is also called the high-order plane vector, and the unit pulse vector is also called the low-order plane vector.
  • FIG. 5 is a flow chart of another embodiment of the encoding method of the present invention. As shown in FIG. 5, the encoding method of this embodiment includes:
  • Step 201 Remove symbol information in the coefficient to be encoded, obtain an absolute value coefficient, and encode the removed symbol information to obtain a symbol code stream.
  • Step 202 Decompose the absolute value coefficient into a plurality of absolute value vectors having the same dimension.
  • Step 203 Calculate and code the bit plane series of the largest component among the plurality of absolute value vectors in sequence to obtain the side information code stream.
  • Step 204 The first vector of the plurality of vectors is used as the current vector, and the current vector is subjected to series decomposition according to the number of bit plane levels of the largest component in the current vector, and the current vector is decomposed into one or more sub-vectors, the one or more The vector of the division includes the high-order plane vector.
  • Step 205 Use the first sub-vector of one or more sub-vectors as the current sub-vector to query whether there is a codeword matching the current sub-vector in the base codebook. If there is a codeword matching the current component vector in the base codebook, step 206 is performed; otherwise, if there is no codeword matching the current component vector in the codebook output code, step 207 is performed.
  • Step 206 Encode the position index of the codeword in the codebook output code to obtain a sub-vector code stream, where the location index includes a coding mode identifier for indicating that the sub-vector code stream is used to encode the location index. . Then, go to step 209.
  • step 207 the current partial vector is separately encoded.
  • Step 208 Set an encoding mode identifier at a starting position of the code stream obtained by separately encoding, to obtain a partial vector code stream, where the encoding mode identifier is used to identify the sub-vector code stream as an encoding manner for separately encoding the current sub-vector.
  • Step 209 Determine whether the current sub-vector is the last sub-vector in one or more sub-vectors, that is, determine whether to obtain a sub-vector code stream of all the sub-vectors in one or more sub-vectors.
  • step 205 is performed until the sub-vector code streams of all one or more sub-vectors are obtained through steps 205-step 208; otherwise, if more than one sub-vector code stream of all the sub-vectors in the vector is obtained, step 210 is performed.
  • Step 210 Combine one or more vector code streams obtained by vector coding to obtain a sub-code stream of the current vector.
  • Step 211 Determine whether the current vector is the last one of the plurality of vectors, that is, determine whether a sub-stream of the plurality of vectors is obtained. If the sub-streams of the multiple vectors are not obtained, that is, the encoding of the multiple vectors is not completed, and the next vector of the current vectors in the plurality of vectors is used as the current vector, step 204 is performed until step 204-step 211 is passed. A sub-stream of a plurality of vectors is obtained; otherwise, if a sub-stream of a plurality of vectors is obtained, step 212 is performed.
  • Step 212 Combine the plurality of sub-code streams to obtain a vector code stream.
  • Step 213 Combine the side information code stream, the vector code stream and the symbol code stream to obtain the first code stream.
  • one or more of the partial vectors may further include a lower plane vector.
  • the high-order plane vector is a harmonic vector
  • the low-order plane vector is a unit pulse vector.
  • the order of the bit-plane levels of the largest components in all the sub-vectors may be sequentially changed from high to low.
  • the harmonic vector and the unit pulse vector are encoded as the current vector.
  • the high-order code stream obtained by the harmonic vector coding and the low-order code stream obtained by the unit pulse vector coding may be combined according to the order of the number of bit planes of the largest component in the divided vector.
  • the divided vector code stream includes a high bit stream and a low bit stream.
  • the main distribution range of the bit plane series of the harmonic portion is the highest 1-3 level, which are denoted as Lev-1, Lev-2 and Lev-3, respectively.
  • Fig. 6a it is a spectrogram of the audio signal of the present invention.
  • the series decomposition of the current vector whose number of bit planes of the largest component is greater than 3 can be performed.
  • the current vector of the maximum component having a bit plane level greater than 3 may be subjected to series decomposition by: extracting a component of a high 3-bit plane in the current vector as a harmonic vector, and extracting a component of the high 3-bit plane
  • the primary bit plane acts as a unit pulse vector. For example: vector
  • the maximum number of bit plane series is 4, from which the high 3 bit vector representing the harmonics can be obtained first (1,6,2,0 , 1, 2, 0, 3 ), that is, the harmonic vector, and then, obtain a unit pulse vector (0, 1, 0, 0, 1, 1, 1, 1).
  • the original vector can be known.
  • the basic codebook may specifically include: a codeword identifier that uniquely identifies a codeword, and the codeword is based on The position index in the codebook and the number of bits required to encode the position index.
  • whether there is a codeword matching the current vector or the current sub-vector in the code-based code-out code includes: performing multi-dimensional summation on the current vector or the current sub-vector to obtain a vector identifier that uniquely identifies the current vector or the current sub-vector ; Query whether there is the same codeword identifier as the vector identifier in the base codebook.
  • Encoding the location index of the codeword in the base codebook includes: obtaining a number of bits corresponding to the same codeword identifier of the current vector or the current vector identifier, and using the number of bits to the current vector or the current vectorization The location index is encoded.
  • the multi-valued summation of the vector is matched with the codeword identifier in the base code out code book. Therefore, only the codeword identifier is stored in the base codebook, and the vector itself is not required to be stored, thereby further reducing the coding apparatus. Storage space; and, storing the codeword identifier relative to the storage vector itself, is easier to query whether the current vector can be encoded based on the codebook, thereby improving coding efficiency. As shown in Table 1 below, information about multiple vectors Specific examples.
  • the contents stored in the base code outbook include the contents of "polynumeric sum of vector", "position index” and “number of bits required for encoding position index” in Table 1 above.
  • encoding the position index of the current vector or the current sub-vector is: encoding the binary code corresponding to the position index.
  • the content stored in the base code outbook is the "multiple vector of vector", “position index” and “number of bits required for encoding position index” in Table 1 above, the required content is occupied.
  • the size of the codebook space is approximately: 3*10743 bits.
  • the basic codebook may specifically include: a multi-entry of vectors sequentially arranged according to the number of bits required to encode the position index of each code-matched codeword in the code-based codebook. The system and the list, the position index of the first codeword in each codebook block, the number of bits required to encode the position index of each codeword in each codebook block, and the number of codewords in each codebook block.
  • the base code out code is divided into the code block blocks arranged in sequence according to the size of the bit number required for the position index of the code code word, and the code block required to encode each code word in the same code block of each code block block.
  • the number of bits is the same, for example: In codebook block 0, the number of bits required to encode each codeword is 8; in codebook block 1, the number of bits required to encode each codeword is 9.
  • whether the codeword matching the current vector or the current sub-vector exists in the query base codebook includes: performing multi-dimensional summation on the current vector to obtain a vector identifier that uniquely identifies the current vector; querying whether the multi-ary and the list are in the list There is a same multi-ary sum as the vector identifier.
  • encoding the location index of the codeword in the base codebook includes: if the multi-ary and the list have the same multi-ary sum with the vector identifier, then obtain The same multi-ary code as the vector identifier and the position number in the multi-ary and the list; according to the number of codewords in each codebook block, determining the codebook block where the position number is located and the position in the codebook block The difference between the positions of the first codewords in the codebook block; determining the difference between the location in the codebook block and the location of the first codeword in the codebook block, and the location index of the first codeword in the codebook block in which it is located Multi-ary and corresponding position index; obtain the number of bits required to encode the multi-ary code and the corresponding position index according to the number of bits required to encode the position index of each code word in each code block, and encode the number of bits Multi-digit and corresponding position index.
  • ID_L2[ 10743] ⁇ 2, 6, 32768, 36864, 9, 22, 25, 24576, 25600, 37888, 3, 7, 8, 10, 18, 24, 26, 32, 36, 37, 70, 73, 86, ⁇ .. ⁇ .
  • the size of the codebook space required to be occupied is approximately: 10743+3*9, which In the middle, 3 denotes the above three items stored in the codebook output code, and 9 denotes a total of 9 codebook blocks in the above-mentioned cornerstone codebook. Therefore, it can be seen that, compared with the content stored in the basic codebook as "multiple binary of vector", "position index” and "number of bits required for encoding position index", the cornerstone required for this embodiment is required.
  • the codebook space is reduced by nearly 2/3, which further reduces the storage space of the encoding device.
  • Lev-2 an implementation of encoding a vector based on the codebook codebook is as follows:
  • the same multi-ary number as the vector identifier and the position number in the multi-ary and the list are obtained.
  • the vector identifier 25600 as an example, the position number is 8;
  • the codebook based on the number of codewords in each codebook block, the location of the codebook block where the location number is located, and the location of the first codeword in the codebook block.
  • the codebook block where the position number 8 is located is block 1, and its position and location in the codebook block 1
  • the position index of the first codeword in 1 is 8, and the difference between the position of the first codeword in the codebook block 1 according to the position in the codebook block 1 is 4, and the position of the first codeword in the codebook block 1 where the codebook block 1 is located.
  • a harmonic vector and a unit pulse vector having a bit plane level of 1 of a maximum component may be subjected to binary summation, and a harmonic vector of a bit plane level of 2 of the largest component may be subjected to quaternary summation.
  • octal summation can be performed for the harmonic component of the maximum component bit plane series of 3, octal summation can be performed.
  • the basic codebook may be further divided into M subcodebooks, where M is an integer greater than 1.
  • the subcodebooks may be arranged in descending order of usage probabilities within a preset time period.
  • the first sub-codebook in the M sub-codebooks may be queried for the same location as the vector identifier.
  • the following subcodebook is used as the first subcodebook to start acquiring the same location as the vector identifier The number of bits corresponding to the index segment of the index is located.
  • the query flow can be skipped in time, so that the subsequent base codebook does not need to be queried.
  • the query time is reduced, which further improves the coding efficiency.
  • Figure ⁇ is a flow chart of still another embodiment of the encoding method of the present invention. As shown in the figure, the flow of this embodiment includes:
  • Step 301 Extract symbol information of a non-zero element from the coefficients to be encoded, obtain an absolute value coefficient, and represent the extracted symbol information as a whole, and perform encoding to obtain a symbol code stream. Specifically, if the coefficient to be encoded is positive, the parameter A is encoded as 0, and if the coefficient to be encoded is positive, the parameter A is encoded as 1.
  • Step 302 Decompose the absolute value coefficient into a plurality of N-dimensional absolute value vectors, where N is an integer greater than zero, for example: 8 or 6.
  • the absolute value coefficient is selected to be decomposed into a plurality of 8-dimensional absolute value vectors, that is, N is 8.
  • the zero portion is padded at the last portion so that the data length of the absolute value coefficient is an integer multiple of 8.
  • Step 303 Calculate the number of bit plane series of the largest component among the plurality of absolute value vectors in turn, and represent it as a whole as parameter B.
  • Entropy coding is used for the parameter B to save bits, and the side information code stream is obtained.
  • the entropy coding can be selected to be arithmetic coding, Huffman coding, or the like.
  • Step 304 Taking the first absolute value vector of the plurality of absolute value vectors as the current vector, performing step decomposition on the current vector according to the number of bit plane levels of the largest component in the current vector obtained in step 303, and decomposing the current vector into More than one sub-vector.
  • the specific decomposition method is as follows:
  • FIG. 8a a schematic diagram of an absolute value vector (2, 1, 0, 3, 2, 1, 0, 1) according to the present invention, due to an absolute value vector (2, 1, 0, 3, 2, 1, 0,1)
  • the bit plane level of the largest component is 2, so there is no need to decompose it.
  • 8b is a schematic diagram of the absolute value vectors (2, 5, 0, 7, 6, 1, 0, 1) and (2, 13, 4, 0, 3, 5, 1, 7) of the present invention. Since the bit-level number of the largest component in the absolute value vector (2,5,0,7,6,1,0,1) is 3, there is no need to decompose it.
  • bit plane level 4 of the largest component in the absolute value vector (2,13,4,0,3,5,1,7) in Figure 8b which is decomposed into a high 3-bit partial vector ⁇ 1 , 6, 2, 0, 1, 2, 0, 3 ⁇ and a low-order partial vector ⁇ 0, 1, 0, 0, 1, 1, 1, 1 ⁇ .
  • Step 305 Encode the current vector as a parameter C to obtain a sub-code stream, where the sub-code stream includes an encoding mode identifier; or one or more sub-vectors obtained by decomposing the current vector, according to the bit plane level from high to low.
  • the sequence is sequentially encoded to obtain a sub-vector code stream, which includes an encoding mode identifier, and then one or more sub-vectors obtained by encoding one or more sub-vectors according to the order of the bit-plane series from high to low.
  • the code stream is combined in the order of the upper bit stream to the lower bit stream to obtain the subcode stream of the current vector.
  • the specific coding methods are as follows.
  • the current vector is an all-zero vector, it is not encoded, and the number of bits required for encoding can be effectively saved.
  • the series is not decomposed, and the high-order plane coding is performed according to the Lev-3 coding mode and the codebook corresponding to Lev-3 is selected.
  • the component of the high 3-bit plane in the current vector is extracted as a harmonic vector, and the harmonic vector is encoded in a high-order plane according to the Lev-3 coding mode to obtain a The vector code stream.
  • the low-level plane after extracting the component of the high 3-bit plane is subjected to low-order plane coding, and the coding mode is called Lev-3L, and the codebook corresponding to Lev-3 L is selected to encode it.
  • another sub-vector code stream is obtained, and then the sub-vector code streams obtained by sub-vector coding are combined to obtain a sub-code stream of the current vector.
  • Lev-1 ie: the number of bit planes of the current vector is 1, and when the dimension of the current vector is 8, there are 255 vectors.
  • the Lev-1 codebook size is 255 when encoding all zero vectors.
  • Lev-2 that is: the maximum number of bit planes in the current vector is 2, and when the dimension of the current vector is 8, there are 65536 vectors.
  • the inventors found that many of the vectors have a very low probability of occurrence, even in large sample experiments. Therefore, in order to utilize the storage space of the encoding device more effectively, it is possible to select those vectors whose occurrence probability is relatively frequent, that is, a vector whose usage probability is greater than a preset value within a preset time period, and constitute a basic codebook.
  • each component is encoded by 2 bits, in order to avoid the ambiguity of decoding, before the code stream obtained by the encoding
  • a 2-bit coding mode identifier 1 1 is added to indicate that the coding mode adopted by the vector is independent coding.
  • the basic codebook can be divided into three sub-codebooks, as shown in Table 2 below, which is an example of a basic codebook structure of the Lev-2 coding mode. According to Table 2, in the Lev-2 encoding mode, the base codebook is divided into 9 subcodebooks.
  • Table 2 An example of a basic codebook structure for Lev 2 mode Subcodebook number Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Subcodebook size 4 6 56 235 662 730 1317 2937 4796 where Q0 is encoded with 8 bits, Q1 is encoded with 9 bits, and so on, Q8 uses 16 bits. Encode. For binary components that are not selected due to low probability of occurrence, natural binary encoding is performed using 2 bits.
  • Lev-3 ie: the maximum number of bit planes in the current vector is 3 or greater than 3, similar to Lev-2, in the same way, divided into two parts: the base codebook and the non-base codebook.
  • Table 3 an example of a basic codebook structure for the Lev-3 encoding mode is shown in Table 3. According to Table 3, in the Lev 3 coding mode, the base codebook is divided into 9 subcodebooks.
  • Table 3 Example of a basic codebook structure for the Lev 3 coding mode Among them, Q0 is encoded with 8 bits, Q1 is encoded with 9 bits, and so on, and Q8 is encoded with 16 bits. For binary components that are not selected due to low probability of occurrence, natural binary encoding is performed using 3 bits.
  • the lower plane is also encoded.
  • the codebook used is called Lev-3L and has a size of 256.
  • the size of the base codebook can be determined according to specific needs. In general, the larger the base codebook, the higher the coding efficiency, and accordingly, the storage space of the occupied coding device will also increase.
  • the following takes the basic codebook structure of the Lev-2 coding mode and the dimension of the current vector as 8 as an example, and illustrates the coding method of the current vector with the bit-plane level of the largest component being 2, and the base code of the Lev-3 coding mode.
  • the present invention does not directly store the 8-dimensional vector, and performs multi-dimensional summation on the 8 components of the current vector to obtain a vector identifier of the current vector.
  • binary summation for example: The current vector is ⁇ 1,0,0,0,1,0,0,1 ⁇ , and the binary sum is obtained, and the obtained vector is identified as 137.
  • Lev-2 perform a quaternary summation, for example: The current vector is ⁇ 0,1,0,2,2,1,3,2 ⁇ , and the quaternary sum is obtained, and the obtained vector is identified as 4766.
  • octal summation is performed.
  • the current vector is ⁇ 7,1,7,0,1,0,0,0 ⁇ , and the octal sum is obtained, and the obtained vector identifier is 15172096;
  • the query order starts from Q0. If the same location index as the current vector identifier is queried in Q0, the bit corresponding to the index segment where the location index is located is obtained. The number is encoded by the number of bits. Otherwise, if the same location index as the current vector identifier is not queried in Q0, Q1, Q2, etc. are sequentially selected, and the same query and encoding process as Q0 is performed, and so on, until the same location index as the current vector identifier is queried. The corresponding location index is encoded and the query process is exited.
  • the current vector is not in the base codebook. At this point, the current vector is encoded separately.
  • Optional separate encodings include natural binary encoding. Specifically: For Lev-2, for each component of each 8-dimensional vector, 2-bit direct coding is used, and a total of 16 bits are used; in addition, after encoding, it can be added at the beginning of the current vector corresponding code stream. The 2-bit encoding mode identifies 11 so that ambiguity errors can be avoided at the decoding end to obtain the correct decoding result.
  • the index corresponding to the codeword identifier may be encoded by using the corresponding number of bits.
  • Step 306 Combine the side information code stream, the sub-code stream and the symbol code stream according to the order of the side information code stream, the sub-code stream, and the symbol code stream to obtain the first code stream and output.
  • FIG. 9a FIG. 9b is a schematic structural diagram of a first code stream according to the present invention
  • FIG. 9b is a schematic structural diagram of a sub-vector code stream included in the sub-code stream in FIG. 9a.
  • FIG. 10 is a flow chart showing still another embodiment of the encoding method of the present invention. As shown in FIG. 10, the process of this embodiment includes:
  • Step 401 Encode a coefficient to be encoded of the current frame input data by using a first coding method, and, after obtaining the first code stream, statistically calculate a first total number of bits required to encode a coefficient to be encoded of the current frame input data;
  • the arithmetic coding encoder encodes the coefficients to be encoded of the current frame input data to obtain a second code stream, which is also referred to as an arithmetic coded code stream, and counts the coefficients to be coded of the current frame input data by using an arithmetic coding encoder. The second total number of bits required.
  • Step 402 Compare whether the first total number of bits is greater than the second total number of bits. If the first total number of bits is less than the second total number of bits, step 403 is performed. Otherwise, if the first total number of bits is greater than the second total number of bits, step 404 is performed. If the first total number of bits is equal to the second total number of bits, step 405 is performed.
  • Step 403 Set a first identifier at a starting position of the first code stream, form a first bit stream, and transmit the first bit stream to the receiving end, where the first identifier is used to identify the first bit stream as the first bit stream. . After that, the subsequent process of this embodiment is not executed.
  • Step 404 Set a second identifier at a starting position of the second code stream, form a second bit stream, and transmit the second bit stream to the receiving end, where the second identifier is used to identify the second bit stream as the second bit stream. . After that, the subsequent process of this embodiment is not executed.
  • Step 405 Select a first code stream or a second code stream according to a preset, and set a first identifier or a second identifier correspondingly at a starting position of the selected first code stream or the second code stream to form a first bit stream. Or a second bit stream.
  • Step 406 The formed first bit stream or the second bit stream is transmitted to the receiving end.
  • the obtained code stream is sent to the receiving end, and the decoding device of the receiving end uses the decoding method corresponding to the encoding method to perform corresponding decoding on the code stream, and recovers the corresponding code to be encoded before the first encoding.
  • the decoding method of this embodiment includes:
  • Step 501 Receive a first code stream, where the first code stream includes an edge information code stream, a vector code stream, and a symbol number stream, and the vector code stream includes a subcode stream corresponding to the plurality of vectors.
  • Step 502 Decode the side information code stream in the first code stream to obtain a bit plane level of the largest component among the plurality of vectors.
  • Step 503 Decode the plurality of sub-code streams according to the number of bit plane levels of the largest component of the plurality of vectors, respectively, to obtain a position index of the code words respectively matching the plurality of vectors in the base codebook in the base codebook.
  • Step 504 Acquire absolute value vectors of the plurality of vectors according to the position index.
  • Step 505 Decode the symbol code stream in the first code stream to obtain symbol information of multiple vectors.
  • Step 506 The symbol information of the plurality of vectors is respectively assigned to the absolute value vectors of the plurality of vectors, and a plurality of vectors are obtained.
  • Step 507 recovering coefficients to be encoded according to multiple vectors.
  • the base code out code may specifically include: a codeword identifier that uniquely identifies a codeword, a location index of the codeword in the base codebook, and an encoding of the location index The number of bits required. That is, corresponding to the coding method embodiment, the content stored in the basic codebook is the "multiple vector of vector", "position index” and "number of bits required for coding position index” in Table 1 above. .
  • the step 504 includes: acquiring, from the base code out code, a plurality of codeword identifiers corresponding to the location index of the codeword matching the multiple vectors in the base codebook, respectively; respectively, using multiple codeword identifiers as vector identifiers, Obtain the corresponding absolute value vector, and the vector identifier is an identifier of the unique identifier absolute value vector obtained by multi-dimensional summation of an absolute value vector.
  • the base code out code may specifically include: a bit required for the position index of the codeword matched by each vector in the base codebook. a multi-ary and a list of vectors of sequential order of numbers, a position index of a first codeword in each codebook block, a number of bits required to encode a position index of each codeword in each codebook block, and a code in each codebook block The number of words.
  • the basic codebook is divided into sequentially arranged codebook blocks according to the number of bits required for the position index of the encoded codeword, and the bits required for encoding each codeword are coded in the same codebook block of each codebook block. The number is the same.
  • step 503 includes: for each sub-code stream, using the codebook block 0 as the current codebook block, obtaining a first number of bits required to encode a position index of each codeword in the current codebook block, from multiple subcodes Reading the data of the first number of bits in the stream to obtain a first value, and determining the last codeword in the current codebook block according to the position index of the first codeword in the current codebook block and the number of codewords in the current codebook block.
  • Position index compare whether the first value is greater than the size of the position index of the last code word; if not larger than the size of the position index of the last code word, obtain the first value and the position index of the first code word in the current code block a first difference of the difference, and using the first difference as a relative position in the current codebook block, obtaining a multi-ary sum corresponding to the first value from the multi-ary and the list; if greater than the last codeword Bit
  • the size of the index is obtained by using the next codebook block of the current codebook block as the next codebook block as the current codebook block, and obtaining the second number of bits required to encode the position index of each codeword in the current codebook block.
  • step 504 includes: obtaining a multi-ary code corresponding to the first value and a corresponding absolute value vector according to the multi-ary subtraction.
  • an implementation for decoding a sub-code stream based on the base codebook is as follows:
  • the first codebook block that is, the codebook block 0 is used as the current codebook block, and the first bit number required to encode the position index of each codeword in the current codebook block is obtained, from multiple sub- Reading the data of the first bit number in the code stream to obtain a first value, and determining the last code in the current codebook block according to the position index of the first codeword in the current codebook block and the number of codewords in the current codebook block.
  • the position index of the word is used as the current codebook block, and the first bit number required to encode the position index of each codeword in the current codebook block is obtained, from multiple sub- Reading the data of the first bit number in the code stream to obtain a first value, and determining the last code in the current codebook block according to the position index of the first codeword in the current codebook block and the number of codewords in the current codebook block. The position index of the word.
  • the first value obtained by decoding is in the current codebook block, and the first difference between the first value and the location index of the first codeword in the current codebook block is obtained. And taking the first difference value as a relative position in the current codebook block, and obtaining a multi-ary sum corresponding to the first value from the multi-ary and the list.
  • the first value is 2, indicating that the decoded first value 2 is in the codebook block 0, the first value 2 and the bit of the first codeword in the codebook block 0 are obtained. Setting a first difference 2 of the difference of index 0, and taking the first difference 2 as a relative position in the codebook block 0, obtaining a multi-ary sum corresponding to the first value from the multi-ary and the list, that is, For: 32768;
  • the second codebook block of the current codebook block is used as the current codebook block, and the second number of bits required to encode the location index of each codeword in the current codebook block is obtained.
  • the first value 6 is greater than the size index 3 of the location index of the last codeword, and the codebook block 1 is used as the current codebook block, and the bits required for encoding the position index of each codeword in each codebook block are used.
  • the second difference 1 of the difference of the first bit number 8 is read from the plurality of sub-code streams by 1 bit of data, and forms a second value of 000001100 with the first value 00000110, that is, a decimal value of 12, and then the codebook.
  • the first difference 4 of the difference between the position index 8 of the first codeword in the block 1 and the relative difference position in the current codebook block, that is, the current codebook block corresponding to the position index 12 The difference between the position in the current codebook and the position of the first codeword in the current codebook block, and the corresponding multi-ary and 25600 are obtained from the multi-ary and the list;
  • the sub-code stream when the coding end uses more than one coding mode to encode the coding coefficient, the sub-code stream includes the coding mode identifier, and the coding mode identifier is used.
  • the sub-code stream is identified as an encoding method for encoding the position index or separately encoding the absolute value vector.
  • the method further includes: identifying the coding mode identified by the coding mode identifier in the subcode stream; and if the coding mode identifier is identified by the coding mode If the encoding is performed, the step 503 is performed; otherwise, if the encoding mode identified by the encoding mode identifier is to separately encode the absolute value vector, the subcode is directly obtained according to the decoding method corresponding to the bit plane level of the largest component in the absolute value vector. The stream is decoded to obtain an absolute value vector.
  • Step 503 may be specifically implemented by: identifying the absolute according to the number of bit-plane levels of the largest component of the plurality of absolute value vectors, respectively.
  • One or more divided vector code streams corresponding to the value vector the bit plane series of the largest component of each of the plurality of absolute value vectors is sequentially used as the current bit plane level, and the corresponding absolute level is identified according to the current bit plane level And the one or more divided vector code streams corresponding to the value vector; sequentially using one of the one or more divided vector code streams as the current divided vector code stream, and identifying the encoding mode identified by the encoding mode identifier in the current divided vector code stream If the identified encoding method is to encode the location index, obtain it from the base codebook.
  • step 504 is: synthesizing one or more partial vectors obtained by decoding one or more divided vector code streams to obtain an absolute value vector.
  • sub-vector further includes a low-order plane vector, wherein the high-order plane vector is a harmonic vector, the sub-vector code stream obtained by the harmonic vector coding is a high-order code stream, and the low-order plane vector is a unit pulse vector, a unit pulse vector.
  • the coded vector code stream is a low bit stream, then one
  • the above divided vector code stream includes a high bit stream and a low bit stream.
  • the upper bit stream and the lower bit stream are arranged in descending order of the number of bit plane levels of the largest component in the corresponding divided vector.
  • one of the vector code streams in the one or more divided vector code streams is used as the current divided vector code stream, which is specifically as follows: according to the order of the highest level of the bit planes in the corresponding divided vector, in descending order, The code stream and the low bit code stream are used as the current split vector code stream.
  • FIG. 12 is a flowchart of another embodiment of a decoding method according to the present invention. As shown in FIG. 12, the decoding method of this embodiment includes:
  • Step 601 Receive a bit stream, where the bit stream is a first bit stream or a second bit stream, where the first bit stream includes a first identifier and a first code stream, where the second bit stream includes a second identifier and a second bit stream Code stream.
  • Step 602 Determine whether the bit stream is the first bit stream according to whether the bit stream includes the first identifier or the second identifier. If it is the first bit stream, step 603 is performed; otherwise, if it is the second bit stream, step 604 is performed.
  • Step 603 Decode the first code stream by using the process shown in steps 502 to 507 for the first code stream in the first bit stream, and recover the coefficient to be encoded of the current frame data. After that, the subsequent process of this embodiment is not executed.
  • Step 604 For the second code stream in the second bit stream, use an arithmetic codec to decode the second code stream in the second bit stream, and recover the to-be-coded coefficient of the current frame data.
  • FIG. 13 is a schematic structural diagram of an embodiment of an encoding apparatus according to the present invention.
  • the encoding apparatus of the embodiment can be used to implement the encoding method of the foregoing embodiment of the present invention.
  • the encoding apparatus of this embodiment includes: a first encoding module 701, a second encoding module 702, a first combining module 703, and a second combining module 704.
  • the first encoding module 701 is configured to encode symbol information in the obtained coefficients to be encoded, obtain a symbol code stream, and respectively encode a bit plane level of a maximum component among the plurality of vectors into which the coefficients to be encoded are decomposed. , get the side information stream.
  • the second encoding module 702 is used to Obtaining, in sequence, a position index of a codeword matching the multiple vectors in the basic codebook in the base codebook, and obtaining a plurality of subcode streams, where the vector corresponding to the codeword in the base code out codebook is within a preset time period. The probability of use is greater than the preset value.
  • the first combining module 703 is configured to combine the plurality of sub-code streams obtained by the second encoding module 702 to obtain a vector code stream.
  • the second merging module 704 is configured to combine the side information code stream obtained by the first encoding module 701, the vector code stream obtained by combining the first merging module 703, and the symbol code stream obtained by the first encoding module 701 to obtain a first code stream. .
  • FIG. 14 is a schematic structural diagram of another embodiment of an encoding apparatus according to the present invention.
  • the first encoding module 701 includes a first removing unit 801, a first decomposing unit 802, and a first embodiment.
  • the first removing unit 801 is configured to remove symbol information in the obtained coefficients to be encoded, and obtain an absolute value coefficient.
  • the first decomposing unit 802 is configured to decompose the absolute value coefficients obtained by the first removing unit 801 into a plurality of absolute value vectors having the same dimension, that is, the plurality of vectors in the embodiment shown in FIG. .
  • the second encoding module 702 is configured to sequentially obtain and encode the position index of the codeword matching the plurality of absolute value vectors decomposed by the first decomposing unit 802 in the basic codebook, and obtain a plurality of sub-blocks.
  • the first encoding unit 803 is configured to sequentially calculate and encode the bit plane level of the largest component among the plurality of absolute value vectors decomposed by the first decomposition unit 802, obtain the side information code stream, and obtain the side information unit 801.
  • the removed symbol information is encoded to obtain a symbol code stream.
  • the second merging module 704 is configured to combine the side information code stream obtained by the first coding unit 803, the vector code stream obtained by combining the first merging module 703, and the symbol code stream coded by the first coding unit 803, The first code stream is obtained.
  • FIG. 15 is a schematic structural diagram of still another embodiment of an encoding apparatus according to the present invention.
  • the first encoding module 701 includes a second decomposing unit 811, a second encoding unit 812, and a first embodiment.
  • the second decomposing unit 811 is configured to decompose the obtained coefficients to be encoded into a plurality of target vectors having the same dimension, that is, the plurality of vectors in the embodiment shown in FIG. 13 .
  • the second encoding module 702 is configured to sequentially obtain and encode the position index of the codeword matching the plurality of target vectors decomposed by the second decomposition unit 811 in the base codebook in the code base to obtain a plurality of subcodes.
  • Stream, second coding unit 812 The bit plane series of the largest component among the plurality of target vectors decomposed by the second decomposing unit 811 is sequentially calculated and encoded to obtain a side information code stream.
  • the second removing unit 813 is configured to separately remove symbol information in the plurality of target vectors decomposed by the second decomposing unit 811 to obtain a plurality of absolute value vectors.
  • the third encoding unit 814 is configured to encode the symbol information removed by the second removing unit 813 to obtain a symbol code stream.
  • the second merging module 704 is configured to combine the side information code stream obtained by the second coding unit 812, the vector code stream obtained by combining the first merging module 703, and the symbol code stream coded by the third coding unit 814, The first code stream is obtained.
  • the second encoding module 702 may specifically include: a query unit 821, a fourth encoding unit 822, and a setting unit 823.
  • the query unit 821 is configured to use the first vector of the plurality of vectors decomposed by the first encoding module 701 as a current vector, and query whether there is a codeword matching the current vector in the base codebook.
  • the plurality of vectors may be a plurality of absolute value vectors decomposed by the first decomposing unit 802, or may be a plurality of target vectors decomposed by the second decomposing unit 811.
  • the fourth encoding unit 822 is configured to: when the codeword matching the current vector exists in the basic codebook according to the query result of the query unit 821, encode the position index of the codeword in the basic codebook to obtain a subcode stream,
  • the location index includes an encoding mode identifier; in the cornerstone codebook, there is no codeword matching the current vector, the current vector is separately encoded, and an encoding mode is set at the beginning of the code stream obtained by separately encoding. Identify, get the substream.
  • the coding mode identifier is used to identify the subcode stream as an encoding method for separately encoding the current vector.
  • the setting unit 823 is configured to: after the fourth encoding unit 822 encodes and obtain the sub-code stream, instruct the query unit 821 to use the next vector of the current vector in the plurality of vectors as the current vector, and query whether the base code outbook exists and is the current vector. The next vector matches the codeword until the substream corresponding to the multiple vectors is obtained.
  • the first merging module 703 is configured to combine the plurality of sub-code streams encoded by the fourth coding unit 822 to obtain a vector code stream, after all the sub-code streams corresponding to the plurality of vectors are obtained according to the indication of the setting unit 823. .
  • Figure 16 is a block diagram showing the structure of still another embodiment of the encoding apparatus of the present invention, which is based on the encoding apparatus shown in Figure 14.
  • Figure 17 is a block diagram showing the structure of still another embodiment of the encoding apparatus of the present invention, which is based on the encoding apparatus shown in Figure 15.
  • the second encoding module 702 may further include: a first obtaining unit 824, a decomposing unit 825, and a merging unit 826.
  • the first obtaining unit 824 is configured to obtain, by using the first one of the plurality of vectors as the current vector, a bit plane level of the largest component in the current vector.
  • the multiple vector may be decomposed by the first decomposition unit 802.
  • the obtained plurality of absolute value vectors may be a plurality of target vectors obtained by the second decomposition unit 811.
  • the decomposing unit 825 is configured to perform step decomposition on the current vector according to the number of bit plane levels of the largest component in the current vector acquired by the first obtaining unit 824, and decompose the current vector into one or more sub-vectors, where the one or more sub-vectors include High plane vector.
  • the query unit 821 specifically uses the first sub-vector of one or more sub-vectors decomposed by the decomposing unit 825 as the current sub-vector, and queries whether there is a code word matching the current sub-vector in the code-book output.
  • the fourth encoding unit 822 specifically encodes the location index of the codeword in the basic codebook according to the query result of the query unit 821, and obtains the partial vector code stream.
  • the location index includes an encoding mode identifier; when there is no codeword matching the current segment vector in the base codebook, the current segmentation vector is separately encoded, and a start position of the coded stream is set. The coding mode is identified, and the vector code stream is obtained.
  • the setting unit 823 specifically instructs the query unit 821 to use the next sub-vector of the current sub-vector in one or more sub-vectors as the current sub-vector to query whether the next sub-vector of the current sub-vector is matched in the code-based output code.
  • the merging unit 826 is configured to, according to the instruction of the setting unit 823, when the fourth encoding unit 822 encodes the sub-vector code stream corresponding to the last sub-vector of one or more sub-vectors, and encode one or more sub-vectors obtained by the fourth encoding unit 822.
  • the coded partial vector code streams are combined to obtain a sub-code stream of the current vector.
  • any coding apparatus may include a first storage module 705, configured to store a basic codebook, where the basic codebook includes: a codeword identifier uniquely identifying a codeword, the codeword The position index in the base code out code and the number of bits required to encode the position index.
  • the query unit 821 performs multi-dimensional summation on the current vector or the current sub-vector to obtain a vector identifier that uniquely identifies the current vector or the current sub-vector, and queries whether there is a code-word identifier identical to the vector identifier in the base codebook.
  • the fourth coding unit 822 is specifically configured according to the query unit 821.
  • the location index is encoded by the number of bits.
  • the second storage module 706 may be configured to store a basic codebook, where the basic codebook includes: the basic codebook includes: codewords matched according to the encoded vectors
  • the number of bits required for the position index in the base codebook is a multi-ary and a list of vectors arranged in sequence, a position index of the first codeword in each codebook block, and a position index of each codeword in each codebook block.
  • the basic codebook is divided into sequentially arranged codebook blocks according to the number of bits required for the position index of the encoded codeword, and the bits required for encoding each codeword are coded in the same codebook block of each codebook block. The number is the same.
  • the query unit 821 specifically performs multi-dimensional summation on the current vector or the current sub-vector to obtain a vector identifier that uniquely identifies the current vector or the current sub-vector, and queries the multi-ary code of the corner code of the second storage module 706. Whether there is a multi-ary sum in the list that is the same as the vector ID.
  • the fourth encoding unit 822 obtains the same multi-ary binary sum as the vector identifier in the multi-ary list according to the query result of the query unit 821, and obtains the same multi-ary and vector in the multi-ary and the list.
  • Position number according to the number of codewords in each codebook block, determining the codebook block where the location number is located and the location in the codebook block; according to the location in the codebook block and the first code in the codebook block
  • Position index of the word determining the multi-ary code and the corresponding position index
  • obtaining the number of bits required to encode the multi-ary code and the corresponding position index according to the number of bits required to encode the position index of each code word in each code block,
  • the multi-ary code and the corresponding position index are encoded by the number of bits. Two of the embodiments are shown in Figures 16 and 17, respectively.
  • the query unit 821 specifically searches for the first sub-codebook in the M sub-codebooks, and queries whether the multi-ary and the list have the same multi-ary sum as the vector identifier; if yes, the acquisition and the vector are started.
  • the operation of identifying the same multi-ary and the position number in the multi-digit and list; if not, the following sub-codebook is used as the first sub-codebook, and the execution of the query multi-ary and the list are present.
  • the vector identifies the same poly-and-sum operation, where the next one is less than or equal to M.
  • the encoding system of this embodiment can be used to implement the process of the embodiment shown in FIG. 10 of the present invention.
  • the encoding system of this embodiment includes: an arithmetic code encoder 11, an encoding device 12, a first receiving device 13, a statistical device 14, a comparing device 15, and a transmitting device 16.
  • the arithmetic code encoder 11 is configured to encode the coefficients to be encoded of the current frame input data to obtain a second code stream, which is also referred to as an arithmetic coded code stream.
  • the encoding device 12 is configured to encode the coefficients to be encoded of the current frame input data to obtain a first code stream, which can be specifically implemented by the encoding device of any of the above-mentioned embodiments 13 to 17 of the present invention.
  • the first receiving device 13 is configured to receive the coefficients to be encoded of the current frame input data, and send them to the arithmetic coding encoder 11 and the encoding device 12, respectively.
  • the statistical means 14 is configured to count the first total number of bits required to encode the coefficients to be encoded of the current frame input data by the encoding means 12, and to count the second required to encode the coefficients to be encoded of the current frame input data using the arithmetic coding encoder 11. The total number of bits.
  • the comparing means 15 is configured to compare whether the first total number of bits counted by the statistical means 14 is greater than the second total number of bits.
  • the transmitting device 16 is configured to: according to the comparison result of the comparing device 15, when the first total number of bits is smaller than the second total number of bits, setting a first identifier at a starting position of the first code stream encoded by the encoding device 12, forming a first a bit stream, and transmitting the first bit stream to the receiving end, wherein the first identifier is used to identify the first bit stream as the first code stream; when the first total number of bits is greater than the second total number of bits, in the second Setting a second identifier to the start position of the code stream, forming a second bit stream, and transmitting the second bit stream to the receiving end, wherein the second identifier is used to identify the second bit stream as the second code stream; When the total number of bits is equal to the second total number of bits, according to a preset, the first code stream or the second code stream is selected,
  • FIG. 19 is a schematic structural diagram of an embodiment of a decoding apparatus according to the present invention.
  • the decoding apparatus of this embodiment can be used to implement the decoding method of the foregoing embodiment of the present invention.
  • the decoding apparatus of this embodiment includes a second receiving module 711, a first decoding module 712, a second decoding module 713, a first obtaining module 714, a third decoding module 715, a second obtaining module 716, and recovery. Module 717.
  • the second receiving module 711 is configured to receive a first code stream sent by the sending end, where the first code stream includes an edge information code.
  • the stream, the vector code stream and the symbol code stream, and the vector code stream includes a sub-code stream corresponding to a plurality of vectors.
  • the first decoding module 712 is configured to decode the side information code stream in the first code stream received by the second receiving module 711, and obtain the bit plane level of the largest component among the plurality of vectors respectively.
  • the second decoding module 713 is configured to decode the plurality of sub-code streams according to the number of bit plane levels of the largest components among the plurality of vectors decoded by the first decoding module 712, respectively, to obtain matching with multiple vectors in the basic codebook. The position index of the codeword in the codebook.
  • the first obtaining module 714 is configured to obtain the absolute value vectors of the multiple vectors according to the position index decoded by the second decoding module 713.
  • the third decoding module 715 is configured to decode the symbol code stream in the first code stream received by the second receiving module 711 to obtain symbol information of multiple vectors.
  • the second obtaining module 716 is configured to respectively assign the symbol information of the plurality of vectors decoded by the third decoding module 715 to the absolute value vectors of the plurality of vectors acquired by the first acquiring module 714 to obtain a plurality of vectors.
  • the recovery module 717 is configured to recover the coefficients to be encoded according to the plurality of vectors obtained by the second obtaining module 716.
  • FIG. 20 is a schematic structural diagram of another embodiment of a decoding apparatus according to the present invention.
  • the encoding apparatus of the embodiment further includes a first storage module 705, configured to store a base code outbook, and the basic The codebook includes: a codeword identifier uniquely identifying a codeword, a location index of the codeword in the base codebook, and a number of bits required to encode the location index.
  • the first obtaining module 714 includes: a second acquiring unit 841 and a third acquiring unit 842.
  • the second obtaining unit 841 is configured to obtain, from the corner code outbook stored by the first storage module 705, a plurality of codeword identifiers corresponding to the location index of the codeword matching the plurality of vectors in the codebook outbound codebook.
  • the third obtaining unit 842 is configured to obtain, by using the plurality of codeword identifiers acquired by the second acquiring unit 841, a vector identifier, and obtain a corresponding absolute value vector, where the vector identifier is an absolute value vector and the unique identifier obtained by the multi-digit summation is absolutely The identifier of the value vector.
  • the second obtaining module 716 is configured to respectively assign the symbol information of the plurality of vectors decoded by the third decoding module 715 to the absolute value vectors of the plurality of vectors acquired by the second acquiring unit 841 to obtain a plurality of vectors.
  • the encoding apparatus of this embodiment further includes a second storage module 706, configured to store a base codebook, where the base code out code includes: a code that matches each vector according to the encoding
  • the number of bits required for the position index of the word in the base codebook is a multi-ary and a list of vectors arranged in sequence, a position index of the first codeword in each codebook block, and a position index of each codeword in each codebook block. The number of bits required and the number of codewords in each codebook block.
  • the basic codebook is divided into sequentially arranged codebook blocks according to the number of bits required for the position index of the encoded codeword, and the bits required for encoding each codeword are coded in the same codebook block of each codebook block.
  • the number is the same.
  • the second decoding module 713 is specifically configured to: according to the number of bit plane levels of the largest component of the plurality of vectors, use the first codebook block as the current codebook block for each subcode stream, and obtain the coded current codebook block.
  • the first bit number required for the position index of each codeword is read from the plurality of subcode streams to obtain the first value, and the position index of the first codeword in the current codebook block is The number of codewords in the current codebook block determines the location index of the last codeword in the current codebook block; compares whether the first value is greater than the location index of the last codeword; if not greater than the location index of the last codeword a size, the first difference between the first value and the position index of the first codeword in the current codebook block is obtained, and the first difference is used as a relative position in the current codebook block, from the multi-value sum Obtaining a multi-ary sum corresponding to the first value in the list; if the size of the position index is greater than the last codeword, the next codebook block of the current codebook block as the next codebook block is used as the current codebook block.
  • the first obtaining module ⁇ 14 specifically obtains the multi-ary code corresponding to the first value and the corresponding absolute value vector according to the multi-ary subtraction.
  • the sub-code stream in the first code stream received by the second receiving module 711 may further include an encoding mode identifier, where the encoding mode identifier is used to identify the sub-code stream to encode the position index or separately encode the absolute value vector.
  • FIG. 21 is a schematic structural diagram of still another embodiment of a decoding apparatus according to the present invention. Compared with the embodiment shown in FIG. 20, the decoding apparatus of the embodiment further includes: an identification module 718 and a decoding processing module 719.
  • the identification module 718 is configured to identify the second receiving The coding mode identified by the coding mode identifier in the sub-code stream in the first code stream received by the module 711.
  • the decoding processing module 719 is configured to, according to the identification result of the identification module 718, when the encoding mode identified by the encoding mode identifier is to encode the location index, instruct the second decoding module 713 to sequentially decode the plurality of sub-code streams;
  • the coding method is to separately code the absolute value vector
  • the subcode stream is directly decoded according to the decoding method corresponding to the bit plane level of the largest component in the absolute value vector, and an absolute value vector is obtained.
  • the sub-code stream in the first code stream received by the second receiving module 711 may include one or more sub-vector code streams obtained by more than one sub-vector coding, where more than one sub-vector is determined by the largest component according to the absolute value vector.
  • the bit plane series is subjected to series decomposition of the absolute value vector, and more than one sub-vector includes a high-order plane vector, and the sub-code stream further includes an encoding mode identifier, and the encoding mode identifier is used to identify the sub-vector code stream to perform position indexing.
  • a coding method that encodes or separates the vector separately. 22 is a schematic structural diagram of a decoding apparatus according to another embodiment of the present invention. Compared with the embodiment shown in FIG.
  • the second decoding module 713 includes: a first identifying unit 843, The second identification unit 844 and the fourth acquisition unit 845.
  • the first identifying unit 843 is configured to sequentially use the number of bit plane levels of the maximum component of each of the plurality of absolute value vectors obtained by the first decoding module 712 as the current bit plane level, according to the bit plane level. And identifying one or more sub-vector code streams corresponding to the absolute value vector, which is the vector in the embodiment shown in FIG.
  • the second identifying unit 844 is configured to sequentially use one of the one or more vector code streams identified by the first identifying unit 843 as the current partial vector code stream, and identify the identifier of the current mode vector code stream. Encoding.
  • the fourth obtaining unit 845 is configured to obtain, according to the recognition result of the second identifying unit 844, the matching of the current sub-vector from the code-based codebook stored by the first storage module 705 when the identified encoding mode is encoding the location index.
  • the location index of the codeword in the codebook is obtained by using the location index as a vector identifier, and the current sub-vector corresponding to the vector identifier is obtained.
  • the vector identifier is a vector identifier that uniquely identifies the current sub-vector obtained by multi-dimensional summation of the current sub-vector; and when the identified encoding method is separately encoding the current sub-vector, the current sub-vector is directly decoded. Get the current split vector.
  • the first acquisition module 714 combines one or more partial vectors obtained by the fourth obtaining unit 845 to obtain an absolute value vector.
  • more than one sub-vector may further include a low-order plane vector, wherein the high-order plane vector is a harmonic vector, the low-order plane vector is a unit pulse vector, and the sub-vector code stream obtained by the harmonic vector coding is a high-order code stream, and the unit pulse vector coding
  • the obtained partial vector code stream is a low bit code stream
  • one or more divided vector code streams include a high bit code stream and a low bit code stream. In the divided vector code stream, the upper bit stream and the lower bit stream are in accordance with the bit of the largest component in the corresponding divided vector.
  • the plane series are arranged in descending order.
  • the second identifying unit 844 specifically follows the order of the number of bit planes of the largest component in the corresponding partial vector from high to low, and sequentially uses the high bit code stream and the bit code stream as the current sub-vector vector code stream to identify the current sub-vector code.
  • the encoding mode in the stream identifies the encoding method identified.
  • FIG. 23 is a schematic structural diagram of an embodiment of a decoding system according to the present invention.
  • the decoding system of the embodiment can be used to implement the process of the embodiment shown in FIG. 12 of the present invention.
  • the decoding system of this embodiment includes: an arithmetic codec 21, a decoding device 22, a second receiving device 23, an identifying device 24, and a decoding processing device 25.
  • the second receiving device 23 is configured to receive a bit stream that is sent by the sending end, where the bit stream is a first bit stream or a second bit stream, where the first bit stream includes a first identifier and a first bit stream, The second bit stream includes a second identifier and a second code stream.
  • the identifying means 24 is operative to identify that the bit stream received by the second receiving means 23 is the first bit stream or the second bit stream based on whether the first stream or the second flag is included in the bit stream.
  • the decoding processing device 25 is configured to, according to the recognition result of the identification device 24, instruct the decoding device 22 to decode the first code stream when the bit stream is the first bit stream, and to indicate the arithmetic code decoding when the bit stream is the second bit stream.
  • the processor 21 decodes the second code stream.
  • the arithmetic codec 21 is configured to decode the second code stream and recover the coefficients to be encoded of the current frame data
  • the decoding device 22 is configured to decode the first code stream and recover the coefficients to be encoded of the current frame data.
  • FIG. 24 is a schematic structural diagram of an embodiment of a communication system according to the present invention.
  • the communication system of this embodiment includes an encoding device 1 and a decoding device 2.
  • the encoding device 1 is configured to encode the obtained symbol information in the to-be-coded coefficients, obtain a symbol code stream, and encode the bit-plane level of the largest component among the plurality of vectors into which the coding coefficients are to be decomposed to obtain side information.
  • the encoding device 1 can be embodied by the encoding device of any of the embodiments shown in Figs. 13 to 17 of the present invention.
  • the decoding device 2 is configured to receive the first code stream, and decode the side information code stream to obtain a bit plane level of the largest component of the plurality of vectors; and respectively, the plurality of subcodes according to the bit plane level of the largest component of the plurality of vectors
  • the stream is decoded to obtain a position index of the codewords respectively matching the plurality of vectors in the base codebook in the base codebook; respectively, obtaining absolute value vectors of the plurality of vectors according to the position index; decoding the symbol code stream to obtain multiple vectors Symbol information; respectively assign symbol information of a plurality of vectors to absolute vector vectors of a plurality of vectors to obtain a plurality of vectors; and recover coefficients to be encoded according to the plurality of vectors.
  • the decoding device 2 can be specifically implemented by the encoding device of any of the embodiments shown in Figs. 19 to 22 of the present invention.
  • FIG. 25 is a schematic structural diagram of another embodiment of a communication system according to the present invention.
  • the communication system of this embodiment includes an encoding system 3 and a decoding system 4.
  • the encoding system 3 includes: an arithmetic coding encoder 11, an encoding device 12, a first receiving device 13, a statistical device 14, a comparing device 15, and a transmitting device 16.
  • the first receiving device 13 is configured to receive the coefficients to be encoded of the current frame input data, and send the coefficients to the arithmetic coding encoder 11 and the encoding device 12, respectively.
  • the arithmetic coding encoder 11 is configured to encode the coefficients to be encoded of the current frame input data to obtain a second code stream.
  • the encoding device 12 is configured to encode the coefficients to be encoded of the current frame input data to obtain a first code stream, which can be specifically implemented by the encoding device of any of the above-mentioned embodiments 13 to 17 of the present invention.
  • the statistical means 14 is configured to count the first total number of bits required to encode the coefficients to be encoded of the current frame input data by the encoding means 12, and to count the second required to encode the coefficients to be encoded of the current frame input data using the arithmetic coding encoder 11. The total number of bits.
  • the comparing means 15 is for comparing whether the first total number of bits is greater than the second total number of bits.
  • the transmitting device 16 is configured to, according to the comparison result of the comparing device 15, set a first identifier at a starting position of the first code stream when the first total number of bits is smaller than the second total number of bits, to form a first bit stream, and
  • the first bit stream is transmitted to the decoding system 4, and in particular, to the second receiving device 23 in the decoding system 4, wherein the first identifier is used to identify the first bit stream as the first code stream; Number is greater than second At the total number of bits, a second identifier is set at the beginning of the second code stream to form a second bit stream, and the second bit stream is transmitted to the decoding system 4, specifically, to the decoding system 4 a second receiving device 23, wherein the second identifier is used to identify the second bit stream as the second code stream; when the first total number of bits is equal to the second total number of bits, selecting the first code stream or the arithmetic coded code according to a preset setting Flowing, and correspondingly setting a first identifier or
  • the decoding system 4 includes: an arithmetic codec 21, a decoding device 22, a second receiving device 23, an identifying device 24, and a decoding processing device 25.
  • the second receiving device 23 is configured to receive the bit stream sent by the transmitting device 16, where the bit stream is a first bit stream or a second bit stream, where the first bit stream includes a first identifier and a first bit stream, The second bit stream includes a second identifier and a second code stream.
  • the identifying means 24 is configured to identify the bit stream received by the second receiving device 23 as the first bit stream or the second bit stream according to whether the first identifier or the second identifier is included in the bit stream.
  • the decoding processing device 25 is configured to, according to the recognition result of the identification device 24, instruct the decoding device 22 to decode the first code stream when the bit stream is the first bit stream, and to indicate the arithmetic code decoding when the bit stream is the second bit stream.
  • the processor 21 decodes the second code stream.
  • the arithmetic codec 21 is configured to decode the second code stream to recover the coefficients to be encoded of the current frame data
  • the decoding device 22 is configured to decode the first code stream and recover the coefficients to be encoded of the current frame data.
  • any of the encoding devices provided in the above embodiments of the present invention may be used in place of the AC encoder in FIG. 1, and any of the decoding devices provided in the above embodiments of the present invention may be substituted for the AC decoder in FIG.
  • the method includes the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk. > ⁇ Use ⁇ W ij_ quantity to form the cornerstone codebook. After receiving the coefficients to be encoded, the coefficients to be encoded can be decomposed into multiple vectors, and the codewords matching the multiple vectors in the base codebook are obtained in sequence.
  • the location index in the present, and encoding the location index therefore, only the basic codebook needs to be stored in the encoding device, and there is no need to store the vector and the correlation between them, thereby saving the coding device required to encode the same vector. Storage space; and, since only the position index needs to be encoded, the amount of data to be encoded and the number of bits required for encoding are reduced, the coding time is shortened, and the coding efficiency is improved. As shown in Table 4 below, an example of the result of the coding efficiency improvement when encoding is performed by the embodiment shown in Fig. 10 of the present invention.
  • the number of frames encoded by the BC encoding method of the embodiment of the present invention is larger than the number of frames encoded by the AC encoding method, especially at a code rate of 20 kbps and 24 kbps.
  • the experimental results show that the encoding efficiency is improved by at least 2% after encoding by the embodiment shown in Fig. 10 of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

编码方法、 装置与系统、 解码方法、 装置与系统 技术领域
本发明涉及通信技术, 尤其是一种编码方法、 装置与系统、 解码方法、 装置与系统。 背景技术
编码性能的一个重要指标是编码效率。 高效率的编码技术, 可以在编码 端用尽可能少的比特, 对经过一系列流程处理后的数据进行编码后传输给解 码端, 使解码端能够正确解码并重建数据, 并确保重建的数据与编码端编码 的数据完全一致。 高效率的编码技术是视音频编解码中的核心技术, 现有的 霍夫曼编码( Huffman Coding,以下简称: HC )和算术编码( Arithmetic Coding, 以下简称: AC ) 均是高效的编码技术, 并且是无损编码。
统一语音和音频编码 ( Unified Speech and Audio Coding, 以下简称: USAC )是移动图像专家组(Moving Picture Experts Group, 以下简称: MPEG ) 正在进行的标准。 USAC的目标是设计新的高质量编码器,既能处理好语音信 号, 也能处理好音乐信号。 图 1为现有技术 USAC编码器的一个结构示意图, 图 2为现有技术 USAC解码器的一个结构示意图。其中的 USAC编码器与 USAC 解码器分别是基于 USAC标准的编码器和解码器。 如图 1所示, 在编码端, USAC编码器对输入信号进行分类, 若输入信号属于音乐信号, 则采用频域 ( frequency domain, 以下简称: FD )编码器进行编码, 并进行归一化、 量化 等编码预处理后, 得到待编码系数, 之后, 采用 AC编码器进行编码。 若输入 的是语音信号的待编码系数, 则采用线性预测域 ( linear prediction domain, 以下简称: LPD )编码器进行编码, 并进行归一化、 量化预处理后, 得到待 编码系数, 之后, 采用 AC编码器进行编码。 如图 2所示, 在解码端, USAC 解码器采用 AC解码器对接收到的码流进行解码, 与反量化、 反归一化等解码 预处理后, 根据码流中的标志位识别该码流是音乐信号码流还是语音信号码 流, 采用 FD解码器对音乐信号码流进行解码, 或采用 LPD解码器对语音信号 码流进行解码。
现有的 USAC编码器中, AC编码器预先存储所有矢量之间的累积概率 ( cumulative Frequency )来描述各矢量间的相关性, 接收到待编码系数时, 从 AC编码器中获取待编码系数中相邻矢量之间的相关性, 并根据相邻矢量之 间的相关性, 采用基于上下文关系的算术编码方法对待编码系数进行编码。 如图 3所示, 为现有技术 USAC编码器的编码原理图。 其中, A表示已编 /解码 但不作为上下文信息的 4维矢量, B表示还未编 /解码的 4维矢量, C表示已编 / 解码并作为上下文信息的 4维矢量, D表示当前要编 /解码的 4维矢量。 USAC 编码器的具体编码过程如下: 将接收到的待编码系数分解成若干个 4维矢量; 将每一个矢量分解成一级或多级位平面; 对于每一个矢量, 提取其位平面的 最高 2级, 并根据相邻矢量之间的相关性, 采用基于上下文的概率计算方式对 其进行编码; 对于提取最高 2级平面后的基它低层的位平面, 使用一个统一的 概率分布表进行算术编码。
一般情况下, 编码效率主要由编码器的算法复杂度与存储空间决定。 在 实现本发明的过程中, 发明人发现, 现有技术中, 采用 AC编码器对待编码系 数进行编码至少存在以下问题:
为了保证编码的完备性与无损编码, AC编码器消耗了大量的存储空间表 示所有累积概率来描述相邻矢量之间的相关性, 目前的相关存储量从 15k至 100k以上, 从而降低了编码效率。 由于存储空间会随着矢量维数的增大而呈 级数增长, 而现有的 AC编码器的存储空间有限, 从实际应用情况来看, 利用 现有的 AC编码技术艮难实现对 4维以上矢量的编码。 发明内容
本发明实施例提供一种编码方法、 装置与系统、 解码方法、 装置与系统, 以减少编码相同矢量所需占用的编码装置的存储空间, 从而提高编码装置的 编码效率。
本发明实施例提供的一种编码方法, 包括:
对获得的待编码系数中的符号信息进行编码, 获得符号码流, 以及分别 对所述待编码系数分解成的多个矢量中最大分量的位平面级数进行编码, 获 得边信息码流;
依次获取基石出码本中与所述多个矢量匹配的码字在所述基石出码本中的位 置索引并进行编码, 得到多个子码流, 所述基础码本中码字对应的矢量在预 设时段内的使用概率大于预设值;
将所述多个子码流进行合并, 得到矢量码流;
对所述边信息码流、 所述矢量码流与所述符号码流进行合并, 得到第一 码流。
本发明实施例提供的一种解码方法, 包括:
接收第一码流, 该第一码流包括边信息码流、 矢量码流与符号码流, 所 述矢量码流包括对应于多个矢量的子码流;
对所述边信息码流进行解码, 分别获得所述多个矢量中最大分量的位平 面级数;
分别根据所述多个矢量中最大分量的位平面级数, 对所述多个子码流进 行解码, 得到基础码本中分别与所述多个矢量匹配的码字在所述基石出码本中 的位置索引;
根据所述位置索引, 分别获取所述多个矢量的绝对值矢量;
解码所述符号码流, 得到所述多个矢量的符号信息;
分别将所述多个矢量的符号信息赋予所述多个矢量的绝对值矢量, 得到 所述多个矢量;
根据所述多个矢量恢复出待编码系数。
本发明实施例提供的一种编码装置, 包括: 第一编码模块, 用于对获得的待编码系数中的符号信息进行编码, 获得 符号码流, 以及分别对所述待编码系数分解成的多个矢量中最大分量的位平 面级数进行编码, 获得边信息码流;
第二编码模块, 用于依次获取基础码本中与所述多个矢量匹配的码字在 所述基础码本中的位置索引并进行编码, 得到多个子码流, 所述基石出码本中 码字对应的矢量在预设时段内的使用概率大于预设值;
第一合并模块, 用于将所述多个子码流进行合并, 得到矢量码流; 第二合并模块, 用于对所述边信息码流、 所述矢量码流与所述符号码流 进行合并, 得到第一码流。
本发明实施例提供的一种编码系统, 包括算术编码编码器, 用于编码当 前帧输入数据的待编码系数, 得到第二码流, 还包括本发明上述实施例提供 的编码装置, 用于编码所述当前帧输入数据的待编码系数, 得到第一码流; 以及
第一接收装置, 用于接收所述当前帧输入数据的待编码系数, 并分别发 送给所述算术编码编码器与所述编码装置;
统计装置, 用于统计采用所述编码装置编码所述当前帧输入数据的待编 码系数所需的第一总比特数, 以及统计采用所述算术编码编码器编码所述当 前帧输入数据的待编码系数所需的第二总比特数;
比较装置, 用于比较所述第一总比特数是否大于所述第二总比特数; 传送装置, 用于根据所述比较装置的比较结果, 在所述第一总比特数小 于所述第二总比特数时, 在所述第一码流的起始位置设置第一标识, 形成第 一比特流, 并将该第一比特流传送给接收端, 所述第一标识用于标识所述第 一比特流; 在所述第一总比特数大于所述第二总比特数时, 在所述第二码流 的起始位置设置第二标识, 形成第二比特流, 并将该第二比特流传送给接收 端, 所述第二标识用于标识所述第二比特码流; 在所述第一总比特数等于所 述第二总比特数时, 根据预先设置, 选择所述第一码流或所述第二码流, 并 在选择的所述第一码流或所述第二码流的起始位置相应设置第一标识或第二 标识, 并将形成的第一比特流或第二比特流传送给接收端。
本发明实施例提供的一种解码装置, 包括:
第二接收模块, 用于接收第一码流, 该第一码流包括边信息码流、 矢量 码流与符号码流, 所述矢量码流包括对应于多个矢量的子码流;
第一解码模块, 用于对所述边信息码流进行解码, 分别获得所述多个矢 量中最大分量的位平面级数;
第二解码模块, 用于分别根据所述多个矢量中最大分量的位平面级数, 对所述多个子码流进行解码, 得到基础码本中分别与所述多个矢量匹配的码 字在所述基础码本中的位置索引;
第一获取模块, 用于根据所述位置索引, 分别获取所述多个矢量的绝对 值矢量;
第三解码模块, 用于解码所述符号码流, 得到所述多个矢量的符号信息; 第二获取模块, 用于分别将所述多个矢量的符号信息赋予所述多个矢量 的绝对值矢量, 得到所述多个矢量;
恢复模块, 用于根据所述多个矢量恢复出待编码系数。
本发明实施例提供的一种解码系统, 包括算术编码解码器, 用于对第二 码流进行解码, 恢复出当前帧数据的待编码系数, 还包括本发明上述实施例 提供的解码装置, 用于对第一码流进行解码, 恢复出当前帧数据的待编码系 数; 以及
第二接收装置, 用于接收比特流, 所述比特流为第一比特流或第二比特 流, 所述第一比特流中包括第一标识与所述第一码流, 所述第二比特流中包 括第二标识与所述第二码流;
识别装置, 用于根据所述比特流中包括第一标识或第二标识, 识别所述 比特流为第一比特流或第二比特流;
解码处理装置, 用于根据所述识别装置的识别结果, 在所述比特流为第 一比特流时, 指示所述解码装置对所述第一码流进行解码; 在所述比特流为 第二比特流时, 指示所述算术编码解码器对所述第二码流进行解码。
本发明实施例提供的一种通信系统, 包括编码装置与解码装置, 所述编 码装置用于对获得的待编码系数中的符号信息进行编码, 获得符号码流, 以 及分别对所述待编码系数分解成的多个矢量中最大分量的位平面级数进行编 码, 获得边信息码流; 依次获取基石出码本中与所述多个矢量匹配的码字在所 述基石出码本中的位置索引并进行编码, 得到多个子码流, 所述基础码本中码 字对应的矢量在预设时段内的使用概率大于预设值; 将所述多个子码流进行 合并, 得到矢量码流; 对所述边信息码流、 所述矢量码流与所述符号码流进 行合并, 得到第一码流并传送给所述解码装置;
所述解码装置用于接收第一码流; 对所述边信息码流进行解码, 获得所 述多个矢量中最大分量的位平面级数; 分别根据所述多个矢量中最大分量的 位平面级数, 对所述多个子码流进行解码, 得到基石出码本中分别与所述多个 矢量匹配的码字在所述基础码本中的位置索引; 根据所述位置索引, 分别获 取所述多个矢量的绝对值矢量; 解码所述符号码流, 得到所述多个矢量的符 号信息; 分别将所述多个矢量的符号信息赋予所述多个矢量的绝对值矢量, 得到所述多个矢量; 根据所述多个矢量恢复出待编码系数。
本发明实施例提供的另一种通信系统, 包括编码系统与解码系统, 所述 编码系统包括:
第一接收装置, 用于接收当前帧输入数据的待编码系数, 并分别发送给 算术编码编码器与编码装置;
算术编码编码器, 用于编码当前帧输入数据的待编码系数, 得到第二码 流;
编码装置, 用于接收待编码系数; 对所述待编码系数中的符号信息进行 编码, 获得符号码流, 以及分别对所述待编码系数分解成的多个矢量中最大 分量的位平面级数进行编码, 获得边信息码流; 依次获取基础码本中与所述 多个矢量匹配的码字在所述基础码本中的位置索引并进行编码, 得到多个子 码流,所述基石出码本中码字对应的矢量在预设时段内的使用概率大于预设值; 将所述多个子码流进行合并, 得到矢量码流; 对所述边信息码流、 所述矢量 码流与所述符号码流进行合并, 得到第一码流;
统计装置, 用于统计采用所述编码装置编码所述当前帧输入数据的待编 码系数所需的第一总比特数, 以及统计采用所述算术编码编码器编码所述当 前帧输入数据的待编码系数所需的第二总比特数;
比较装置, 用于比较所述第一总比特数是否大于所述第二总比特数; 传送装置, 用于根据所述比较装置的比较结果, 在所述第一总比特数小 于所述第二总比特数时, 在所述第一码流的起始位置设置第一标识, 形成第 一比特流, 并将该第一比特流传送给所述解码系统, 所述第一标识用于标识 所述第一比特流为第一码流;在所述第一总比特数大于所述第二总比特数时, 在所述第二码流的起始位置设置第二标识, 形成第二比特流, 并将该第二比 特流传送给所述解码系统, 所述第二标识用于标识所述第二比特流为第二码 流; 在所述第一总比特数等于所述第二总比特数时, 根据预先设置, 选择第 一码流或第二码流, 并在选择的第一码流或第二码流的起始位置相应设置第 一标识或第二标识, 并将形成的第一比特流或第二比特流传送给所述解码系 统;
所述解码系统包括:
第二接收装置, 用于接收所述传送装置传送的比特流, 所述比特流为第 一比特流或第二比特流;
识别装置, 用于根据所述比特流中包括第一标识或第二标识, 识别所述 比特流为第一比特流或第二比特流;
解码处理装置, 用于根据所述识别装置的识别结果, 在所述比特流为第 一比特流时, 指示解码装置对所述第一码流进行解码; 在所述比特流为第二 比特流时, 指示算术编码解码器对所述第二码流进行解码; 算术编码解码器, 用于对所述第二码流进行解码, 恢复出当前帧数据的 待编码系数,
解码装置, 用于接收所述第一码流; 对所述边信息码流进行解码, 获得 所述多个矢量中最大分量的位平面级数; 分别根据所述多个矢量中最大分量 的位平面级数, 对所述多个子码流进行解码, 得到基础码本中分别与所述多 个矢量匹配的码字在所述基石出码本中的位置索引; 根据所述位置索引, 分别 获取所述多个矢量的绝对值矢量; 解码所述符号码流, 得到所述多个矢量的 符号信息;分别将所述多个矢量的符号信息赋予所述多个矢量的绝对值矢量, 得到所述多个矢量; 根据所述多个矢量恢复出待编码系数。
基于本发明上述实施例提供的编码方法、 装置与系统、 解码方法、 装置 与系统, 可以由预设时段内的使用概率大于预设值的矢量组成基础码本, 接 收到待编码系数后, 可以将待编码系数分解成多个矢量, 依次获取基础码本 中与多个矢量匹配的码字在基础码本中的位置索引, 并对该位置索引进行编 码, 因此, 编码装置中仅仅需要存储基础码本, 不需要存储所有矢量及其之 间的相关性, 与现有技术相比, 节省了编码相同矢量所需占用的编码装置存 储空间; 并且, 由于仅仅需要对位置索引进行编码, 相对于现有技术需要编 码待编码系数来说, 减少了待编码的数据量与编码所需的比特数, 缩短了编 码时间, 提高了编码效率。
下面通过附图和实施例, 对本发明的技术方案做进一步的详细描述。 附图说明 施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面 描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为现有技术 USAC编码器的一个结构示意图; 图 2为现有技术 USAC解码器的一个结构示意图;
图 3为现有技术 USAC编码器的编码原理图;
图 4为本发明编码方法一个实施例的流程图;
图 5为本发明编码方法另一个实施例的流程图;
图 6a为本发明音频信号的一个频谱图;
图 6b为图 6a所示音频信号分解成的谐波与单位脉冲示意图; 图 Ί为本发明编码方法又一个实施例的流程图;
图 8a为本发明一个绝对值矢量(2,1,0,3,2,1,0,1 ) 的示意图;
图 8b为本发明绝对值矢量(2,5,0,7,6,1,0,1 )和(2,13,4,0,3,5,1,7 )的示意 图 9a为本发明第一码流的一个结构示意图;
图 9b为图 9a中子码流包括的分矢量码流的一个结构示意图; 图 10为本发明编码方法再一个实施例的流程图;
图 11为本发明解码方法一个实施例的流程图;
图 12为本发明解码方法另一个实施例的流程图;
图 13为本发明编码装置一个实施例的结构示意图;
图 14为本发明编码装置另一个实施例的结构示意图;
图 15为本发明编码装置又一个实施例的结构示意图;
图 16为本发明编码装置再一个实施例的结构示意图;
图 17为本发明编码装置还一个实施例的结构示意图;
图 18为本发明编码系统一个实施例的结构示意图;
图 19为本发明解码装置一个实施例的结构示意图;
图 20为本发明解码装置另一个实施例的结构示意图;
图 21为本发明解码装置又一个实施例的结构示意图;
图 22为本发明解码装置再一个实施例的结构示意图;
图 23为本发明解码系统一个实施例的结构示意图; 图 24为本发明通信系统一个实施例的结构示意图;
图 25为本发明通信系统另一个实施例的结构示意图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而 不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做 出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
在音频信号中, 不同 4维矢量出现的频率差异比较明显。 根据信息论知 识, 对于出现频率较高的矢量, 例如: 对于矢量 {0,0,0,0} , 在 USAC编码器 中经常出现, 可以使用尽可能少的比特数编码, 以节省存储空间, 使编码技 术可以应用于 4维以上更高维数的矢量, 从而更有效提高编码效率。 图 4为 本发明编码方法一个实施例的流程图。 如图 4所示, 该实施例的编码方法包 括:
步骤 101 , 对获得的待编码系数中的符号信息进行编码, 获得符号码流, 以及分别对待编码系数分解成的多个矢量中最大分量的位平面级数进行编 码, 获得边信息码流。 其中, 最大分量即矢量中具有最大绝对值的分量。
步骤 102, 依次获取基础码本中与多个矢量匹配的码字在基础码本中的 位置索引并进行编码, 得到多个子码流。 其中, 基石出码本中码字对应的矢量 在预设时段内的使用概率大于预设值。
步骤 103 , 将多个子码流进行合并, 得到矢量码流。
步骤 104, 对边信息码流、 矢量码流与符号码流进行合并, 合并得到的 码流称为第一码流。 此外, 上述实施例的编码方法可以称为位平面矢量编码 ( Bitplane-vector Coding , 以下简称: BC ) 方法, 相应的, 第一码流也可以 称为 BC码流。
在上述实施例提供的编码方法中, 可以由预设时段内的使用概率大于预 设值的矢量组成基础码本, 接收到待编码系数后, 可以将待编码系数分解成 多个矢量, 依次获取基础码本中与多个矢量匹配的码字在基础码本中的位置 索引, 并对该位置索引进行编码, 因此, 编码装置中仅仅需要存储基础码本, 所需占用的存储空间较小; 并且, 由于仅仅需要对位置索引进行编码, 减少 了待编码的数据量与编码所需的比特数, 缩短了编码时间, 提高了编码效率。
作为本发明的一个具体实施例, 步骤 101可以通过以下方式实现: 去除 待编码系数中的符号信息, 获得绝对值系数; 将该绝对值系数分解为维数相 同的多个绝对值矢量; 依次计算多个绝对值矢量中最大分量的位平面级数并 进行编码, 获得边信息码流; 并对符号信息进行编码, 获得符号码流。 该实 施例中, 多个矢量具体为多个绝对值矢量。
作为本发明的另一个具体实施例, 步骤 101也可以通过以下方式实现: 将待编码系数分解为维数相同的多个目标矢量; 依次计算多个目标矢量中最 大分量的位平面级数并进行编码, 获得边信息码流; 分别去除多个目标矢量 中的符号信息, 获得多个绝对值矢量; 并对符号信息进行编码, 获得符号码 流。 该实施例中, 多个矢量具体为多个目标矢量。
另外, 作为本发明的又一个具体实施例, 步骤 102可以通过以下方式实 现:
依次以多个矢量中的每一个矢量作为当前矢量, 查询基础码本中是否存 在与当前矢量匹配的码字; 若基础码本中存在与当前矢量匹配的码字, 对该 码字在基础码本中的位置索引进行编码, 得到子码流, 其中的位置索引中包 括一个编码方式标识。 具体地, 该编码方式标识可以设置在位置索引的首位, 另外也可以根据预先设定设置在其它位; 若基础码本中不存在与当前矢量匹 配的码字, 对当前矢量进行单独编码, 并在单独编码获得的码流的起始位置 设置一个编码方式标识, 得到子码流。 其中的编码方式标识用于标识该子码 流为对位置索 ^ 1进行编码或当前矢量进行单独编码的编码方式。
根据本发明的再一个实施例, 可以将音频信号的频谱分解成谐波与单 位脉冲, 也即: 频谱中待编码系数分解得到的矢量可以表示为谐波矢量与 单位脉冲矢量的叠加形式。 其中, 谐波为音频信号中的最核心部分, 是音 频信号中最重要的编码对象。相对于谐波,单位脉冲可以作为辅助性信息, 描述音频信号的细节, 单位脉冲矢量中各分量的取值为 0或 1。 其中的谐波 矢量也称为高位平面矢量, 单位脉冲矢量也称为低位平面矢量。
图 5为本发明编码方法另一个实施例的流程图。 如图 5所示, 该实施例 的编码方法包括:
步骤 201 , 去除待编码系数中的符号信息, 获得绝对值系数, 并对去除 的符号信息进行编码, 获得符号码流。
步骤 202, 将该绝对值系数分解为维数相同的多个绝对值矢量。
步骤 203 , 依次计算多个绝对值矢量中最大分量的位平面级数并进行编 码, 获得边信息码流。
步骤 204, 以多个矢量中的第一个矢量作为当前矢量, 根据当前矢量中 最大分量的位平面级数, 对当前矢量进行级数分解, 将当前矢量分解为一个 以上分矢量, 该一个以上的分矢量包括高位平面矢量。
步骤 205 , 以一个以上分矢量中的第一个分矢量作为当前分矢量, 查询 基础码本中是否存在与当前分矢量匹配的码字。 若基础码本中存在与当前分 矢量匹配的码字, 执行步骤 206; 否则, 若基石出码本中不存在与当前分矢量 匹配的码字, 执行步骤 207。
步骤 206, 对该码字在基石出码本中的位置索引进行编码, 得到分矢量码 流, 其中的位置索引中包括一个用于表示该分矢量码流为对位置索引进行编 码的编码方式标识。 然后, 执行步骤 209。
步骤 207, 对当前分矢量进行单独编码。
步骤 208, 在单独编码获得的码流的起始位置设置一个编码方式标识, 得到分矢量码流, 该编码方式标识用于标识该分矢量码流为对当前分矢量进 行单独编码的编码方式。 步骤 209, 判断当前分矢量是否为一个以上分矢量中的最后一个分矢量, 也即: 判断是否得到一个以上分矢量中所有分矢量的分矢量码流。 若没有得 到一个以上分矢量中所有分矢量的分矢量码流, 也就是说, 未完成对一个以 上分矢量中所有分矢量的编码, 以一个以上分矢量中当前分矢量的下一个分 矢量作为当前分矢量, 执行步骤 205 , 直到通过步骤 205-步骤 208得到所有 一个以上分矢量的分矢量码流; 否则, 若得到一个以上分矢量中所有分矢量 的分矢量码流, 执行步骤 210。
步骤 210, 将一个以上分矢量编码得到的分矢量码流进行合并, 得到当 前矢量的子码流。
步骤 211 , 判断当前矢量是否为多个矢量中的最后一个矢量, 也即: 判 断是否得到多个矢量的子码流。 若没有得到多个矢量的子码流, 也就是说, 未完成对多个矢量的编码, 以多个矢量中当前矢量的下一个矢量作为当前矢 量, 执行步骤 204, 直到通过步骤 204-步骤 211得到多个矢量的子码流; 否 则, 若得到多个矢量的子码流, 执行步骤 212。
步骤 212, 将多个子码流进行合并, 得到矢量码流。
步骤 213 , 对边信息码流、 矢量码流与符号码流进行合并, 得到第一码 流。
作为本发明编码方法的又一个实施例,在图 5所示实施例的步骤 204中, 一个以上分矢量还可以包括低位平面矢量。其中的高位平面矢量为谐波矢量, 低位平面矢量为单位脉冲矢量。 相应的, 通过步骤 205-步骤 208对一个以上 分矢量的位置索引进行编码或对分矢量进行单独编码时, 可以按照所有分矢 量中最大分量的位平面级数由高到低的顺序, 依次以谐波矢量与单位脉冲矢 量作为当前矢量进行编码。 步骤 209中, 具体可以按照分矢量中最大分量的 位平面级数由高到低的顺序, 将谐波矢量编码得到的高位码流与单位脉冲矢 量编码得到的低位码流进行合并。 其中的分矢量码流包括高位码流与低位码 流。 根据本发明人的一个实验结果, 基于音频信号的特征, 其中谐波部分的 位平面级数主要分布范围为最高的 1 -3级,分别表示为 Lev— 1、 Lev— 2和 Lev— 3。 如图 6a所示,为本发明音频信号的一个频谱图。 6a所示音频信号分解成的谐 波与单位脉冲示意图如图 6b所示。 在实际应用中, 对于任意信号的频谱, 使 用最多 3级位平面即可非常好地描述其谐波部分。 因此, 根据本发明的一个 应用实施例,可以对最大分量的位平面级数大于 3的当前矢量进行级数分解。 具体地, 可以通过如下方式对最大分量的位平面级数大于 3的当前矢量进行 级数分解: 提取当前矢量中高 3位平面的分量作为谐波矢量, 将提取高 3位 平面的分量后的每一级位平面作为一个单位脉冲矢量。 例如: 矢量
( 2,13,4,0,3,5,1,7 ) 中最大分量的位平面级数为 4, 从中可以首先得到表示谐 波的高 3位的分矢量( 1,6,2,0,1,2,0,3 ), 也即: 谐波矢量, 然后, 得到一层单 位脉冲矢量 ( 0,1,0,0,1,1,1,1 )。 根据位平面级数原理, 可以获知原矢量
( 2,13,4,0,3,5,1,7 ) 与两个分矢量 (1,6,2,0,1,2,0,3 )、 (0,1,0,0,1,1,1,1 ) 的关系 为. {2,13,4,0,3,5,1,7} = 2 χ {1,6,2,0,1,2,0,3} + {0,1,0,0,1,1,1,1 } 在本发明上述各实施例的编码方法中, 基础码本具体可以包括: 唯一标 识一个码字的码字标识、 该码字在基础码本中的位置索引以及编码该位置索 引所需的比特数。 相应的, 查询基石出码本中是否存在与当前矢量或当前分矢 量匹配的码字包括: 对当前矢量或当前分矢量进行多进制求和, 获得唯一标 识当前矢量或当前分矢量的矢量标识; 查询基础码本中是否存在与矢量标识 相同的码字标识。 对该码字在基础码本中的位置索引进行编码包括: 获取与 当前矢量或当前分矢量的矢量标识相同的码字标识对应的比特数, 并以该比 特数对当前矢量或当前分矢量的位置索引进行编码。 将矢量进行多进制求和 与基石出码本中的码字标识进行匹配, 因此, 在基础码本中仅仅存储码字标识 即可, 不需要再存储矢量本身, 从而进一步减少了编码装置的存储空间; 并 且, 存储码字标识相对于存储矢量本身, 更易于查询是否可基于基石出码本编 码当前矢量, 从而提高了编码效率。 如下表 1所示, 为多个矢量的相关信息 具体实例。
表 1 多个矢量的相关信息具体实例 (Lev— 2)
Figure imgf000017_0001
根据本发明的上述实施例,基石出码本中存储的内容包括上述表 1中的"矢 量的多进制和"、 "位置索引"与"编码位置索引所需的比特数 "三项内容。 具体 地, 对当前矢量或当前分矢量的位置索引进行编码即为: 对位置索引对应的 二进制码进行编码。 相应的, 在基石出码本中存储的内容为上述表 1中的"矢量 的多进制和"、 "位置索引"与"编码位置索引所需的比特数"三项内容时, 所需 占用的码本空间大小约为: 3* 10743比特。 其中, 3表示基石出码本中存储的上 述三项内容, 10743表示该实施例的基础码本中所包含的矢量总数。 在本发明上述各实施例的编码方法中, 基础码本具体也可以包括: 按照 编码各矢量匹配的码字在基石出码本中的位置索引所需的比特数大小依次排列 的矢量的多进制和列表、 各码本块中首码字的位置索引、 编码各码本块中各 码字的位置索引所需的比特数与各码本块中的码字数量。 其中, 基石出码本按 照编码码字的位置索引所需的比特数大小被划分成依次排列的各码本块, 在 各码本块的同一个码本块中, 编码各码字所需的比特数相同, 例如: 在码本 块 0中, 编码每一个码字所需要的比特数都是 8; 在码本块 1 中, 编码每一 个码字所需要的比特数都是 9。 相应的, 查询基础码本中是否存在与当前矢 量或当前分矢量匹配的码字包括: 对当前矢量进行多进制求和, 获得唯一标 识当前矢量的矢量标识; 查询多进制和列表中是否存在与该矢量标识相同的 多进制和。 若基础码本中存在与当前矢量匹配的码字, 对该码字在基础码本 中的位置索引进行编码包括: 若多进制和列表中存在与矢量标识相同的多进 制和, 则获取与矢量标识相同的多进制和在多进制和列表中的位置序号; 根 据各码本块中的码字数量, 确定位置序号所在的码本块以及在该码本块中的 位置与该码本块中首码字的位置之差; 根据在该码本块中的位置与该码本块 中首码字的位置之差、 以及所在的码本块中首码字的位置索引, 确定多进制 和对应的位置索引; 根据编码各码本块中各码字的位置索引所需的比特数, 获取编码多进制和对应的位置索引所需的比特数, 并以该比特数编码多进制 和对应的位置索引。 根据该实施例, 基础码本中存储的一个内容实例为: 各 码本块中首码字的位置索引, 表示为: Offset— 2bit[9] = {0, 8, 28, ...} , 和编码 各码本块中各码字的位置索引所需的比特数,表示为: BitSpan_2bit[9] = {8, 9, 10, ...} , 和各码本块中的码字数量, 表示为: Size_2bit[9] = {4, 6, 56, ...} , 和 以表 1中"矢量的多进制和"列表示的多进制和列表, 即:
ID_L2[ 10743] = {2, 6, 32768, 36864, 9, 22, 25, 24576, 25600, 37888, 3, 7, 8, 10, 18, 24, 26, 32, 36, 37, 70, 73, 86, · ..}。
根据该基石出码本实施例, 所需占用的码本空间大小约为: 10743+3*9, 其 中, 3表示基石出码本中存储的上述三项内容, 9表示上述基石出码本中共有 9个 码本块。 由此可知, 与基础码本中存储的内容为"矢量的多进制和"、 "位置索 引 "与 "编码位置索引所需的比特数 "相比, 该实施例中基石出码本所需的码本空 间降低了近 2/3 , 从而进一步减少了编码装置的存储空间。 以 Lev— 2为例, 基 于该基石出码本对一个矢量进行编码的一个实施例如下:
对该矢量进行多进制求和, 获得唯一标识当前矢量的矢量标识, 假设该 矢量标识为 25600; 查询多进制和列表中是否存在与该矢量标识相同的多进 制和;
若多进制和列表中存在与矢量标识相同的多进制和, 则获取与矢量标识 相同的多进制和在多进制和列表中的位置序号, 以矢量标识 25600为例, 位 置序号为 8;
根据各码本块中的码字数量, 确定位置序号所在的码本块以及在该码本 块中的位置与该码本块中首码字的位置之差, 基于上述实例, 根据各码本块 中的码字数量 Size— 2bit[9] = {4, 6, 56, ...} ,可知位置序号 8所在的码本块为块 1 , 其在该码本块 1中的位置与所在的码本块 1中首码字的位置之差为 4; 根据在该码本块中的位置与该码本块中首码字的位置之差、 以及所在的 码本块中首码字的位置索引, 确定多进制和对应的位置索引, 继续上述实例, 根据各码本块中首码字的位置索引 Offset_2bit[9] = {0, 8, 28, ...} , 可知码本块 1中首码字的位置索引为 8,根据在码本块 1中的位置与所在的码本块 1中首 码字的位置之差为 4、 所在的码本块 1中首码字的位置索引 8, 可以确定多进 制和对应的位置索引为 8+4=12;
根据编码各码本块中各码字的位置索引所需的比特数, 获取编码多进制 和对应的位置索引所需的比特数, 并以该比特数编码多进制和对应的位置索 引, 继续上述实例, 根据编码各码本块中各码字的位置索引所需的比特数 BitSpan_2bit[9] = {8, 9, 10, ...} , 可知编码码本块 2中各码字的位置索引所需 的比特数为 9, 以 9比特编码位置索引 12的二进制码 000001100。 具体地, 对最大分量的位平面级数为 1 的谐波矢量和单位脉冲矢量, 可 以进行二进制求和, 对最大分量的位平面级数为 2的谐波矢量, 可以进行四 进制求和, 对最大分量的位平面级数为 3的谐波矢量, 可以进行八进制求和。
进一步地, 按照对应的矢量在预设时段内的使用概率大小, 又可以将基 础码本划分为 M个子码本, 其中, M为大于 1的整数。 具体地, 可以按照在 预设时段内的使用概率由大到小的顺序, 来排列子码本。 相应的, 查询基石出 码本中是否存在与当前矢量或当前分矢量的矢量标识相同的位置索引时, 可 以针对 M个子码本中的第 1个子码本, 查询是否存在与矢量标识相同的位置 索引; 若存在, 则执行获取与矢量标识相同的码字标识对应的比特数的操作; 若不存在, 则以下一个子码本作为第 1个子码本, 开始执行获取与该矢量标 识相同的位置索引所在位置索引段对应的比特数操作, 通过对 M个子码本的 依次查询, 来获知基石出码本中是否存在与当前矢量或当前分矢量的矢量标识 相同的位置索引。 其中, 下一个小于或等于 M。 将基石出码本划分为多个子码 本后, 在某一个子码本中查询到与矢量标识相同的位置索引时, 可以及时跳 出查询流程, 从而不需要再对后续的基础码本进行查询, 减少了查询时间, 从而进一步提高了编码效率。
图 Ί为本发明编码方法又一个实施例的流程图。 如图 Ί所示, 该实施例 的流程包括:
步骤 301 , 从待编码系数中提取非零元素的符号信息, 获得绝对值系数, 并将提取的符号信息作为一个整体, 表示为参数 A, 进行编码, 得到符号 码流。 具体地, 若待编码系数为正, 则将该参数 A编码为 0, 若待编码系数 为正, 则将该参数 A编码为 1。
步骤 302, 将绝对值系数分解为多个 N维绝对值矢量, 其中, N为大于 零的整数, 例如: 8或 6。 为叙述方便, 本实施例中选择将绝对值系数分解 为多个 8维绝对值矢量, 即: N为 8。 当绝对值系数的数据长度不为 8的整数 倍时, 在最后部分补零, 使得绝对值系数的数据长度为 8的整数倍。 步骤 303 , 依次计算多个绝对值矢量中最大分量的位平面级数, 将其作 为一个整体, 表示为参数 B, 对该参数 B使用熵编码以节省比特, 获得边信 息码流。 其中, 可以选择熵编码可以是算术编码、 霍夫曼编码等。
步骤 304 , 以多个绝对值矢量中的第一个绝对值矢量作为当前矢量, 根 据步骤 303获得的当前矢量中最大分量的位平面级数,对当前矢量进行级数分 解, 将当前矢量分解为一个以上分矢量。 具体分解方法如下:
在最大分量的位平面级数小于或等于 3时, 不对当前矢量进行分解。 如 图 8a所示, 为本发明一个绝对值矢量 (2,1,0,3,2,1,0,1 ) 的示意图, 由于绝 对值矢量(2,1,0,3,2,1,0,1 ) 中最大分量的位平面级数位 2, 因此, 无需对其进 行分解。 再如图 8b所示, 为本发明绝对值矢量 ( 2,5,0,7,6,1,0,1 ) 和 ( 2,13,4,0,3,5,1 ,7 ) 的示意图, 由于绝对值矢量 (2,5,0,7,6,1 ,0,1 ) 中最大分 量的位平面级数位 3 , 因此, 也无需对其进行分解。
在最大分量的位平面级数大于 3时, 首先从当前矢量中提取高 3位平面的 分量作为一个分矢量, 即: 谐波矢量, 然后将剩余的位平面每一级作为一个 分矢量, 即: 单位脉冲矢量。 例如: 图 8b中的绝对值矢量(2,13,4,0,3,5,1,7 ) 中最大分量的位平面级数位 4,将其分解为一个高 3位的分矢量 { 1,6,2,0,1,2,0,3 } 和一个低位的分矢量 {0,1,0,0,1,1,1,1 }。
步骤 305 , 将当前矢量作为一个参数 C进行编码, 得到一个子码流, 该 子码流中包括编码方式标识; 或将当前矢量分解得到的一个以上分矢量, 按照位平面级数由高到低的顺序, 依次进行编码, 得到一个分矢量码流, 该 分矢量码流中包括编码方式标识, 然后按照位平面级数由高到低的顺序, 将 编码一个以上分矢量得到的一个以上分矢量码流, 按照高位码流到低位码流 的顺序合并, 获得当前矢量的子码流。 具体编码方式有如下几种情况。
第一, 若当前矢量为全零矢量, 则不对其进行编码, 可以有效的节省 编码所需比特数。
第二, 若当前矢量中最大分量的位平面级数为 1 , 则不对其进行级数分 解, 按照 Lev— 1编码模式、 选择 Lev— 1对应的码本对其进行高位平面编码。 第三, 若当前矢量中最大分量的位平面级数为 2, 则不对其进行级数分 解, 按照 Lev— 2编码模式、 选择 Lev— 2对应的码本对其进行高位平面编码。
第四, 若当前矢量中最大分量的位平面级数为 3 , 则不对其进行级数分 解, 按照 Lev— 3编码模式、 选择 Lev— 3对应的码本对其进行高位平面编码。
第五, 若当前矢量中最大分量的位平面级数大于 3 , 提取当前矢量中高 3位平面的分量作为谐波矢量, 并按照 Lev— 3编码模式对该谐波矢量进行高 位平面编码, 得到一个分矢量码流。 然后, 按位平面从高到低, 将提取高 3 位平面的分量后的低层位平面进行低位平面编码,该编码模式称为 Lev— 3L , 选择 Lev— 3 L对应的码本对其进行编码, 得到另一个分矢量码流, 之后将对 各分矢量编码得到的分矢量码流进行合并, 得到当前矢量的子码流。
以下对 Lev— 1、 Lev— 2、 Lev— 3和 Lev— 3L的码本结构进行说明。
对于 Lev— 1 , 即: 当前矢量的位平面级数为 1 , 在当前矢量的维数为 8 时,共有 255个矢量。在不对全零矢量进行编码时, Lev— 1的码本大小为 255。
对于 Lev— 2 , 即: 当前矢量中最大分量的位平面级数为 2, 在当前矢量 的维数为 8时, 共有 65536个矢量。 在实现本发明的过程中, 发明人发现其 中有很多矢量的出现概率非常小, 甚至在大样本实验中从未出现。 因此, 为了更为有效的利用编码装置的存储空间, 可以选择那些出现概率比较频 繁的矢量, 也即: 在预设时段内的使用概率大于预设值的矢量, 组成基础码 本。 对由于出现概率低未被选择的每个矢量, 也称为: 非基础码本, 采用 2比特对其中的每一个分量进行编码, 为了避免解码的二义性, 可以在编 码获得的码流前添加一个 2比特编码方式标识 1 1 , 以表示该矢量采用的编 码方式为独立编码。 按照出现概率的大小, 又可以将基础码本分成 3个子 码本, 如下表 2所示, 为 Lev— 2编码模式的一个基础码本结构实例。 根据表 2, Lev— 2编码模式下, 基础码本被分为 9个子码本。
表 2 Lev 2模式的一个基础码本结构实例 子码本号 Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 子码本大小 4 6 56 235 662 730 1317 2937 4796 其中, Q0采用 8比特进行编码, Q1采用 9比特进行编码, 依此类推, Q8采用 16比特进行编码。 对由于出现概率低未被选择的每个矢量中的分 量, 采用 2比特进行自然二进制编码。
对于 Lev— 3 , 即: 当前矢量中最大分量的位平面级数为 3或大于 3 , 与 Lev— 2类似, 按照同样的方式, 分成基础码本和非基础码本两部分。 对于 矢量的维数为 8时, Lev— 3编码模式的一个基础码本结构实例见表 3。 根据 表 3 , Lev 3编码模式下, 基础码本被分为 9个子码本。
表 3 Lev 3编码模式的一个基础码本结构实例
Figure imgf000023_0001
其中, Q0采用 8比特进行编码, Q1采用 9比特进行编码, 依此类推, Q8采用 16比特进行编码。 对由于出现概率低未被选择的每个矢量中的分 量, 采用 3比特进行自然二进制编码。
此外, 在矢量中最大分量的位平面级数大于 3时, 还需要对低位平面 进行编码, 其中所使用的码本称为 Lev— 3L, 大小为 256。
通过以上编码方式, 可以用尽可能少的比特编码出现频率高矢量, 从 而节省比特数。 在实际应用中, 可根据具体需要决定基础码本的大小。 一 般地, 基础码本越大, 编码效率越高, 相应地, 占用的编码装置的存储空 间也将增大。
以下以 Lev— 2编码模式的基础码本结构、 当前矢量的维数为 8为例, 说 明对最大分量的位平面级数为 2的当前矢量的编码方法, 对于 Lev— 3编码模 式的基础码本结构、 当前矢量的维数为其它值的情况, 同样适用:
为了减少存储空间, 本发明并不直接存储 8维矢量, 对当前矢量的 8个 分量进行多进制求和, 获得当前矢量的矢量标识。 具体地, 对于 Lev 1和 Lev— 3L, 进行二进制求和, 例如: 当前矢量为 { 1,0,0,0,1,0,0,1 } , 进行二进 制求和, 获得的矢量标识为 137。 对于 Lev— 2 , 进行四进制求和, 例如: 当 前矢量为 {0,1 ,0,2,2,1,3,2} , 进行四进制求和, 获得的矢量标识为 4766。 对 于 Lev— 3 , 进行八进制求和。 例如: 当前矢量为 {7,1,7,0,1,0,0,0} , 进行八进 制求和, 获得的矢量标识为 15172096;
在基础码本中查询是否存在与当前矢量标识相同的位置索引, 查询顺 序是从 Q0开始, 若在 Q0中查询到与当前矢量标识相同的位置索引, 获取 该位置索引所在位置索引段对应的比特数, 采用该比特数对该位置索引进 行编码。 否则, 若在 Q0中未查询到与当前矢量标识相同的位置索引, 则依 次选择 Ql、 Q2等, 进行与 Q0相同的查询、 编码过程, 依次类推, 直到查 询到与当前矢量标识相同的位置索引并对对应的位置索引进行编码, 退出 该查询过程。 若在最后一个子码本中仍未查询到与当前矢量标识相同的位 置索引, 说明当前矢量并不在该基础码本中。 此时, 对当前矢量进行单独 编码。 可选的单独编码包括自然二进制编码。 具体地: 对于 Lev— 2 , 对每 一个 8维矢量中的每一个分量, 采用 2比特直接编码,共使用 16比特; 此外, 在编码完毕后, 可以在当前矢量对应码流的起始位置添加 2比特的编码方 式标识 11 , 这样可以避免在解码端出现二义性错误, 以获得正确的解码结 果。
与 Lev— 2相比, 对于 Lev— 3 , 当前矢量不存在于基础码本中时, 对每一 个 8维矢量中每一个分量, 采用 3比特直接编码, 共使用 24比特; 此外, 在 编码完毕后, 可以在当前矢量对应码流的起始位置添加 2比特的编码方式 标识 11 , 这样, 以避免在解码端出现二义性错误, 以获得正确的解码结果。 因此, 对当前 8维矢量进行单独编码时, Lev— 2编码模式下共需 18比特, Lev— 3编码模式下共需 26比特。
对于 Lev— 1和 Lev— 3L, 由于矢量的数量并不是很多, 可以将所有的码 本包含在基础码本中, 因此, 只需一个码本并且该码本是完备的, 只需要 在该基础码本中搜索到相应的码字标识后, 采用相应的比特数对该码字标 识对应的索引编码即可。
步骤 306 , 按照边信息码流、 子码流、 符号码流的顺序, 合并边信息码 流、 子码流与符号码流, 得到第一码流并输出。 如图 9a所示, 为本发明第 一码流的一个结构示意图,图 9b为图 9a中子码流包括的分矢量码流的一个结 构示意图。
在图 7所示的上述实施例中, 由于从步骤 304-步骤 305的操作为对绝对 值矢量的一个编码处理过程, 因此, 由步骤 304-步骤 305过程的流程也称为绝 对值矢量编码流程。 方法, 将实现上述各第一编码方法的装置称为编码装置。 作为本发明再一个 实施例, 可以在本发明上述各实施例提供的第一编码方法与算术编码编码器 提供的算术编码编码方法之间进行切换, 从而在不同情况下实现编码方法之 间的灵活选择, 进而提高编码效率。 图 10为本发明编码方法再一个实施例的 流程图。 如图 10所示, 该实施例的流程包括:
步骤 401 , 通过第一编码方法对当前帧输入数据的待编码系数进行编码, 并在得到第一码流后, 统计编码当前帧输入数据的待编码系数所需的第一总 比特数; 以及采用算术编码编码器编码当前帧输入数据的待编码系数, 得到 第二码流, 该第二码流也称为算术编码码流, 并统计采用算术编码编码器编 码当前帧输入数据的待编码系数所需的第二总比特数。
步骤 402, 比较第一总比特数是否大于第二总比特数。 若第一总比特数 小于第二总比特数, 执行步骤 403。 否则, 若第一总比特数大于第二总比特 数, 执行步骤 404, 若第一总比特数等于第二总比特数, 执行步骤 405。
步骤 403 , 在第一码流的起始位置设置第一标识, 形成第一比特流, 并 将该第一比特流传送给接收端, 第一标识用于标识第一比特流为第一码流。 之后, 不再执行本实施例的后续流程。 步骤 404, 在第二码流的起始位置设置第二标识, 形成第二比特流, 并 将该第二比特流传送给接收端, 第二标识用于标识第二比特流为第二码流。 之后, 不再执行本实施例的后续流程。
步骤 405 , 根据预先设置, 选择第一码流或第二码流, 并在选择的第一 码流或第二码流的起始位置相应设置第一标识或第二标识, 形成第一比特流 或第二比特流。
步骤 406, 将形成的第一比特流或第二比特流传送给接收端。 到的码流发送给接收端, 由接收端的解码装置采用与编码方法相应的解码方 法, 对码流进行相应的解码, 恢复出第一编码前的相应待编码系数。
图 11为本发明解码方法一个实施例的流程图。 如图 11所示, 该实施例 的解码方法包括:
步骤 501 , 接收第一码流, 该第一码流包括边信息码流、 矢量码流与符 号码流, 矢量码流包括对应于多个矢量的子码流。
步骤 502, 对第一码流中的边信息码流进行解码, 获得多个矢量中最大 分量的位平面级数。
步骤 503 , 分别根据多个矢量中最大分量的位平面级数, 对多个子码流 进行解码, 得到基础码本中分别与多个矢量匹配的码字在基础码本中的位置 索引。
步骤 504, 根据位置索引, 分别获取多个矢量的绝对值矢量。
步骤 505 , 解码第一码流中的符号码流, 得到多个矢量的符号信息。 步骤 506, 分别将多个矢量的符号信息赋予多个矢量的绝对值矢量, 得 到多个矢量。
步骤 507, 根据多个矢量恢复出待编码系数。
在图 11所示实施例的解码方法中, 基石出码本具体可以包括: 唯一标识一 个码字的码字标识、 该码字在基础码本中的位置索引以及编码该位置索引所 需的比特数。 即: 与编码方法实施例相应, 在基础码本中存储的内容为上述 表 1中的"矢量的多进制和"、 "位置索引"与"编码位置索引所需的比特数 "三项 内容。 相应的, 步骤 504包括: 分别从基石出码本中获取与多个矢量匹配的码 字在基础码本中的位置索引对应的多个码字标识; 分别以多个码字标识作为 矢量标识, 获取相应的绝对值矢量, 矢量标识为一个绝对值矢量进行多进制 求和后获得的唯一标识绝对值矢量的标识。
另外, 与编码方法实施例相应, 在图 11所示实施例的解码方法中, 基石出 码本具体也可以包括: 按照编码各矢量匹配的码字在基础码本中的位置索引 所需的比特数大小依次排列的矢量的多进制和列表、 各码本块中首码字的位 置索引、 编码各码本块中各码字的位置索引所需的比特数与各码本块中的码 字数量。 其中, 基础码本按照编码码字的位置索引所需的比特数大小被划分 成依次排列的各码本块, 在各码本块的同一个码本块中, 编码各码字所需的 比特数相同。 即: 基石出码本中存储的一个内容实例为: 各码本块中首码字的 位置索引 Offset— 2bit[9] = {0, 8, 28, ...} , 和编码各码本块中各码字的位置索引 所需的比特数 BitSpan_2bit[9] = {8, 9, 10, ...} , 和各码本块中的码字数量 Size— 2bit[9] = {4, 6, 56, ...} , 和以表 1中"矢量的多进制和"列表示的多进制和 列表。 即: 与编码方法实施例相应, 在基石出码本中存储的内容为上述表 1 中 的"矢量的多进制和"、 "位置索引 "与"编码位置索引所需的比特数 "三项内容。 相应的, 步骤 503包括: 针对每一个子码流, 以码本块 0作为当前码本块, 获取编码当前码本块中各码字的位置索引所需的第一比特数, 从多个子码流 中读取该第一比特数的数据, 得到第一数值, 以及根据当前码本块中首码字 的位置索引与当前码本块中的码字数量确定当前码本块中最后一个码字的位 置索引; 比较第一数值是否大于最后一个码字的位置索引的大小; 若不大于 最后一个码字的位置索引的大小, 则获取第一数值与当前码本块中首码字的 位置索引之差的第一差值,并以该第一差值作为在当前码本块中的相对位置, 从多进制和列表中获取第一数值对应的多进制和; 若大于最后一个码字的位 置索引的大小, 则以作为下一个码本块的当前码本块的下一个码本块作为当 前码本块, 获取编码当前码本块中各码字的位置索引所需的第二比特数, 并 计算第二比特数与第一比特数之差的第二差值; 从多个子码流中再读取第二 差值比特数的数据, 并与第一数值形成第二数值, 并以该第二数值作为第一 数值, 执行根据当前码本块中首码字的位置索引与当前码本块中的码字数量 确定当前码本块中最后一个码字的位置索引的操作。 相应的, 步骤 504包括: 按照多进制减法, 获取与第一数值对应的多进制和相应的绝对值矢量。 与编 码方法实施例相应, 基于该基础码本对一个子码流进行解码的一个实施例如 下:
针对每一个子码流, 以第一码本块, 也即码本块 0作为当前码本块, 获 取编码当前码本块中各码字的位置索引所需的第一比特数, 从多个子码流中 读取该第一比特数的数据, 得到第一数值, 以及根据当前码本块中首码字的 位置索引与当前码本块中的码字数量确定当前码本块中最后一个码字的位置 索引。 与编码方法实施例中矢量标识 25600的实例相应, 根据编码各码本块 中各码字的位置索引所需的比特数 BitSpan— 2bit[9] = {8, 9, 10, ...} , 可知编码 码本块 0 中各码字的位置索引所需的第一比特数为 8 , 从多个子码流中读取 该 8比特数的数据, 得到第一数值 000001 10, 即: 十进制数值 6; 根据当前 码本块 0中首码字的位置索引 0与当前码本块中的码字数量 4确定当前码本 块中最后一个码字的位置索引为 3;
比较第一数值是否大于最后一个码字的位置索引的大小。继续上述实例, 比较第一数值 6是否大于最后一个码字的位置索引的大小 3 ;
若不大于最后一个码字的位置索引的大小, 说明解码所得第一数值在当 前码本块中, 则获取第一数值与当前码本块中首码字的位置索引之差的第一 差值, 并以该第一差值作为在当前码本块中的相对位置, 从多进制和列表中 获取第一数值对应的多进制和。 继续上述实例, 若第一数值为 2, 说明解码 所得第一数值 2在码本块 0中, 则获取第一数值 2与码本块 0中首码字的位 置索引 0之差的第一差值 2, 并以该第一差值 2作为在码本块 0中的相对位 置, 从多进制和列表中获取第一数值对应的多进制和, 即为: 32768;
若大于最后一个码字的位置索引的大小, 则以当前码本块的下一个码本 块作为当前码本块, 获取编码当前码本块中各码字的位置索引所需的第二比 特数, 并计算第二比特数与第一比特数之差的第二差值; 从多个子码流中再 读取第二差值比特数的数据, 并与第一数值形成第二数值, 并以该第二数值 作为第一数值, 执行根据当前码本块中首码字的位置索引与当前码本块中的 码字数量确定当前码本块中最后一个码字的位置索引的操作, 直到第一数值 不大于最后一个码字的位置索引的大小为止。 继续上述实例, 第一数值 6大 于最后一个码字的位置索引的大小 3 , 以码本块 1作为当前码本块, 才艮据编 码各码本块中各码字的位置索引所需的比特数 BitSpan— 2bit[9] = {8, 9, 10, ...} , 获取编码码本块 1中各码字的位置索引所需的第二比特数 9, 并计算 第二比特数 9与第一比特数 8之差的第二差值 1 , 从多个子码流中再读取 1 比特数的数据, 并与第一数值 00000110形成第二数值 000001100, 即十进 制数值 12 , 再与码本块 1 中的最后一个元素 000001101 比较, 获知 000001100小于 000001101 , 可知 000001 100属于码本块 1。 根据各码本 块中首码字的位置索引 Offset— 2bit[9] = {0, 8, 28, ...} , 可知码本块 1中首码字 的位置索引为 8, 获取 12与码本块 1中首码字的位置索引 8之差的第一差值 4, 并以该第一差值 4作为在当前码本块中的相对位置, 即: 位置索引 12对 应的当前码本块中的位置与该当前码本块中首码字的位置之差, 从多进制和 列表中获取 12对应的多进制和 25600;
按照多进制减法, 获取与第一数值对应的多进制和相应的绝对值矢量, 继续上述实例,按照四进制减法, 获取与 25600对应的绝对值矢量 ( 1, 2, 1, 0, 0, 0, 0,0 )。
与本发明上述实施例提供的编码方法相应, 在编码端采用一种以上的编 码方式对待编码系数编码时, 子码流中包括编码方式标识, 编码方式标识用 于标识该子码流为对位置索引进行编码或绝对值矢量进行单独编码的编码方 式。 相应的, 通过步骤 502获得多个矢量中最大分量的位平面级数之后, 还 包括: 识别子码流中编码方式标识所标识的编码方式; 若编码方式标识所标 识的编码方式为对位置索引进行编码, 则执行步骤 503 ; 否则, 若编码方式 标识所标识的编码方式为对绝对值矢量进行单独编码, 则根据绝对值矢量中 最大分量的位平面级数对应的解码方式, 直接对子码流进行解码, 获得绝对 值矢量。
另外, 与图 7所示的实施例相应, 若编码过程中根据绝对值矢量中最大 分量的位平面级数, 对绝对值矢量进行级数分解, 将绝对值矢量分解为一个 以上分矢量, 该一个以上的分矢量包括高位平面矢量, 并且, 子码流中包括 编码方式标识, 则步骤 503具体可以通过以下方式实现: 分别根据多个绝对 值矢量中最大分量的位平面级数, 识别该绝对值矢量对应的一个以上分矢量 码流; 依次以多个绝对值矢量中每一个绝对值矢量的最大分量的位平面级数 作为当前位平面级数, 根据该当前位平面级数, 识别相应绝对值矢量对应的 所述一个以上分矢量码流; 依次以一个以上分矢量码流中的一个分矢量码流 作为当前分矢量码流, 识别当前分矢量码流中编码方式标识所标识的编码方 式; 若所标识的编码方式为对位置索引进行编码, 从基础码本中获取与当前 分矢量匹配的码字在基础码本中的位置索引; 以该位置索引作为矢量标识, 获取该矢量标识对应的当前分矢量, 该矢量标识为当前分矢量进行多进制求 和后获得的唯一标识当前分矢量的标识; 若所标识的编码方式为对当前分矢 量进行单独编码, 则直接对当前分矢量进行解码, 获得当前分矢量。 相应的, 步骤 504为: 对一个以上分矢量码流解码获得的一个以上分矢量进行合成, 得到绝对值矢量。
进一步地, 若一个以上分矢量还包括低位平面矢量, 其中, 高位平面矢 量为谐波矢量, 谐波矢量编码得到的分矢量码流为高位码流, 低位平面矢量 为单位脉冲矢量, 单位脉冲矢量编码得到的分矢量码流为低位码流, 则一个 以上分矢量码流包括高位码流与低位码流。 在分矢量码流中, 高位码流与低 位码流按照对应的分矢量中最大分量的位平面级数由高到低的顺序排列。 相 应的, 依次以一个以上分矢量码流中的一个分矢量码流作为当前分矢量码流 具体为: 按照对应的分矢量中最大分量的位平面级数由高到低的顺序, 依次 以高位码流、 低位码流作为当前分矢量码流。
与图 10所示的实施例相应,若发送端可以在第一编码方法与算术编码编 码方法之间进行切换, 则在接收端, 可以采用相应的解码方法实施例对接收 到的比特流进行解码。 图 12为本发明解码方法另一个实施例的流程图, 如图 12所示, 该实施例的解码方法包括:
步骤 601 , 接收比特流, 该比特流为第一比特流或第二比特流, 其中, 第一比特流中包括第一标识与第一码流, 第二比特流中包括第二标识与第二 码流。
步骤 602, 根据比特流中包括第一标识或第二标识, 识别比特流是否为 第一比特流。 若为第一比特流, 执行步骤 603; 否则, 若为第二比特流, 执 行步骤 604。
步骤 603 , 针对第一比特流中的第一码流, 通过步骤 502-步骤 507所示 的流程对第一码流进行解码, 恢复出当前帧数据的待编码系数。 之后, 不再 执行本实施例的后续流程。
步骤 604, 针对第二比特流中的第二码流, 采用算术编码解码器对第二 比特流中的第二码流进行解码, 恢复出当前帧数据的待编码系数。
图 13为本发明编码装置一个实施例的结构示意图,该实施例的编码装置 可用于实现本发明上述实施例的编码方法。 如图 13所示, 该实施例的编码装 置包括: 第一编码模块 701、 第二编码模块 702、 第一合并模块 703与第二合 并模块 704。 其中, 第一编码模块 701 用于对获得的待编码系数中的符号信 息进行编码, 获得符号码流, 以及分别对该待编码系数分解成的多个矢量中 最大分量的位平面级数进行编码, 获得边信息码流。 第二编码模块 702用于 依次获取基础码本中与多个矢量匹配的码字在基础码本中的位置索引并进行 编码, 得到多个子码流, 其中, 基石出码本中码字对应的矢量在预设时段内的 使用概率大于预设值。 第一合并模块 703用于将第二编码模块 702编码得到 的多个子码流进行合并, 得到矢量码流。 第二合并模块 704用于对第一编码 模块 701获得的边信息码流、 第一合并模块 703合并得到的矢量码流与第一 编码模块 701获得的符号码流进行合并, 得到第一码流。
图 14为本发明编码装置另一个实施例的结构示意图, 与图 13所示的实 施例相比, 该实施例中, 第一编码模块 701 包括第一去除单元 801、 第一分 解单元 802与第一编码单元 803。 其中, 第一去除单元 801用于去除获得的 待编码系数中的符号信息, 获得绝对值系数。 第一分解单元 802用于将第一 去除单元 801获得的绝对值系数分解为维数相同的多个绝对值矢量, 该多个 绝对值矢量即为图 13 中所示实施例中的多个矢量。 相应的, 第二编码模块 702用于依次获取基石出码本中与第一分解单元 802分解得到的多个绝对值矢 量匹配的码字在基础码本中的位置索引并进行编码, 得到多个子码流, 第一 编码单元 803用于依次计算第一分解单元 802分解得到的多个绝对值矢量中 最大分量的位平面级数并进行编码,获得边信息码流,并对第一去除单元 801 去除的符号信息进行编码, 获得符号码流。 相应的, 第二合并模块 704用于 对第一编码单元 803编码得到的边信息码流、 第一合并模块 703合并得到的 矢量码流与第一编码单元 803编码得到的符号码流进行合并,得到第一码流。
图 15为本发明编码装置又一个实施例的结构示意图, 与图 13所示的实 施例相比, 该实施例中, 第一编码模块 701 包括第二分解单元 811、 第二编 码单元 812、 第二去除单元 813 与第三编码单元 814。 其中, 第二分解单元 811 用于将获得的待编码系数分解为维数相同的多个目标矢量, 该多个目标 矢量即为图 13中所示实施例中的多个矢量。 相应的, 第二编码模块 702用于 依次获取基础码本中与第二分解单元 811分解得到的多个目标矢量匹配的码 字在基石出码本中的位置索引并进行编码,得到多个子码流,第二编码单元 812 用于依次计算第二分解单元 811分解得到的多个目标矢量中最大分量的位平 面级数并进行编码, 获得边信息码流。 第二去除单元 813用于分别去除第二 分解单元 811分解得到的多个目标矢量中的符号信息,获得多个绝对值矢量。 第三编码单元 814用于对第二去除单元 813去除的符号信息进行编码, 获得 符号码流。 相应的, 第二合并模块 704用于对第二编码单元 812编码得到的 边信息码流、 第一合并模块 703合并得到的矢量码流与第三编码单元 814编 码得到的符号码流进行合并, 得到第一码流。
在上述实施例所示的编码装置中, 第二编码模块 702具体可以包括: 查 询单元 821、 第四编码单元 822与设置单元 823。 其中, 查询单元 821用于以 第一编码模块 701分解得到的多个矢量中的第一个矢量作为当前矢量, 查询 基础码本中是否存在与当前矢量匹配的码字。 具体地, 该多个矢量可以是第 一分解单元 802分解得到的多个绝对值矢量, 也可以是第二分解单元 811分 解得到的多个目标矢量。 第四编码单元 822用于根据查询单元 821的查询结 果, 在基础码本中存在与当前矢量匹配的码字时, 对该码字在基础码本中的 位置索引进行编码, 得到子码流, 其中的位置索引中包括一个编码方式标识; 在基石出码本中不存在与当前矢量匹配的码字, 对当前矢量进行单独编码, 并 在单独编码获得的码流的起始位置设置一个编码方式标识, 得到子码流。 其 中的编码方式标识用于标识子码流为对当前矢量进行单独编码的编码方式。 设置单元 823用于在第四编码单元 822编码获得子码流后,指示查询单元 821 以多个矢量中当前矢量的下一个矢量作为当前矢量, 查询基石出码本中是否存 在与作为当前矢量的下一个矢量匹配的码字, 直到得到多个矢量对应的子码 流。 相应的, 第一合并模块 703用于根据设置单元 823的指示, 在全部得到 多个矢量对应的子码流后, 将第四编码单元 822编码得到的多个子码流进行 合并, 得到矢量码流。 图 16为本发明编码装置再一个实施例的结构示意图, 该实施例基于图 14所示的编码装置。 图 17为本发明编码装置还一个实施例 的结构示意图, 该实施例基于图 15所示的编码装置。 进一步地, 再参见图 16与图 17, 第二编码模块 702还可以包括: 第一 获取单元 824、 分解单元 825与合并单元 826。 其中, 第一获取单元 824用于 以多个矢量中的第一个矢量作为当前矢量, 获取当前矢量中最大分量的位平 面级数, 具体地, 该多个矢量可以是第一分解单元 802分解得到的多个绝对 值矢量,也可以是第二分解单元 811分解得到的多个目标矢量。分解单元 825 用于根据第一获取单元 824获取到的当前矢量中最大分量的位平面级数, 对 当前矢量进行级数分解, 将当前矢量分解为一个以上分矢量, 该一个以上的 分矢量包括高位平面矢量。 相应的, 查询单元 821具体以分解单元 825分解 得到的一个以上分矢量中的第一个分矢量作为当前分矢量, 查询基石出码本中 是否存在与当前分矢量匹配的码字。第四编码单元 822具体根据查询单元 821 的查询结果, 在基础码本中存在与当前分矢量匹配的码字时, 对该码字在基 础码本中的位置索引进行编码, 得到分矢量码流, 其中的位置索引中包括一 个编码方式标识; 在基础码本中不存在与当前分矢量匹配的码字时, 对当前 分矢量进行单独编码, 并在编码获得的码流的起始位置设置一个编码方式标 识, 得到分矢量码流。 相应的, 设置单元 823具体指示查询单元 821以一个 以上分矢量中当前分矢量的下一个分矢量作为当前分矢量, 查询基石出码本中 是否存在与作为当前分矢量的下一个分矢量匹配的码字。 合并单元 826用于 根据设置单元 823的指示, 在第四编码单元 822编码得到一个以上分矢量中 最后一个分矢量对应的分矢量码流时, 将第四编码单元 822编码得到的一个 以上分矢量编码得到的分矢量码流进行合并, 得到当前矢量的子码流。
另外, 在本发明上述实施例提供的任意编码装置中, 都可以包括第一存 储模块 705 , 用于存储基础码本, 该基础码本包括: 唯一标识一个码字的码 字标识、该码字在基石出码本中的位置索引以及编码该位置索引所需的比特数。 相应的, 查询单元 821具体对当前矢量或当前分矢量进行多进制求和, 获得 唯一标识当前矢量或当前分矢量的矢量标识, 并查询基础码本中是否存在与 矢量标识相同的码字标识。相应的,第四编码单元 822具体根据查询单元 821 的查询结果, 在基础码本中存在与矢量标识相同的码字标识时, 获取与矢量 标识相同的码字标识对应的比特数, 并以该比特数对位置索引进行编码。
或者, 在本发明上述实施例提供的任意编码装置中, 都可以包括第二存 储模块 706, 用于存储基础码本, 该基础码本包括: 基础码本包括: 按照编 码各矢量匹配的码字在基础码本中的位置索引所需的比特数大小依次排列的 矢量的多进制和列表、 各码本块中首码字的位置索引、 编码各码本块中各码 字的位置索引所需的比特数与各码本块中的码字数量。 其中, 基础码本按照 编码码字的位置索引所需的比特数大小被划分成依次排列的各码本块, 在各 码本块的同一个码本块中, 编码各码字所需的比特数相同。 相应的, 查询单 元 821具体对当前矢量或当前分矢量进行多进制求和, 获得唯一标识当前矢 量或当前分矢量的矢量标识, 并查询第二存储模块 706的基石出码本的多进制 列表中是否存在与矢量标识相同的多进制和。 第四编码单元 822具体根据查 询单元 821的查询结果,在多进制列表中存在与矢量标识相同的多进制和时, 获取与矢量标识相同的多进制和在多进制和列表中的位置序号; 根据各码本 块中的码字数量, 确定位置序号所在的码本块以及在该码本块中的位置; 根 据在该码本块中的位置与所在的码本块中首码字的位置索引, 确定多进制和 对应的位置索引; 根据编码各码本块中各码字的位置索引所需的比特数, 获 取编码多进制和对应的位置索引所需的比特数, 并以该比特数编码多进制和 对应的位置索引。 其中的两个实施例分别如图 16与图 17所示。
若基石出码本包括按照对应的矢量在预设时段内的使用概率大小划分的 M 个子码本, 其中, M为大于 1的整数。 则相应的, 查询单元 821具体针对 M 个子码本中的第 1个子码本, 查询多进制和列表中是否存在与矢量标识相同 的多进制和; 若存在, 则开始执行获取与该矢量标识相同的多进制和在多进 制和列表中的位置序号的操作; 若不存在, 则以下一个子码本作为第 1个子 码本, 开始执行查询多进制和列表中是否存在与该矢量标识相同的多进制和 的操作, 其中的下一个小于或等于 M。 图 18为本发明编码系统一个实施例的结构示意图,该实施例的编码系统 可用于实现如本发明图 10所示实施例的流程。 如图 18所示, 该实施例的编 码系统包括: 算术编码编码器 11、 编码装置 12、 第一接收装置 13、 统计装 置 14、 比较装置 15与传送装置 16。 其中, 算术编码编码器 11用于编码当前 帧输入数据的待编码系数, 得到第二码流, 该第二码流也称为算术编码码流。 编码装置 12用于编码当前帧输入数据的待编码系数, 得到第一码流, 其具体 可以通过本发明上述图 13至 17任一实施例的编码装置实现。 第一接收装置 13用于接收当前帧输入数据的待编码系数,并分别发送给算术编码编码器 11 与编码装置 12。 统计装置 14用于统计采用编码装置 12编码当前帧输入数据 的待编码系数所需的第一总比特数,以及统计采用算术编码编码器 11编码当 前帧输入数据的待编码系数所需的第二总比特数。比较装置 15用于比较统计 装置 14统计得到的第一总比特数是否大于第二总比特数。 传送装置 16用于 根据比较装置 15的比较结果, 在第一总比特数小于第二总比特数时, 在编码 装置 12编码得到的第一码流的起始位置设置第一标识, 形成第一比特流, 并 将该第一比特流传送给接收端, 其中的第一标识用于标识第一比特流为第一 码流; 在第一总比特数大于第二总比特数时, 在第二码流的起始位置设置第 二标识, 形成第二比特流, 并将该第二比特流传送给接收端, 其中的第二标 识用于标识第二比特流为第二码流; 在第一总比特数等于第二总比特数时, 根据预先设置, 选择第一码流或第二码流, 并在选择的第一码流或第二码流 的起始位置相应设置第一标识或第二标识, 并将形成的第一比特流或第二比 特流传送给接收端。
图 19为本发明解码装置一个实施例的结构示意图,该实施例的解码装置 可用于实现本发明上述实施例的解码方法。 如图 19所示, 该实施例的解码装 置包括第二接收模块 711、 第一解码模块 712、 第二解码模块 713、 第一获取 模块 714、 第三解码模块 715、 第二获取模块 716与恢复模块 717。 其中, 第 二接收模块 711用于接收发送端发送的第一码流, 该第一码流包括边信息码 流、 矢量码流与符号码流, 矢量码流包括对应于多个矢量的子码流。 第一解 码模块 712用于对第二接收模块 711接收到的第一码流中的边信息码流进行 解码, 分别获得多个矢量中最大分量的位平面级数。 第二解码模块 713用于 分别才艮据第一解码模块 712解码得到的多个矢量中最大分量的位平面级数, 对多个子码流进行解码, 得到基础码本中分别与多个矢量匹配的码字在基石出 码本中的位置索引。 第一获取模块 714用于根据第二解码模块 713解码得到 的位置索引, 分别获取多个矢量的绝对值矢量。 第三解码模块 715用于解码 第二接收模块 711接收到的第一码流中的符号码流, 得到多个矢量的符号信 息。 第二获取模块 716用于分别将第三解码模块 715解码得到的多个矢量的 符号信息赋予第一获取模块 714获取到的多个矢量的绝对值矢量, 得到多个 矢量。 恢复模块 717用于根据第二获取模块 716得到的多个矢量, 恢复出待 编码系数。
图 20为本发明解码装置另一个实施例的结构示意图, 与图 19所示的实 施例相比, 该实施例的编码装置还包括第一存储模块 705 , 用于存储基石出码 本, 该基础码本包括: 唯一标识一个码字的码字标识、 该码字在基础码本中 的位置索引以及编码该位置索引所需的比特数。 相应的, 第一获取模块 714 包括: 第二获取单元 841与第三获取单元 842。 其中, 第二获取单元 841用 于分别从第一存储模块 705存储的基石出码本中获取与多个矢量匹配的码字在 基石出码本中的位置索引对应的多个码字标识。 第三获取单元 842用于以第二 获取单元 841获取的多个码字标识作为矢量标识, 获取相应的绝对值矢量, 矢量标识为一个绝对值矢量进行多进制求和后获得的唯一标识绝对值矢量的 标识。 相应的, 第二获取模块 716用于分别将第三解码模块 715解码得到的 多个矢量的符号信息赋予第二获取单元 841 获取到的多个矢量的绝对值矢 量, 得到多个矢量。
或者, 与图 19所示的实施例相比, 该实施例的编码装置还包括第二存储 模块 706, 用于存储基础码本, 该基石出码本包括: 按照编码各矢量匹配的码 字在基础码本中的位置索引所需的比特数大小依次排列的矢量的多进制和列 表、 各码本块中首码字的位置索引、 编码各码本块中各码字的位置索引所需 的比特数与各码本块中的码字数量。 其中, 基础码本按照编码码字的位置索 引所需的比特数大小被划分成依次排列的各码本块, 在各码本块的同一个码 本块中, 编码各码字所需的比特数相同。 相应的, 第二解码模块 713具体用 于分别根据多个矢量中最大分量的位平面级数, 针对每一个子码流, 以第一 码本块作为当前码本块, 获取编码当前码本块中各码字的位置索引所需的第 一比特数, 从多个子码流中读取该第一比特数的数据, 得到第一数值, 以及 根据当前码本块中首码字的位置索引与当前码本块中的码字数量确定当前码 本块中最后一个码字的位置索引; 比较第一数值是否大于最后一个码字的位 置索引的大小; 若不大于最后一个码字的位置索引的大小, 则获取第一数值 与当前码本块中首码字的位置索引之差的第一差值, 并以该第一差值作为在 当前码本块中的相对位置,从多进制和列表中获取第一数值对应的多进制和; 若大于最后一个码字的位置索引的大小, 则以作为下一个码本块的当前码本 块的下一个码本块作为当前码本块, 获取编码当前码本块中各码字的位置索 引所需的第二比特数, 并计算第二比特数与第一比特数之差的第二差值; 从 多个子码流中再读取第二差值比特数的数据, 并与第一数值形成第二数值, 并以该第二数值作为第一数值, 执行根据当前码本块中首码字的位置索引与 当前码本块中的码字数量确定当前码本块中最后一个码字的位置索引的操 作。 第一获取模块 Ί 14具体按照多进制减法, 获取与第一数值对应的多进制 和相应的绝对值矢量。
另外, 第二接收模块 711接收到的第一码流中的子码流还可以包括编码 方式标识, 该编码方式标识用于标识子码流为对位置索引进行编码或对绝对 值矢量进行单独编码的编码方式。 相应的, 图 21为本发明解码装置又一个实 施例的结构示意图,与图 20所示的实施例相比,该实施例的解码装置还包括: 识别模块 718与解码处理模块 719。 其中, 识别模块 718用于识别第二接收 模块 711接收到的第一码流中的子码流中编码方式标识所标识的编码方式。 解码处理模块 719用于根据识别模块 718的识别结果, 在编码方式标识所标 识的编码方式为对位置索引进行编码时, 指示第二解码模块 713依次对多个 子码流进行解码; 在所标识的编码方式为对绝对值矢量进行单独编码时, 根 据绝对值矢量中最大分量的位平面级数对应的解码方式, 直接对子码流进行 解码, 获得绝对值矢量。
另外, 第二接收模块 711接收到的第一码流中的子码流可以包括一个以 上分矢量编码得到的一个以上分矢量码流, 其中一个以上的分矢量由根据绝 对值矢量中最大分量的位平面级数对绝对值矢量进行级数分解得到, 一个以 上的分矢量包括高位平面矢量, 子码流中还包括编码方式标识, 该编码方式 标识用于标识分矢量码流为对位置索引进行编码或对分矢量进行单独编码的 编码方式。 相应的, 图 22为本发明解码装置再一个实施例的结构示意图, 与 图 20所示的实施例相比, 该实施例的解码装置中, 第二解码模块 713包括: 第一识别单元 843、 第二识别单元 844与第四获取单元 845。 其中, 第一识别 单元 843用于依次以第一解码模块 712获得的多个绝对值矢量中每一个绝对 值矢量的最大分量的位平面级数作为当前位平面级数, 根据该位平面级数, 识别绝对值矢量对应的一个以上分矢量码流,该绝对值矢量即为图 20所示实 施例中的矢量。 第二识别单元 844用于依次以第一识别单元 843识别出的一 个以上分矢量码流中的一个分矢量码流作为当前分矢量码流, 识别当前分矢 量码流中编码方式标识所标识的编码方式。 第四获取单元 845用于根据第二 识别单元 844的识别结果, 在所标识的编码方式为对位置索引进行编码时, 从第一存储模块 705存储的基石出码本中获取与当前分矢量匹配的码字在基石出 码本中的位置索引, 以该位置索引作为矢量标识, 获取该矢量标识对应的当 前分矢量。 其中的矢量标识为当前分矢量进行多进制求和后获得的唯一标识 当前分矢量的矢量标识; 在所标识的编码方式为对当前分矢量进行单独编码 时, 直接对当前分矢量进行解码, 获得当前分矢量。 相应的, 第一获取模块 714对第四获取单元 845获得的一个以上分矢量进行合成, 得到绝对值矢量。 另外, 一个以上分矢量还可以包括低位平面矢量, 其中的高位平面矢量 为谐波矢量, 低位平面矢量为单位脉冲矢量, 谐波矢量编码得到的分矢量码 流为高位码流, 单位脉冲矢量编码得到的分矢量码流为低位码流, 一个以上 分矢量码流包括高位码流与低位码流, 在分矢量码流中, 高位码流与低位码 流按照对应的分矢量中最大分量的位平面级数由高到低的顺序排列。相应的, 第二识别单元 844具体按照对应的分矢量中最大分量的位平面级数由高到低 的顺序, 依次以高位码流、 位码流作为当前分矢量码流, 识别当前分矢量 码流中编码方式标识所标识的编码方式。
图 23为本发明解码系统一个实施例的结构示意图,该实施例的解码系统 可用于实现如本发明图 12所示实施例的流程。 如图 23所示, 该实施例的解 码系统包括: 算术编码解码器 21、 解码装置 22、 第二接收装置 23、 识别装 置 24与解码处理装置 25。 其中, 第二接收装置 23用于接收由发送端发送的 比特流, 该比特流为第一比特流或第二比特流, 其中, 第一比特流中包括第 一标识与第一码流, 第二比特流中包括第二标识与第二码流。 识别装置 24用 于根据比特流中包括第一标识或第二标识,识别第二接收装置 23接收到的比 特流为第一比特流或第二比特流。 解码处理装置 25用于根据识别装置 24的 识别结果,在比特流为第一比特流时,指示解码装置 22对第一码流进行解码; 在比特流为第二比特流时, 指示算术编码解码器 21对第二码流进行解码。 算 术编码解码器 21 用于对第二码流进行解码, 恢复出当前帧数据的待编码系 数,解码装置 22用于对第一码流进行解码,恢复出当前帧数据的待编码系数。
图 24为本发明通信系统一个实施例的结构示意图。 如图 24所示, 该实 施例的通信系统包括编码装置 1与解码装置 2。 其中, 编码装置 1用于对获 得的待编码系数中的符号信息进行编码, 获得符号码流, 以及分别对待编码 系数分解成的多个矢量中最大分量的位平面级数进行编码,获得边信息码流; 依次获取基础码本中与多个矢量匹配的码字在基础码本中的位置索引并进行 编码, 得到多个子码流, 基石出码本中码字对应的矢量在预设时段内的使用概 率大于预设值; 将多个子码流进行合并, 得到矢量码流; 对边信息码流、 矢 量码流与符号码流进行合并, 得到第一码流并传送给解码装置 2。 该编码装 置 1具体可以通过本发明图 13至图 17所示任一实施例的编码装置实现。
解码装置 2用于接收第一码流; 对边信息码流进行解码, 获得多个矢量 中最大分量的位平面级数; 分别根据多个矢量中最大分量的位平面级数, 对 多个子码流进行解码, 得到基础码本中分别与多个矢量匹配的码字在基础码 本中的位置索引; 根据位置索引, 分别获取多个矢量的绝对值矢量; 解码符 号码流, 得到多个矢量的符号信息; 分别将多个矢量的符号信息赋予多个矢 量的绝对值矢量, 得到多个矢量; 根据多个矢量恢复出待编码系数。 该解码 装置 2具体可以通过本发明图 19至图 22所示任一实施例的编码装置实现。
图 25为本发明通信系统另一个实施例的结构示意图。 如图 25所示, 该 实施例的通信系统包括编码系统 3与解码系统 4。 其中编码系统 3 包括: 算 术编码编码器 11、 编码装置 12、 第一接收装置 13、 统计装置 14、 比较装置 15与传送装置 16。 其中, 第一接收装置 13用于接收当前帧输入数据的待编 码系数, 并分别发送给算术编码编码器 11 与编码装置 12。 算术编码编码器 11 用于编码当前帧输入数据的待编码系数, 得到第二码流。 编码装置 12用 于编码当前帧输入数据的待编码系数, 得到第一码流, 其具体可以通过本发 明上述图 13至 17任一实施例的编码装置实现。统计装置 14用于统计采用编 码装置 12编码当前帧输入数据的待编码系数所需的第一总比特数,以及统计 采用算术编码编码器 11 编码当前帧输入数据的待编码系数所需的第二总比 特数。 比较装置 15用于比较第一总比特数是否大于第二总比特数。 传送装置 16用于根据比较装置 15的比较结果, 在第一总比特数小于第二总比特数时, 在第一码流的起始位置设置第一标识, 形成第一比特流, 并将该第一比特流 传送给解码系统 4, 具体地, 可以传送给解码系统 4中的第二接收装置 23 , 其中的第一标识用于标识第一比特流为第一码流; 在第一总比特数大于第二 总比特数时, 在第二码流的起始位置设置第二标识, 形成第二比特流, 并将 该第二比特流传送给解码系统 4, 具体地, 可以传送给解码系统 4 中的第二 接收装置 23 , 其中的第二标识用于标识第二比特流为第二码流; 在第一总比 特数等于第二总比特数时, 根据预先设置, 选择第一码流或算术编码码流, 并在选择的第一码流或第二码流的起始位置相应设置第一标识或第二标识, 并将形成的第一比特流或第二比特流传送给解码系统 4, 具体地, 可以传送 给解码系统 4中的第二接收装置 23。
解码系统 4包括: 算术编码解码器 21、 解码装置 22、 第二接收装置 23、 识别装置 24与解码处理装置 25。 其中, 第二接收装置 23用于接收传送装置 16发送的比特流, 该比特流为第一比特流或第二比特流, 其中, 第一比特流 中包括第一标识与第一码流, 第二比特流中包括第二标识与第二码流。 识别 装置 24用于根据比特流中包括第一标识或第二标识, 识别第二接收装置 23 接收到的比特流为第一比特流或第二比特流。解码处理装置 25用于根据识别 装置 24的识别结果, 在比特流为第一比特流时, 指示解码装置 22对第一码 流进行解码; 在比特流为第二比特流时, 指示算术编码解码器 21对第二码流 进行解码。 算术编码解码器 21用于对第二码流进行解码, 恢复出当前帧数据 的待编码系数, 解码装置 22用于对第一码流进行解码, 恢复出当前帧数据的 待编码系数。
作为本发明的一个应用, 可以以本发明上述实施例提供的任一编码装置 代替图 1中的 AC编码器,以本发明上述实施例提供的任一解码装置代替图 2 中的 AC解码器。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述 的存储介质包括: ROM, RAM, 磁碟或者光盘等各种可以存储程序代码的介 质。 > ^ 用 ψΰ^ 丁 W ij_ 量组成基石出 码本, 接收到待编码系数后, 可以将待编码系数分解成多个矢量, 依次获取 基础码本中与多个矢量匹配的码字在基础码本中的位置索引, 并对该位置索 引进行编码, 因此, 编码装置中仅仅需要存储基础码本, 不需要存储有矢量 及其之间的相关性, 节省了编码相同矢量所需占用的编码装置存储空间; 并 且, 由于仅仅需要对位置索引进行编码, 减少了待编码的数据量与编码所需 的比特数, 缩短了编码时间, 提高了编码效率。 如下表 4所示, 为采用本发 明图 10所示实施例进行编码时的一个编码效率提升结果实例。
表 4 编码效率提升结果实例
Figure imgf000043_0001
根据上述表 4可知, 采用本发明所示实施例的 BC编码方法编码的帧数大 于采用 AC编码方法编码的帧数, 尤其是在码率为 20kbps和 24kbps时。 实验结 果表明,采用本发明图 10所示实施例进行编码后,编码效率至少提高 2%以上。
最后所应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对 本发明作限制性理解。 尽管参照上述较佳实施例对本发明进行了详细说明, 本领域的普通技术人员应当理解: 其依然可以对本发明的技术方案进行修改 或者等同替换, 而这种修改或者等同替换并不脱离本发明技术方案的精神和 范围。

Claims

权 利 要 求
1、 一种编码方法, 其特征在于, 包括:
对获得的待编码系数中的符号信息进行编码, 获得符号码流, 以及分别 对所述待编码系数分解成的多个矢量中最大分量的位平面级数进行编码, 获 得边信息码流;
依次获取基石出码本中与所述多个矢量匹配的码字在所述基石出码本中的位 置索引并进行编码, 得到多个子码流, 所述基础码本中码字对应的矢量在预 设时段内的使用概率大于预设值;
将所述多个子码流进行合并, 得到矢量码流;
对所述边信息码流、 所述矢量码流与所述符号码流进行合并, 得到第一 码流。
2、 根据权利要求 1所述的方法, 其特征在于, 对获得的待编码系数中的 符号信息进行编码, 获得符号码流, 以及分别对所述待编码系数分解成的多 个矢量中最大分量的位平面级数进行编码, 获得边信息码流包括:
去除所述待编码系数中的符号信息, 获得绝对值系数, 将该绝对值系数 分解为维数相同的多个绝对值矢量, 依次计算所述多个绝对值矢量中最大分 量的位平面级数并进行编码, 获得边信息码流, 并对所述符号信息进行编码, 获得符号码流, 所述多个矢量为所述多个绝对值矢量; 或者
将所述待编码系数分解为维数相同的多个目标矢量; 依次计算所述多个 目标矢量中最大分量的位平面级数并进行编码, 获得边信息码流, 所述多个 矢量为所述多个目标矢量; 分别去除所述多个目标矢量中的符号信息, 获得 多个绝对值矢量, 并对所述符号信息进行编码, 获得符号码流。
3、 根据权利要求 2所述的方法, 其特征在于, 还包括:
针对当前帧输入数据的待编码系数, 分别执行所述对获得的待编码系数 中的符号信息进行编码, 获得符号码流, 以及分别对所述待编码系数分解成 的多个矢量中最大分量的位平面级数进行编码, 获得边信息码流的操作, 并 在得到所述第一码流后, 统计编码所述当前帧输入数据的待编码系数所需的 第一总比特数; 以及采用算术编码编码器编码所述当前帧输入数据的待编码 系数, 得到第二码流, 并统计采用算术编码编码器编码所述当前帧输入数据 的待编码系数所需的第二总比特数;
比较所述第一总比特数是否大于所述第二总比特数;
若所述第一总比特数小于所述第二总比特数, 则在所述第一码流的起始 位置设置第一标识, 形成第一比特流, 并将该第一比特流传送给接收端, 所 述第一标识用于标识所述第一比特流为第一码流;
若所述第一总比特数大于所述第二总比特数, 则在所述第二码流的起始 位置设置第二标识, 形成第二比特流, 并将该第二比特流传送给接收端, 所 述第二标识用于标识所述第二比特流为第二码流;
若所述第一总比特数等于所述第二总比特数, 则根据预先设置, 选择第 一码流或第二码流, 并在选择的第一码流或第二码流的起始位置相应设置第 一标识或第二标识, 形成第一比特流或第二比特流, 并
将形成的第一比特流或第二比特流传送给接收端。
4、 根据权利要求 1、 2或 3所述的方法, 其特征在于, 所述依次获取基 础码本中与所述多个矢量匹配的码字在所述基础码本中的位置索引并进行编 码, 得到子码流包括:
依次以所述多个矢量中的每一个矢量作为当前矢量, 查询基础码本中是 否存在与所述当前矢量匹配的码字;
若基础码本中存在与所述当前矢量匹配的码字, 对该码字在基础码本中 的位置索引进行编码, 得到所述子码流, 所述位置索引中包括一个编码方式 标识;
若基础码本中不存在与所述当前矢量匹配的码字, 对所述当前矢量进行 单独编码, 并在编码获得的码流的起始位置设置一个编码方式标识, 得到所 述子码流; 所述编码方式标识用于标识所述子码流为对位置索引进行编码或对所述 当前矢量进行单独编码的编码方式。
5、 根据权利要求 4所述的方法, 其特征在于, 所述基础码本包括: 唯一 标识一个码字的码字标识、 该码字在基础码本中的位置索引以及编码该位置 索引所需的比特数;
所述查询基石出码本中是否存在与所述当前矢量匹配的码字包括: 对所述 当前矢量进行多进制求和, 获得唯一标识所述当前矢量的矢量标识; 查询所 述基础码本中是否存在与所述矢量标识相同的码字标识;
所述对该码字在基础码本中的位置索引进行编码包括: 获取与所述矢量 标识相同的码字标识对应的位置索引与比特数, 并以该比特数对所述位置索 引进行编码。
6、 根据权利要求 4所述的方法, 其特征在于, 所述基础码本包括: 按照 编码各矢量匹配的码字在基石出码本中的位置索引所需的比特数大小依次排列 的矢量的多进制和列表、 各码本块中首码字的位置索引、 编码各码本块中各 码字的位置索引所需的比特数与各码本块中的码字数量; 所述基础码本按照 编码码字的位置索引所需的比特数大小被划分成依次排列的各码本块, 在所 述各码本块的同一个码本块中, 编码各码字所需的比特数相同;
所述查询基石出码本中是否存在与所述当前矢量匹配的码字包括: 对所述 当前矢量进行多进制求和, 获得唯一标识所述当前矢量的矢量标识; 查询所 述多进制和列表中是否存在与所述矢量标识相同的多进制和;
若基础码本中存在与所述当前矢量匹配的码字, 对该码字在基础码本中 的位置索引进行编码包括: 若所述多进制和列表中存在与所述矢量标识相同 的多进制和, 则获取与所述矢量标识相同的多进制和在所述多进制和列表中 的位置序号; 根据各码本块中的码字数量, 确定所述位置序号所在的码本块 以及在该码本块中的位置与该码本块中首码字的位置之差; 根据所述位置之 差与所在的码本块中首码字的位置索引,确定所述多进制和对应的位置索引; 根据编码各码本块中各码字的位置索引所需的比特数, 获取编码所述多进制 和对应的位置索引所需的比特数, 并以该比特数编码所述多进制和对应的位 置索引。
7、 根据权利要求 1、 2或 3所述的方法, 其特征在于, 所述依次获取基 础码本中与所述多个矢量匹配的码字在所述基础码本中的位置索引并进行编 码包括:
依次以所述多个矢量中的每一个矢量作为当前矢量, 根据所述当前矢量 中最大分量的位平面级数, 对所述当前矢量进行级数分解, 将所述当前矢量 分解为一个以上分矢量, 该一个以上的分矢量包括高位平面矢量;
针对所述当前矢量分解得到的一个以上分矢量, 依次以每一个分矢量作 为当前分矢量, 查询基石出码本中是否存在与所述当前分矢量匹配的码字; 若基础码本中存在与所述当前分矢量匹配的码字, 对该码字在基础码本 中的位置索引进行编码, 得到分矢量码流, 所述位置索引中包括一个编码方 式标识;
若基础码本中不存在与所述当前分矢量匹配的码字, 对所述当前分矢量 进行单独编码, 并在编码获得的码流的起始位置设置一个编码方式标识, 得 到分矢量码流;
所述编码方式标识用于标识所述分矢量码流为对位置索引进行编码或对 所述当前分矢量进行单独编码的编码方式;
将所述一个以上分矢量编码得到的分矢量码流进行合并, 得到所述当前 矢量的子码流。
8、 根据权利要求 7所述的方法, 其特征在于, 所述一个以上分矢量还包 括低位平面矢量;
所述高位平面矢量为谐波矢量, 所述低位平面矢量为单位脉冲矢量; 所述依次以所述多个矢量中的每一个矢量作为所述当前矢量包括: 按照 所述分矢量中最大分量的位平面级数由高到低的顺序, 依次以所述谐波矢量 与所述单位脉冲矢量作为所述当前矢量;
将所述一个以上分矢量编码得到的分矢量码流进行合并包括: 按照所述 分矢量中最大分量的位平面级数由高到低的顺序, 将所述谐波矢量编码得到 的高位码流与所述单位脉冲矢量编码得到的低位码流进行合并, 所述分矢量 码流包括所述高位码流与所述低位码流。
9、 根据权利要求 8所述的方法, 其特征在于, 根据所述当前矢量中最大 分量的位平面级数, 对所述当前矢量进行级数分解包括: 对最大分量的位平 面级数大于 3的当前矢量进行级数分解。
10、 根据权利要求 9所述的方法, 其特征在于, 对最大分量的位平面级 数大于 3的当前矢量进行级数分解包括: 提取所述当前矢量中高 3位平面的 分量作为谐波矢量, 将提取高 3位平面的分量后的每一级位平面作为一个单 位脉冲矢量。
11、 根据权利要求 7所述的方法, 其特征在于, 所述基 码本包括: 唯 一标识一个码字的码字标识、 该码字在基础码本中的位置索引以及编码该位 置索引所需的比特数;
查询基础码本中是否存在与所述当前分矢量匹配的码字包括: 对所述当 前分矢量进行多进制求和, 获得唯一标识所述当前分矢量的矢量标识; 查询 所述基石出码本中是否存在与所述矢量标识相同的码字标识;
所述对该码字在基础码本中的位置索引进行编码包括: 获取与所述矢量 标识相同的码字标识对应的位置索引与比特数, 并以该比特数对所述位置索 引进行编码。
12、 根据权利要求 11所述的方法, 其特征在于, 所述一个以上分矢量还 包括低位平面矢量;
所述高位平面矢量为谐波矢量, 所述低位平面矢量为单位脉冲矢量; 对所述当前分矢量进行多进制求和包括: 对最大分量的位平面级数为 1 的谐波矢量和单位脉冲矢量进行二进制求和, 对最大分量的位平面级数为 2 的谐波矢量进行四进制求和, 对最大分量的位平面级数为 3的谐波矢量进行 八进制求和。
13、 根据权利要求 11所述的方法, 其特征在于, 所述基 码本包括按照 对应的矢量在预设时段内的使用概率大小划分的 M个子码本, M为大于 1的 整数;
查询所述基石出码本中是否存在与所述矢量标识相同的码字标识包括: 针 对所述 M个子码本中的第 1个子码本, 查询是否存在与所述矢量标识相同的 码字标识; 若存在, 则执行所述获取与所述矢量标识相同的码字标识对应的 位置索引与比特数的操作; 若不存在, 以下一个子码本作为第 1个子码本, 执行所述查询是否存在与所述矢量标识相同的码字标识的操作, 所述下一个 小于或等于 M。
14、 根据权利要求 7所述的方法, 其特征在于, 所述基础码本包括: 按 照编码各矢量匹配的码字在基础码本中的位置索引所需的比特数大小依次排 列的矢量的多进制和列表、 各码本块中首码字的位置索引、 编码各码本块中 各码字的位置索引所需的比特数与各码本块中的码字数量; 所述基石出码本按 照编码码字的位置索引所需的比特数大小被划分成依次排列的各码本块, 在 所述各码本块的同一个码本块中, 编码各码字所需的比特数相同;
所述查询基石出码本中是否存在与所述当前分矢量匹配的码字包括: 对所 述当前分矢量进行多进制求和, 获得唯一标识所述当前分矢量的矢量标识; 查询所述多进制和列表中是否存在与所述矢量标识相同的多进制和;
若基础码本中存在与所述当前分矢量匹配的码字, 对该码字在基础码本 中的位置索引进行编码包括: 若所述多进制和列表中存在与所述矢量标识相 同的多进制和, 则获取与所述矢量标识相同的多进制和在所述多进制和列表 中的位置序号; 根据各码本块中的码字数量, 确定所述位置序号所在的码本 块以及在该码本块中的位置与该码本块中首码字的位置之差; 根据该位置之 差与所在的码本块中首码字的位置索引,确定所述多进制和对应的位置索引; 根据编码各码本块中各码字的位置索引所需的比特数, 获取编码所述多进制 和对应的位置索引所需的比特数, 并以该比特数编码所述多进制和对应的位 置索引。
15、 根据权利要求 14所述的方法, 其特征在于, 对所述当前分矢量进行 多进制求和包括:
对最大分量的位平面级数为 1 的谐波矢量和单位脉冲矢量进行二进制求 和, 对最大分量的位平面级数为 2的谐波矢量进行四进制求和, 对最大分量 的位平面级数为 3的谐波矢量进行八进制求和。
16、 根据权利要求 14所述的方法, 其特征在于, 所述基 码本包括按照 对应的矢量在预设时段内的使用概率大小划分的 M个子码本, M为大于 1的 整数;
查询所述多进制和列表中是否存在与所述矢量标识相同的多进制和包 括: 针对所述 M个子码本中的第 1个子码本, 查询所述多进制和列表中是否 存在与所述矢量标识相同的多进制和; 若存在, 则执行所述获取与所述矢量 标识相同的多进制和在所述多进制和列表中的位置序号的操作; 若不存在, 以下一个子码本作为第 1个子码本, 执行所述查询所述多进制和列表中是否 存在与所述矢量标识相同的多进制和的操作, 所述下一个小于或等于 M。
17、 一种解码方法, 其特征在于, 包括:
接收第一码流, 该第一码流包括边信息码流、 矢量码流与符号码流, 所 述矢量码流包括对应于多个矢量的子码流;
对所述边信息码流进行解码, 分别获得所述多个矢量中最大分量的位平 面级数;
分别根据所述多个矢量中最大分量的位平面级数, 对所述多个子码流进 行解码, 得到基础码本中分别与所述多个矢量匹配的码字在所述基石出码本中 的位置索引;
根据所述位置索引, 分别获取所述多个矢量的绝对值矢量; 解码所述符号码流, 得到所述多个矢量的符号信息;
分别将所述多个矢量的符号信息赋予所述多个矢量的绝对值矢量, 得到 所述多个矢量;
根据所述多个矢量恢复出待编码系数。
18、 根据权利要求 17所述的方法, 其特征在于, 所述基 码本包括: 唯 一标识一个码字的码字标识、 该码字在基础码本中的位置索引以及编码该位 置索引所需的比特数;
根据所述位置索引, 分别获取所述多个矢量的绝对值矢量包括: 分别从 所述基础码本中获取与所述多个矢量匹配的码字在所述基石出码本中的位置索 引对应的多个码字标识; 分别以所述多个码字标识作为矢量标识, 获取相应 的绝对值矢量, 所述矢量标识为一个绝对值矢量进行多进制求和后获得的唯 一标识所述绝对值矢量的标识。
19、 根据权利要求 17所述的方法, 其特征在于, 所述基 码本包括: 按 照编码各矢量匹配的码字在基础码本中的位置索引所需的比特数大小依次排 列的矢量的多进制和列表、 各码本块中首码字的位置索引、 编码各码本块中 各码字的位置索引所需的比特数与各码本块中的码字数量; 所述基石出码本按 照编码码字的位置索引所需的比特数大小被划分成依次排列的各码本块, 在 所述各码本块的同一个码本块中, 编码各码字所需的比特数相同;
对所述多个子码流进行解码, 得到基础码本中分别与所述多个矢量匹配 的码字在所述基石出码本中的位置索引包括:
针对每一个子码流, 以第一码本块作为当前码本块, 获取编码当前码本 块中各码字的位置索引所需的第一比特数, 从所述多个子码流中读取该第一 比特数的数据, 得到第一数值, 以及根据当前码本块中首码字的位置索引与 当前码本块中的码字数量确定当前码本块中最后一个码字的位置索引;
比较所述第一数值是否大于最后一个码字的位置索引的大小;
若不大于所述最后一个码字的位置索引的大小, 则获取第一数值与当前 码本块中首码字的位置索引之差的第一差值, 并以该第一差值作为在当前码 本块中的相对位置, 从所述多进制和列表中获取所述第一数值对应的多进制 和;
若大于所述最后一个码字的位置索引的大小, 则以所述当前码本块的下 一个码本块作为当前码本块, 获取编码作为下一个码本块的当前码本块中各 码字的位置索引所需的第二比特数, 并计算所述第二比特数与所述第一比特 数之差的第二差值;从所述多个子码流中再读取所述第二差值比特数的数据, 并与所述第一数值形成第二数值, 并以该第二数值作为第一数值, 执行所述 根据当前码本块中首码字的位置索引与当前码本块中的码字数量确定当前码 本块中最后一个码字的位置索引的操作;
根据所述位置索引, 分别获取所述多个矢量的绝对值矢量包括: 按照多 进制减法, 获取与所述第一数值对应的多进制和相应的绝对值矢量。
20、 根据权利要求 19所述的方法, 其特征在于, 所述子码流中包括编码 方式标识, 所述编码方式标识用于标识所述子码流为对位置索引进行编码或 对所述绝对值矢量进行单独编码的编码方式;
分别获得所述多个矢量中最大分量的位平面级数之后, 还包括: 识别所 述子码流中编码方式标识所标识的编码方式; 若所标识的编码方式为对位置 索弓 ]进行编码,则执行所述分别根据所述多个矢量中最大分量的位平面级数, 对所述多个子码流进行解码操作; 若所标识的编码方式为对所述绝对值矢量 进行单独编码, 则根据所述绝对值矢量中最大分量的位平面级数对应的解码 方式, 直接对所述子码流进行解码, 获得所述绝对值矢量。
21、 根据权利要求 19所述的方法, 其特征在于, 所述子码流包括编码方 式标识与一个以上分矢量编码得到的一个以上分矢量码流, 所述一个以上的 分矢量由根据所述绝对值矢量中最大分量的位平面级数对所述绝对值矢量进 行级数分解得到, 所述一个以上的分矢量包括高位平面矢量; 所述编码方式 标识用于标识所述分矢量码流为对位置索引进行编码或对所述分矢量进行单 独编码的编码方式; 所述多个矢量为多个绝对值矢量;
分别根据所述多个矢量中最大分量的位平面级数, 对所述多个子码流进 行解码, 得到基础码本中分别与所述多个矢量匹配的码字在所述基石出码本中 的位置索引包括:
依次以所述多个绝对值矢量中每一个绝对值矢量的最大分量的位平面级 数作为当前位平面级数, 根据所述当前位平面级数, 识别所述绝对值矢量对 应的所述一个以上分矢量码流;
依次以所述一个以上分矢量码流中的一个分矢量码流作为当前分矢量码 流, 识别所述当前分矢量码流中编码方式标识所标识的编码方式;
若所标识的编码方式为对位置索弓 ]进行编码, 从所述基础码本中获取与 所述当前分矢量匹配的码字在所述基础码本中的位置索引; 以所述位置索引 作为矢量标识, 获取所述矢量标识对应的当前分矢量, 所述矢量标识为当前 分矢量进行多进制求和后获得的唯一标识所述当前分矢量的标识;
若所标识的编码方式为对所述当前分矢量进行单独编码, 则直接对所述 当前分矢量进行解码, 获得所述当前分矢量;
根据所述位置索引, 分别获取所述多个矢量的绝对值矢量包括: 对所述 一个以上分矢量码流解码获得的一个以上分矢量进行合成, 得到所述绝对值 矢量。
22、 根据权利要求 21所述的方法, 其特征在于, 所述一个以上分矢量还 包括低位平面矢量; 所述高位平面矢量为谐波矢量, 所述低位平面矢量为单 位脉冲矢量; 所述谐波矢量编码得到的分矢量码流为高位码流, 所述单位脉 冲矢量编码得到的分矢量码流为低位码流, 所述一个以上分矢量码流包括所 述高位码流与所述低位码流, 所述高位码流与所述低位码流按照对应的分矢 量中最大分量的位平面级数由高到低的顺序排列;
依次以所述一个以上分矢量码流中的一个分矢量码流作为当前分矢量码 流包括: 按照对应的分矢量中最大分量的位平面级数由高到低的顺序, 依次 以高位码流、 低位码流作为当前分矢量码流。
23、 根据权利要求 17至 22任意一项所述的方法, 其特征在于, 还包括: 接收比特流, 所述比特流为第一比特流或第二比特流, 所述第一比特流 中包括第一标识与第一码流, 所述第二比特流中包括第二标识与第二码流; 根据所述比特流中包括第一标识或第二标识, 识别所述比特流为第一比 特流或第二比特流;
若所述比特流为第一比特流, 针对所述第一比特流中的码流, 执行对所 述边信息码流进行解码的操作, 恢复出当前帧数据的待编码系数;
若所述比特流为第二比特流, 针对所述第二比特流中的码流, 采用算术 编码解码器对所述第二比特流中的第二码流进行解码, 恢复出当前帧数据的 待编码系数。
24、 一种编码装置, 其特征在于, 包括:
第一编码模块, 用于对获得的待编码系数中的符号信息进行编码, 获得 符号码流, 以及分别对所述待编码系数分解成的多个矢量中最大分量的位平 面级数进行编码, 获得边信息码流;
第二编码模块, 用于依次获取基础码本中与所述多个矢量匹配的码字在 所述基础码本中的位置索引并进行编码, 得到多个子码流, 所述基石出码本中 码字对应的矢量在预设时段内的使用概率大于预设值;
第一合并模块, 用于将所述多个子码流进行合并, 得到矢量码流; 第二合并模块, 用于对所述边信息码流、 所述矢量码流与所述符号码流 进行合并, 得到第一码流。
25、 根据权利要求 24所述的编码装置, 其特征在于, 所述第一编码模块 包括:
第一去除单元, 用于去除所述待编码系数中的符号信息, 获得绝对值系 数;
第一分解单元, 用于将所述绝对值系数分解为维数相同的多个绝对值矢 量, 所述多个矢量为所述多个绝对值矢量;
第一编码单元, 用于依次计算所述多个绝对值矢量中最大分量的位平面 级数并进行编码, 获得边信息码流, 并对所述符号信息进行编码, 获得符号 码流;
或者, 所述第一编码模块包括:
第二分解单元,用于将所述待编码系数分解为维数相同的多个目标矢量, 所述多个矢量为所述多个目标矢量;
第二编码单元, 用于依次计算所述多个目标矢量中最大分量的位平面级 数并进行编码, 获得边信息码流;
第二去除单元, 用于分别去除所述多个目标矢量中的符号信息, 获得多 个绝对值矢量;
第三编码单元, 用于对所述符号信息进行编码, 获得符号码流。
26、 根据权利要求 25所述的编码装置, 其特征在于, 所述第二编码模块 包括:
查询单元, 用于以所述多个矢量中的第一个矢量作为当前矢量, 查询基 础码本中是否存在与所述当前矢量匹配的码字;
第四编码单元, 用于根据所述查询单元的查询结果, 在基石出码本中存在 与所述当前矢量匹配的码字时,对该码字在基石出码本中的位置索引进行编码, 得到所述子码流, 所述位置索引中包括一个编码方式标识; 在基础码本中不 存在与所述当前矢量匹配的码字, 对所述当前矢量进行单独编码, 并在单独 编码获得的码流的起始位置设置一个编码方式标识, 得到所述子码流, 所述 编码方式标识用于标识所述子码流为对位置索引进行编码或所述当前矢量进 行单独编码的编码方式;
设置单元, 用于指示所述查询单元以所述多个矢量中所述当前矢量的下 一个矢量作为当前矢量, 查询基础码本中是否存在与作为当前矢量的下一个 矢量匹配的码字。
27、 根据权利要求 26所述的编码装置, 其特征在于, 所述第二编码模块 还包括:
第一获取单元, 用于以所述多个矢量中的第一个矢量作为当前矢量, 获 取所述当前矢量中最大分量的位平面级数;
分解单元, 用于根据所述当前矢量中最大分量的位平面级数, 对所述当 前矢量进行级数分解, 将所述当前矢量分解为一个以上分矢量, 该一个以上 的分矢量包括高位平面矢量;
所述查询单元具体用于以所述一个以上分矢量中的第一个分矢量作为当 前分矢量, 查询基石出码本中是否存在与所述当前分矢量匹配的码字;
所述第四编码单元具体用于根据所述查询单元的查询结果, 在基础码本 中存在与所述当前分矢量匹配的码字时, 对该码字在基础码本中的位置索引 进行编码, 得到分矢量码流, 所述位置索引中包括一个编码方式标识; 在基 础码本中不存在与所述当前分矢量匹配的码字时, 对所述当前分矢量进行单 独编码, 并在编码获得的码流的起始位置设置一个编码方式标识, 得到分矢 量码流;
所述设置单元具体用于指示所述查询单元以所述一个以上分矢量中所述 当前分矢量的下一个分矢量作为当前分矢量, 查询基础码本中是否存在与作 为当前分矢量的下一个分矢量匹配的码字;
合并单元, 用于根据所述设置单元的指示, 在所述第四编码单元得到所 述一个以上分矢量中最后一个分矢量对应的分矢量码流时, 将所述一个以上 分矢量编码得到的分矢量码流进行合并, 得到所述当前矢量的子码流。
28、 根据权利要求 24至 27任意一项所述的编码装置, 其特征在于, 还 包括:
第一存储模块, 用于存储所述基础码本, 所述基石出码本包括: 唯一标识 一个码字的码字标识、 该码字在基石出码本中的位置索引以及编码该位置索引 所需的比特数; 所述查询单元具体用于对所述当前矢量或所述当前分矢量进行多进制求 和, 获得唯一标识所述当前矢量或所述当前分矢量的矢量标识, 并查询所述 基石出码本中是否存在与所述矢量标识相同的码字标识;
所述第四编码单元具体用于根据所述查询单元的查询结果, 在基础码本 中存在与所述矢量标识相同的码字标识时, 获取与所述码字标识对应的比特 数, 并以该比特数对所述位置索引进行编码。
29、 根据权利要求 24至 27任意一项所述的编码装置, 其特征在于, 还 包括:
第二存储模块, 用于存储所述基础码本, 所述基 码本包括: 按照编码 各矢量匹配的码字在基础码本中的位置索引所需的比特数大小依次排列的矢 量的多进制和列表、 各码本块中首码字的位置索引、 编码各码本块中各码字 的位置索引所需的比特数与各码本块中的码字数量; 所述基础码本按照编码 码字的位置索引所需的比特数大小被划分成依次排列的各码本块, 在所述各 码本块的同一个码本块中, 编码各码字所需的比特数相同;
所述查询单元具体用于对所述当前矢量或所述当前分矢量进行多进制求 和, 获得唯一标识所述当前矢量或所述当前分矢量的矢量标识, 并查询所述 多进制列表中是否存在与所述矢量标识相同的多进制和;
所述第四编码单元具体用于根据所述查询单元的查询结果, 在所述多进 制列表中存在与所述矢量标识相同的多进制和时, 获取与所述矢量标识相同 的多进制和在所述多进制和列表中的位置序号;根据各码本块中的码字数量, 确定所述位置序号所在的码本块以及在该码本块中的位置与该码本块中首码 字的位置之差; 根据所述位置之差与所在的码本块中首码字的位置索引, 确 定所述多进制和对应的位置索引; 根据编码各码本块中各码字的位置索引所 需的比特数, 获取编码所述多进制和对应的位置索引所需的比特数, 并以该 比特数编码所述多进制和对应的位置索引。
30、 根据权利要求 29所述的编码装置, 其特征在于, 所述基础码本包括 按照对应的矢量在预设时段内的使用概率大小划分的 M个子码本, M为大于 1的整数;
所述查询单元具体用于针对所述 M个子码本中的第 1个子码本, 查询所 述多进制和列表中是否存在与所述矢量标识相同的多进制和; 若存在, 则执 行所述获取与所述矢量标识相同的多进制和在所述多进制和列表中的位置序 号的操作; 若不存在, 以下一个子码本作为第 1个子码本, 执行所述查询所 述多进制和列表中是否存在与所述矢量标识相同的多进制和的操作, 所述下 一个小于或等于^1。
31、 一种编码系统, 包括算术编码编码器, 用于编码当前帧输入数据的 待编码系数, 得到第二码流, 其特征在于, 还包括权利要求 24-30任意一项 所述的编码装置, 用于编码所述当前帧输入数据的待编码系数, 得到第一码 流; 以及
第一接收装置, 用于接收所述当前帧输入数据的待编码系数, 并分别发 送给所述算术编码编码器与所述编码装置;
统计装置, 用于统计采用所述编码装置编码所述当前帧输入数据的待编 码系数所需的第一总比特数, 以及统计采用所述算术编码编码器编码所述当 前帧输入数据的待编码系数所需的第二总比特数;
比较装置, 用于比较所述第一总比特数是否大于所述第二总比特数; 传送装置, 用于根据所述比较装置的比较结果, 在所述第一总比特数小 于所述第二总比特数时, 在所述第一码流的起始位置设置第一标识, 形成第 一比特流, 并将该第一比特流传送给接收端, 所述第一标识用于标识所述第 一比特流; 在所述第一总比特数大于所述第二总比特数时, 在所述第二码流 的起始位置设置第二标识, 形成第二比特流, 并将该第二比特流传送给接收 端, 所述第二标识用于标识所述第二比特码流; 在所述第一总比特数等于所 述第二总比特数时, 根据预先设置, 选择所述第一码流或所述第二码流, 并 在选择的所述第一码流或所述第二码流的起始位置相应设置第一标识或第二 标识, 并将形成的第一比特流或第二比特流传送给接收端。
32、 一种解码装置, 其特征在于, 包括:
第二接收模块, 用于接收第一码流, 该第一码流包括边信息码流、 矢量 码流与符号码流, 所述矢量码流包括对应于多个矢量的子码流;
第一解码模块, 用于对所述边信息码流进行解码, 分别获得所述多个矢 量中最大分量的位平面级数;
第二解码模块, 用于分别根据所述多个矢量中最大分量的位平面级数, 对所述多个子码流进行解码, 得到基础码本中分别与所述多个矢量匹配的码 字在所述基础码本中的位置索引;
第一获取模块, 用于根据所述位置索引, 分别获取所述多个矢量的绝对 值矢量;
第三解码模块, 用于解码所述符号码流, 得到所述多个矢量的符号信息; 第二获取模块, 用于分别将所述多个矢量的符号信息赋予所述多个矢量 的绝对值矢量, 得到所述多个矢量;
恢复模块, 用于根据所述多个矢量恢复出待编码系数。
33、 根据权利要求 32所述的解码装置, 其特征在于, 还包括第一存储模 块, 用于存储所述基石出码本, 所述基础码本包括: 唯一标识一个码字的码字 标识、 该码字在基石出码本中的位置索引以及编码该位置索引所需的比特数; 所述第一获取模块包括:
第二获取单元, 用于分别从所述基础码本中获取与所述多个矢量匹配的 码字在所述基础码本中的位置索引对应的多个码字标识;
第三获取单元, 用于以所述多个码字标识作为矢量标识, 获取相应的绝 对值矢量, 所述矢量标识为一个绝对值矢量进行多进制求和后获得的唯一标 识所述绝对值矢量的标识。
34、 根据权利要求 32所述的解码装置, 其特征在于, 还包括第二存储模 块, 用于存储所述基石出码本, 所述基础码本包括: 按照编码各矢量匹配的码 字在基础码本中的位置索引所需的比特数大小依次排列的矢量的多进制和列 表、 各码本块中首码字的位置索引、 编码各码本块中各码字的位置索引所需 的比特数与各码本块中的码字数量; 所述基石出码本按照编码码字的位置索引 所需的比特数大小被划分成依次排列的各码本块, 在所述各码本块的同一个 码本块中, 编码各码字所需的比特数相同;
所述第二解码模块具体用于分别根据所述多个矢量中最大分量的位平面 级数, 针对每一个子码流, 以第一码本块作为当前码本块, 获取编码当前码 本块中各码字的位置索引所需的第一比特数, 从所述多个子码流中读取该第 一比特数的数据, 得到第一数值, 以及根据当前码本块中首码字的位置索引 与当前码本块中的码字数量确定当前码本块中最后一个码字的位置索引; 比 较所述第一数值是否大于最后一个码字的位置索引的大小; 若不大于所述最 后一个码字的位置索引的大小, 则获取第一数值与当前码本块中首码字的位 置索引之差的第一差值, 并以该第一差值作为在当前码本块中的相对位置, 从所述多进制和列表中获取所述第一数值对应的多进制和; 若大于所述最后 一个码字的位置索引的大小, 则以作为下一个码本块的当前码本块的下一个 码本块作为当前码本块, 获取编码所述当前码本块中各码字的位置索引所需 的第二比特数, 并计算所述第二比特数与所述第一比特数之差的第二差值; 从所述多个子码流中再读取所述第二差值比特数的数据, 并与所述第一数值 形成第二数值, 并以该第二数值作为第一数值, 执行所述根据当前码本块中 首码字的位置索引与当前码本块中的码字数量确定当前码本块中最后一个码 字的位置索引的操作;
所述第一获取模块具体用于按照多进制减法, 获取与所述第一数值对应 的多进制和相应的绝对值矢量。
35、 根据权利要求 34所述的解码装置, 其特征在于, 所述子码流中包括 编码方式标识, 所述编码方式标识用于标识所述子码流为对位置索引进行编 码或对所述绝对值矢量进行单独编码的编码方式; 所述解码装置还包括:
识别模块, 用于识别所述子码流中编码方式标识所标识的编码方式; 解码处理模块, 用于根据所述识别模块的识别结果, 在所标识的编码方 式为对位置索引进行编码时, 指示所述第二解码模块依次对所述多个子码流 进行解码; 在所标识的编码方式为对所述绝对值矢量进行单独编码时, 根据 所述绝对值矢量中最大分量的位平面级数对应的解码方式, 直接对所述子码 流进行解码, 获得所述绝对值矢量。
36、 根据权利要求 32所述的解码装置, 其特征在于, 所述子码流包括编 码方式标识与一个以上分矢量编码得到的一个以上分矢量码流, 所述一个以 上的分矢量由根据所述绝对值矢量中最大分量的位平面级数对所述绝对值矢 量进行级数分解得到, 所述一个以上的分矢量包括高位平面矢量; 所述编码 方式标识用于标识所述分矢量码流为对位置索引进行编码或对所述分矢量进 行单独编码的编码方式; 所述多个矢量为多个绝对值矢量;
所述第二解码模块包括:
第一识别单元, 用于依次以所述多个绝对值矢量中每一个绝对值矢量的 最大分量的位平面级数作为当前位平面级数, 根据所述当前位平面级数, 识 别所述绝对值矢量对应的所述一个以上分矢量码流;
第二识别单元, 用于依次以所述一个以上分矢量码流中的一个分矢量码 流作为当前分矢量码流, 识别所述当前分矢量码流中编码方式标识所标识的 编码方式;
第四获取单元, 用于根据所述第二识别单元的识别结果, 在所标识的编 码方式为对位置索引进行编码时, 从所述基石出码本中获取与所述当前分矢量 匹配的码字在所述基石出码本中的位置索引, 以所述位置索引作为矢量标识, 获取所述矢量标识对应的当前分矢量, 所述矢量标识为当前分矢量进行多进 制求和后获得的唯一标识所述当前分矢量的标识; 在所标识的编码方式为对 所述当前分矢量进行单独编码时, 直接对所述当前分矢量进行解码, 获得所 述当前分矢量;
所述第一获取模块具体用于对所述第四获取单元获得的一个以上分矢量 进行合成, 得到所述绝对值矢量。
37、 根据权利要求 36所述的解码装置, 其特征在于, 所述一个以上分矢 量还包括低位平面矢量; 所述高位平面矢量为谐波矢量, 所述低位平面矢量 为单位脉冲矢量; 所述谐波矢量编码得到的分矢量码流为高位码流, 所述单 位脉冲矢量编码得到的分矢量码流为低位码流, 所述一个以上分矢量码流包 括所述高位码流与所述低位码流, 所述高位码流与所述低位码流按照对应的 分矢量中最大分量的位平面级数由高到低的顺序排列;
所述第二识别单元具体用于按照对应的分矢量中最大分量的位平面级数 由高到低的顺序, 依次以高位码流、 低位码流作为当前分矢量码流, 识别所 述当前分矢量码流中编码方式标识所标识的编码方式。
38、 一种解码系统, 包括算术编码解码器, 用于对第二码流进行解码, 恢复出当前帧数据的待编码系数, 其特征在于, 还包括权利要求 32-37任意 一项所述的解码装置, 用于对第一码流进行解码, 恢复出当前帧数据的待编 码系数; 以及
第二接收装置, 用于接收比特流, 所述比特流为第一比特流或第二比特 流, 所述第一比特流中包括第一标识与所述第一码流, 所述第二比特流中包 括第二标识与所述第二码流;
识别装置, 用于根据所述比特流中包括第一标识或第二标识, 识别所述 比特流为第一比特流或第二比特流;
解码处理装置, 用于根据所述识别装置的识别结果, 在所述比特流为第 一比特流时, 指示所述解码装置对所述第一码流进行解码; 在所述比特流为 第二比特流时, 指示所述算术编码解码器对所述第二码流进行解码。
39、 一种通信系统, 包括编码装置与解码装置, 其特征在于, 所述编码 装置用于对获得的待编码系数中的符号信息进行编码, 获得符号码流, 以及 分别对所述待编码系数分解成的多个矢量中最大分量的位平面级数进行编 码, 获得边信息码流; 依次获取基石出码本中与所述多个矢量匹配的码字在所 述基石出码本中的位置索引并进行编码, 得到多个子码流, 所述基础码本中码 字对应的矢量在预设时段内的使用概率大于预设值; 将所述多个子码流进行 合并, 得到矢量码流; 对所述边信息码流、 所述矢量码流与所述符号码流进 行合并, 得到第一码流并传送给所述解码装置;
所述解码装置用于接收第一码流; 对所述边信息码流进行解码, 获得所 述多个矢量中最大分量的位平面级数; 分别根据所述多个矢量中最大分量的 位平面级数, 对所述多个子码流进行解码, 得到基石出码本中分别与所述多个 矢量匹配的码字在所述基础码本中的位置索引; 根据所述位置索引, 分别获 取所述多个矢量的绝对值矢量; 解码所述符号码流, 得到所述多个矢量的符 号信息; 分别将所述多个矢量的符号信息赋予所述多个矢量的绝对值矢量, 得到所述多个矢量; 根据所述多个矢量恢复出待编码系数。
40、 一种通信系统, 包括编码系统与解码系统, 其特征在于, 所述编码 系统包括:
第一接收装置, 用于接收当前帧输入数据的待编码系数, 并分别发送给 算术编码编码器与编码装置;
算术编码编码器, 用于编码当前帧输入数据的待编码系数, 得到第二码 流;
编码装置, 用于接收待编码系数; 对所述待编码系数中的符号信息进行 编码, 获得符号码流, 以及分别对所述待编码系数分解成的多个矢量中最大 分量的位平面级数进行编码, 获得边信息码流; 依次获取基础码本中与所述 多个矢量匹配的码字在所述基础码本中的位置索引并进行编码, 得到多个子 码流,所述基石出码本中码字对应的矢量在预设时段内的使用概率大于预设值; 将所述多个子码流进行合并, 得到矢量码流; 对所述边信息码流、 所述矢量 码流与所述符号码流进行合并, 得到第一码流; 统计装置, 用于统计采用所述编码装置编码所述当前帧输入数据的待编 码系数所需的第一总比特数, 以及统计采用所述算术编码编码器编码所述当 前帧输入数据的待编码系数所需的第二总比特数;
比较装置, 用于比较所述第一总比特数是否大于所述第二总比特数; 传送装置, 用于根据所述比较装置的比较结果, 在所述第一总比特数小 于所述第二总比特数时, 在所述第一码流的起始位置设置第一标识, 形成第 一比特流, 并将该第一比特流传送给所述解码系统, 所述第一标识用于标识 所述第一比特流为第一码流;在所述第一总比特数大于所述第二总比特数时, 在所述第二码流的起始位置设置第二标识, 形成第二比特流, 并将该第二比 特流传送给所述解码系统, 所述第二标识用于标识所述第二比特流为第二码 流; 在所述第一总比特数等于所述第二总比特数时, 根据预先设置, 选择第 一码流或第二码流, 并在选择的第一码流或第二码流的起始位置相应设置第 一标识或第二标识, 并将形成的第一比特流或第二比特流传送给所述解码系 统;
所述解码系统包括:
第二接收装置, 用于接收所述传送装置传送的比特流, 所述比特流为第 一比特流或第二比特流;
识别装置, 用于根据所述比特流中包括第一标识或第二标识, 识别所述 比特流为第一比特流或第二比特流;
解码处理装置, 用于根据所述识别装置的识别结果, 在所述比特流为第 一比特流时, 指示解码装置对所述第一码流进行解码; 在所述比特流为第二 比特流时, 指示算术编码解码器对所述第二码流进行解码;
算术编码解码器, 用于对所述第二码流进行解码, 恢复出当前帧数据的 待编码系数;
解码装置, 用于接收所述第一码流; 对所述边信息码流进行解码, 获得 所述多个矢量中最大分量的位平面级数; 分别根据所述多个矢量中最大分量 的位平面级数, 对所述多个子码流进行解码, 得到基础码本中分别与所述多 个矢量匹配的码字在所述基石出码本中的位置索引; 根据所述位置索引, 分别 获取所述多个矢量的绝对值矢量; 解码所述符号码流, 得到所述多个矢量的 符号信息;分别将所述多个矢量的符号信息赋予所述多个矢量的绝对值矢量, 得到所述多个矢量; 根据所述多个矢量恢复出待编码系数。
PCT/CN2009/072670 2009-07-07 2009-07-07 编码方法、装置与系统、解码方法、装置与系统 WO2011003233A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2009/072670 WO2011003233A1 (zh) 2009-07-07 2009-07-07 编码方法、装置与系统、解码方法、装置与系统
CN2009801590126A CN102422541B (zh) 2009-07-07 2009-07-07 编码方法、装置与系统、解码方法、装置与系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2009/072670 WO2011003233A1 (zh) 2009-07-07 2009-07-07 编码方法、装置与系统、解码方法、装置与系统

Publications (1)

Publication Number Publication Date
WO2011003233A1 true WO2011003233A1 (zh) 2011-01-13

Family

ID=43428732

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/072670 WO2011003233A1 (zh) 2009-07-07 2009-07-07 编码方法、装置与系统、解码方法、装置与系统

Country Status (2)

Country Link
CN (1) CN102422541B (zh)
WO (1) WO2011003233A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107888246B (zh) 2016-09-29 2023-04-28 华为技术有限公司 基于码本的信道状态信息反馈方法及设备
CN110262209B (zh) * 2019-06-03 2020-06-26 中国科学技术大学 基于fpga的时间数字变换器
CN115103451B (zh) * 2022-06-06 2024-07-05 中国联合网络通信集团有限公司 视频传输方法、装置、电子设备以及可读存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2405560A (en) * 2003-08-27 2005-03-02 Matsushita Electric Ind Co Ltd Vector quantization
CN101266795A (zh) * 2007-03-12 2008-09-17 华为技术有限公司 一种格矢量量化编解码的实现方法及装置
CN101304254A (zh) * 2007-07-23 2008-11-12 华为技术有限公司 矢量编/解码方法、装置及流媒体播放器

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1008316B (zh) * 1985-05-08 1990-06-06 索尼公司 纠错码的译码方法和系统
US5359606A (en) * 1992-02-12 1994-10-25 Storage Technology Corporation Data quality analysis in a data signal processing channel

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2405560A (en) * 2003-08-27 2005-03-02 Matsushita Electric Ind Co Ltd Vector quantization
CN101266795A (zh) * 2007-03-12 2008-09-17 华为技术有限公司 一种格矢量量化编解码的实现方法及装置
CN101304254A (zh) * 2007-07-23 2008-11-12 华为技术有限公司 矢量编/解码方法、装置及流媒体播放器

Also Published As

Publication number Publication date
CN102422541B (zh) 2013-12-04
CN102422541A (zh) 2012-04-18

Similar Documents

Publication Publication Date Title
JP5384780B2 (ja) 無損失オーディオ符号化方法、無損失オーディオ符号化装置、無損失オーディオ復号化方法、無損失オーディオ復号化装置及び記録媒体
JP4328358B2 (ja) 情報圧縮符号化装置、その復号化装置、これらの方法、およびこれらのプログラムとその記録媒体
US10425102B2 (en) Coding method, decoding method, coder, and decoder
US8731947B2 (en) Coding method, decoding method, codec method, codec system and relevant apparatuses
WO2019153700A1 (zh) 编解码方法、装置及编解码设备
JP2005242363A5 (zh)
JP4779098B2 (ja) 可変サイズベクトルエントロピ符号化を実行するための方法および装置
RU98111482A (ru) Способ и устройство масштабированного кодирования и декодирования звука
JP2009509456A (ja) 逐次改善可能な格子ベクトル量子化
WO2007083264A1 (en) Audio coding
WO2007046060A2 (en) Compression and decompression of data vectors
AU2018298758B2 (en) Method and device for digital data compression
KR101485339B1 (ko) 무손실 부호화/복호화 장치 및 방법
WO2008049737A1 (en) Audio coding
WO2011097963A1 (zh) 编码方法、解码方法、编码器和解码器
WO2011048911A2 (en) Method and apparatus for decoding bitstream
WO2011003233A1 (zh) 编码方法、装置与系统、解码方法、装置与系统
WO2020095706A1 (ja) 符号化装置、復号装置、符号列のデータ構造、符号化方法、復号方法、符号化プログラム、復号プログラム
KR100667595B1 (ko) 가변 길이 디코더
WO2011150810A1 (zh) 数据编码方法、解码方法、编码器和解码器
CN114429200A (zh) 规范化哈夫曼编解码方法及神经网络计算芯片
JP4093193B2 (ja) データ圧縮方法及びプログラムならびにデータ復元方法及び装置
Pic et al. Mq-coder inspired arithmetic coder for synthetic dna data storage
US20110260896A1 (en) Apparatus for parallel entropy encoding and decoding
WO2010078818A1 (zh) 位平面编码和解码方法、通信系统及相关设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980159012.6

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09846984

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09846984

Country of ref document: EP

Kind code of ref document: A1