WO2010078818A1 - 位平面编码和解码方法、通信系统及相关设备 - Google Patents

位平面编码和解码方法、通信系统及相关设备 Download PDF

Info

Publication number
WO2010078818A1
WO2010078818A1 PCT/CN2009/076214 CN2009076214W WO2010078818A1 WO 2010078818 A1 WO2010078818 A1 WO 2010078818A1 CN 2009076214 W CN2009076214 W CN 2009076214W WO 2010078818 A1 WO2010078818 A1 WO 2010078818A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit plane
vector
information
coding mode
unit
Prior art date
Application number
PCT/CN2009/076214
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 华为技术有限公司
Publication of WO2010078818A1 publication Critical patent/WO2010078818A1/zh

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes

Definitions

  • Bit plane coding and decoding method, communication system and related equipment The application is filed on December 30, 2008, the Chinese Patent Office, the application number is 200810189141.7, and the invention name is "bit plane coding and decoding method, communication system and related equipment". Priority of Chinese Patent Application, the entire contents of which is incorporated herein by reference. Technical field
  • the present invention relates to the field of data compression technologies, and in particular, to a bit plane coding and decoding method, a communication system, and related devices.
  • Bitplane Coding is a common data compression technology and has been widely used in image, video and audio compression.
  • the existing bit plane coding method includes: converting the quantized signal into a binary code; generating a multi-level (one level or more) bit plane by converting the binary code, and the maximum value of the signal determines the number of stages of the generated bit plane, And each level represents one bit of the signal; the converted binary code is started by the Most Significant Bit (MSB), and the layer is encoded. If there are remaining bits, the next bit is transferred to the next highest bit, and so on.
  • MSB Most Significant Bit
  • the plane is coded step by step.
  • the quantized signal has a maximum value of 15 (the binary code is 1111). After being converted into binary, it can generate a 4-level bit plane. From the highest to the lowest bit alignment plane according to the direction of the arrow in the figure. Encode.
  • the invention provides a bit plane coding and decoding method, a communication system and related equipment, and improves coding efficiency and accuracy of a bit plane.
  • a bit plane coding method comprising:
  • the next level bit plane of the current bit plane is used as the current bit plane, and the step of matching the information of the current bit plane with the preset information is performed.
  • a bit plane decoding method includes:
  • the vector coding information of the bit plane is decoded according to the vector coding mode to obtain a source binary code of the bit plane, and the parsed code stream data is returned to decode the next level bit plane of the bit plane.
  • a communication system includes: an encoding module and a decoding module;
  • the encoding module is configured to match the information of the current bit plane with the preset information, and if yes, select the encoding mode of the current bit plane as a vector encoding mode; according to the vector encoding mode, the current bit
  • the binary code of the plane is encoded to obtain a coded binary code; the binary code identifying the current bit plane coding mode and the coded binary code of the current bit plane are correspondingly written into the code stream; if there is a bit in the code stream If yes, the next bit plane of the current bit plane is used as the current bit plane, and the step of matching the information of the current bit plane with the preset information is performed;
  • the decoding module is configured to receive code stream data sent by the encoding module, parse the code stream data, and obtain a vector coding mode of the bit plane coding mode to obtain vector coding information of the bit plane; Correspondingly, the vector coding information of the bit plane is decoded according to the vector coding mode to obtain a source binary code of the bit plane, and the parsed code stream data is returned to decode the next level bit plane of the bit plane.
  • An encoding device comprising:
  • a preset information storage unit configured to store preset information
  • a matching unit configured to match information of a current bit plane with preset information stored by the preset information storage unit
  • a vector selection unit configured to: when the result of the matching unit matching is consistent, The coding mode of the pre-bit plane is selected as a vector coding mode;
  • a coding unit configured to encode a binary code of a current bit plane according to a vector coding mode selected by the vector selection unit;
  • a code stream forming unit configured to write a binary code identifying the current bit plane coding mode and a binary code of the current bit plane encoded by the coding unit into the code stream correspondingly, if there is a bit remaining in the code stream, The next-level bit plane of the current bit plane is used as the current bit plane, and the matching unit is notified to perform matching.
  • a decoding device comprising:
  • a parsing unit configured to parse the received code stream data, and obtain a vector coding mode of the bit plane when the binary code that identifies the bit plane coding mode is obtained into a vector coding mode
  • a decoding unit configured to: correspondingly decode the vector coding information of the bit plane according to the vector coding mode parsed by the parsing unit, obtain a source binary code of the bit plane, and return the parsing unit to parse the code stream data pair The next level bit plane of the bit plane is decoded.
  • the bit plane coding method of the present invention selects the corresponding coding mode of the bit plane by comparing the information of the bit plane with the preset information, and when the phase coincides, selects the vector coding mode, and the bit plane is followed.
  • the information encoded by the vector coding mode is written into the code stream.
  • the bit plane coding method of the present invention can use a simple method to select a coding mode and then encode the bit plane, which simplifies the calculation degree of the selected coding mode, thereby improving coding efficiency and accuracy; and selecting a vector coding mode when matching
  • the coding bit can be reduced to improve the efficiency of the bit plane coding; in addition, the user can preset the information used to select the vector coding mode according to the actual application, thereby improving the user experience.
  • FIG. 1 is a schematic diagram of a multi-level bit plane generated by a quantized signal in the prior art
  • FIG. 2 is a flowchart of a bit plane coding method according to Embodiment 1 of the present invention.
  • 3 is a coding structure diagram of a Chinese audio signal according to Embodiment 2 of the present invention
  • 4 is a flowchart of a coding structure of a Chinese audio signal according to Embodiment 2 of the present invention
  • FIG. 5 is a flowchart of a layer 2 bit plane coding in Embodiment 2 of the present invention.
  • FIG. 6 is a flowchart of coding LSB level bit plane in Embodiment 2 of the present invention.
  • FIG. 9 is a schematic structural diagram of a communication system provided by an embodiment of a system of the present invention.
  • FIG. 10 is a schematic structural diagram of an encoding apparatus according to Embodiment 1 of the device of the present invention.
  • FIG. 11 is a schematic structural diagram of an encoding device provided by Embodiment 2 of the device of the present invention.
  • FIG. 12 is a schematic structural diagram of an encoding apparatus according to Embodiment 3 of the apparatus of the present invention.
  • FIG. 13 is a schematic structural diagram of a decoding apparatus provided in Embodiment 4 of the apparatus of the present invention.
  • Embodiment 1 A bit plane coding method, as shown in FIG. 2, includes:
  • Step 101 Convert the quantized signal into a binary code
  • the object encoded by the bit plane in the embodiment of the present invention may be: a residual signal generated by a certain stage of the encoder (such as a signal enhancement layer), and a full-band time-frequency transform directly on the input signal.
  • the input signal is first band-divided using a filter bank (QMF), the signal generated by time-frequency conversion of each sub-band, and the like may be other signals, which does not limit the present invention.
  • QMF filter bank
  • Step 102 Generate an N-level bit plane, where the N is greater than or equal to 1, where the value of N is determined by the maximum value of the quantized signal in step 101;
  • Step 103 The MSB level plane is used as the current bit plane. It can be understood that the encoding of the level planes is coded step by step from the MSB level plane;
  • Step 105 Match information of the current bit plane with preset information, and if yes, select an encoding mode of the current bit plane as a vector coding mode; if not, perform the current bit plane
  • the encoding mode is selected as Run-length Encoding mode or direct encoding. Mode
  • the information preset here is pre-set information in the encoding device, and may be distribution information of a binary code indicating a bit plane, such as a bit plane binary codeword having a number greater than a few, or two in a bit plane "The number of "0" codewords distributed between the codes is greater than a few; it can also be bit information indicating the bit plane, such as the bit plane is the MSB bit, or the least bit (Least Significant Bits, LSB), or Other bits, etc.; may also be other information indicating the bit plane.
  • a binary code indicating a bit plane such as a bit plane binary codeword having a number greater than a few, or two in a bit plane "The number of "0" codewords distributed between the codes is greater than a few; it can also be bit information indicating the bit plane, such as the bit plane is the MSB bit, or the least bit (Least Significant Bits, LSB), or Other bits, etc.; may also be other information indicating the bit plane.
  • the bit information of the current bit plane is matched with the preset information, and if not, the current bit plane is the quantized signal.
  • the non-LSB bit selects the coding mode of the current bit plane as direct coding or run length coding; if it is consistent, that is, the current bit plane is the LSB bit of the quantized signal, the coding mode of the current bit plane is the vector coding mode.
  • Other vector coding modes may be used, such as Lattice Vector Quantization (LVQ), etc., which does not constitute a limitation of the present invention.
  • This method of selecting the coding mode of the bit plane is relatively simple, and it is only necessary to determine in the actual operation that the current bit plane is MSB or LSB or the like.
  • step 104 may be performed to calculate the distribution of the binary code in the current bit plane, and the current bit plane may be scanned to obtain the level plane. Distribution information such as the number and location of occurrences of "1" or "0".
  • the statistics in step 104 are performed.
  • the distribution information is the number of binary codes 1. If the length of the signal is 64, after statistics, there are 3 (reference quantities) or more binary codes "1” or 61 (reference quantities) of the following binary codes in the current bit plane" 0", the coding mode selected for the current bit plane is vector coding mode; if the number of binary codes " ⁇ " in the current bit plane is less than 3, or the number of binary codes "0" is greater than 61, the current bit plane is selected.
  • the coding mode is a direct coding or a run length coding mode; wherein the reference quantity 3 is determined according to the length of the quantized signal and combined with the actual quantized signal length. It can be seen that the method of selecting the coding mode for the bit plane is relatively simple to implement. And the calculation is relatively simple.
  • Step 106 Encode the binary code of the current bit plane according to an encoding mode of the current bit plane to obtain a coded binary code.
  • the encoding mode selected for the current bit plane in step 105 is selected as direct encoding or run length encoding, Directly encoding the position code of the binary code in the current bit plane as " ⁇ ", which can improve the coding efficiency of the bit plane; if the coding mode selected for the current bit plane is selected as a vector coding mode such as a lattice vector coding mode, the current bit plane is The binary code is decomposed into a plurality of vectors (one or more), and the vector is encoded. In practical applications, such vector coding methods use a small amount of bits for encoding, and the efficiency is relatively high.
  • Step 107 Write a binary code identifying the current bit plane coding mode and a coded binary code of the current bit plane into the code stream correspondingly;
  • the binary code that encodes the coding mode of the current bit plane and the binary code obtained by encoding the current bit plane according to the corresponding coding mode are correspondingly written into the code stream, so that the decoding end can correctly perform after receiving the code stream data. decoding.
  • Step 108 If there is a bit remaining in the code stream, use a next-level bit plane of the current bit plane as a current bit plane, and perform step 105 or step 104; if there is no bit remaining in the code stream, stop.
  • a method of Unary Coding can be obtained, and a unique code word is used to represent the N-level bits.
  • the number of levels not encoded in the plane As shown in Table 1 below, a code stream structure is shown in the table, where the code stream code (U-code) is characterized by the coding of the bit plane of the level, such as 0 for all codes, 10 for the lowest bit plane uncoded, and 1 bit for 1 bit.
  • the pattern -i characterizes the coding mode of each level of the bit plane; the code stream of mode-i contains the code stream of the bit plane encoded according to the selected coding mode, and also contains other important information such as: The distribution information of the binary code in the plane, such as the position information and the quantity information of "1".
  • the bit plane coding method of the present invention selects the corresponding coding mode of the bit plane by comparing the information of the bit plane with the preset information, and selects the vector coding when the phase matches.
  • the mode, and the information encoded by the bit plane according to the vector coding mode is written into the code stream.
  • the bit plane coding method of the present invention can use a simple method to select a coding mode and then encode the bit plane, which simplifies the calculation degree of the selected coding mode, thereby improving coding efficiency and accuracy; and selecting a vector coding mode when matching
  • the coding bit can be reduced to improve the efficiency of the bit plane coding; in addition, the user can preset the information used to select the vector coding mode according to the actual application, thereby improving the user experience.
  • Embodiment 2 A bit plane coding method, where the bit plane coding of the voice in the actual application is specifically described as an example.
  • FIG. 3 is a flow chart of the encoding of the speech and audio signals.
  • the input ultra-wideband signal passes through the low-pass filter bank (L-QMF) and the high-pass filter bank (H-QMF), it is divided into low band (0-8 kHz) and high.
  • the two channels (8-16 kHz) output signals ⁇ ( «) and ⁇ ⁇ ( «) respectively.
  • the frame length is set to 5 ms
  • the low band signal is processed by the core encoder, and a wideband signal can be output to the multi-channel analog switch (MUX) to obtain a broadband output of 0-8 kHz at a maximum rate of 64 kbps.
  • MUX multi-channel analog switch
  • Broadband expansion The performance specifications of current UWB encoders require a frequency range of at least 0-14 kHz. Therefore, ( «) can be low-pass filtered to a frequency range of 8 - 14 kHz before UWB encoding.
  • the encoding of the high-band signal 5 ⁇ (") is now implemented by the following steps.
  • the structure flow chart is shown in Figure 4: Al, &(") Modified Discrete Cosine Transform (MDCT) maps to the frequency domain .
  • MDCT Modified Discrete Cosine Transform
  • the obtained normalization factor can be encoded by a layer of quantization, and a low bit rate encoder can be used.
  • CS VQ is used as a quantization coding tool, and the MDCT coefficients are initially quantized and output to the MUX.
  • fine two-layer quantization coding is performed on the basis of one layer of quantization coding.
  • Two-layer quantization coding The subsequent associated code stream is combined and transmitted to the decoder to synthesize the MDCT coefficients of 8-14 kHz.
  • the input signal of the two-layer quantized coding is the difference between the original MDCT coefficient Y ( k ) and the MDCT coefficient Y' ( k ) outputted by a layer of quantized coding, that is, a layer of quantized encoded error signal.
  • the flow chart for performing the two-layer quantization coding is as shown in FIG. 5, and includes:
  • the quantized error information is generated into a multi-level (k-level, k > l) bit plane, and the highest level of the bit plane is determined by the maximum value of the error signal. It can be understood that side information of each bit plane can also be obtained (eg : distribution of non-zero elements of this layer, etc.);
  • step B3 Taking the MSB level bit plane in the k-level bit plane as the current bit plane, when the preset information includes information indicating that the bit plane is the LSB bit of the quantized signal, the bit of the quantized error signal is used.
  • the information is matched with the preset information, and may be implemented by determining whether the current bit plane is the lowest bit of the binary code corresponding to the quantized error signal, that is, the LSB. If not, executing step B4; if yes, Perform step B5;
  • the coding mode selected for the non-LSB bit plane is a position or run code encoding directly encoding "1";
  • a method of directly encoding the location of the ⁇ (pulse coding) is selected, and the non-LSB level plane is directly encoded to obtain a coded binary code, that is, a binary number of the position number of the codeword of 1 in the non-LSB level plane.
  • Code since the MDCT coefficient is 64, the binary code of the position number of one "1" codeword can be written into the code stream by 6 bits. For example: If the binary code of position 37 of a certain bit plane is " ⁇ , Then write "100101" to the code stream, which improves the coding efficiency. In addition, if "1" appears for the first time at position 37, then 1 bit is needed to record the symbol information of the MDCT coefficient at position 37.
  • the number of pulses encoded by the level plane is such that 0 indicates that the current bit plane has no binary code "1"; 10 indicates that the current bit plane has 1 binary code T.
  • the coding mode selected for the LSB level plane is coded in a vector coding mode such as a lattice vector coding mode, and the flowchart is as shown in FIG. 6.
  • the binary code of the LSB level plane is used in the lattice vector coding mode. Encoding to obtain the encoded binary code is achieved by the following steps:
  • step C1 step C2 needs to be performed.
  • C2 Prioritize the above eight vectors according to the number of binary codes in each vector.
  • the ranking result determines the priority of each vector coding in the level plane.
  • the number of "1"s in all vectors in the layer is obtained from the inner side information, and the side information is stored without extra bits.
  • the lattice vector encoder performs priority ordering with reference side information. When the bits are insufficient, the lower priority is directly quantized into all zero vectors by 1 bit. After obtaining the LSB level plane vector superior ranking information, the lattice vector encoder encoding process is similar to the related module in G.718. Finally, the lattice vector encoder performs the following vectors in order from low frequency to high frequency. Encoding step.
  • the lattice vector space herein may be preset by the encoding end according to the decomposed vector dimension, and the lattice vector space is a position arrangement combination (grid vector codebook) of all vectors including the all zero vector, and each vector (code number) Corresponding reference position.
  • the lattice vector space vector contains: From the vector ⁇ 0,0,0,0,0,0,0 ⁇ to the vector ⁇ 1,1, 1,1, 1 Position index information of 1,1,1, and a small number of code vectors such as ⁇ 1,0,0,0,0,0,0 ⁇ , ⁇ 1,1,0,0,0,0,0 , 0 ⁇ , etc., these code vectors are called absolute guide items.
  • the coded information in this step refers to the information written into the code stream, that is, a complex vector is associated with another simple coded information, and the coded information is sent out.
  • the decoder receives the code stream data, The position index information of the vector in the lattice vector space is found by the encoded information, and the vector is restored, so that the bit usage can be reduced at the encoding end, thereby improving the coding efficiency of the lattice vector in the prior art.
  • the encoding information includes, but is not limited to, the following information: the relative position index information of the decomposed vector in the lattice vector space with respect to a reference position, and the encoding information and the position index information of the decomposed vector in the lattice vector space
  • the correspondence is implemented by the following method.
  • the flow chart is shown in Figure 7:
  • the identification information herein refers to information identifying a certain area, and the identification information can uniquely find an area;
  • the identifier can be used to intercept the code stream;
  • the lattice vector space of the capacity 255 can be divided into six regions, and the index number interval of the position is used in the table. Representing; respectively, using an identification information, that is, a dock to represent an interval, and determining a reference position in each interval, such as a reference value in the table; and associating the dock, the reference value, and the index number interval of each region to form a table
  • the codebook information table in 2. It can be understood that other information such as a codebook number, a codeword length, and the like may be associated in the correspondence, wherein the codebook number Q0 indicates the terminal in the area.
  • the number of "1" codewords is 0; the codeword length is the binary code length of the maximum value in the index number interval; in addition, when the codebook information table is generated by the present invention, the corresponding information of the terminal "111111" is also stored, if the LSB The remaining vectors in the level plane are all all zero vectors, and when the number is greater than 6, they are directly encoded with "111111".
  • step C4 Obtain coding information of the at least one vector according to the correspondence formed in step C3, and write the coding information into the code stream.
  • the indexing method according to the classical lattice vector encoding first finds the position of the quantized value in the lattice vector space to be 35.
  • the offset value in the table is the position code of the corresponding absolute boot term in the grid vector space; the number of arrays is the number of vectors corresponding to the absolute boot term, and the position number of these vectors is in the corresponding boot entry and the next absolute Between the positions of the boot items; Q0 to Q5 indicate the area where the vector corresponding to the absolute boot entry is located.
  • the vector ⁇ 0,0,0,0,0,0,1,1 ⁇ is the vector ⁇ 1,1,0,0,0,0,0 ⁇
  • the encoded information that is, the relative position 3 of the position number 35 of the vector with respect to the reference value 32 is obtained;
  • the decoder can correctly solve the dock, and read 5 bits to obtain the relative position of the vector, and then obtain its absolute position, and finally reconstruct the vector.
  • bit plane coding is used, and the coding process of the error signal of the layer quantizer is completed in the order from MSB to LSB.
  • the first and second layer code streams are combined, they are transmitted to the decoder together with the core layer encoder stream.
  • bit plane vector coding method can also be applied to coding images and video signals. It is not intended to limit the invention. In practical applications, before the bit layer coding of the above two layers, the signal needs to be normalized, and as far as possible, when there is bit plane coding, there are enough code streams to encode each level of the bit plane.
  • the bit plane coding mode selected in the bit plane coding method has two types.
  • the coding mode of the LSB level bit plane is selected as the vector coding mode, and the coding mode of the non-LSB level bit plane is selected as the direct coding mode or the run length coding mode.
  • the degree of calculation is simplified; and in the embodiment, the lattice vector coding mode selected for the LSB level bit plane is used: the vector into which the bit plane is decomposed is written into the code stream by using simple coding information, and the bit is reduced. The amount of use increases the coding efficiency.
  • Embodiment 3 A bit plane decoding method, which is shown in FIG. 8 and includes:
  • Step 301 Parsing the received code stream data, obtaining a binary code of the bit plane coding mode to obtain a vector coding mode, obtaining vector coding information of the bit plane, and performing step 303; obtaining a binary of the identification bit plane coding mode If the code is another coding mode such as direct coding or run length coding, step 302 is performed;
  • Step 302 Decode the encoded binary code of the bit plane correspondingly according to another coding mode such as direct coding or run length coding, obtain a source binary code of the bit plane, and return to step 301 to parse the code stream data pair. Decoding the next level bit plane of the bit plane;
  • another coding mode such as direct coding or run length coding
  • the encoding end is encoded step by step, and the decoding end is also decoded step by step. If the binary code of the identifier bit plane coding mode parsed in step 301 indicates that the level bit plane uses direct coding or run length coding, the coded binary code of the level bit plane includes: location information of the level bit codeword being 1, The side information of the level plane is the distribution of the binary code in the level plane, the length of the encoded input signal, etc., and the decoding end needs to decode the position information according to the side information, and the source binary code of the level plane can be restored.
  • Step 303 Decode the vector coding information of the bit plane correspondingly according to the vector coding mode, obtain a source binary code of the bit plane, and return to step 301 to parse the code stream data to the bit plane. Decoding the first level plane; If the vector code is a trellis vector code, since the cell vector coding is performed in units of vectors, the coded binary code is vector coded information. If the method as described in the second embodiment is used in encoding, when decoding, the following steps are implemented:
  • Step 3030 Obtain a correspondence between the vector coding information and the location index information of the vector in the cell vector space.
  • the encoding information herein may be the relative position index information of the vector in the lattice vector space with respect to a reference position as described in the second embodiment, and details are not described herein again.
  • the obtaining of the correspondence may be obtained by the side information in the code stream, or may be preset by the decoding end, and may be obtained by other methods, which does not constitute a limitation of the present invention.
  • Step 3031 Obtain location index information of the vector in a lattice vector space according to the correspondence, and find a source binary code in the vector in the lattice vector space.
  • the correspondence table obtained by the decoder is as shown in Table 2 above, and the parsed binary code is the binary of the dock "110" and the relative position of the vector encoded by the 5-bit in the lattice vector space relative to a reference position.
  • the code 00011 according to the reference value in Table 2, obtains the position of the vector in the lattice vector space is 35, and finds the source binary code in the vector in the lattice vector space as ⁇ 0, 0, 0, 0, 0, 0. , 1,1 ⁇ .
  • the above process is an inverse process of the coding method, and is complementary to the bit plane coding method.
  • the decoding efficiency is also improved at the decoding end.
  • Step 304 After obtaining the source binary code of each level plane, the source signal is restored by the source binary code of the level planes and the auxiliary information.
  • the encoding end When the encoding end is encoded, due to the limitation of the code stream bits, the encoding end may not encode all the stages in the generated bit plane, and the decoding end needs to restore the source binary code according to the encoded binary code when decoding, and With the aid of auxiliary information such as: How many levels in the bit plane are not encoded, or all of the bit planes are encoded, the source quantized signal can be restored.
  • the encoding end cannot encode all the level bit planes when encoding, and there is a low level bit plane that cannot be encoded, resulting in loss of precision, and the signal decoded by the decoding end is depleted.
  • the bit amount used in the coding is reduced, and at the same time, there are more remaining bits in the bit plane of the bit coding plane, so that the binary code in the bit plane of the coding end is encoded. The number will increase, and accordingly, the decoder will restore The loss of the signal will be reduced.
  • bit plane decoding method in the foregoing embodiment is that the binary code of the bit plane coding mode is used to decode the coded binary code of the bit plane, and the source signal is restored, when the binary code of the identifier bit plane coding mode is vector coded.
  • the encoding side uses fewer bits, so the decoded bits of the decoding end are also reduced compared with the prior art, thereby improving the decoding efficiency.
  • a person skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware.
  • the program can be stored in a computer readable storage medium.
  • the storage medium can include: ROM, RAM, disk or CD, etc.
  • System Embodiment 1 A communication system, as shown in FIG. 9, includes: an encoding module 100 and a decoding module 200, wherein:
  • the encoding module 100 is configured to match the information of the current bit plane with the preset information, and if yes, select the encoding mode of the current bit plane as a vector encoding mode; according to the vector encoding mode, the current
  • the binary code of the bit plane is encoded to obtain a coded binary code; the binary code identifying the current bit plane coding mode and the coded binary code of the current bit plane are correspondingly written into the code stream; if the code stream has If the bit is remaining, the next bit plane of the current bit plane is used as the current bit plane, and the step of matching the information of the current bit plane with the preset information is performed;
  • the decoding module 200 is configured to receive the code stream data of the encoding module 100, and parse the code stream data, and obtain a vector code of the bit plane when the binary code of the identification bit plane coding mode is obtained into a vector coding mode. And decoding, according to the vector coding mode, the vector coding information of the bit plane, to obtain a source binary code of the bit plane, and returning the parsed code stream data to the next level bit plane of the bit plane; decoding.
  • the encoding module 100 selects the corresponding coding mode of the bit plane by comparing the information of the bit plane with the preset information, and selects the vector coding mode when the phase matches, and follows the vector of the bit plane.
  • the information encoded by the coding mode is written into the code stream, and the coding mode is selected and coded in a simple manner, which simplifies the calculation degree of the selected coding mode, thereby improving coding efficiency and accuracy; and selecting The vector coding mode can reduce the coding use bits and improve the efficiency of bit plane coding.
  • the decoding module 200 encodes according to the bit plane. The mode is decoded.
  • Device Embodiment 1 is a coding device.
  • the schematic diagram of the structure is as shown in FIG. 10, including: a preset information storage unit 10, a matching unit 11, a vector selection unit 12, an encoding unit 13, and a code stream forming unit 14, wherein:
  • a preset information storage unit 10 configured to store preset information
  • the information preset here may be the distribution information of the binary code indicating the bit plane, such as the number of bits of the bit plane binary codeword being greater than a few, or the "0" codeword distributed between two "1" codes in the bit plane.
  • the number is greater than a few; it can also be bit information indicating the bit plane, such as the bit plane is MSB bit, or LSB bit, or other bits; etc.; can also be other information indicating the bit plane.
  • the matching unit 11 is configured to match the information of the current bit plane with the preset information stored by the preset information storage unit 10;
  • the matching unit 11 compares whether the bit information of the current bit plane is an MSB bit or an LSB bit or other bits when matching. Matches preset information.
  • a vector selection unit 12 configured to select, when the matching unit 11 matches, a coding mode of the current bit plane as a vector coding mode
  • the vector coding mode here may be a lattice vector coding mode or the like.
  • the encoding unit 13 is configured to encode the binary code of the current bit plane according to the vector coding mode selected by the vector selection unit 12;
  • the code stream forming unit 14 is configured to write the binary code of the current bit plane coding mode selected by the vector selection unit 12 and the binary code of the current bit plane encoded by the coding unit 13 into the code stream correspondingly. If there is a bit remaining in the code stream, the next-level bit plane of the current bit plane is used as the current bit plane, and the matching unit 11 is notified to perform matching.
  • the matching unit 11 compares the information of the bit plane with the preset information to select the corresponding encoding mode of the bit plane.
  • the vector selecting unit 12 selects the vector encoding mode, and the code is selected.
  • the stream forming unit 14 writes the information encoded by the encoding unit 13 on the bit plane in accordance with the vector encoding mode into the code stream.
  • the encoding device of the present invention can perform coding in a selective coding mode on a bit plane by a simple method, which simplifies the calculation degree of selecting a coding mode, thereby improving Coding efficiency and precision; and when selected as vector coding mode, the coding use bits can be reduced, and the efficiency of bit plane coding can be improved; in addition, the user can modify the vector code stored in the preset information storage unit 10 according to the actual application. Mode information improves the user experience.
  • Device Embodiment 2 an encoding device, a schematic structural diagram is shown in FIG. 11.
  • the encoding device of this embodiment has a distribution statistics unit 15 and a mode selection unit 16 as compared with the device embodiment 1, wherein:
  • the distribution statistic unit 15 is configured to: when the preset information of the preset information storage unit 10 includes distribution information of a binary codeword of a bit plane, calculate a distribution of a binary code in the current bit plane;
  • the preset information stored by the preset information storage unit 10 includes information indicating that the number of binary codes in the bit plane is greater than the reference amount, or information indicating that the number of binary codes in the bit plane is less than the reference amount
  • the reference quantity is determined according to the quantized signal length
  • the information that is calculated by the distribution statistic unit 15 includes: counting the number of binary codes in the current bit plane being 1 or 0;
  • the mode selection unit 16 is configured to select, when the matching unit 11 matches results, that the coding mode of the current bit plane is a direct coding mode or a run length coding mode.
  • the distribution statistic unit 15 counts the distribution of the binary code in the current bit plane, and the matching unit 11 will distribute the statistics.
  • the encoding mode selected by the vector selecting unit 12 for the current bit plane is a vector encoding mode;
  • the mode selection unit 16 selects the coding mode of the current bit plane as the direct coding mode or the run length coding mode.
  • the binary code of the current bit plane is then encoded by the encoding unit 13 in accordance with the vector coding mode selected by the vector selection unit 12, or the binary code of the current bit plane is encoded according to the coding mode selected by the mode selection unit 16.
  • the code stream forming unit 14 writes the binary code identifying the current bit plane coding mode selected by the vector selection unit 12 and the binary code of the current bit plane encoded by the coding unit 13 into the code stream, or the mode.
  • the binary code of the current bit plane coding mode selected by the selecting unit 16 and the binary code of the current bit plane encoded by the coding unit 13 are correspondingly written into the code stream, and if there are bits remaining in the code stream, the The next-level bit plane of the current bit plane is used as the current bit plane, and the matching unit 11 is notified to perform matching.
  • the encoding device performs bit plane coding to divide the statistics in the statistical unit 15
  • the distribution of the code is compared with the preset information of the preset information storage unit 10.
  • This method is relatively simple, so that the encoding device can achieve the purpose of improving the encoding efficiency by using a simple structure.
  • the third embodiment of the device is a coding device.
  • the structure of the device is as shown in FIG. 12.
  • the coding device of the embodiment is compared with the device embodiment 1 to refine the coding unit 13, and includes: a lattice vector space forming unit 131, and a corresponding relationship generation.
  • the unit 132 and the encoding information obtaining unit 133 wherein:
  • a vector decomposition unit 131 configured to: when the vector selection unit 12 selects an encoding mode for the current bit plane, a lattice vector coding mode, and decompose the binary code of the level plane into at least one vector; the correspondence generation unit 132, Generating a correspondence between position index information and encoding information of the at least one vector decomposed by the lattice vector decomposition unit 131 in the lattice vector space;
  • the correspondence relationship generating unit 132 may include a region decomposing unit 142, a reference location determining unit 152, and an associating unit 162, where the region decomposing unit 142 is configured to decode at least one vector according to the trellis vector decomposition unit 131.
  • the reference position determining unit 152 is configured to respectively indicate the plurality of regions decomposed by the region decomposition unit 142 with corresponding identification information, and in each region Determining a reference position; the association unit 162, location index information for the plurality of regions decomposed by the region decomposition unit 142, index information indicating the plurality of regions, and an index corresponding to the reference locations of the plurality of regions Information is correlated to form a correspondence.
  • the encoding information obtaining unit 133 is configured to obtain, according to the correspondence generated by the association unit 162 in the correspondence relationship generating unit 132, the encoding information of the at least one vector, where the encoding information is the encoded binary code of the at least one vector.
  • the encoding information herein includes the relative position index information of the vector decomposed into the lattice vector space with respect to a reference position by the lattice vector decomposition unit 131.
  • the code stream forming unit 14 writes the encoded information obtained by the encoding information obtaining unit 133 into the code stream.
  • the coding unit 13 may further include: a sorting unit 134, where the at least one vector decomposed by the trellis vector decomposition unit 131 includes two or more vectors, and the number of pairs of binary codes in each vector is The two or more vectors are prioritized.
  • the encoding information obtaining unit 133 encodes the vector of the bit plane in accordance with the vector order in the sorting unit 134.
  • the encoding unit 13 is refined, and when the vector selecting unit 12 is selected for the current bit plane
  • the correspondence relationship generation unit 132 generates a correspondence relationship, associates the complex trellis vector with the simple coding information, and writes the coding information into the code stream.
  • the coding device used in this embodiment can reduce bit usage and increase the coding rate.
  • Device Embodiment 4 A decoding device, a schematic structural diagram is shown in FIG. 13, and includes: a parsing unit 30, a decoding unit 31, and a restoring unit 32, where:
  • the parsing unit 30 is configured to parse the received code stream data, and obtain a vector coding mode of the bit plane, and obtain vector coding information of the bit plane;
  • the decoding unit 31 is configured to: according to the vector coding mode parsed by the parsing unit 30, correspondingly decode the vector coding information of the bit plane, obtain a source binary code of the bit plane, and return the parsing unit to parse the code stream.
  • the data decodes the next level bit plane of the bit plane.
  • the decoding unit 31 may include: a correspondence relationship obtaining unit 310 and a searching unit 311, where: the correspondence relationship obtaining unit 310 is configured to obtain the vector coding information and the vector in the lattice vector space obtained by the parsing unit 30. Corresponding relationship of the location index information; the searching unit 311 is configured to obtain location index information of the vector in the cell vector space according to the correspondence relationship obtained by the correspondence relationship obtaining unit 310, and use the location index information in the The source binary code in the vector is found in the lattice vector space.
  • the decoding device of the present embodiment can reduce the number of bits used for decoding at the time of encoding, because the encoding device can save the coded bits during decoding, thereby improving the code efficiency.
  • the bit plane coding method of the present invention selects the corresponding coding mode of the bit plane by comparing the information of the bit plane with the preset information, and when the phase coincides, selects the vector coding mode, and the bit plane is followed.
  • the information encoded by the vector coding mode is written into the code stream.
  • the bit plane coding method of the present invention can use a simple method to select a coding mode and then encode the bit plane, which simplifies the calculation degree of the selected coding mode, thereby improving coding efficiency and accuracy; and selecting a vector coding mode when matching
  • the coding bit can be reduced to improve the efficiency of the bit plane coding; in addition, the user can preset the information used to select the vector coding mode according to the actual application, thereby improving the user experience.
  • bit plane coding and decoding method, communication system and related information provided by the embodiments of the present invention
  • the description of the above embodiments is only for helping to understand the method of the present invention and its core ideas; at the same time, for those skilled in the art, according to the idea of the present invention, it will be in the specific embodiment and application range. In the above, the contents of the specification are not to be construed as limiting the invention.
  • the invention provides a bit plane coding and decoding method, a communication system and related equipment, and is applied to the field of data compression technology.
  • the bit plane coding method of the present invention selects the coding mode corresponding to the bit plane by comparing the information of the bit plane with the preset information, and selects a vector coding mode when the coincidence, and encodes the bit plane according to the vector coding mode.
  • the post information is written into the code stream.
  • the bit plane coding method of the present invention can use a simple method to select a coding mode and then encode the bit plane, which simplifies the calculation degree of the selected coding mode, thereby improving coding efficiency and accuracy; and selecting a vector coding mode when matching
  • the coding bit can be reduced to improve the efficiency of the bit plane coding; in addition, the user can preset the information used to select the vector coding mode according to the actual application, thereby improving the user experience.

Description

位平面编码和解码方法、 通信系统及相关设备 本申请要求于 2008 年 12 月 30 日提交中国专利局、 申请号为 200810189141.7、 发明名称为 "位平面编码和解码方法、 通信系统及相关设 备" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及数据压缩技术领域, 特别涉及位平面编码和解码方法、 通信 系统及相关设备。
背景技术
位平面编码(Bitplane Coding, BPC )是一种常见的数据压缩技术, 并且 在图像、视频、音频压缩领域获得广泛的应用。现有的位平面编码方法包括: 将量化后的信号转换成二进制码;将转换成的二进制码生成多级(一级以上) 位平面, 该信号的最大值决定了生成位平面的级数, 且每一级代表信号的一 位; 将转换成的二进制码由最高位(Most Significant Bit, MSB )开始, 对该 层进行编码, 若有剩余比特, 则转到次高位, 依此类推对位平面进行逐级编 码。
参阅图 1 , 量化后的信号最大值为 15 (二进制码为 1111 ), 转化为二进 制后, 能生成 4级位平面, 在编码时根据图中箭头的方向, 从最高位到最低 位对位平面进行编码。
在对上述现有技术实践和研究过程中, 本发明的发明人发现: 现有的位 平面编码方法的编码效率不高。
发明内容
本发明提供位平面编码和解码方法、 通信系统及相关设备, 提高了位平 面的编码效率和精度。
一种位平面编码方法, 包括:
将当前位平面的信息与预置的信息进行匹配, 若相符合, 则将所述当前 位平面的编码模式选择为矢量编码模式;
按照所述矢量编码模式对当前位平面的二进制码进行编码得到编码后二 进制码;
将标识所述当前位平面编码模式的二进制码及所述当前位平面的编码后 二进制码对应地写进码流;
若所述码流中有比特剩余, 则将所述当前位平面的下一级位平面作为当 前位平面, 并执行所述将当前位平面的信息与预置的信息进行匹配的步骤。
一种位平面解码方法, 包括:
解析接收到的码流数据, 当得到标识位平面编码模式的二进制码为矢量 编码模式, 获得所述位平面的矢量编码信息;
根据所述矢量编码模式对应地将所述位平面的矢量编码信息进行解码, 得到所述位平面的源二进制码, 并返回解析码流数据对所述位平面的下一级 位平面进行解码。
一种通信系统, 包括: 编码模块和解码模块;
所述编码模块, 用于将当前位平面的信息与预置的信息进行匹配, 若相 符合, 则将所述当前位平面的编码模式选择为矢量编码模式; 按照所述矢量 编码模式对当前位平面的二进制码进行编码得到编码后二进制码; 将标识所 述当前位平面编码模式的二进制码及所述当前位平面的编码后二进制码对应 地写进码流; 若所述码流中有比特剩余, 则将所述当前位平面的下一级位平 面作为当前位平面, 并执行所述将当前位平面的信息与预置的信息进行匹配 的步骤;
所述解码模块, 用于接收所述编码模块发送的码流数据, 解析所述码流 数据, 当得到标识位平面编码模式的二进制码为矢量编码模式, 获得所述位 平面的矢量编码信息; 根据所述矢量编码模式对应地将所述位平面的矢量编 码信息进行解码, 得到所述位平面的源二进制码, 并返回解析码流数据对所 述位平面的下一级位平面进行解码。
一种编码设备, 包括:
预置信息储存单元, 用于储存预置信息;
匹配单元, 用于将当前位平面的信息与所述预置信息储存单元储存的预 置信息进行匹配;
矢量选择单元, 用于当所述匹配单元匹配的结果为相符合, 则将所述当 前位平面的编码模式选择为矢量编码模式;
编码单元, 用于按照所述矢量选择单元选择的矢量编码模式对当前位平 面的二进制码进行编码;
码流形成单元, 用于将标识当前位平面编码模式的二进制码及所述编码 单元编码后的当前位平面的二进制码对应地写进码流, 若所述码流中有比特 剩余, 则将所述当前位平面的下一级位平面作为当前位平面, 并通知所述匹 配单元进行匹配。
一种解码设备, 包括:
解析单元, 用于解析接收到的码流数据, 当得到标识位平面编码模式的 二进制码为矢量编码模式, 获得所述位平面的矢量编码信息;
解码单元, 用于根据所述解析单元解析的矢量编码模式对应地将所述位 平面的矢量编码信息进行解码, 得到所述位平面的源二进制码, 并返回所述 解析单元解析码流数据对所述位平面的下一级位平面进行解码。
可以看出, 本发明的位平面编码方法是通过将位平面的信息与预置的信 息进行比较来选择位平面相应的编码模式, 在相符合时, 选择为矢量编码模 式, 并将位平面按照矢量编码模式编码后的信息写进码流。 本发明的位平面 编码方法可以釆用简单的方法对位平面进行选择编码模式后编码, 简化了选 择编码模式的计算程度, 从而可以提高编码效率和精度; 且在相符合时选择 为矢量编码模式, 可以减少编码使用比特, 提高位平面编码的效率; 另外用 户可以根据实际应用在编码端预置用来选择矢量编码模式的信息, 提高了用 户体验。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面 描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1是现有技术中量化后的信号生成多级位平面的示意图;
图 2是本发明实施例一提供的位平面编码方法的流程图;
图 3是本发明实施例二中语音频信号的编码结构图; 图 4是本发明实施例二中语音频信号的编码结构流程图;
图 5是本发明实施例二中二层位平面编码的流程图;
图 6是本发明实施例二中对 LSB级位平面编码的流程图;
图 7是本发明实施例二中生成对应关系的流程图;
图 8是本发明实施例三提供的位平面解码的流程图;
图 9是本发明系统实施例提供的通信系统的结构示意图;
图 10是本发明设备实施例一提供的编码设备的结构示意图;
图 11是本发明设备实施例二提供的编码设备的结构示意图;
图 12是本发明设备实施例三提供的编码设备的结构示意图;
图 13是本发明设备实施例四提供的解码设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而 不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做 出创造性劳动前提下所获得的所有其他实施例 , 都属于本发明保护的范围。
实施例一、 一种位平面编码方法, 如图 2所示, 包括:
步骤 101、 将量化后的信号转化成二进制码;
本发明实施例中对位平面编码的对象除了输入的原始信号之外, 还可以 是: 编码器某个阶段(如信号增强层)产生的残差信号、 直接对输入信号进 行全带时频变换产生信号、 先使用滤波器组(QMF )对输入信号进行分带后, 对各子带进行时频变换产生的信号等, 还可以是其他的信号, 这并不造成对 本发明的限制。
步骤 102、 将所述二进制码生成 N级位平面, 所述 N大于等于 1 , 这里 N的 值是由步骤 101中量化后的信号的最大值决定的;
步骤 103、 将 MSB级位平面作为当前位平面; 可以理解, 在对各级位平面 进行编码时是从 MSB级位平面开始逐级编码的;
步骤 105、 将当前位平面的信息与预置的信息进行匹配, 若相符合, 则将 所述当前位平面的编码模式选择为矢量编码模式; 若不相符合, 则将所述当 前位平面的编码模式选择为游程编码( Run-length Encoding )模式或直接编码 模式;
可以理解, 这里预置的信息是编码设备内预先设定的信息, 可以为指示 位平面的二进制码的分布信息, 如位平面二进制码字为 1的个数大于几, 或位 平面中两个 "Γ 码之间分布的 "0" 码字的个数大于几等; 也可以是指示位 平面的位信息,如位平面是 MSB位,或是最低位(Least Significant Bits , LSB ), 或是其它位等; 还可以是指示位平面的其它的信息。
其中, 当预置的信息包括指示位平面是量化后的信号的 LSB位, 则将当前 位平面的位信息与预置的信息进行匹配, 若不相符合, 即当前位平面是量化 后的信号的非 LSB位, 则将当前位平面的编码模式选择为直接编码或游程编 码; 若相符合, 即当前位平面是量化后的信号的 LSB位, 则将当前位平面的编 码模式为矢量编码模式如格矢量编码模式(Lattice Vector Quantization, LVQ ) 等, 也可以是其它的矢量编码模式, 这并不构成对本发明的限制。 这种选择 位平面的编码模式的方法比较简单, 只需在实际的操作过程中确定当前位平 面是 MSB或 LSB或其他。
当预置的信息包括位平面的二进制码字的分布信息, 本步骤之前, 可以 执行步骤 104, 统计当前位平面中二进制码的分布, 可以通过对当前位平面进 行扫描, 来得到该级位平面中 "1" 或 "0" 出现的次数及位置等分布信息。
更具体地, 当预置的信息包括指示位平面中二进制码为 1的个数大于参考 量, 或指示位平面中二进制码为 0的个数小于参考量的信息时, 则步骤 104中 统计的分布信息为二进制码为 1的个数, 如信号的长度为 64, 经过统计, 当前 位平面中有 3 (参考量)个以上二进制码 "1" , 或 61 (参考量)个以下二进 制码 "0" , 则为当前位平面选择的编码模式为矢量编码模式; 当前位平面出 现二进制码 "Γ 的个数小于 3 , 或二进制码 "0" 的个数大于 61 , 则为当前位 平面选择的编码模式为直接编码或游程编码模式; 其中参考量 3是根据量化后 信号的长度, 并结合实际的量化后的信号长度确定的。 可见这种为位平面选 择编码模式的方法实现起来比较简单, 且计算也比较简单。
步骤 106、 按照当前位平面的编码模式对当前位平面的二进制码进行编码 得到编码后二进制码;
当步骤 105中为当前位平面选择的编码模式选择为直接编码或游程编码, 则直接编码当前位平面中二进制码为 " Γ 的位置信息, 这样可以提高位平面 的编码效率; 为当前位平面选择的编码模式选择为矢量编码模式如格矢量编 码模式, 则将当前位平面的二进制码分解成多个矢量(一个以上), 并对所述 矢量进行编码。 在实际的应用中这种矢量编码方法进行编码时使用比特量少, 效率比较高。
步骤 107、 将标识所述当前位平面编码模式的二进制码及所述当前位平面 的编码后二进制码对应地写进码流;
可以理解, 将标识当前位平面的编码模式的二进制码及当前位平面按照 相应的编码模式进行编码后得到的二进制码对应地写进码流, 这样解码端在 接收到码流数据后才能进行正确解码。
步骤 108、 若所述码流中有比特剩余, 则将所述当前位平面的下一级位平 面作为当前位平面, 并执行步骤 105或步骤 104; 若所述码流中没有比特剩余, 则停止。
需要说明的, 在上述方法中, 对于在编码某一级位平面, 有某一位置上 首次出现二进制码 " 1 " 时, 需要在编码完该级位平面后, 再花 1比特二进制 码 "0" (正)或 "Γ (负)表示该位置对应的量化信号的符号。 若在后续位 平面中相同位置上依然出现 "1 " 时, 也无需再花比特编码符号信息。
此外, 为了使解码端获得正确的位平面最大级数, 在位平面编码中, 在 码流的起始位置, 可以釆取一元编码(Unary Coding )的方式, 使用唯一的码 字表征 N级位平面中未进行编码的级数。 如下表 1所示, 为码流结构示意表, 其中码流代码(U-code )表征为该级位平面的编码情况, 如 0表示全部编码, 10表示最低级位平面未编码; 用 1比特的模式 -i表征每级位平面的编码模式; 模式 -i的码流中包含了该位平面的按照选定的编码模式编码后的码流,还包含 了其他一些重要信息如: 每级位平面中二进制码的分布信息如 "1" 的位置信 息和数量信息等。
Figure imgf000008_0001
表 1 码流结构示意表
可以看出, 本发明的位平面编码方法是通过将位平面的信息与预置的信 息进行比较来选择位平面相应的编码模式的, 在相符合时, 选择为矢量编码 模式, 并将位平面按照矢量编码模式编码后的信息写进码流。 本发明的位平 面编码方法可以釆用简单的方法对位平面进行选择编码模式后编码, 简化了 选择编码模式的计算程度, 从而可以提高编码效率和精度; 且在相符合时选 择为矢量编码模式, 可以减少编码使用比特, 提高位平面编码的效率; 另外 用户可以根据实际应用在编码端预置用来选择矢量编码模式的信息, 提高了 用户体验。 实施例二、 一种位平面编码方法, 本实施例中实际应用中语音的位平面 编码为例具体说明。
图 3是对语音频信号编码的流程图 , 输入的超宽带信号 经过低通滤波 器组( L-QMF )和高通滤波器组( H-QMF )后,分低带( 0-8kHz )和高带( 8-16kHz ) 两个通道分别输出信号 ^ («)和^ ^ («)。 本实施例中, 设定帧长为 5ms, 低带信 号经过核心编码器处理, 可以将一个宽带信号输出到多路模拟开关 (MUX ), 以最高速率 64kbps获得 0-8kHz的宽带输出,进行超宽带扩展; 现行的超宽带编 码器的性能指标要求频率范围至少为 0-14kHz, 因此, 在进行超宽带编码前, 可对 («)进行低通滤波 , 使其频率范围为 8- 14kHz。
对高带信号5 ^(")的编码, 通过以下步骤现实现, 结构流程图如图 4所示: Al、 & (")经改进离散余弦变换(Modified Discrete Cosine Transform, MDCT ) 映射到频域。 通过一定的计算, 由于帧长为 5ms , 则每一帧信号的 MDCT系数个数为 80 , 而由于有效频率范围为 8-14kHz, 有效的 MDCT系数为 60, 为了处理方便, 可以在编码端添加 4个零点, 组成一个大小为 64的 MDCT 系数数组。
A2、 对 MDCT系数进行归一化处理, 使得 MDCT系数的动态范围不至过 大。 所求得的归一化因子可通过一层量化编码, 可以用一个低码率编码器, 本实施例中以 CS VQ作为量化编码工具, 初步地将 MDCT系数量化编码后输出 到 MUX。
A3、 经过 16kbps下的 CSVQ量化编码后, 仅能对 MDCT系数进行粗量化, 量化误差较大, 特别是对音乐信号, 输出音质需要进一步提升。 因此, 本实 施例在一层量化编码的基础上, 进行精细的二层量化编码。 两层的量化编码 后的相关码流会进行合并传输到解码端合成 8-14kHz的 MDCT系数。 二层量化编码的输入信号是原始 MDCT系数 Y ( k ) 与一层量化编码后输 出的 MDCT系数 Y' ( k )之差, 也就是一层量化编码后的误差信号。 进行二层 量化编码的流程图如图 5所示, 包括:
Bl、 将误差信号进行量化;
B2、 将量化后的误差信息生成多级(k级, k > l )位平面, 位平面的最高 级由误差信号中最大值决定,可以理解,还可以获得各级位平面的边信息(如: 该层的非零元素的分布情况等);
B3、将 k级位平面中的 MSB级位平面作为当前位平面, 当预置的信息包括 指示位平面是所述量化后的信号的 LSB位的信息,将所述量化后的误差信号的 位信息与所述预置的信息进行匹配, 可以通过判断当前位平面是否是所述量 化后的误差信号对应的二进制码的最低位即 LSB来实现,如果否, 则执行步骤 B4; 如果是, 则执行步骤 B5;
B4、 为非 LSB位平面选择的编码模式为直接编码 "1" 的位置或游程编码 等;
本实施例中, 选择直接编码 "Γ 的位置的方式(脉冲编码), 将非 LSB 级位平面直接编码后得到编码后二进制码, 即非 LSB级位平面中码字为 1的位 置编号的二进制码, 由于 MDCT系数为 64个, 可用 6比特将 1个 "1" 码字的位 置编号的二进制码写进码流。 例如: 若某一级位平面的 37号位置的二进制码 为 "Γ , 则将 "100101" 写入码流, 提高了编码效率。 此外, 若此时是 37号 位置首次出现 "1" , 则还需用 1比特纪录 37号位置 MDCT系数的符号信息; 还 需要在当前位平面编码码流的最前端添加可识别的码头, 表征该级位平面被 编码的脉冲数量, 如用 0表示当前位平面无二进制码 "1" ; 10表示当前位平面 有 1个二进制码 T。
Β5、 为 LSB级位平面选择的编码模式为矢量编码模式如格矢量编码模式 等进行编码, 流程图如图 6所示, 本实施例中釆用格矢量编码模式将 LSB级位 平面的二进制码进行编码得到编码后二进制码通过以下步骤实现:
Cl、 将 LSB级位平面的二进制码分解为至少一个矢量。 本实施例中由于 MDCT系数为 64个, 则 LSB级位平面的二进制码可以分解成 8个维度为 8的矢 量。
可以理解, 由于受比特限制, 某些情况下, 不能保证同一级内所有的矢 量均能编码。 因此, 在步骤 C1之后, 需要执行步骤 C2。
C2、 根据每个矢量中二进制码为 1的个数对上述 8个矢量进行优先排序。 该排序结果决定了该级位平面中各矢量编码的优级。 在编码端中, 层内所有 矢量中 "1" 的个数由内边信息获得, 并且, 这些边信息无需花费额外比特进 行存贮。 格矢量编码器参考边信息完成优先级排序, 当比特不足时, 优先级 较低的直接用 1比特量化成全零矢量。获得 LSB级位平面矢量优级排序信息后, 格矢量编码器编码的流程与 G.718中相关模块类似, 最终, 格矢量编码器会按 照从低频到高频的顺序将各矢量执行下述的编码步骤。
C3、 生成所述至少一个矢量在格矢量空间的位置索引信息和编码信息的 对应关系。
可以理解,这里的格矢量空间可以是编码端根据分解的矢量维度预置的, 格矢量空间为包括全零矢量在内的所有矢量的位置排列组合(格矢量码本) 以及各个矢量(码数) 的对应的参考位置。 如果编码端设定分解的矢量维度 为 8, 则格矢量空间矢量包含: 从矢量 {0,0,0,0,0,0,0,0}到矢量 {1,1, 1,1, 1,1, 1,1 } 的位置索引信息, 及少量的码矢量如 {1,0,0,0,0,0,0,0}、 {1,1,0,0,0,0,0,0}等, 这 些码矢量被称为绝对引导项。
本步骤中的编码信息是指写进码流的信息, 即将一个复杂的矢量和另一 个简单的编码信息关联起来, 并将编码信息传递到出去, 当解码端接收到码 流数据后, 即可通过编码信息查找到该矢量在格矢量空间的位置索引信息, 并将该矢量还原出来, 这样在编码端能减少比特使用量, 从而能提升现有技 术中格矢量的编码效率。
本发明中, 编码信息包括但不仅限于下述信息: 分解成的矢量在格矢量 空间中相对于一个基准位置的相对位置索引信息, 则编码信息和分解成的矢 量在格矢量空间的位置索引信息的对应关系通过以下方法实现, 流程图如图 7 所示:
D 1、 根据分解成的矢量的维度即 8将格矢量空间分成多个区域; D2、 分别用相应的标识信息来指示所述多个区域, 并在每个区域内确定 一个基准位置; 这里的标识信息是指标识某个区域的信息, 通过标识信息可 以唯一找到某个区域; 在解码端可以通过该标识信息来进行码流的截获;
D3、 将所述多个区域的位置索引信息、 指示所述多个区域的标识信息和 所述多个区域的基准位置对应的索引信息进行关联, 形成对应关系。
例如, 下表 2所示的码本信息表, 由于矢量维度 8的格矢量空间的容量为 255 , 可以将容量为 255的格矢量空间分成六个区域, 在表中用位置的索引号 区间来表示; 分别用一个标识信息即码头来表示一个区间, 并在每个区间内 确定一个基准位置, 如表中的基准值; 并将每个区域的码头、 基准值和索引 号区间关联起来形成表 2中的码本信息表。 可以理解, 在该对应关系中还可以 关联其它的信息如码本号、 码字长度等, 其中码本号 Q0表示该区域的码头中
"1 " 码字的数量为 0个; 码字长度为索引号区间内最大值的二进制码长度; 此外, 本发明生成码本信息表时, 还储存码头为 " 111111 " 的对应信息, 若 LSB级位平面内剩余矢量全为全零矢量、 并且数量大于 6时, 直接用 "111111 " 编码。
Figure imgf000012_0001
表 2 码本信息表
C4、 根据步骤 C3中形成的对应关系获得所述至少一个矢量的编码信息, 并将编码信息写进码流。
假定当前矢量的量化值为 {0,0,0,0,0,0,1,1} ,按照经典格矢量编码的索引化 方法首先在格矢量空间内查找到该量化值的位置为 35。 在查找时, 可以通过 下表 3进行查找, 表中偏移值为对应的绝对引导项在格矢量空间的位置编码; 排列数为绝对引导项对应的矢量数, 这些矢量的位置编号在对应的引导项和 下一个绝对引导项的位置之间; Q0到 Q5指示绝对引导项对应的矢量所在区 域。 如矢量 {0,0,0,0,0,0,1,1 }对应的绝对引导项为矢量 {1,1,0,0,0,0,0,0} , 则矢量 {0,0,0,0,0,0,1,1 }的位置编号 8和 36之间,通过查找格矢量空间中 8到 36之间的矢 量, 获得该矢量的位置编号为 35;
Figure imgf000013_0001
表 3 引导项信息表
确定矢量 {0,0,0,0,0,0,1,1 }的位置编号 35在上述表 2中索引号区间, 属于 Q3 区域;
根据表 2形成的对应关系, 获得编码信息即该矢量的位置编号 35相对于基 准值 32的相对位置 3;
用 1比特将标识编码模式的二进制码写进码流, 再将该矢量对应的码头 "1110" 及 5比特的该矢量在 Q3中的相对位置 3的二进制码写进码流; 由于码 头的唯一性, 解码端可以正确的解出码头, 并读取 5比特获得该矢量的相对位 置, 进而获得其绝对位置, 最终重建该矢量。
上述从步骤 B1到 B5的二层量化编码过程中, 釆用位平面编码, 按从 MSB 至 LSB的顺序, 完成一层量化器的误差信号的编码过程。 一、二层编码码流合 并后, 与核心层编码器码流一起传输给解码端。
上述位平面矢量编码方法也可以应用于对图像、 视频信号的编码, 这并 不构成对本发明的限制。 且在实际应用中, 上述二层的位平面编码前, 需要 将信号进行归一化处理, 尽量保证在位平面编码时, 有足够的码流可以将位 平面的每一级都能编码到。
本实施例中位平面编码方法中选择的位平面编码模式有两种, 选择 LSB 级位平面的编码模式为矢量编码模式,选择非 LSB级位平面的编码模式为直接 编码模式或游程编码模式等, 本实施例中简化了计算程度; 且本实施例中为 LSB级位平面选择的格矢量编码模式中釆用:将位平面分解成的矢量用简单的 编码信息写进码流, 减少了比特使用量, 提高了编码效率。 实施例三、 一种位平面解码方法, 流程图如图 8所示, 包括:
步骤 301、 解析接收到的码流数据, 得到标识位平面编码模式的二进制码 为矢量编码模式, 获得所述位平面的矢量编码信息, 并执行步骤 303 ; 当得到 的标识位平面编码模式的二进制码为直接编码或游程编码等其他编码模式, 则执行步骤 302;
由于在编码端为每级位平面选择相应的编码模式进行编码, 因此在解码 端需要知道每级位平面的编码模式才能将各级位平面的源二进制码还原出 来。
步骤 302、 根据所述直接编码或游程编码等其他编码模式对应地将所述位 平面的编码后二进制码进行解码, 得到所述位平面的源二进制码, 并返回步 骤 301解析码流数据对所述位平面的下一级位平面进行解码;
本发明实施例中编码端是逐级进行编码, 则解码端也是逐级进行解码的。 如果步骤 301中解析得到的标识位平面编码模式的二进制码指示该级位平面 使用直接编码或游程编码, 该级位平面的编码后二进制码包括: 该级位平面 码字为 1的位置信息、 该级位平面的边信息如该级位平面中二进制码的分布、 编码输入信号长度等, 解码端需要根据边信息将位置信息进行解码, 则可将 该级位平面的源二进制码还原。
步骤 303、 才艮据所述矢量编码模式对应地将所述位平面的矢量编码信息进 行解码, 得到所述位平面的源二进制码, 并返回步骤 301解析码流数据对所述 位平面的下一级位平面进行解码; 如果所述矢量编码为格矢量编码, 由于在进行格矢量编码时, 是以矢量 为单位进行编码的, 编码后二进制码是矢量编码信息。 如果在编码时釆用如 实施例二所述的方法, 在解码时, 通过以下步骤实现:
步骤 3030、 获得所述矢量编码信息和矢量在格矢量空间的位置索引信息 的对应关系;
这里的编码信息如实施例二中所述可以是矢量在所述格矢量空间中相对 于一个基准位置的相对位置索引信息, 在此不再赘述。 在获得该对应关系时 可以通过在码流中的边信息来获得, 也可以是解码端已经预置的, 还可以通 过其他的方法来获得, 这并不构成对本发明的限制。
步骤 3031、 根据该对应关系获得所述矢量在格矢量空间的位置索引信息, 并在所述格矢量空间内查到所述矢量中的源二进制码。
例如: 解码端获得的对应关系表如上述表 2所示, 且解析得到的编码后二 进制码为码头 " 110" 和用 5比特编码的矢量在格矢量空间的相对一个基准位 置的相对位置的二进制码 00011 , 则根据表 2中的基准值, 得到矢量在格矢量 空间的位置为 35 , 并在格矢量空间内查找该矢量中的源二进制码为 {0,0,0,0,0,0,1,1 }。
可以理解上述过程是编码方法的逆过程, 是和位平面编码方法相辅相成 的, 在编码端提高了编码效率, 则在解码端也会同样的提高解码效率。
步骤 304、 获得各级位平面的源二进制码后, 通过所述各级位平面的源二 进制码以及辅助信息还原源信号。
编码端在编码时由于码流比特的限制, 编码端可能并没有将生成的位平 面中的所有级都进行编码, 解码端在进行解码时需要根据编码后的二进制码 将源二进制码还原, 并借助辅助信息如: 位平面中多少级未进行编码, 或者 位平面全部进行编码等才能将源量化信号还原出来。
可以理解, 由于码流比特的限制, 编码端在进行编码时不能对所有级位 平面进行编码, 会有低级的位平面未能编码, 造成精度损耗, 则解码端解码 出的信号就会有损耗。 本发明实施例中当编码端矢量编码将位平面进行编码 会使得编码时使用比特量减少, 同时就有更多剩余的比特编码位平面中其他 级, 这样编码端编码的位平面中二进制码个数会增加, 相应地, 解码端还原 的信号的损耗会减少。
另外上述本实施例的位平面解码方法是 居标识位平面编码模式的二进 制码将位平面的编码后二进制码进行解码, 还原出源信号, 当所述标识位平 面编码模式的二进制码为矢量编码模式时, 编码端使用的比特比较少, 因此 解码端的解码的比特相对现有技术也会减少, 从而使得解码效率提高。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成, 该程序可以存储于一计算机可 读存储介质中, 存储介质可以包括: ROM、 RAM, 磁盘或光盘等。 系统实施例一、 一种通信系统, 结构示意图如图 9所示, 包括: 编码模块 100和解码模块 200, 其中:
所述编码模块 100 , 用于将当前位平面的信息与预置的信息进行匹配, 若 相符合, 则将所述当前位平面的编码模式选择为矢量编码模式; 按照所述矢 量编码模式对当前位平面的二进制码进行编码得到编码后二进制码; 将标识 所述当前位平面编码模式的二进制码及所述当前位平面的编码后二进制码对 应地写进码流; 若所述码流中有比特剩余, 则将所述当前位平面的下一级位 平面作为当前位平面, 并执行所述将当前位平面的信息与预置的信息进行匹 配的步骤;
所述解码模块 200 , 用于接收到所述编码模块 100的码流数据, 解析所述 码流数据, 当得到标识位平面编码模式的二进制码为矢量编码模式, 获得所 述位平面的矢量编码信息; 根据所述矢量编码模式对应地将所述位平面的矢 量编码信息进行解码, 得到所述位平面的源二进制码, 并返回解析码流数据 对所述位平面的下一级位平面进行解码。
本实施例的通信系统中编码模块 100通过将位平面的信息与预置的信息 进行比较来选择位平面相应的编码模式的, 在相符合时, 选择为矢量编码模 式, 并将位平面按照矢量编码模式编码后的信息写进码流, 釆用简单的方法 对位平面进行选择编码模式后编码, 简化了选择编码模式的计算程度, 从而 可以提高编码效率和精度; 且在相符合时选择为矢量编码模式, 可以减少编 码使用比特, 提高位平面编码的效率。 同时, 解码模块 200根据位平面的编码 模式进行解码, 当根据矢量编码模式进行解码时, 解码的比特数较少, 提高 了解码速率。 设备实施例一、 一种编码设备, 结构示意图如图 10所示, 包括: 预置信 息储存单元 10、 匹配单元 11、 矢量选择单元 12、 编码单元 13和码流形成单元 14, 其中:
预置信息储存单元 10, 用于储存预置信息;
这里预置的信息可以为指示位平面的二进制码的分布信息, 如位平面二 进制码字为 1的个数大于几, 或位平面中两个 "1" 码之间分布的 "0" 码字的 个数大于几等; 也可以是指示位平面的位信息, 如位平面是 MSB位, 或是 LSB 位, 或是其它位等; 还可以是指示位平面的其它的信息。
匹配单元 11 , 用于将当前位平面的信息与所述预置信息储存单元 10储存 的预置信息进行匹配;
当预置信息储存单元 10储存的信息包括指示位平面是所述量化后的信号 的最低位信息, 匹配单元 11在匹配时是将当前位平面的位信息如是 MSB位还 是 LSB位还是其他位等与预置信息进行匹配。
矢量选择单元 12, 用于当所述匹配单元 11匹配的结果为相符合, 则将所 述当前位平面的编码模式选择为矢量编码模式;
这里的矢量编码模式可以是格矢量编码模式等。
编码单元 13 , 用于按照所述矢量选择单元 12选择的矢量编码模式对当前 位平面的二进制码进行编码;
码流形成单元 14 , 用于将所述矢量选择单元 12选择的标识当前位平面编 码模式的二进制码及所述编码单元 13编码后的当前位平面的二进制码对应地 写进码流, 若所述码流中有比特剩余, 则将所述当前位平面的下一级位平面 作为当前位平面, 并通知所述匹配单元 11进行匹配。
本实施例的编码设备中, 通过匹配单元 11将位平面的信息与预置的信息 进行比较来选择位平面相应的编码模式的, 在相符合时, 矢量选择单元 12选 择为矢量编码模式, 码流形成单元 14将编码单元 13按照矢量编码模式对位平 面编码后的信息写进码流。 本发明的编码设备可以釆用简单的方法对位平面 进行选择编码模式后编码, 简化了选择编码模式的计算程度, 从而可以提高 编码效率和精度; 且在相符合时选择为矢量编码模式, 可以减少编码使用比 特, 提高位平面编码的效率; 另外用户可以根据实际应用修改预置信息储存 单元 10中储存的用来选择矢量编码模式的信息, 提高了用户体验。 设备实施例二、 一种编码设备, 结构示意图如图 11所示, 本实施例的编 码设备和设备实施例一相比增加了分布统计单元 15 , 和模式选择单元 16 , 其 中:
分布统计单元 15 , 用于当所述预置信息储存单元 10的预置信息包括位平 面的二进制码字的分布信息, 统计所述当前位平面中二进制码的分布;
当所述预置信息储存单元 10储存的预置信息包括指示位平面中二进制码 为 1的个数大于参考量的信息, 或指示位平面中二进制码为 0的个数小于参考 量的信息, 所述参考量是根据所述量化后的信号长度确定的; 则所述分布统 计单元 15统计的信息包括: 统计当前位平面中二进制码为 1或 0的个数;
模式选择单元 16 , 用于当所述匹配单元 11匹配的结果为不相符合, 则将 所述当前位平面的编码模式选择为直接编码模式或游程编码模式。
在本实施例中, 当预置储存单元 10储存的预置信息包括位平面的二进制 码字的分布信息, 分布统计单元 15统计所述当前位平面中二进制码的分布, 匹配单元 11将分布统计单元 15统计的信息和所述预置信息储存单元 10储存的 预置信息进行匹配后, 若相符合, 矢量选择单元 12为当前位平面选择的编码 模式为矢量编码模式; 若不相符合, 由模式选择单元 16为当前位平面的编码 模式选择为直接编码模式或游程编码模式。 再由编码单元 13按照矢量选择单 元 12选择的矢量编码模式对当前位平面的二进制码进行编码, 或按照模式选 择单元 16选择的编码模式对当前位平面的二进制码进行编码。 最后, 由码流 形成单元 14将所述矢量选择单元 12选择的标识当前位平面编码模式的二进制 码及所述编码单元 13编码后的当前位平面的二进制码对应地写进码流, 或模 式选择单元 16选择的标识当前位平面编码模式的二进制码及所述编码单元 13 编码后的当前位平面的二进制码对应地写进码流, 若所述码流中有比特剩余, 则将所述当前位平面的下一级位平面作为当前位平面, 并通知所述匹配单元 11进行匹配。
本实施例中编码设备进行位平面编码将分布统计单元 15中统计的二进制 码的分布与预置信息储存单元 10的预置信息进行比较, 这种方法比较简单, 从而使得编码设备釆用简单的结构就能实现提高编码效率的目的。 设备实施例三、 一种编码设备, 结构示意图如图 12所示, 本实施例的编 码设备和设备实施例一相比细化了编码单元 13 , 包括: 格矢量空间形成单元 131、 对应关系生成单元 132和编码信息获得单元 133 , 其中:
格矢量分解单元 131 , 用于当所述矢量选择单元 12为当前位平面选择的编 码模式为格矢量编码模式, 将该级位平面的二进制码分解为至少一个矢量; 对应关系生成单元 132 , 用于生成所述格矢量分解单元 131分解的至少一 个矢量在所述格矢量空间的位置索引信息和编码信息的对应关系;
可选地, 所述对应关系生成单元 132可以包括区域分解单元 142、 基准位 置确定单元 152和关联单元 162 , 所述区域分解单元 142 , 用于根据所述格矢量 分解单元 131分解的至少一个矢量的维度将所述格矢量空间的位置分成多个 区域; 所述基准位置确定单元 152 , 用于分别用相应的标识信息来指示所述区 域分解单元 142分解的多个区域, 并在每个区域内确定一个基准位置; 所述关 联单元 162 , 用于将所述区域分解单元 142分解的多个区域的位置索引信息、 指示多个区域的标识信息和所述多个区域的基准位置对应的索引信息进行关 联, 形成对应关系。
编码信息获得单元 133 , 用于根据所述对应关系生成单元 132中的关联单 元 162生成的对应关系获得所述至少一个矢量的编码信息, 所述编码信息为所 述至少一个矢量的编码后二进制码。 可以理解, 这里的编码信息包括格矢量 分解单元 131分解成的矢量在格矢量空间中相对于一个基准位置的相对位置 索引信息。
所述码流形成单元 14将所述编码信息获得单元 133获得的编码信息写进 码流。
可选地, 该编码单元 13还可以包括: 排序单元 134 , 用于当所述格矢量分 解单元 131分解的至少一个矢量包括两个以上矢量, 根据每个矢量中二进制码 为 1的个数对所述两个以上矢量进行优先排序。 而编码信息获得单元 133根据 排序单元 134中的矢量顺序对位平面的矢量进行编码。
本实施例中细化了编码单元 13 , 当矢量选择单元 12为当前位平面选择的 编码模式为格矢量编码模式时, 通过对应关系生成单元 132生成对应关系, 将 复杂的格矢量与简单的编码信息对应起来, 并将编码信息写进码流。 和现有 技术中釆用格矢量编码模式进行编码时, 需要将复杂的格矢量写进码流相比, 本实施例釆用的编码设备可以减少比特使用, 提高编码速率。 设备实施例四、 一种解码设备, 结构示意图如图 13所示, 包括: 解析单 元 30、 解码单元 31和还原单元 32, 其中:
解析单元 30 , 用于解析接收到的码流数据, 当得到标识位平面编码模式 的二进制码为矢量编码模式 , 获得所述位平面的矢量编码信息;
解码单元 31 , 用于根据所述解析单元 30解析的矢量编码模式对应地将所 述位平面的矢量编码信息进行解码, 得到所述位平面的源二进制码, 并返回 所述解析单元解析码流数据对所述位平面的下一级位平面进行解码。
可选地, 解码单元 31可以包括: 对应关系获得单元 310和查找单元 311 , 其中: 所述对应关系获得单元 310 , 用于获得所述解析单元 30获得的矢量编码 信息和矢量在格矢量空间的位置索引信息的对应关系; 所述查找单元 311 , 用 于根据所述对应关系获得单元 310获得的对应关系得到所述矢量在格矢量空 间的位置索引信息, 并利用所述位置索引信息在所述格矢量空间内查到所述 矢量中的源二进制码。
本实施例的解码设备相对于编码设备来说, 由于编码设备在编码时能节 省编码使用比特, 使得在解码时解码的比特也会相对地减少, 从而提高了解 码效率。
可以看出, 本发明的位平面编码方法是通过将位平面的信息与预置的信 息进行比较来选择位平面相应的编码模式, 在相符合时, 选择为矢量编码模 式, 并将位平面按照矢量编码模式编码后的信息写进码流。 本发明的位平面 编码方法可以釆用简单的方法对位平面进行选择编码模式后编码, 简化了选 择编码模式的计算程度, 从而可以提高编码效率和精度; 且在相符合时选择 为矢量编码模式, 可以减少编码使用比特, 提高位平面编码的效率; 另外用 户可以根据实际应用在编码端预置用来选择矢量编码模式的信息, 提高了用 户体验。
以上对本发明实施例所提供的位平面编码和解码方法、 通信系统及相关 式进行了阐述, 以上实施例的说明只是用于帮助理解本发明的方法及其核心 思想; 同时, 对于本领域的一般技术人员, 依据本发明的思想, 在具体实施 方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应理解为对 本发明的限制。 本发明提供位平面编码和解码方法、 通信系统及相关设备, 应用于数据压缩技术领域。 本发明的位平面编码方法是通过将位平面的信息 与预置的信息进行比较来选择位平面相应的编码模式, 在相符合时, 选择为 矢量编码模式, 并将位平面按照矢量编码模式编码后的信息写进码流。 本发 明的位平面编码方法可以釆用简单的方法对位平面进行选择编码模式后编 码, 简化了选择编码模式的计算程度, 从而可以提高编码效率和精度; 且在 相符合时选择为矢量编码模式, 可以减少编码使用比特, 提高位平面编码的 效率; 另外用户可以根据实际应用在编码端预置用来选择矢量编码模式的信 息, 提高了用户体验。

Claims

权 利 要 求
1、 一种位平面编码方法, 其特征在于, 包括:
将当前位平面的信息与预置的信息进行匹配, 若相符合, 则将所述当前 位平面的编码模式选择为矢量编码模式;
按照所述矢量编码模式对当前位平面的二进制码进行编码得到编码后二 进制码;
将标识所述当前位平面编码模式的二进制码及所述当前位平面的编码后 二进制码对应地写进码流;
若所述码流中有比特剩余, 则将所述当前位平面的下一级位平面作为当 前位平面, 并执行所述将当前位平面的信息与预置的信息进行匹配的步骤。
2、 如权利要求 1所述的方法, 其特征在于, 若所述预置的信息包括: 位 平面的二进制码字的分布信息, 则所述将当前位平面的信息与预置的信息进 行匹配之前还包括: 统计所述当前位平面中二进制码的分布。
3、 如权利要求 2所述的方法, 其特征在于, 所述预置的信息包括: 指示 位平面中二进制码为 1的个数大于参考量的信息, 或指示位平面中二进制码为 0的个数小于参考量的信息, 所述参考量是根据所述量化后的信号长度确定 的;
则所述统计所述当前位平面中二进制码的分布包括: 统计当前位平面中 二进制码为 1或 0的个数;
当所述当前位平面中二进制码为 1的个数大于参考量, 或当前位平面中二 进制码为 0的个数小于参考量时, 则为当前位平面选择的编码模式为矢量编码 模式。
4、 如权利要求 1所述的方法, 其特征在于, 若所述预置的信息包括: 指 示位平面是所述量化后的信号的最低位信息;
将所述量化后的信号的位信息与所述预置的信息进行匹配, 若相符合, 则选择所述当前位平面的编码模式为矢量编码模式。
5、 如权利要求 1至 4任一项所述的方法, 其特征在于, 还包括: 当所述匹 配的结果为: 所述当前位平面的信息与预置的信息不相符合, 则选择所述当 前位平面的编码模式为直接编码模式或游程编码模式。
6、 如权利要求 1所述的方法, 其特征在于, 若所述矢量编码模式为格矢
20
更正页 (细则第 91条) 量编码模式, 则按照所述格矢量编码模式将当前位平面的二进制码进行编码 得到编码后二进制码包括:
将当前位平面的二进制码分解为至少一个矢量;
生成所述至少一个矢量在格矢量空间的位置索引信息和编码信息的对应 关系;
根据所述对应关系获得所述至少一个矢量的编码信息, 所述编码信息为 所述至少一个矢量的编码后二进制码。
7、 如权利要求 6所述的方法, 其特征在于, 所述编码信息包含所述至少 一个矢量在所述格矢量空间中相对于一个基准位置的相对位置索引信息。
8、 如权利要求 7所述的方法, 其特征在于, 所述生成所述至少一个矢量 在所述格矢量空间的位置索引信息和编码信息的对应关系包括: 根据所述至 少一个矢量的维度将所述格矢量空间分成多个区域;
分别用相应的标识信息来指示所述多个区域, 并在每个区域内确定一个 基准位置;
将所述多个区域的位置索引信息、 指示所述多个区域的标识信息和所述 多个区域的基准位置对应的索引信息进行关联, 形成对应关系。
9、 如权利要求 6至 8任一项所述的方法, 其特征在于, 若所述至少一个矢 量包括两个以上矢量, 则将该级位平面的二进制码分解为至少一个矢量之后 还包括: 根据每个矢量中二进制码为 1的个数对所述两个以上矢量进行优先排 序。
10、 一种位平面解码方法, 其特征在于, 包括:
解析接收到的码流数据, 当得到标识位平面编码模式的二进制码为矢量 编码模式, 获得所述位平面的矢量编码信息;
根据所述矢量编码模式对应地将所述位平面的矢量编码信息进行解码, 得到所述位平面的源二进制码, 并返回解析码流数据对所述位平面的下一级 位平面进行解码。
1 1、 如权利要求 10所述的方法, 其特征在于, 若所述矢量编码模式为格 矢量编码模式, 所述根据所述矢量编码模式对应地将所述位平面的矢量编码 信息进行解码包括:
21
更正页 (细则第 91条) 获得所述矢量编码信息和矢量在格矢量空间的位置索引信息的对应关 系;
根据该对应关系获得所述矢量在格矢量空间的位置索引信息, 并在所述 格矢量空间内查到所述矢量中的源二进制码。
12、 如权利要求 1 1所述的方法, 其特征在于, 所述矢量编码信息包括: 所述矢量在所述格矢量空间中相对于一个基准位置的相对位置索引信息。
13、 一种通信系统, 其特征在于, 包括: 编码模块和解码模块; 所述编码模块, 用于将当前位平面的信息与预置的信息进行匹配, 若相 符合, 则将所述当前位平面的编码模式选择为矢量编码模式; 按照所述矢量 编码模式对当前位平面的二进制码进行编码得到编码后二进制码; 将标识所 述当前位平面编码模式的二进制码及所述当前位平面的编码后二进制码对应 地写进码流; 若所述码流中有比特剩余, 则将所述当前位平面的下一级位平 面作为当前位平面, 并执行所述将当前位平面的信息与预置的信息进行匹配 的步骤;
所述解码模块, 用于接收所述编码模块发送的码流数据, 解析所述码流 数据, 当得到标识位平面编码模式的二进制码为矢量编码模式, 获得所述位 平面的矢量编码信息; 根据所述矢量编码模式对应地将所述位平面的矢量编 码信息进行解码, 得到所述位平面的源二进制码, 并返回解析码流数据对所 述位平面的下一级位平面进行解码。
14、 一种编码设备, 其特征在于, 包括:
预置信息储存单元, 用于储存预置信息;
匹配单元, 用于将当前位平面的信息与所述预置信息储存单元储存的预 置信息进行匹配;
矢量选择单元, 用于当所述匹配单元匹配的结果为相符合, 则将所述当 前位平面的编码模式选择为矢量编码模式;
编码单元, 用于按照所述矢量选择单元选择的矢量编码模式对当前位平 面的二进制码进行编码;
码流形成单元, 用于将标识当前位平面编码模式的二进制码及所述编码 单元编码后的当前位平面的二进制码对应地写进码流, 若所述码流中有比特
22
更正页 (细则第 91条) 剩余, 则将所述当前位平面的下一级位平面作为当前位平面, 并通知所述匹 配单元进行匹配。
15、 如权利要求 14所述的设备, 其特征在于, 还包括: 分布统计单元, 用于当所述预置信息储存单元的预置信息包括位平面的二进制码字的分布信 息, 统计所述当前位平面中二进制码的分布;
所述匹配单元是将所述分布统计单元统计的信息和所述预置信息储存单 元储存的预置信息进行匹配。
16、 如权利要求 14所述的设备, 其特征在于, 若所述预置信息储存单元 储存的预置信息包括: 指示位平面中二进制码为 1的个数大于参考量的信息, 或指示位平面中二进制码为 0的个数小于参考量的信息, 所述参考量是根据所 述量化后的信号长度确定的;
则所述分布统计单元统计的信息包括: 统计当前位平面中二进制码为 1或 0的个数。
17、 如权利要求 14至 16任一项所述的设备, 其特征在于, 还包括: 模式 选择单元, 用于当所述匹配单元匹配的结果为不相符合, 则将所述当前位平 面的编码模式选择为直接编码模式或游程编码模式;
所述编码单元, 还用于按照所述模式选择单元选择的编码模式对当前位 平面的二进制码进行编码。
18、 如权利要求 14所述的设备, 其特征在于, 所述编码单元包括: 格矢量分解单元, 用于当所述匹配单元为当前位平面选择的编码模式为 格矢量编码模式, 将该级位平面的二进制码分解为至少一个矢量;
对应关系生成单元, 用于生成所述格矢量分解单元分解的至少一个矢量 在格矢量空间的位置索引信息和编码信息的对应关系;
编码信息获得单元, 用于根据所述对应关系生成单元生成的对应关系获 得所述至少一个矢量的编码信息, 所述编码信息为所述至少一个矢量的编码 后二进制码。
19、 如权利要求 18所述的设备, 其特征在于, 所述对应关系生成单元包 括: 区域分解单元, 用于根据所述格矢量分解单元分解的至少一个矢量的维 度将所述格矢量空间的位置分成多个区域;
23
更正页 (细则第 91条) 基准位置确定单元, 用于分别用相应的标识信息来指示所述区域分解单 元分解的多个区域, 并在每个区域内确定一个基准位置;
关联单元, 用于将所述区域分解单元分解的多个区域的位置索引信息、 指示多个区域的标识信息和所述多个区域的基准位置对应的索引信息进行关 联, 形成对应关系。
20、 一种解码设备, 其特征在于, 包括:
解析单元, 用于解析接收到的码流数据, 当得到标识位平面编码模式的 二进制码为矢量编码模式, 获得所述位平面的矢量编码信息;
解码单元, 用于根据所述解析单元解析的矢量编码模式对应地将所述位 平面的矢量编码信息进行解码, 得到所述位平面的源二进制码, 并返回所述 解析单元解析码流数据对所述位平面的下一级位平面进行解码。
21、 如权利要求 20所述的设备, 其特征在于, 所述解码单元包括: 对应 关系获得单元, 用于获得所述解析单元获得的矢量编码信息和矢量在格矢量 空间的位置索引信息的对应关系;
查找单元, 用于根据所述对应关系获得单元获得的对应关系得到所述矢 量在格矢量空间的位置索引信息, 并利用所述位置索引信息在所述格矢量空 间内查到所述矢量中的源二进制码。
24
更正页 (细则第 91条)
PCT/CN2009/076214 2008-12-29 2009-12-29 位平面编码和解码方法、通信系统及相关设备 WO2010078818A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810189141.7 2008-12-29
CN 200810189141 CN101771416B (zh) 2008-12-29 2008-12-29 位平面编码和解码方法、通信系统及相关设备

Publications (1)

Publication Number Publication Date
WO2010078818A1 true WO2010078818A1 (zh) 2010-07-15

Family

ID=42316248

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/076214 WO2010078818A1 (zh) 2008-12-29 2009-12-29 位平面编码和解码方法、通信系统及相关设备

Country Status (2)

Country Link
CN (1) CN101771416B (zh)
WO (1) WO2010078818A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634273A (zh) 2012-08-21 2014-03-12 电信科学技术研究院 数据压缩发送及解压缩方法和设备
CN105809709B (zh) * 2015-03-31 2019-03-29 西安邮电大学 一种基于位平面的运动目标跟踪方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030113026A1 (en) * 2001-12-17 2003-06-19 Microsoft Corporation Skip macroblock coding
EP1135926B1 (en) * 1998-12-04 2007-05-02 General Instrument Corporation Improvement of fine granularity scalability using bit plane coding of transform coefficients
US7333659B2 (en) * 2003-04-14 2008-02-19 Sony Corporation Picture encoder and picture encoding method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005620B (zh) * 2004-09-03 2011-08-10 微软公司 为隔行扫描和逐行扫描视频编码和解码宏块和运动信息中的革新
CN1316829C (zh) * 2004-12-03 2007-05-16 大唐微电子技术有限公司 基于小波变换的视频流编码/解码方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1135926B1 (en) * 1998-12-04 2007-05-02 General Instrument Corporation Improvement of fine granularity scalability using bit plane coding of transform coefficients
US20030113026A1 (en) * 2001-12-17 2003-06-19 Microsoft Corporation Skip macroblock coding
US7333659B2 (en) * 2003-04-14 2008-02-19 Sony Corporation Picture encoder and picture encoding method

Also Published As

Publication number Publication date
CN101771416B (zh) 2013-06-05
CN101771416A (zh) 2010-07-07

Similar Documents

Publication Publication Date Title
US7689427B2 (en) Methods and apparatus for implementing embedded scalable encoding and decoding of companded and vector quantized audio data
US8046235B2 (en) Apparatus and method of encoding audio data and apparatus and method of decoding encoded audio data
US7680670B2 (en) Dimensional vector and variable resolution quantization
US9390720B2 (en) Entropy encoding and decoding using direct level and run-length/level context-adaptive arithmetic coding/decoding modes
US8731947B2 (en) Coding method, decoding method, codec method, codec system and relevant apparatuses
US20070168197A1 (en) Audio coding
US20050015249A1 (en) Entropy coding by adapting coding between level and run-length/level modes
US20110200125A1 (en) Method for Encoding a Symbol, Method for Decoding a Symbol, Method for Transmitting a Symbol from a Transmitter to a Receiver, Encoder, Decoder and System for Transmitting a Symbol from a Transmitter to a Receiver
US20070078646A1 (en) Method and apparatus to encode/decode audio signal
WO2011063594A1 (zh) 格型矢量量化音频编解码方法和系统
WO2007011115A1 (en) Method and apparatus to encode/decode low bit-rate audio signal
JP2009509456A (ja) 逐次改善可能な格子ベクトル量子化
US20100017196A1 (en) Method, system, and apparatus for compression or decompression of digital signals
WO2011097963A1 (zh) 编码方法、解码方法、编码器和解码器
AU2018298758A1 (en) Method and device for digital data compression
US20160111100A1 (en) Audio signal encoder
US10770081B2 (en) Stereo audio signal encoder
WO2010078818A1 (zh) 位平面编码和解码方法、通信系统及相关设备
WO2015000373A1 (zh) 信号编码和解码方法以及设备
EP3577649B1 (en) Stereo audio signal encoder
US8487789B2 (en) Method and apparatus for lossless encoding and decoding based on context
KR100765747B1 (ko) 트리 구조 벡터 양자화를 이용한 스케일러블 음성 부호화장치
WO2011003233A1 (zh) 编码方法、装置与系统、解码方法、装置与系统
Xie Lattice Vector Quantization Applied to Speech and Audio Coding
WO2009152723A1 (zh) 嵌入式编解码方法和装置

Legal Events

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

Ref document number: 09837375

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: 09837375

Country of ref document: EP

Kind code of ref document: A1