WO2011137841A1 - Method and device for compression encoding, method and device for decompression decoding, and communication system - Google Patents

Method and device for compression encoding, method and device for decompression decoding, and communication system Download PDF

Info

Publication number
WO2011137841A1
WO2011137841A1 PCT/CN2011/074850 CN2011074850W WO2011137841A1 WO 2011137841 A1 WO2011137841 A1 WO 2011137841A1 CN 2011074850 W CN2011074850 W CN 2011074850W WO 2011137841 A1 WO2011137841 A1 WO 2011137841A1
Authority
WO
WIPO (PCT)
Prior art keywords
error
data
coding
decoding
compression
Prior art date
Application number
PCT/CN2011/074850
Other languages
French (fr)
Chinese (zh)
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 WO2011137841A1 publication Critical patent/WO2011137841A1/en

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
    • H03M7/60General implementation details not specific to a particular type of compression
    • H03M7/6041Compression optimized for errors

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a compression encoding method, a decoding decompression method, an apparatus, and a communication system.
  • Voice, audio, image and video signals are the most common multimedia sources for transmission in communication systems, because these multimedia sources have strong correlation and statistical properties, and already have good mathematics and physics.
  • the model has a good data compression algorithm, which can compress the original multimedia data into the original one-tenth of the range, greatly improving channel utilization and reducing equipment and operating costs.
  • general data does not have the high correlation and statistical characteristics of multimedia sources, the effective compression coding method for voice, audio, image and video signals cannot be directly used for general data compression, so it is necessary to compress specifically for general data. coding.
  • the prior art firstly needs to decompose the input original data into a first subset and a second subset.
  • the second subset of data is estimated, and then the second subset is subtracted from the obtained second subset to obtain a set of error data;
  • the first subset of data is processed by a derivative encoder to obtain the subset of the mantissa And a subset index, and a subset derivative and a subset Huffman table reflecting the first subset of encoded information
  • the error data is processed by another derivative encoder to obtain an error mantissa and an error index, and the error data encoding information is reflected Error derivative and error Huffman Table; where the subset derivative, subset Huffman table, error derivative, and error Huffman table determine the minimum amount of storage needed to represent a set of floating point data, so the header information encoder needs to have the subset derivative, subset Huffman table, error derivative, and error Huffman table determine the minimum amount of storage needed to represent a set of floating point
  • the inventors of the present invention found that the prior art uses the same algorithm to compress and encode the first subset data and the error data, and the compression ratio thereof is not high enough.
  • Embodiments of the present invention provide a compression coding method, a decoding and decompression method, a device, and a communication system, which may have a higher compression ratio.
  • a compression coding method including:
  • the original data and the error data are respectively compression-encoded to obtain data compression coding and error compression coding, and the error data is an error generated by compression coding the original data;
  • Data entropy coding and error entropy coding are frame encapsulated to form an encoded frame.
  • a decoding and decompression method including:
  • the decoded decompressed data and the decoding decompression error are added to obtain reconstructed data.
  • a decoding and decompression method including: Decapsulating the encoded frame to obtain two-level error entropy coding, data entropy coding, and error entropy coding;
  • a compression encoder including:
  • a compression coding unit configured to compress and encode the original data and the error data respectively, to obtain data compression coding and error compression coding, where the error data is an error generated by compression coding the original data;
  • An entropy coding unit configured to entropy encode data compression coding and error compression coding obtained by the compression coding unit, respectively, to obtain data entropy coding and error entropy coding;
  • an encapsulating unit configured to perform frame encapsulation on the data entropy coding and error entropy coding obtained by the entropy coding unit to form an encoded frame.
  • a decoding decompressor comprising:
  • a first decapsulation unit configured to decapsulate the encoded frame to obtain data entropy coding and error entropy coding
  • a first entropy decoding unit configured to perform entropy decoding on data entropy coding and error entropy coding obtained by the first deblocking unit, respectively, to obtain data compression coding and error compression coding;
  • a first decoding decompression unit configured to respectively decode and decompress the data compression coding and the error compression coding obtained by the first entropy decoding unit, to obtain decoding decompression data and decoding decompression error;
  • the first reconstruction unit is configured to add the decoded decompressed data obtained by the first decoding and decompressing unit and the decoding and decompression error to obtain the reconstructed data.
  • a decoding decompressor comprising:
  • a second decapsulation unit configured to decapsulate the encoded frame to obtain a second-order error entropy coding, and a number According to entropy coding and error entropy coding;
  • a second entropy decoding unit configured to perform entropy decoding on the second-order error entropy coding, data entropy coding, and error entropy coding obtained by the second de-sealing unit, respectively, to obtain two-level error, data compression coding, and error compression coding;
  • a second decoding and decompressing unit configured to separately decode and decompress data compression coding and error compression coding obtained by the second entropy decoding unit, to obtain decoding decompressed data and decoding decompression error
  • a second reconstruction unit configured to add the second-order error obtained by the second entropy decoding unit, and the decoded decompressed data obtained by the second decoding and decompressing unit and the decoding and decompression error to obtain the reconstructed data.
  • a communication system comprising any of the above described compression encoders and any of the decoding decompressors.
  • the compression coding algorithm is divided into two levels.
  • the first stage is to compress and encode the original data
  • the second stage is to compress and encode the error generated in the first stage compression coding
  • the data compression coding and the error compression coding obtained by the stage compression coding are entropy coded. Since the data is compressed and coded multiple times by the scheme, a higher compression ratio can be achieved compared with the prior art only when the compression coding is performed once.
  • the error generated in the first-stage compression coding is compression-encoded, and the data compression coding and error compression coding obtained by the compression coding are respectively performed. Entropy coding, so the compression quality can be improved relative to the prior art.
  • Figure la is a flowchart of a compression coding method provided by Embodiment 1 of the present invention.
  • Figure lb is an example of a probability distribution of raw data
  • Figure lc is an example of a probability distribution of error data corresponding to Figure lb;
  • Figure Id is an example of 16 codeword probability distributions in data compression coding at 4-bit encoding;
  • Figure 1 is an example of 16 codeword probability distributions in 4-bit coding error compression coding;
  • Figure 2 is an implementation of the present invention A flowchart of a decoding and decompression method provided in Example 2;
  • Figure 3a is an example diagram of a piece of raw data
  • Figure 3b is an example diagram of the error data corresponding to Figure 3a;
  • Figure 3c is an example diagram of the reconstructed data corresponding to Figure 3a;
  • Figure 3d is an example diagram of the secondary error corresponding to Figure 3a;
  • Figure 3e is a diagram showing an example of the probability distribution of the secondary error corresponding to Figure 3a;
  • FIG. 3f is a flowchart of a compression coding method according to Embodiment 3 of the present invention.
  • Embodiment 4 is a flowchart of a decoding and decompression method provided by Embodiment 4 of the present invention.
  • Figure 5a is a schematic block diagram of a compression encoder
  • Figure 5b is a block diagram of the decoding decompressor
  • Figure 5c is a schematic diagram of an encoded frame structure and an encoded bitstream
  • Figure 6a is a schematic block diagram of a compression encoder
  • Figure 6b is a block diagram of the decoding decompressor
  • Figure 6c is a schematic diagram of an encoded frame structure and an encoded bitstream
  • FIG. 7 is a schematic structural diagram of a compression encoder according to an embodiment of the present invention.
  • FIG. 7b is another schematic structural diagram of a compression encoder according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a decoding decompressor according to an embodiment of the present invention.
  • FIG. 9 is another schematic structural diagram of a decoding decompressor according to an embodiment of the present invention.
  • Embodiments of the present invention provide a compression coding method, a decoding and decompression method, an apparatus, and a communication system. The details are described below separately.
  • a compression coding method comprising: compressing and encoding original data and error data respectively, and obtaining data compression coding and error compression coding, wherein the error data is an error generated by compression coding the original data; respectively compressing and encoding the data
  • the error compression coding performs entropy coding to obtain data entropy coding and error entropy coding; and data entropy coding and error entropy coding are frame-encapsulated to form an encoded frame.
  • the error data is an error generated by compressing and encoding the original data
  • the specific error may be:
  • the original data is compression-encoded to obtain compressed data, which is referred to as data compression coding in the embodiment of the present invention.
  • the waveform coding method may include PCM (Pulse Code Modulation) or Adaptive Differential Pulse Code Modulation (ADPCM); the prediction may include linear prediction (LP, Linear Prediction), etc., and the transformation may be Including wavelet transform (WT, Wavelet Transform) transform or discrete cosine transform (DCT, Discrete Cosine Transform) crying and so on.
  • PCM Pulse Code Modulation
  • ADPCM Adaptive Differential Pulse Code Modulation
  • WT Wavelet Transform
  • DCT discrete cosine Transform
  • decoding decompression data (2) Decompressing and decompressing the data compression coding to obtain decompressed and decompressed data in the present In the embodiment, it is called decoding decompression data;
  • the data compression coding may be decoded and decompressed by using a waveform decoding method, a prediction and transformation algorithm, or a vector quantization method.
  • the decoding and decompression algorithm used should correspond to the compression coding algorithm used in step (1).
  • the waveform decoding method is needed to decode and decompress the data compression coding.
  • the vector quantization method is needed to decode the data compression coding. Unzip, and so on.
  • decoding and decompression refers to de-encoding decompression, which corresponds to “compression coding” in the encoder, which are exactly the opposite processing procedures.
  • "compression coding” actually has two meanings, namely “compression” and “encoding”; wherein “compression” sometimes is in the domain, frequency domain or Time-frequency simultaneous forward signal processing and elimination of redundancy, etc.
  • “encoding” may include quantization, and equal-length coding and unequal-length coding (ie, entropy coding) after quantization.
  • decoding and decompression actually includes “decoding", that is, equal length or unequal length.
  • decoding and inverse quantization processing “decompression” actually refers to the process of reverse signal processing in the time domain, frequency domain or time-frequency.
  • decoding decompression the above decoding and decompression processes are collectively referred to as decoding decompression, and the data obtained by the decoding decompression process is referred to as decoding decompressed data.
  • error data is compression-encoded to obtain compression-coded error data, which is referred to as error compression coding in this embodiment.
  • an algorithm simple scalar quantization (SQ, Scalar Quantization) method such as a non-uniform quantization coding algorithm, can be used to compress and encode error data.
  • the distribution of error data is generally non-uniformly distributed, see Figure lb and Figure lc, Figure lb is an example of probability distribution of raw data, and Figure lc is the error data corresponding to it.
  • the probability distribution example it can be seen that the error data has a large distribution percentage only in a narrow observation range (near 0), that is, the probability distribution of the error data is a very unequal distribution, so the error data is here.
  • non-homogeneous quantization coding algorithm when performing compression coding, such as Lloyd-Max non-uniform scalar quantization algorithm.
  • the data compression coding and the error compression coding generated in step 101 also have a strong unequal probability, and the so-called unequal probability refers to the unequal probability distribution, see FIG. 1d and FIG.
  • An example of 16 codeword probability distributions in data compression coding for 4-bit encoding and Figure l is an example of 16 codeword probability distributions in 4-bit encoding error compression coding; it can be seen that data compression coding The probability of occurrence of the error-compressed codeword is unequal. Therefore, the data compression coding and the error compression coding can be further compressed by entropy coding, that is, step 102 is performed.
  • data compression coding and error compression coding may be entropy encoded by Huffman coding, and/or arithmetic coding, and/or other unequal length coding algorithms, respectively.
  • entropy coding is a distortion-free coding
  • the compression coding method provided in step 101 is a distortion coding, which will not be described here.
  • the header information may not be needed in the encoded frame; however, if the compression encoder and the decoding decompressor operate in a time varying mode, the encoded frame is The frame header information needs to be carried, and the frame header information carries the coding mode of the current coded frame.
  • the frame header message is used according to specific application requirements.
  • the information may also carry information such as frame length, coding rate, and quantization coding table, and details are not described herein again.
  • the compression coding algorithm is divided into two levels. The first stage is to compress and encode the original data, and the second stage is to compress and encode the error generated in the first stage compression coding, and then separately
  • the data compression coding and the error compression coding obtained by the two stages of compression coding are entropy coded. Since the data is compressed and coded multiple times by the solution, the compression coding can be achieved only once compared with the prior art.
  • the error generated in the first-stage compression encoding is compression-encoded, and the compression-encoded data is compressed and encoded separately.
  • the compression coding performs entropy coding, so the compression quality can be improved relative to the prior art.
  • the embodiment of the present invention further provides a decoding and decompression method, including: decapsulating a coded frame to obtain data entropy coding and error entropy coding; and entropy decoding data entropy coding and error entropy coding, respectively Obtaining data compression coding and error compression coding; respectively decoding and decompressing the obtained data compression coding and error compression coding to obtain decoded decompressed data and decoding decompression error; adding decoding decompression data and decoding decompression error to obtain addition
  • the latter data is referred to as reconstructed data in the embodiment of the invention.
  • the encoded frame may be decomposed according to preset information to obtain data entropy coding and error entropy coding.
  • the encoded frame is decomposed into frame header information, data entropy coding, and error entropy coding.
  • the frame header information may be obtained first, and then the coded frame is decomposed according to the frame header information to obtain data entropy coding and error entropy coding.
  • the frame header information carries the coding mode of the current coded frame.
  • the frame header information may also carry the frame. For information about the length, the coding rate, and the quantization coding table, refer to the first embodiment, and details are not described herein again.
  • data entropy coding and error entropy coding obtained in step 201 may be entropy decoded by Huffman decoding, and/or arithmetic decoding, and/or other unequal length coding algorithms, respectively.
  • the entropy decoding algorithm used here needs to correspond to the entropy coding algorithm.
  • Huffman decoding is required for entropy decoding, and so on.
  • the indication information of the specific algorithm may be carried in the frame header information or specified by using preset information. If the indication information is carried in the frame header information, in the specific implementation, the data entropy coding and the error entropy coding may be entropy decoded according to the frame header information; if the preset information is specified, the specific implementation may be based on The preset information entropy decodes the data entropy coding and the error entropy coding, respectively.
  • the waveform decoding method, the prediction and transform algorithm, or the vector quantization method may be used to decode and decompress the data compression coding to obtain decoded decompressed data; correspondingly, the error compression coding may be decoded and decompressed by using a non-homogeneous quantization decoding algorithm. A decoding decompression error is obtained.
  • the decoding and decompression algorithm used here needs to correspond to the compression coding algorithm used in compression coding.
  • the waveform decoding method is needed for decoding and decompression. , So on and so forth.
  • the indication information of the specific algorithm may be carried in the frame header information, or specified by using preset information. If the indication information is carried in the frame header information, in the specific implementation, the data compression coding and the error compression coding may be separately decoded and decompressed according to the frame header information; if the preset information is specified, the specific implementation may be performed according to The preset information decodes and decompresses the data compression coding and the error compression coding, respectively.
  • the present embodiment provides a decoding and decompression method corresponding to the first embodiment. It can be seen that the embodiment can achieve the same beneficial effects as the first embodiment, that is, higher than the prior art. Compression ratio, and high compression quality.
  • the compression coding method provided in the first embodiment is a distortion compression coding method.
  • a distortion-free compression coding method is provided.
  • FIG. 3a is an example diagram of a piece of original data
  • FIG. 3b is an example diagram of error data corresponding to the original data
  • FIG. 3c is subjected to the second embodiment.
  • An example of the reconstructed data obtained by the decoding decompression method is provided, and FIG.
  • the compression coding method may further include: decoding and decompressing the error compression coding to obtain a decoding and decompression error. Calculating the error between the error data and the decoding decompression error to obtain a second-order error; entropy encoding the second-order error to obtain a second-order error entropy coding;
  • step 103 is specifically: encapsulating data entropy coding, error entropy coding, and second-order error entropy coding to form an encoded frame.
  • the specific process of the distortion-free compression coding method can be as follows:
  • decoding and decompression algorithm used here should correspond to the compression coding algorithm used in compression coding the error data.
  • the embodiment can further perform the second compression coding (that is, compressing the error generated during the first-stage compression coding).
  • the error generated when encoding is further entropy encoded, so that the compression quality can be further improved with respect to the first embodiment, and distortion-free compression can be realized.
  • Embodiments of the present invention will be described from the perspective of a decoding decompressor.
  • the embodiment provides a decoding and decompression method, including: decapsulating a coded frame to obtain a second-level error entropy coding, data entropy coding, and error entropy coding; respectively, encoding the second-order error entropy and data Entropy coding and error entropy coding are used for entropy decoding, and two-level error, data compression coding and error compression coding are obtained.
  • the data compression coding and error compression coding are respectively decoded and decompressed to obtain decoded decompressed data and decoding decompression error;
  • the decoding decompressed data and the decoding decompression error are added to obtain reconstructed data.
  • the encoded frame is decomposed into two-level error entropy coding, data entropy coding, and error entropy coding; if the frame header information is included in the coded frame, the coded frame is decomposed into frame header information. , two-level error entropy coding, data entropy coding and error entropy coding.
  • the frame header information carries the coding mode of the current coded frame.
  • the frame header information may also carry information such as the frame length, the coding rate, and the quantization code table according to the specific application requirements. For details, refer to the first embodiment, and details are not described herein. .
  • the second error entropy coding, the data entropy coding, and the error entropy coding may be entropy decoded by Huffman decoding, and/or arithmetic decoding, and/or other unequal length coding algorithms, respectively.
  • the entropy decoding algorithm used here needs to correspond to the entropy coding algorithm.
  • Huffman decoding is required for entropy decoding, and so on.
  • the indication information of the specific algorithm may be carried in the frame header information or specified by using preset information.
  • the second-level error entropy coding, the data entropy coding, and the error entropy coding may be entropy decoded according to the frame header information; if the preset information is specified, In a specific implementation, the second-order error entropy coding, the data entropy coding, and the error entropy coding may be entropy decoded according to the preset information.
  • the waveform decoding method, the prediction and transform algorithm, or the vector quantization method may be used to decode and decompress the data compression coding to obtain decoded decompressed data.
  • the error compression coding may be decoded and decompressed by using a non-homogeneous quantization decoding algorithm. , get the decoding decompression error.
  • the decoding and decompression algorithm used here needs to correspond to the compression coding algorithm used in compression coding.
  • the waveform decoding method is needed for decoding and decompression. , So on and so forth.
  • the indication information of the specific algorithm may be carried in the frame header information, or specified by using preset information. If the indication information is carried in the frame header information, in the specific implementation, the data compression coding and the error compression coding may be separately decoded and decompressed according to the frame header information; if the preset information is used If the line is specified, the data compression coding and the error compression coding may be separately decoded and decompressed according to the preset information.
  • the reconstructed data obtained at this time is the same as the original data. If there is distortion compression coding, there is a slight error between the reconstructed data obtained at this time and the original data.
  • the present embodiment provides a decoding and decompression method corresponding to the three-phase of the embodiment. It can be seen that the embodiment can achieve the same beneficial effects as the third embodiment, that is, higher than the prior art.
  • the compression ratio, as well as the higher compression quality, can also further improve the compression quality with respect to the second embodiment.
  • FIG. 5a is a schematic block diagram of a compression encoder including a data compression coding module A501, a data decoding decompression module A502 of a compression encoder, an adder A503 of a compression encoder, and error compression.
  • Encoding module A504 error entropy encoding module A505, data entropy encoding module A506 and frame encapsulating module A507; FIG.
  • 5b is a schematic block diagram of a decoding decompressor including a frame deblocking module B501, an error entropy decoding module B502, and data entropy
  • the frame header information is included in the coded frame as an example.
  • the data compression coding module A501 is configured to adopt an ADPCM coding algorithm, and the error compression coding module A504 is used.
  • the entropy coding module A505 and the data entropy coding module A506 adopt the Huffman coding algorithm
  • the data decompression decoding module B505 correspondingly adopts the ADPCM decoding algorithm
  • the error decoding decompression module B504 correspondingly adopts the Lloyd-Max non-uniform hook scalar quantization algorithm
  • the decoding module B502 and the data entropy decoding module B503 correspondingly adopt the Huffman decoding algorithm
  • the processing flow of the compression encoder and the decoding decompressor is as follows:
  • Step 1 The data compression coding module A501 uses the ADPCM coding algorithm to compress and encode the original data S, obtains the data compression coding Sc, and supplies the data compression coding Sc to the data decoding decompression module A502 and the data entropy coding module A506 of the compression encoder;
  • the original data S may be any source and any type of data, such as a general data sequence, a sample communication signal, a sampling time series, a voice signal, an audio signal, and the like.
  • Step 2 The data decoding and decompression module of the compression encoder A502 decodes and decompresses the data compression code Sc by using the ADPCM decoding algorithm to obtain the decoded decompressed data S, and then sends the decoded decompressed data S to the adder A503 of the compression encoder.
  • Step 3 The adder A503 of the compression encoder calculates an error between the original data S and the decoded decompressed data S, that is, subtracts the decompressed data S from the original data S, obtains error data, and then sends the error data to the error compression coding.
  • Step 4 The error compression coding module A504 uses Lloyd-Max non-uniform scalar quantization algorithm to compress and encode the error data to obtain error compression coding c, and then sends the error compression coding c to the error entropy coding module A505.
  • Step 5 The error entropy coding module A505 uses the Huffman coding algorithm to entropy encode the error compression coding R lC to obtain the error entropy coding R ie , and then sends the error entropy coding R ie to the frame encapsulation module step 6, and the data entropy coding module A506 adopts The Huffman coding algorithm entropy encodes the data compression coding Sc, obtains the data entropy coding Se, and then sends the data entropy coding Se to the frame encapsulation module A507. Step 6 and steps 2 ⁇ 5 are performed in no particular order. Step 7.
  • the frame encapsulation module A507 combines the error entropy coding e and the data entropy coding Se, and adds the frame header information Hi to output a complete coding frame, thereby forming an encoded bit stream ⁇ 1 ⁇ , wherein the frame header information Hi carries the current coding.
  • the coding mode of the frame may also carry information such as frame length, coding rate, and quantization coding table.
  • the coded bitstream includes a plurality of coded frames: an encoded frame i-l, an encoded frame i and an encoded frame i+l, and the like, and the encoded frame includes a frame header information, a data entropy coding Se, and an error entropy coding e.
  • the coded bit stream ⁇ can be sent to the channel for transmission according to the needs of the actual application, or can be stored in the storage medium.
  • Step 1 After receiving the encoded frame from the encoded bitstream, the frame deblocking module B501 decomposes the encoded frame into frame header information, error entropy coding e, and data entropy coding Se, and then sends the error entropy coding e to the error entropy decoding module.
  • B502 Send data entropy coding Se to the data entropy decoding module B503.
  • Step 2 The error entropy decoding module B502 performs entropy decoding on the error entropy coding e by using Huffman decoding, obtains an error compression code R lC , and then sends the error compression code R lC to the error decoding decompression module B 504.
  • the data entropy decoding module B503 uses Huffman decoding to entropy decode the data entropy coding Se, obtains the data compression coding Sc, and then sends the data compression coding Sc to the data decoding decompression module B505 of the decoding decompressor.
  • Step 3 the error decoding decompression module B504 uses Lloyd-Max non-uniform scalar quantization algorithm to decode and decompress the error compression code R lC to obtain a decoding decompression error, and then send the decoding decompression error to the adder B506 of the decoding decompressor;
  • the data decoding decompression module of the decoding decompressor B505 decodes and decompresses the data compression coding Sc by the ADPCM decoding algorithm to obtain the decoded decompressed data S, and then sends the decoded decompressed data S to the adder B506 of the decoding decompressor.
  • Step 4 The adder B506 of the decoding decompressor decompresses the decompressed data S, and decodes the decompression error. The addition is performed to obtain the reconstructed data s ri .
  • the compression coding algorithm is divided into two levels.
  • the first stage is to compress and encode the original data S
  • the second stage is to compress and encode the error data generated during the first stage compression coding
  • the data compression coding Sc and the error compression coding R lC obtained by the two stages of compression coding are entropy coded respectively. Since the data is compressed and coded multiple times by the present scheme, compared with the prior art, only one compression coding is performed. A higher compression ratio can be achieved, and, in addition, in the present scheme, in addition to compressing and encoding the original data S, the error data generated during the first-stage compression encoding is compression-encoded, and compression encoding is separately performed.
  • the obtained data compression code Sc and error compression code c are entropy coded, so that the compression quality can be improved relative to the prior art.
  • FIG. 6a is a schematic block diagram of a compression coder which has several modules related to the second-order error compared with the compression coder in the fifth embodiment: a compression coder
  • 6b is a schematic block diagram of a decoding decompressor including a frame deblocking module B601, an error entropy decoding module B602, a data entropy decoding module B603, an error decoding decompression module B604 of a decoding decompressor, and a number of decoding decompressors.
  • the decoding decompression module B605 the adder B606 of the decoding decompressor and the second-order error entropy decoding module B607.
  • the frame header information is included in the coded frame as an example.
  • the data compression coding module A601 is configured to adopt an ADPCM coding algorithm, and the error compression coding module A604 is used.
  • error entropy coding module A605 and data entropy coding module A606 adopt Huffman coding algorithm
  • data decompression decoding module B605 correspondingly adopts ADPCM decoding algorithm
  • error decoding decompression module B604 correspondingly adopts The Lloyd-Max non-uniform hook scalar quantization algorithm
  • the second error entropy decoding module B607, the error entropy decoding module B602 and the data entropy decoding module B603 correspondingly adopt the Huffman decoding algorithm
  • the processing flow of the compression encoder and the decoding decompressor is as follows:
  • Step 1 The data compression coding module A601 uses the ADPCM coding algorithm to compress and encode the original data S, obtains the data compression coding Sc, and supplies the data compression coding Sc to the data decoding decompression module A602 and the data entropy coding module A606 of the compression encoder;
  • the original data S may be any source and any type of data, such as a general data sequence, a sample communication signal, a sampling time series, a voice signal, an audio signal, and the like.
  • Step 2 The data decoding and decompression module A602 decodes and decompresses the data compression code Sc by using the ADPCM decoding algorithm to obtain the decoded decompressed data S, and then sends the decoded decompressed data S to the first adder A603 of the compression encoder.
  • Step 3 The adder A603 of the compression encoder calculates an error between the original data S and the decoded decompressed data S, that is, subtracts the decompressed data S from the original data S, obtains error data, and then sends the error data to the error compression coding.
  • Step 4 The error compression coding module A604 uses the Lloyd-Max non-uniform scalar quantization algorithm to compress and encode the error data to obtain an error compression code c, and then sends the error compression code c to the error entropy coding module A605 and the error decoding of the compression encoder.
  • Step 5 The error decoding decompression module A608 of the compression encoder adopts the Lloyd-Max non-uniform standard The quantity quantization algorithm decodes and decompresses the error compression code C to obtain a decoding decompression error, and then transmits the decoding decompression error to the second adder A609.
  • Step 6 The second adder A609 subtracts the error decompression error from the error data to obtain a second-order error R 2 , and then sends the second-order error R 2 to the second-order error entropy encoding module A610.
  • Step 7 The second-order error entropy coding module A610 uses the Huffman coding algorithm to entropy encode the second-order error R 2 to obtain a second-order error entropy code R 2 e , and then sends the second-order error entropy code R 2 e to the frame encapsulation module A607. .
  • the error entropy coding module A605 uses the Huffman coding algorithm to entropy encode the error compression coding c, obtains the error entropy coding R ie , and then sends the error entropy coding R ie to the frame encapsulation module.
  • the data entropy coding module A606 adopts Huffman.
  • the encoding algorithm entropy encodes the data compression code Sc to obtain a data entropy code Se, and then sends the data entropy code Se to the frame encapsulation module A607. Step 6 and steps 2 ⁇ 5 are performed in no particular order.
  • Step 7 The frame encapsulation module A607 combines the second-order error entropy coding R 2 e, the error entropy coding R e and the data entropy coding Se, and adds the frame header information Hi to output a complete coding frame, thereby forming an encoded bit stream ⁇ 1 ⁇
  • the figure is a schematic diagram of an encoded frame structure and an encoded bitstream.
  • the coded bit stream includes a plurality of coded frames: an encoded frame il, an encoded frame i, and an encoded frame i+l, and the like, and the encoded frame includes frame header information, data entropy coding Se, error entropy coding e, and second order error.
  • Entropy coding R 2 e is a schematic diagram of an encoded frame structure and an encoded bitstream.
  • the coded bit stream ⁇ can be sent to the channel for transmission according to the needs of the actual application, or can be stored in the storage medium.
  • Step 1 After receiving the encoded frame from the encoded bit stream, the frame deblocking module B601 decomposes the encoded frame into frame header information, second-order error entropy coding R 2 e, error entropy coding e, and data entropy coding Se, and then The level error entropy coding R 2 e is sent to the second error entropy decoding module B607, the error entropy coding e is sent to the error entropy decoding module B602, and the data entropy coding Se is sent to the data entropy decoding module. B603.
  • Step 2 The second-order error entropy decoding module B607 performs entropy decoding on the second-order error entropy coding R 2 e by Huffman decoding to obtain a second-order error R 2 , and then sends the second-order error R 2 to the adder B 606 of the decoding decompressor.
  • the error entropy decoding module B602 performs entropy decoding on the error entropy coding e by using Huffman decoding, obtains an error compression code R lC , and then sends the error compression code R lC to the error decoding decompression module B604.
  • the data entropy decoding module B603 uses Huffman decoding to entropy decode the data entropy coding Se, obtains the data compression coding Sc, and then sends the data compression coding Sc to the data decoding decompression module B605.
  • Step 3 the error decoding decompression module B604 uses Lloyd-Max non-uniform scalar quantization algorithm to decode and decompress the error compression code R lC to obtain a decoding decompression error, and then send the decoding decompression error to the adder B606 of the decoding decompressor;
  • the data decoding and decompression module B605 uses the ADPCM decoding algorithm to decode and decompress the data compression code Sc to obtain the decoded decompressed data S, and then sends the decoded decompressed data S to the adder B606 of the decoding decompressor.
  • Step 4 The adder B606 of the decoding decompressor adds the second-order error R 2 , the decoded decompressed data S, and the decoding decompression error to obtain the reconstructed data Sr 2 .
  • the second embodiment can further perform entropy coding on the second-order error, so that the quality can be further compressed and implemented in comparison with the fifth embodiment. No distortion compression.
  • the embodiment of the present invention further provides a compression coder, as shown in FIG. 7a, the compression coder includes a compression coding unit 701, an entropy coding unit 702, and a packaging unit 703;
  • the compression coding unit 701 is configured to separately compress and encode the original data and the error data to obtain data compression coding and error compression coding, where the error data is to compress the original data.
  • the entropy encoding unit 702 is configured to entropy encode the data compression coding and the error compression coding obtained by the compression coding unit 701, respectively, to obtain data entropy coding and error entropy coding; for example, Huffman coding, and/or arithmetic coding, and/or may be adopted. Or other unequal length coding algorithms entropy coding data compression coding and error compression coding, respectively.
  • the encapsulating unit 703 is configured to perform frame encapsulation on the data entropy coding and error entropy coding obtained by the entropy coding unit 702 to form an encoded frame.
  • the header information may not be needed in the encoded frame, but when the compression encoder and the decoding decompressor operate in the time varying mode, the encoded frame is
  • the frame header information carries the coding mode of the current coded frame.
  • the frame header information may also carry information such as the frame length, the coding rate, and the quantization code table according to specific application requirements. Therefore, the encapsulating unit 703 is further configured to frame the header information, and the data entropy encoding and the error entropy encoding obtained by the entropy encoding unit 702 to form an encoded frame.
  • the compression coding unit 701 may include a data compression coding subunit 7011, a data decoding decompression subunit 7012, a calculation subunit 7013, and an error compression coding subunit 7014.
  • the data compression coding subunit 7011 is configured to use the original data. Perform compression coding to obtain data compression coding; for example, the original data may be compression-encoded by using a waveform coding method, a prediction and transformation algorithm, or a VQ method;
  • the data decoding and decompressing subunit 7012 is configured to decode and decompress the data compression coding obtained by the data compression coding subunit 7011 to obtain decoded decompressed data;
  • the calculating subunit 7013 is configured to calculate an error between the original data and the decoded decompressed data obtained by the data decoding and decompressing subunit 7012, to obtain error data;
  • the error compression coding sub-unit 7014 is configured to perform compression coding on the error data obtained by the calculation sub-unit 7013 to obtain error compression coding; for example, the error data may be compression-coded by using an SQ method.
  • the above compression coder can realize distortion compression coding, that is, the compression coder has a loss
  • the compression encoder is really, and further, the distortion-free compression coding can be realized.
  • the corresponding unit needs to be added to the distortion compression encoder to process the second-order error, thereby forming distortion-free compression.
  • Encoder as follows:
  • the compression coder may further include an error decoding decompression unit 704 and an operation unit 705;
  • the error decoding and decompression unit 704 is configured to perform decoding and decompression on the error compression coding obtained by the compression coding unit 701 to obtain a decoding and decompression error.
  • the error compression coding obtained by the error compression coding subunit 7014 can be decoded and decompressed. Decode the decompression error.
  • the operation unit 705 is configured to calculate an error between the error data and the decoding and decompression error obtained by the error decoding and decompression unit 704, to obtain a second-order error;
  • the entropy coding unit 702 is further configured to entropy encode the second-order error obtained by the operation unit 705 to obtain a second-level error entropy coding; for example, Huffman coding, and/or arithmetic coding, and/or other
  • the equal length coding algorithm entropy encodes the second order error.
  • the encapsulating unit 703 is further configured to perform frame encapsulation on the data entropy coding, error entropy coding, and second-order error entropy coding obtained by the entropy coding unit 702 to form an encoded frame.
  • the foregoing units may be implemented as a separate entity, or may be implemented as a plurality of entities.
  • the compression coding unit 701 may be implemented by a data compression coding module.
  • the data decoding decompression module, the adder (the adder of the compression encoder in the fifth embodiment or the first adder in the sixth embodiment) and the error compression coding module, the entropy coding unit 702 may be the data entropy coding module and the data
  • the entropy coding module is composed, and the encapsulation unit 703 is implemented by the frame encapsulation module, the error decoding decompression unit 704 is used as the error decoding decompression module, and the operation unit 705 is implemented by the second adder in the sixth embodiment, etc., the specific implementation
  • the form can be set according to actual needs.
  • the compression coding unit 701 of the compression encoder can divide the compression coding algorithm into two levels.
  • the first stage is to compress and encode the original data
  • the second level is
  • the error generated during the first-stage compression coding is compression-encoded, and then the entropy coding unit 702 separately entropy encodes the data compression coding and the error compression coding obtained by the two-stage compression coding, because the scheme performs more data on the data.
  • Sub-compression coding so that a higher compression ratio can be achieved with respect to the prior art only one compression coding, and, in this scheme, the compression coding unit 701 can not only compress and encode the original data, but also In particular, the error generated in the first stage compression coding is compression-encoded, and the entropy coding unit 702 separately entropy encodes the data compression coding and the error compression coding obtained by compression coding, so that it can be compared with the prior art. Improve compression quality.
  • an embodiment of the present invention further provides a decoding decompressor.
  • the decoding decompressor includes a first decapsulation unit 801, a first entropy decoding unit 802, and a first a decoding decompression unit 803 and a first reconstruction unit 804;
  • the first decapsulation unit 801 is configured to decapsulate the encoded frame to obtain data entropy coding and error entropy coding;
  • the first entropy decoding unit 802 is configured to perform entropy decoding on the data entropy coding and the error entropy coding obtained by the first decapsulation unit 801, respectively, to obtain data compression coding and error compression coding;
  • the first decoding and decompressing unit 803 is configured to separately decode and decompress the data compression coding and the error compression coding obtained by the first entropy decoding unit 802 to obtain the decoded decompressed data and the decoding decompression error.
  • the first reconstruction unit 804 is configured to The decoded decompressed data obtained by the decoding and decompressing unit 803 and the decoding decompression error are added to obtain reconstructed data.
  • the decoding and decompression algorithm and the entropy decoding algorithm used herein need to correspond to the compression coding algorithm used in compression coding and the entropy coding algorithm.
  • the waveform coding method is adopted.
  • the waveform decoding method is needed for decoding and decompression. If Huffman coding is used for entropy coding, Huffman decoding is required for entropy decoding, and so on.
  • each of the foregoing units may be implemented as a separate entity, or may be implemented as a plurality of entities.
  • the first decapsulation unit 801 may be implemented by a frame decapsulation module.
  • the first entropy decoding unit 802 may be composed of an error entropy decoding module and a data entropy decoding module, and the first decoding decompression unit 803 may be instructed by the data decoding decompression module and the error decoding decompression module, and the first reconstruction unit is implemented by an adder.
  • the specific implementation can be set according to actual needs.
  • the first deblocking unit 801 of the decoding decompressor can decompose the encoded frame into data entropy coding and error entropy coding, and the first entropy decoding unit 802 performs data entropy coding and error entropy coding, respectively.
  • the entropy decoding is performed to obtain the decoded decompressed data and the decoding decompression error, and then the decoding decompression data and the decoding decompression error are respectively decoded and decompressed by the first decoding decompression unit 803 to obtain the decoded decompressed data and the decoding decompression error, and finally by the first reconstruction unit 804.
  • the decoding decompressed data and the decoding decompression error are combined to implement data reconstruction. Since the decoding decompressor corresponds to the distorted compression decoder in the seventh embodiment, the same advantageous effects as in the seventh embodiment can be achieved. That is, a higher compression ratio and a higher compression quality can be achieved than in the prior art.
  • an embodiment of the present invention further provides a decoding decompressor.
  • the decoding decompressor includes a second deblocking unit 901, a second entropy decoding unit 902, and a second Two decoding decompression unit 903 and second reconstruction unit 904;
  • the second decapsulation unit 901 is configured to decapsulate the encoded frame to obtain two-level error entropy coding, data entropy coding, and error entropy coding;
  • the second entropy decoding unit 902 is configured to perform entropy decoding on the second-order error entropy coding, the data entropy coding, and the error entropy coding obtained by the second deblocking unit 901, to obtain a second-order error, a data compression coding, and an error compression coding;
  • a second decoding and decompressing unit 903 configured to separately decode and decompress data compression coding and error compression coding obtained by the second entropy decoding unit 902, to obtain decoding decompressed data and decoding decompression error;
  • the second reconstruction unit 904 is configured to add the second-level error obtained by the second entropy decoding unit 903, and the decoded decompressed data obtained by the second decoding and decompressing unit 903 and the decoding decompression error to obtain reconstructed data.
  • the decoding and decompression algorithm and the entropy decoding algorithm used herein need to correspond to the compression coding algorithm used in compression coding and the entropy coding algorithm.
  • the waveform coding method is adopted.
  • the waveform decoding method is needed for decoding and decompression. If Huffman coding is used for entropy coding, Huffman decoding is required for entropy decoding, and so on.
  • each of the foregoing units may be implemented as a separate entity, or may be implemented as a plurality of entities.
  • the second decapsulation unit 901 may be implemented by a frame decapsulation module.
  • the second entropy decoding unit 902 may be composed of a two-level error entropy decoding module, an error entropy decoding module, and a data entropy decoding module, and the second decoding and decompressing unit 903 may be instructed by the data decoding decompression module and the error decoding decompression module, and the second reconstruction Unit 904 is implemented by an adder, etc., and the specific implementation form can be set according to actual needs.
  • the second deblocking unit 901 of the decoding decompressor provided by the present invention can decompose the encoded frame into two-level error entropy coding, data entropy coding and error entropy coding, and the second entropy decoding unit 902 respectively performs the second-order error entropy.
  • Encoding, data entropy coding and error entropy coding are performed to obtain two-level error, decoding decompressed data and decoding decompression error, and then decoding and decompressing the decompressed data and the decoding decompression error by the second decoding and decompressing unit 903, respectively, to obtain decoding and decompression Data and decoding decompression error, and finally the second reconstruction unit 904 combines the secondary error, the decoded decompressed data, and the decoding decompression error to achieve data reconstruction, since the decoding decompressor and the distortion-free in the seventh embodiment
  • the compression decoder corresponds to the same, so that the same advantageous effect as in the seventh embodiment can be achieved, that is, a higher compression ratio and a higher compression quality can be achieved than in the prior art, and, in contrast, the eighth embodiment is
  • the decoding decompressor provided in this embodiment can have higher compression quality in terms of the provided decoding decompressor. Achieve lossless compression encoding.
  • the embodiment of the present invention further provides a communication system, including any of the compression encoder and the decoding decompressor provided by the embodiments of the present invention; that is, the communication system may include a distortion compression decoder and corresponding decoding.
  • the decompressor, or the communication system can also be a distortion-free compression decoder and its corresponding decoding decompressor.
  • the compression coder and the decoding decompressor provided by the embodiments of the present invention can be applied to a communication-oriented data compression and transmission system, and can also be applied to a storage-oriented data compression system.
  • the communication-oriented data compression and transmission system includes: remote data communication through various channels and networks, such as data communication, file transmission, voice communication, audio communication, etc.; through short-range and internal data communication, such as general public Data transmission and remoteness in the wireless interface; data transmission between modules within the device or within the board, such as analog to digital / digital to analog conversion (AD / DA, Analog to Digital / Digital to Analog) Data exchange with other components.
  • remote data communication through various channels and networks, such as data communication, file transmission, voice communication, audio communication, etc.
  • short-range and internal data communication such as general public Data transmission and remoteness in the wireless interface
  • data transmission between modules within the device or within the board such as analog to digital / digital to analog conversion (AD / DA, Analog to Digital / Digital to Analog) Data exchange with other components.
  • AD / DA Analog to Digital / Digital to Analog
  • Data storage systems for storage can include: efficient storage of data, digital media storage, digital libraries, and the like.
  • the compression coder in the communication system can divide the compression coding algorithm into two levels.
  • the first stage is to compress and encode the original data
  • the second stage is to compress and encode the first stage.
  • the generated error is compression-encoded
  • the data compression coding and the error compression coding obtained by the two-stage compression coding are entropy-encoded respectively. Since the data is compressed and encoded multiple times, it is only performed once compared with the prior art.
  • a higher compression ratio can be achieved, and, in this scheme, in addition to compressing and encoding the original data, the compression encoder compresses and encodes the error generated in the first-stage compression coding.
  • entropy coding the data compression coding and error compression coding obtained by compression coding, respectively so that the compression quality can be improved compared with the prior art.
  • the surface can be improved.
  • Processing performance to a data compression and transmission system or a storage-oriented data compression system of communication that is, if the communication system provided by the embodiment of the present invention is applied to a communication-oriented data compression and transmission system, communication signals and data can be improved
  • the transmission efficiency improves the utilization of the channel, thereby reducing the operating cost.
  • the storage efficiency of the communication signal and the data can be improved, and the utilization of the storage device can be improved. Rate, thereby reducing hardware costs for systems and equipment.
  • the program can be stored in a computer readable storage medium.
  • the storage medium can include: Read Only Memory (ROM), Random Access Memory (RAM), disk or optical disk.

Landscapes

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

Abstract

A method and device for compression encoding, a method and device for decompression decoding, and a communication system are provided in the present invention. In the present invention, original data and error data, which is generated by compression encoding the original data, are respectively compression encoded to obtain a data compression code and error compression code (101); then the data compression code and error compression code are respectively entropy encoded to obtain a data entropy code and error entropy code (102); finally, the data entropy code and error entropy code are encapsulated in frames to form code frames (103). Compared with the existing technology, the present invention can improve compression ratio and compression quality.

Description

压缩编码方法及装置、 解码解压方法及装置、 以及通信系统 本申请要求于 2010年 9月 29 日提交中国专利局、 申请号为 201010298614. 4、 发明名称为 "压缩编码方法、 解码解压方法、 装置和通 信系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域  The present invention claims to be submitted to the Chinese Patent Office on September 29, 2010, and the application number is 201010298614. 4, the invention name is "compression coding method, decoding decompression method, device" The priority of the Chinese Patent Application, the entire disclosure of which is incorporated herein by reference. Technical field
本发明涉及通信技术领域, 具体涉及压缩编码方法、 解码解压方法、 装置和通信系统。  The present invention relates to the field of communications technologies, and in particular, to a compression encoding method, a decoding decompression method, an apparatus, and a communication system.
背景技术 Background technique
随着通信系统的快速发展, 通信业务类型和业务量日益增长, 通信系 统中需要进行传输的数据量也急剧增加, 为了满足通信业务激增的需要, 需要通过对通信信号和数据进行压缩来节省网络资源。  With the rapid development of communication systems, the types of communication services and the volume of services are increasing, and the amount of data that needs to be transmitted in communication systems is also increasing sharply. In order to meet the surge in communication services, it is necessary to save the network by compressing communication signals and data. Resources.
语音、 音频、 图像和视频信号都是最常见的通信系统中进行传输的多 媒体信源, 因为这些多媒体信源自身都具有较强的相关性和统计特性, 并 且已经具有了较好的数学和物理模型, 因而具有了很好的数据压缩算法, 可以将原始多媒体数据压缩到原来的几十分之一的范围内, 大大的提高了 信道利用率并减低了设备和运营成本。 然而, 由于一般数据不具备多媒体 信源高度的相关性和统计特性, 所以针对语音、 音频、 图像和视频信号有 效地压缩编码方法无法直接用于一般数据的压缩, 所以需要专门针对一般 数据进行压缩编码。  Voice, audio, image and video signals are the most common multimedia sources for transmission in communication systems, because these multimedia sources have strong correlation and statistical properties, and already have good mathematics and physics. The model has a good data compression algorithm, which can compress the original multimedia data into the original one-tenth of the range, greatly improving channel utilization and reducing equipment and operating costs. However, since general data does not have the high correlation and statistical characteristics of multimedia sources, the effective compression coding method for voice, audio, image and video signals cannot be directly used for general data compression, so it is necessary to compress specifically for general data. coding.
在一般数据进行压缩编码时, 现有技术首先需要将输入的一帧原始数 据分解成第一子集和第二子集, 一方面, 利用第一子集数据估计第二子集 数据, 得到第二子集数据的估值, 然后由第二子集减去得到的第二子集的 估值得到一组误差数据; 另一方面, 第一子集数据经过一个导数编码器处 理得到子集尾数和子集指数, 以及反映第一子集编码信息的子集导数及子 集霍夫曼(Huffman )表, 而误差数据经过另一个导数编码器处理得到误差 尾数和误差指数, 以及反映误差数据编码信息的误差导数及误差 Huffman 表; 其中, 子集导数、 子集 Huffman表、 误差导数和误差 Huffman表决定 了表示一组浮点数据需要的最少存储量, 所以, 头信息编码器需要将将子 集导数、 子集 Huffman表、 误差导数及误差 Huffman表和来自反映编码器 编码设置的编码参数组合成头信息, 然后由格式化模块将头信息、 子集尾 数、 子集指数、 误差尾数和误差指数按照一定的格式组合成编码数据帧, 形成压缩数据输出。 解码解压流程为上述的逆过程, 在此不再赘述。 When the general data is compression-encoded, the prior art firstly needs to decompose the input original data into a first subset and a second subset. On the one hand, using the first subset data to estimate the second subset data, The second subset of data is estimated, and then the second subset is subtracted from the obtained second subset to obtain a set of error data; on the other hand, the first subset of data is processed by a derivative encoder to obtain the subset of the mantissa And a subset index, and a subset derivative and a subset Huffman table reflecting the first subset of encoded information, and the error data is processed by another derivative encoder to obtain an error mantissa and an error index, and the error data encoding information is reflected Error derivative and error Huffman Table; where the subset derivative, subset Huffman table, error derivative, and error Huffman table determine the minimum amount of storage needed to represent a set of floating point data, so the header information encoder needs to have the subset derivative, subset Huffman table The error derivative and the error Huffman table and the encoding parameters from the reflection encoder encoding settings are combined into header information, and then the formatting module combines the header information, the subset mantissa, the subset index, the error mantissa and the error index into a certain format. The data frame is encoded to form a compressed data output. The decoding and decompression process is the inverse process described above, and is not described here.
在对现有技术的研究和实践过程中, 本发明的发明人发现, 现有技术 采用了同一算法对第一子集数据和误差数据进行压缩编码, 其压缩比不够 高。  In the research and practice of the prior art, the inventors of the present invention found that the prior art uses the same algorithm to compress and encode the first subset data and the error data, and the compression ratio thereof is not high enough.
发明内容 Summary of the invention
本发明实施例提供压缩编码方法、 解码解压方法、 装置和通信系统, 可以具有更高的压缩比。  Embodiments of the present invention provide a compression coding method, a decoding and decompression method, a device, and a communication system, which may have a higher compression ratio.
一方面, 提供了一种压缩编码方法, 包括:  In one aspect, a compression coding method is provided, including:
分别对原始数据和误差数据进行压缩编码, 得到数据压缩编码和误差 压缩编码, 所述误差数据为对原始数据进行压缩编码所产生的误差;  The original data and the error data are respectively compression-encoded to obtain data compression coding and error compression coding, and the error data is an error generated by compression coding the original data;
分别对数据压缩编码和误差压缩编码进行熵编码, 得到数据熵编码和 误差熵编码;  Entropy coding the data compression coding and the error compression coding respectively, and obtaining data entropy coding and error entropy coding;
将数据熵编码和误差熵编码进行帧封装以形成编码帧。  Data entropy coding and error entropy coding are frame encapsulated to form an encoded frame.
另一方面, 提供了一种解码解压方法, 包括:  In another aspect, a decoding and decompression method is provided, including:
对编码帧进行解封装, 以得到数据熵编码和误差熵编码;  Encoding the encoded frame to obtain data entropy coding and error entropy coding;
分别对所述数据熵编码和误差熵编码进行熵解码, 得到数据压缩编码 和误差压缩编码;  Entropy decoding the data entropy coding and error entropy coding respectively to obtain data compression coding and error compression coding;
分别对所述数据压缩编码和误差压缩编码进行解码解压, 得到解码解 压数据和解码解压误差;  Decoding and decompressing the data compression coding and the error compression coding respectively to obtain decoding decompression data and decoding decompression error;
对解码解压数据和解码解压误差进行相加, 得到重构数据。  The decoded decompressed data and the decoding decompression error are added to obtain reconstructed data.
另一方面, 提供了一种解码解压方法, 包括: 对编码帧进行解封装, 得到二级误差熵编码、 数据熵编码和误差熵编 码; In another aspect, a decoding and decompression method is provided, including: Decapsulating the encoded frame to obtain two-level error entropy coding, data entropy coding, and error entropy coding;
分别对所述二级误差熵编码、 数据熵编码和误差熵编码进行熵解码, 得到二级误差、 数据压缩编码和误差压缩编码;  Entropy decoding the second-order error entropy coding, data entropy coding and error entropy coding, respectively, to obtain two-level error, data compression coding and error compression coding;
分别对所述数据压缩编码和误差压缩编码进行解码解压, 得到解码解 压数据和解码解压误差;  Decoding and decompressing the data compression coding and the error compression coding respectively to obtain decoding decompression data and decoding decompression error;
对二级误差、 解码解压数据和解码解压误差进行相加, 得到重构数据。 另一方面, 提供了一种压缩编码器, 包括:  The two-level error, the decoded decompressed data, and the decoding decompression error are added to obtain reconstructed data. In another aspect, a compression encoder is provided, including:
压缩编码单元, 用于分别对原始数据和误差数据进行压缩编码, 得到 数据压缩编码和误差压缩编码, 所述误差数据为对原始数据进行压缩编码 所产生的误差;  a compression coding unit, configured to compress and encode the original data and the error data respectively, to obtain data compression coding and error compression coding, where the error data is an error generated by compression coding the original data;
熵编码单元, 用于分别对压缩编码单元得到的数据压缩编码和误差压 缩编码进行熵编码, 得到数据熵编码和误差熵编码;  An entropy coding unit, configured to entropy encode data compression coding and error compression coding obtained by the compression coding unit, respectively, to obtain data entropy coding and error entropy coding;
封装单元, 用于将熵编码单元得到的数据熵编码和误差熵编码进行帧 封装以形成编码帧。  And an encapsulating unit, configured to perform frame encapsulation on the data entropy coding and error entropy coding obtained by the entropy coding unit to form an encoded frame.
另一方面, 提供了一种解码解压器, 包括:  In another aspect, a decoding decompressor is provided, comprising:
第一解封单元, 用于对编码帧进行解封装, 以得到数据熵编码和误差 熵编码;  a first decapsulation unit, configured to decapsulate the encoded frame to obtain data entropy coding and error entropy coding;
第一熵解码单元, 用于分别对第一解封单元得到的数据熵编码和误差 熵编码进行熵解码, 得到数据压缩编码和误差压缩编码;  a first entropy decoding unit, configured to perform entropy decoding on data entropy coding and error entropy coding obtained by the first deblocking unit, respectively, to obtain data compression coding and error compression coding;
第一解码解压单元, 用于分别对第一熵解码单元得到的数据压缩编码 和误差压缩编码进行解码解压, 得到解码解压数据和解码解压误差;  a first decoding decompression unit, configured to respectively decode and decompress the data compression coding and the error compression coding obtained by the first entropy decoding unit, to obtain decoding decompression data and decoding decompression error;
第一重构单元, 用于对第一解码解压单元得到的解码解压数据和解码 解压误差进行相加, 得到重构数据。  The first reconstruction unit is configured to add the decoded decompressed data obtained by the first decoding and decompressing unit and the decoding and decompression error to obtain the reconstructed data.
另一方面, 提供了一种解码解压器, 包括:  In another aspect, a decoding decompressor is provided, comprising:
第二解封单元, 用于对编码帧进行解封装, 得到二级误差熵编码、 数 据熵编码和误差熵编码; a second decapsulation unit, configured to decapsulate the encoded frame to obtain a second-order error entropy coding, and a number According to entropy coding and error entropy coding;
第二熵解码单元, 用于分别对第二解封单元得到的二级误差熵编码、 数据熵编码和误差熵编码进行熵解码, 得到二级误差、 数据压缩编码和误 差压缩编码;  a second entropy decoding unit, configured to perform entropy decoding on the second-order error entropy coding, data entropy coding, and error entropy coding obtained by the second de-sealing unit, respectively, to obtain two-level error, data compression coding, and error compression coding;
第二解码解压单元, 用于分别对第二熵解码单元得到的数据压缩编码 和误差压缩编码进行解码解压, 得到解码解压数据和解码解压误差;  a second decoding and decompressing unit, configured to separately decode and decompress data compression coding and error compression coding obtained by the second entropy decoding unit, to obtain decoding decompressed data and decoding decompression error;
第二重构单元, 用于对第二熵解码单元得到的二级误差, 以及第二解 码解压单元得到的解码解压数据和解码解压误差进行相加, 得到重构数据。  And a second reconstruction unit, configured to add the second-order error obtained by the second entropy decoding unit, and the decoded decompressed data obtained by the second decoding and decompressing unit and the decoding and decompression error to obtain the reconstructed data.
另一方面, 提供了一种通信系统, 包括上述的任一种压缩编码器和任 一种解码解压器。  In another aspect, a communication system is provided, comprising any of the above described compression encoders and any of the decoding decompressors.
本发明实施例将压缩编码算法分成两级进行, 第一级是对原始数据进 行压缩编码, 第二级是对在第一级压缩编码时所产生的误差进行压缩编码, 然后再分别对这两级压缩编码得到的数据压缩编码和误差压缩编码进行熵 编码, 由于本方案对数据进行了多次压缩编码, 所以相对于现有技术只进 行一次压缩编码而言, 可以达到较高的压缩比, 而且, 由于在本方案中, 除了对原始数据进行压缩编码外, 还特别对第一级压缩编码时所产生的误 差进行了压缩编码, 并分别对压缩编码得到的数据压缩编码和误差压缩编 码进行熵编码, 所以相对于现有技术而言, 可以提高压缩质量。  In the embodiment of the present invention, the compression coding algorithm is divided into two levels. The first stage is to compress and encode the original data, and the second stage is to compress and encode the error generated in the first stage compression coding, and then separately The data compression coding and the error compression coding obtained by the stage compression coding are entropy coded. Since the data is compressed and coded multiple times by the scheme, a higher compression ratio can be achieved compared with the prior art only when the compression coding is performed once. Moreover, in the present scheme, in addition to compressing and encoding the original data, the error generated in the first-stage compression coding is compression-encoded, and the data compression coding and error compression coding obtained by the compression coding are respectively performed. Entropy coding, so the compression quality can be improved relative to the prior art.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述 中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性 劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in view of the drawings.
图 la是本发明实施例一提供的压缩编码方法的流程图;  Figure la is a flowchart of a compression coding method provided by Embodiment 1 of the present invention;
图 lb是一个原始数据的概率分布实例图;  Figure lb is an example of a probability distribution of raw data;
图 lc是图 lb所对应的误差数据的概率分布实例图; 图 Id是一个 4比特编码时数据压缩编码中 16个码字概率分布的实例图; 图 le是一个 4比特编码时误差压缩编码中 16个码字概率分布的实例图; 图 2是本发明实施例二提供的解码解压方法的流程图; Figure lc is an example of a probability distribution of error data corresponding to Figure lb; Figure Id is an example of 16 codeword probability distributions in data compression coding at 4-bit encoding; Figure 1 is an example of 16 codeword probability distributions in 4-bit coding error compression coding; Figure 2 is an implementation of the present invention A flowchart of a decoding and decompression method provided in Example 2;
图 3a是一段原始数据的实例图;  Figure 3a is an example diagram of a piece of raw data;
图 3b是图 3a所对应的误差数据的实例图;  Figure 3b is an example diagram of the error data corresponding to Figure 3a;
图 3c是图 3a所对应的重构数据的实例图;  Figure 3c is an example diagram of the reconstructed data corresponding to Figure 3a;
图 3d是图 3a所对应的二级误差的实例图;  Figure 3d is an example diagram of the secondary error corresponding to Figure 3a;
图 3e是图 3a所对应的二级误差的概率分布实例图;  Figure 3e is a diagram showing an example of the probability distribution of the secondary error corresponding to Figure 3a;
图 3f是本发明实施例三提供的压缩编码方法的流程图;  FIG. 3f is a flowchart of a compression coding method according to Embodiment 3 of the present invention; FIG.
图 4是本发明实施例四提供的解码解压方法的流程图;  4 is a flowchart of a decoding and decompression method provided by Embodiment 4 of the present invention;
图 5a是压缩编码器的原理框图;  Figure 5a is a schematic block diagram of a compression encoder;
图 5b是解码解压器的原理框图;  Figure 5b is a block diagram of the decoding decompressor;
图 5c是编码帧结构和编码比特流的示意图;  Figure 5c is a schematic diagram of an encoded frame structure and an encoded bitstream;
图 6a是压缩编码器的原理框图;  Figure 6a is a schematic block diagram of a compression encoder;
图 6b是解码解压器的原理框图;  Figure 6b is a block diagram of the decoding decompressor;
图 6c是编码帧结构和编码比特流的示意图;  Figure 6c is a schematic diagram of an encoded frame structure and an encoded bitstream;
图 7a是本发明实施例提供的压缩编码器的结构示意图;  FIG. 7 is a schematic structural diagram of a compression encoder according to an embodiment of the present invention; FIG.
图 7b是本发明实施例提供的压缩编码器的另一结构示意图;  FIG. 7b is another schematic structural diagram of a compression encoder according to an embodiment of the present invention;
图 8是本发明实施例提供的解码解压器的结构示意图;  8 is a schematic structural diagram of a decoding decompressor according to an embodiment of the present invention;
图 9是本发明实施例提供的解码解压器的另一结构示意图。  FIG. 9 is another schematic structural diagram of a decoding decompressor according to an embodiment of the present invention.
具体实施方式  detailed description
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有作出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。 本发明实施例提供一种压缩编码方法、 解码解压方法、 装置和通信系 统。 以下分别进行详细说明。 The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention. Embodiments of the present invention provide a compression coding method, a decoding and decompression method, an apparatus, and a communication system. The details are described below separately.
实施例一、  Embodiment 1
本实施例将从压缩编码器的角度进行描述。  This embodiment will be described from the perspective of a compression encoder.
一种压缩编码方法, 包括: 分别对原始数据和误差数据进行压缩编码, 得到数据压缩编码和误差压缩编码, 其中, 误差数据为对原始数据进行压 缩编码所产生的误差; 分别对数据压缩编码和误差压缩编码进行熵编码, 得到数据熵编码和误差熵编码; 将数据熵编码和误差熵编码进行帧封装以 形成编码帧。  A compression coding method, comprising: compressing and encoding original data and error data respectively, and obtaining data compression coding and error compression coding, wherein the error data is an error generated by compression coding the original data; respectively compressing and encoding the data The error compression coding performs entropy coding to obtain data entropy coding and error entropy coding; and data entropy coding and error entropy coding are frame-encapsulated to form an encoded frame.
如图 1 a所示, 具体流程可以如下:  As shown in Figure 1a, the specific process can be as follows:
101、 分别对原始数据和误差数据进行压缩编码, 得到数据压缩编码和 误差压缩编码。  101. Compress and encode the original data and the error data respectively to obtain data compression coding and error compression coding.
其中, 误差数据为对原始数据进行压缩编码所产生的误差, 具体可以 ^口下:  Wherein, the error data is an error generated by compressing and encoding the original data, and the specific error may be:
( 1 )对原始数据进行压缩编码, 得到压缩后的数据, 在本发明实施例 中称之为数据压缩编码。  (1) The original data is compression-encoded to obtain compressed data, which is referred to as data compression coding in the embodiment of the present invention.
对原始数据进行压缩编码时, 具体可以根据应用系统对压缩性能和成 本的要求采用不同的方法, 比如可以采用算法简单的波形编码方法, 可以 采用算法比较复杂的预测和变换算法, 或者, 还可以采用压缩比较高但算 法比较复杂的矢量量化 ( VQ, Vector Quantization ) 方法, 等等;  When the original data is compression-encoded, different methods may be adopted according to the requirements of the application system for the compression performance and the cost. For example, a simple algorithm for waveform coding may be used, and a more complex prediction and transformation algorithm may be used, or The vector quantization (VQ, Vector Quantization) method with higher compression but more complicated algorithm, etc.;
其中, 波形编码方法可以包括脉沖编码调制 ( PCM, Pulse Code Modulation )或自适应差分脉沖编码调制 (ADPCM, Adaptive Differential Pulse Code Modulation )等; 预测可以包括线性预测( LP, Linear Prediction ) 等, 变换可以包括小波变换(WT, Wavelet Transform ) 变换或离散余弦变 换 ( DCT, Discrete Cosine Transform ) 哭换等。  The waveform coding method may include PCM (Pulse Code Modulation) or Adaptive Differential Pulse Code Modulation (ADPCM); the prediction may include linear prediction (LP, Linear Prediction), etc., and the transformation may be Including wavelet transform (WT, Wavelet Transform) transform or discrete cosine transform (DCT, Discrete Cosine Transform) crying and so on.
( 2 )对数据压缩编码进行解码解压, 得到解压解压后的数据, 在本发 明实施例中称为解码解压数据; (2) Decompressing and decompressing the data compression coding to obtain decompressed and decompressed data in the present In the embodiment, it is called decoding decompression data;
比如, 具体可以采用波形解码方法、 预测和变换算法、 或矢量量化方 法对数据压缩编码进行解码解压。  For example, the data compression coding may be decoded and decompressed by using a waveform decoding method, a prediction and transformation algorithm, or a vector quantization method.
需说明的是, 所采用的解码解压算法应该与步骤(1 ) 中所采用的压缩 编码算法相对应, 比如, 如果在步骤(1 ) 中, 采用波形编码方法对原始数 据进行压缩编码, 则此时需要采用波形解码方法对数据压缩编码进行解码 解压; 又比如, 如果在步骤(1 ) 中, 采用矢量量化方法对原始数据进行压 缩编码, 则此时需要采用矢量量化方法对数据压缩编码进行解码解压, 依 此类推。  It should be noted that the decoding and decompression algorithm used should correspond to the compression coding algorithm used in step (1). For example, if the original data is compression-encoded by using the waveform coding method in step (1), then The waveform decoding method is needed to decode and decompress the data compression coding. For example, if the original data is compression-encoded by the vector quantization method in step (1), then the vector quantization method is needed to decode the data compression coding. Unzip, and so on.
另外, 还需说明的是, 本发明实施例所说的 "解码解压" 指的是解编 码解压缩, 它与在编码器中的 "压缩编码" 相对应, 二者正好是相反的处 理过程。 在编码算法或编码器 (比如本发明实施例中所说的压缩编码器) 中, "压缩编码" 实际有两含义, 即 "压缩" 和 "编码"; 其中 "压缩" 有 时域、 频域或时频同时的正向信号处理和多余度的消除等, 而 "编码" 可 能包括量化、 以及量化之后的等长编码和不等长编码(即熵编码)等。 而 在解码算法或解码器 (比如本发明实施例中所说的解码解压器) 中, 处理 过程与压缩编码正好相反, 因此 "解码解压" 实际包括 "解码", 即等长或 不等长的解码以及反量化处理等; "解压" 实际是指时域、 频域或时频同时 的反向信号处理的过程。 为了描述方便, 在本发明实施例中, 均将上述解 码和解压过程则统称为解码解压, 并将通过该解码解压过程所得到的数据 称为解码解压数据。  In addition, it should be noted that "decoding and decompression" as used in the embodiment of the present invention refers to de-encoding decompression, which corresponds to "compression coding" in the encoder, which are exactly the opposite processing procedures. In an encoding algorithm or encoder (such as the compression coder described in the embodiment of the present invention), "compression coding" actually has two meanings, namely "compression" and "encoding"; wherein "compression" sometimes is in the domain, frequency domain or Time-frequency simultaneous forward signal processing and elimination of redundancy, etc., and "encoding" may include quantization, and equal-length coding and unequal-length coding (ie, entropy coding) after quantization. In a decoding algorithm or decoder (such as the decoding decompressor described in the embodiment of the present invention), the processing is exactly the opposite of the compression encoding, so "decoding and decompression" actually includes "decoding", that is, equal length or unequal length. Decoding and inverse quantization processing; "decompression" actually refers to the process of reverse signal processing in the time domain, frequency domain or time-frequency. For convenience of description, in the embodiment of the present invention, the above decoding and decompression processes are collectively referred to as decoding decompression, and the data obtained by the decoding decompression process is referred to as decoding decompressed data.
( 3 )计算原始数据与解码解压数据之间的误差, 得到误差数据; (3) calculating an error between the original data and the decoded decompressed data to obtain error data;
( 4 )对误差数据进行压缩编码, 得到压缩编码后的误差数据, 在本实 施例中称之为误差压缩编码。 (4) The error data is compression-encoded to obtain compression-coded error data, which is referred to as error compression coding in this embodiment.
例如, 可以采用算法简单的标量量化( SQ, Scalar Quantization )方法, 比如非均匀量化编码算法对误差数据进行压缩编码。 这是因为, 在实际应用中, 误差数据的分布一般是非均匀分布的, 参 见图 lb和图 lc, 图 lb是一个原始数据的概率分布实例图, 而图 lc则是它所对 应的误差数据的概率分布实例图, 可见, 误差数据只有在一个较窄的观测 范围内 (0附近)才具有较大的分布百分比, 即误差数据的概率分布是非常 不等概的分布, 因此在此对误差数据进行压缩编码时最好采用非均勾量化 编码算法, 比如 Lloyd-Max非均匀标量量化算法。 For example, an algorithm simple scalar quantization (SQ, Scalar Quantization) method, such as a non-uniform quantization coding algorithm, can be used to compress and encode error data. This is because, in practical applications, the distribution of error data is generally non-uniformly distributed, see Figure lb and Figure lc, Figure lb is an example of probability distribution of raw data, and Figure lc is the error data corresponding to it. For the probability distribution example, it can be seen that the error data has a large distribution percentage only in a narrow observation range (near 0), that is, the probability distribution of the error data is a very unequal distribution, so the error data is here. It is better to use non-homogeneous quantization coding algorithm when performing compression coding, such as Lloyd-Max non-uniform scalar quantization algorithm.
步骤 101中所产生的数据压缩编码和误差压缩编码也同样具有较强不 等概性, 所谓的不等概性, 指的是概率分布不均等, 参见图 Id和图 le, 其 中, 图 Id是一个 4比特编码时数据压缩编码中 16个码字概率分布的实例图, 而图 le则是一个 4比特编码时误差压缩编码中 16个码字概率分布的实例图; 可以看出, 数据压缩编码和误差压缩编码的码字出现的概率是不均等的, 因此, 可以采用熵编码对数据压缩编码和误差压缩编码进行进一步的压缩, 即执行步骤 102。  The data compression coding and the error compression coding generated in step 101 also have a strong unequal probability, and the so-called unequal probability refers to the unequal probability distribution, see FIG. 1d and FIG. An example of 16 codeword probability distributions in data compression coding for 4-bit encoding, and Figure l is an example of 16 codeword probability distributions in 4-bit encoding error compression coding; it can be seen that data compression coding The probability of occurrence of the error-compressed codeword is unequal. Therefore, the data compression coding and the error compression coding can be further compressed by entropy coding, that is, step 102 is performed.
102、 分别对数据压缩编码和误差压缩编码进行熵编码, 得到熵编码后 的数据压缩编码和熵编码后的误差压缩编码, 在本发明实施例中分别称为 数据熵编码和误差熵编码;  102. Entropy coding the data compression coding and the error compression coding respectively, and obtaining the entropy-encoded data compression coding and the entropy coding error compression coding, which are respectively referred to as data entropy coding and error entropy coding in the embodiments of the present invention;
例如, 可以采用霍夫曼(Huffman )编码、 和 /或算术编码、 和 /或其他 不等长编码算法分别对数据压缩编码和误差压缩编码进行熵编码。  For example, data compression coding and error compression coding may be entropy encoded by Huffman coding, and/or arithmetic coding, and/or other unequal length coding algorithms, respectively.
需说明的是, 熵编码是一种无失真的编码, 而步骤 101中所提供的压缩 编码方式则是一种有失真的编码, 在此不再赘述。  It should be noted that entropy coding is a distortion-free coding, and the compression coding method provided in step 101 is a distortion coding, which will not be described here.
103、 将数据熵编码和误差熵编码进行帧封装以形成编码帧。  103. Encapsulate data entropy coding and error entropy coding to form an encoded frame.
需说明的是, 当压缩编码器和解码解压器工作在固定模式时, 编码帧 中可以不需要帧头信息; 但是, 如果压缩编码器和解码解压器工作在时变 的模式时, 编码帧中需要携带帧头信息, 该帧头信息携带当前编码帧的编 码模式。  It should be noted that when the compression encoder and the decoding decompressor operate in the fixed mode, the header information may not be needed in the encoded frame; however, if the compression encoder and the decoding decompressor operate in a time varying mode, the encoded frame is The frame header information needs to be carried, and the frame header information carries the coding mode of the current coded frame.
进一步的, 在编码帧中携带帧头时, 根据具体的应用需求, 该帧头信 息还可以携带帧长、 编码速率和量化编码表格等信息, 在此不再赘述。 由上可知, 本实施例将压缩编码算法分成两级进行, 第一级是对原始 数据进行压缩编码, 第二级是对在第一级压缩编码时所产生的误差进行压 缩编码, 然后再分别对这两级压缩编码得到的数据压缩编码和误差压缩编 码进行熵编码, 由于本方案对数据进行了多次压缩编码, 所以相对于现有 技术只进行一次压缩编码而言, 可以达到较高的压缩比; 进一步的, 在本 方案中, 除了对原始数据进行压缩编码外, 还特别对第一级压缩编码时所 产生的误差进行了压缩编码, 并分别对压缩编码得到的数据压缩编码和误 差压缩编码进行熵编码, 所以相对于现有技术而言, 可以提高压缩质量。 Further, when the frame header is carried in the encoded frame, the frame header message is used according to specific application requirements. The information may also carry information such as frame length, coding rate, and quantization coding table, and details are not described herein again. As can be seen from the above, in this embodiment, the compression coding algorithm is divided into two levels. The first stage is to compress and encode the original data, and the second stage is to compress and encode the error generated in the first stage compression coding, and then separately The data compression coding and the error compression coding obtained by the two stages of compression coding are entropy coded. Since the data is compressed and coded multiple times by the solution, the compression coding can be achieved only once compared with the prior art. Further, in the present scheme, in addition to compressing and encoding the original data, the error generated in the first-stage compression encoding is compression-encoded, and the compression-encoded data is compressed and encoded separately. The compression coding performs entropy coding, so the compression quality can be improved relative to the prior art.
实施例二、  Embodiment 2
本实施例将从解码解压器的角度进行描述。  This embodiment will be described from the perspective of decoding a decompressor.
与实施例一相应的, 本发明实施例还提供一种解码解压方法, 包括: 对编码帧进行解封装, 以得到数据熵编码和误差熵编码; 分别对数据熵编 码和误差熵编码进行熵解码, 得到数据压缩编码和误差压缩编码; 分别对 所得到的数据压缩编码和误差压缩编码进行解码解压, 得到解码解压数据 和解码解压误差; 对解码解压数据和解码解压误差进行相加, 得到相加后 的数据, 在发明实施例中称为重构数据。  Corresponding to the first embodiment, the embodiment of the present invention further provides a decoding and decompression method, including: decapsulating a coded frame to obtain data entropy coding and error entropy coding; and entropy decoding data entropy coding and error entropy coding, respectively Obtaining data compression coding and error compression coding; respectively decoding and decompressing the obtained data compression coding and error compression coding to obtain decoded decompressed data and decoding decompression error; adding decoding decompression data and decoding decompression error to obtain addition The latter data is referred to as reconstructed data in the embodiment of the invention.
参见图 2, 具体流程可以如下:  Referring to Figure 2, the specific process can be as follows:
201、 对编码帧进行解封装, 得到数据熵编码和误差熵编码; 例如, 如果编码帧中不包括帧头信息, 则将编码帧分解为数据熵编码 和误差熵编码。 比如, 可以根据预置信息对编码帧进行分解, 得到数据熵 编码和误差熵编码。  201. Decapsulate the encoded frame to obtain data entropy coding and error entropy coding; for example, if the frame header information is not included in the coded frame, the coded frame is decomposed into data entropy coding and error entropy coding. For example, the encoded frame may be decomposed according to preset information to obtain data entropy coding and error entropy coding.
如果编码帧中包括帧头信息, 则将编码帧分解为帧头信息、 数据熵编 码和误差熵编码。 比如, 可以先获取帧头信息, 然后根据帧头信息对编码 帧进行分解, 得到数据熵编码和误差熵编码。 其中, 帧头信息携带当前编 码帧的编码模式; 当然, 根据具体的应用需求, 该帧头信息还可以携带帧 长、 编码速率和量化编码表格等信息, 参见实施例一, 在此不再赘述。If the frame header information is included in the encoded frame, the encoded frame is decomposed into frame header information, data entropy coding, and error entropy coding. For example, the frame header information may be obtained first, and then the coded frame is decomposed according to the frame header information to obtain data entropy coding and error entropy coding. The frame header information carries the coding mode of the current coded frame. Of course, according to specific application requirements, the frame header information may also carry the frame. For information about the length, the coding rate, and the quantization coding table, refer to the first embodiment, and details are not described herein again.
202、 分别对数据熵编码和误差熵编码进行熵解码, 得到数据压缩编码 和误差压缩编码; 202. Perform entropy decoding on data entropy coding and error entropy coding, respectively, to obtain data compression coding and error compression coding;
例如, 具体可以采用 Huffman解码、 和 /或算术解码、 和 /或其他不等长 编码算法分别对步骤 201中得到的数据熵编码和误差熵编码进行熵解码。  For example, data entropy coding and error entropy coding obtained in step 201 may be entropy decoded by Huffman decoding, and/or arithmetic decoding, and/or other unequal length coding algorithms, respectively.
需说明的是, 这里所采用的熵解码算法需要与熵编码算法相对应, 比 如, 如果在进行熵编码时采用的是 Huffman编码, 则进行熵解码时需要采用 Huffman解码, 依此类推。 其中, 具体采用何种算法的指示信息可以携带在 帧头信息中, 或者通过预置信息进行指定。 如果该指示信息携带在帧头信 息中, 则具体实施时, 可以根据帧头信息分别对数据熵编码和误差熵编码 进行熵解码; 如果是通过预置信息进行指定, 则具体实施时, 可以根据预 置信息分别对数据熵编码和误差熵编码进行熵解码。  It should be noted that the entropy decoding algorithm used here needs to correspond to the entropy coding algorithm. For example, if Huffman coding is used in entropy coding, Huffman decoding is required for entropy decoding, and so on. The indication information of the specific algorithm may be carried in the frame header information or specified by using preset information. If the indication information is carried in the frame header information, in the specific implementation, the data entropy coding and the error entropy coding may be entropy decoded according to the frame header information; if the preset information is specified, the specific implementation may be based on The preset information entropy decodes the data entropy coding and the error entropy coding, respectively.
203、 分别对数据压缩编码和误差压缩编码进行解码解压, 得到解码解 压数据和解码解压误差;  203: Decompress and decompress data compression coding and error compression coding respectively, to obtain decoding decompression data and decoding decompression error;
例如, 具体可以采用波形解码方法、 预测和变换算法、 或矢量量化方 法对数据压缩编码进行解码解压, 得到解码解压数据; 相应的, 可以采用 非均勾量化解码算法对误差压缩编码进行解码解压, 得到解码解压误差。  For example, the waveform decoding method, the prediction and transform algorithm, or the vector quantization method may be used to decode and decompress the data compression coding to obtain decoded decompressed data; correspondingly, the error compression coding may be decoded and decompressed by using a non-homogeneous quantization decoding algorithm. A decoding decompression error is obtained.
需说明的是, 这里所采用的解码解压算法需要与压缩编码时所采用压 缩编码算法相对应, 比如, 如果在进行压缩编码时采用的是波形编码方法, 则进行解码解压时需要采用波形解码方法, 依此类推。 其中, 具体采用何 种算法的指示信息可以携带在帧头信息中, 或者通过预置信息进行指定。 如果该指示信息携带在帧头信息中, 则具体实施时, 可以根据帧头信息分 别对数据压缩编码和误差压缩编码进行解码解压; 如果是通过预置信息进 行指定, 则具体实施时, 可以根据预置信息分别对数据压缩编码和误差压 缩编码进行解码解压。  It should be noted that the decoding and decompression algorithm used here needs to correspond to the compression coding algorithm used in compression coding. For example, if the waveform coding method is used in compression coding, the waveform decoding method is needed for decoding and decompression. , So on and so forth. The indication information of the specific algorithm may be carried in the frame header information, or specified by using preset information. If the indication information is carried in the frame header information, in the specific implementation, the data compression coding and the error compression coding may be separately decoded and decompressed according to the frame header information; if the preset information is specified, the specific implementation may be performed according to The preset information decodes and decompresses the data compression coding and the error compression coding, respectively.
204、 对解码解压数据和解码解压误差进行相加, 得到重构数据。 由上可知, 本实施例提供了与实施例一相对应的解码解压方法, 可见, 本实施例可以实现与实施例一同样的有益效果, 即相对于现有技术而言, 可以达到较高的压缩比, 以及较高的压缩质量。 204. Add the decoded decompressed data and the decoding and decompression error to obtain the reconstructed data. As can be seen from the above, the present embodiment provides a decoding and decompression method corresponding to the first embodiment. It can be seen that the embodiment can achieve the same beneficial effects as the first embodiment, that is, higher than the prior art. Compression ratio, and high compression quality.
实施例三、  Embodiment 3
实施例一所提供的压缩编码方法是一种有失真的压缩编码方法, 为了 进一步提高压缩编码的质量, 在本实施例中, 提供了一种无失真的压缩编 码方法。  The compression coding method provided in the first embodiment is a distortion compression coding method. In order to further improve the quality of compression coding, in this embodiment, a distortion-free compression coding method is provided.
参见图 3a、 图 3b、 图 3c、 图 3d和图 3e, 其中, 图 3a为一段原始数据的实 例图, 图 3b是该原始数据所对应的误差数据的实例图, 图 3c经过实施例二 所提供的解码解压方法得到的重构数据的实例图, 而图 3d则显示了原始数 据与重构数据的差值, 这个差值就是在压缩编码过程中所产生的总体误差, 这里可以称其为二级误差, 为了进一步提高压缩质量, 可以对该二级误差 再进行一次压缩, 即在实施例一的基础上, 该压缩编码方法还可以包括: 对误差压缩编码进行解码解压, 得到解码解压误差; 计算误差数据与 解码解压误差之间的误差, 得到二级误差; 对该二级误差进行熵编码, 得 到二级误差熵编码;  Referring to FIG. 3a, FIG. 3b, FIG. 3c, FIG. 3d and FIG. 3e, FIG. 3a is an example diagram of a piece of original data, FIG. 3b is an example diagram of error data corresponding to the original data, and FIG. 3c is subjected to the second embodiment. An example of the reconstructed data obtained by the decoding decompression method is provided, and FIG. 3d shows the difference between the original data and the reconstructed data, and the difference is the total error generated in the compression encoding process, which may be referred to herein as The second-order error, in order to further improve the compression quality, the secondary error may be further compressed once, that is, based on the first embodiment, the compression coding method may further include: decoding and decompressing the error compression coding to obtain a decoding and decompression error. Calculating the error between the error data and the decoding decompression error to obtain a second-order error; entropy encoding the second-order error to obtain a second-order error entropy coding;
则相应的, 此时步骤 103具体为: 将数据熵编码、 误差熵编码和二级误 差熵编码进行帧封装以形成编码帧。  Correspondingly, step 103 is specifically: encapsulating data entropy coding, error entropy coding, and second-order error entropy coding to form an encoded frame.
参见图 3f, 该无失真的压缩编码方法的具体流程可以如下:  Referring to FIG. 3f, the specific process of the distortion-free compression coding method can be as follows:
301、 分别对原始数据和误差数据进行压缩编码, 得到数据压缩编码和 误差压缩编码, 其中, 误差数据为对原始数据进行压缩编码所产生的误差; 具体可参见实施例一, 在此不再赘述。  301. Compressing and encoding the original data and the error data respectively, and obtaining data compression coding and error compression coding, where the error data is an error generated by compression coding the original data. For details, refer to the first embodiment, and details are not described herein. .
302、 对误差压缩编码进行解码解压, 得到解码解压误差;  302. Decoding and decompressing the error compression coding to obtain a decoding and decompression error;
需说明的是, 这里所采用的解码解压算法应该与对误差数据进行压缩 编码时所采用的压缩编码算法相对应。  It should be noted that the decoding and decompression algorithm used here should correspond to the compression coding algorithm used in compression coding the error data.
303、 计算误差数据与解码解压误差之间的误差, 得到二级误差; 由于误差数据是对原始数据进行压缩编码所产生的误差, 所以计算误 差数据与解码解压误差之间的误差即可得到在压缩编码过程中所产生的总 体误差, 即二级误差。 303. Calculating an error between the error data and the decoding decompression error, and obtaining a second-order error; Since the error data is an error generated by compression-coding the original data, the error between the error data and the decoding decompression error can be obtained to obtain the overall error generated in the compression encoding process, that is, the second-order error.
304、 分别对二级误差、 数据压缩编码和误差压缩编码进行熵编码, 得 到二级误差熵编码、 数据熵编码和误差熵编码, 具体可采用的熵编码算法 可参见实施例一, 在此不再赘述。  304. Entropy coding the second-order error, the data compression coding, and the error compression coding respectively, and obtaining the second-order error entropy coding, the data entropy coding, and the error entropy coding. For the specific entropy coding algorithm, refer to the first embodiment. Let me repeat.
305、 将数据熵编码、 误差熵编码和二级误差熵编码进行帧封装以形成 编码帧。  305. Encapsulate data entropy coding, error entropy coding, and second-order error entropy coding to form an encoded frame.
由上可知, 本实施例除了可以实现实施例一所描述的有益效果之外, 进一步的, 还可以对在进行第二次压缩编码 (即对在第一级压缩编码时所 产生的误差进行压缩编码) 时所产生的误差作进一步的熵编码, 从而相对 于实施例一而言, 可以进一步提高压缩质量, 实现无失真压缩。  As can be seen from the above, in addition to the beneficial effects described in Embodiment 1, the embodiment can further perform the second compression coding (that is, compressing the error generated during the first-stage compression coding). The error generated when encoding is further entropy encoded, so that the compression quality can be further improved with respect to the first embodiment, and distortion-free compression can be realized.
实施例四、  Embodiment 4
本发明实施例将从解码解压器的角度进行描述。  Embodiments of the present invention will be described from the perspective of a decoding decompressor.
与实施例三相应的, 本实施例提供一种解码解压方法, 包括: 对编码 帧进行解封装, 得到二级误差熵编码、 数据熵编码和误差熵编码; 分别对 二级误差熵编码、 数据熵编码和误差熵编码进行熵解码, 得到二级误差、 数据压缩编码和误差压缩编码; 分别对该数据压缩编码和误差压缩编码进 行解码解压, 得到解码解压数据和解码解压误差; 对二级误差、 解码解压 数据和解码解压误差进行相加, 得到重构数据。  Corresponding to the third embodiment, the embodiment provides a decoding and decompression method, including: decapsulating a coded frame to obtain a second-level error entropy coding, data entropy coding, and error entropy coding; respectively, encoding the second-order error entropy and data Entropy coding and error entropy coding are used for entropy decoding, and two-level error, data compression coding and error compression coding are obtained. The data compression coding and error compression coding are respectively decoded and decompressed to obtain decoded decompressed data and decoding decompression error; The decoding decompressed data and the decoding decompression error are added to obtain reconstructed data.
参见图 4, 具体流程可以如下:  Referring to Figure 4, the specific process can be as follows:
401、 对编码帧进行解封装, 得到二级误差熵编码、 数据熵编码和误差 熵编码;  401. Decapsulate the encoded frame to obtain two-level error entropy coding, data entropy coding, and error entropy coding.
例如, 如果编码帧中不包括帧头信息, 则将编码帧分解为二级误差熵 编码、 数据熵编码和误差熵编码; 如果编码帧中包括帧头信息, 则将编码 帧分解为帧头信息、 二级误差熵编码、 数据熵编码和误差熵编码。 其中, 帧头信息携带当前编码帧的编码模式, 当然, 根据具体的应用 需求, 该帧头信息还可以携带帧长、 编码速率和量化编码表格等信息, 参 见实施例一, 在此不再赘述。 For example, if the frame header information is not included in the encoded frame, the encoded frame is decomposed into two-level error entropy coding, data entropy coding, and error entropy coding; if the frame header information is included in the coded frame, the coded frame is decomposed into frame header information. , two-level error entropy coding, data entropy coding and error entropy coding. The frame header information carries the coding mode of the current coded frame. The frame header information may also carry information such as the frame length, the coding rate, and the quantization code table according to the specific application requirements. For details, refer to the first embodiment, and details are not described herein. .
402、 分别对二级误差熵编码、 数据熵编码和误差熵编码进行熵解码, 得到二级误差、 数据压缩编码和误差压缩编码;  402. Entropy decoding the second-order error entropy coding, the data entropy coding, and the error entropy coding, respectively, to obtain a second-order error, a data compression coding, and an error compression coding;
例如, 具体可以采用 Huffman解码、 和 /或算术解码、 和 /或其他不等长 编码算法分别对该二级误差熵编码、 数据熵编码和误差熵编码进行熵解码。  For example, the second error entropy coding, the data entropy coding, and the error entropy coding may be entropy decoded by Huffman decoding, and/or arithmetic decoding, and/or other unequal length coding algorithms, respectively.
需说明的是, 这里所采用的熵解码算法需要与熵编码算法相对应, 比 如, 如果在进行熵编码时采用的是 Huffman编码, 则进行熵解码时需要采用 Huffman解码, 依此类推。 其中, 具体采用何种算法的指示信息可以携带在 帧头信息中, 或者通过预置信息进行指定。 如果该指示信息携带在帧头信 息中, 则具体实施时, 可以根据帧头信息分别对二级误差熵编码、 数据熵 编码和误差熵编码进行熵解码; 如果是通过预置信息进行指定, 则具体实 施时, 可以根据预置信息分别对二级误差熵编码、 数据熵编码和误差熵编 码进行熵解码。  It should be noted that the entropy decoding algorithm used here needs to correspond to the entropy coding algorithm. For example, if Huffman coding is used in entropy coding, Huffman decoding is required for entropy decoding, and so on. The indication information of the specific algorithm may be carried in the frame header information or specified by using preset information. If the indication information is carried in the frame header information, in the specific implementation, the second-level error entropy coding, the data entropy coding, and the error entropy coding may be entropy decoded according to the frame header information; if the preset information is specified, In a specific implementation, the second-order error entropy coding, the data entropy coding, and the error entropy coding may be entropy decoded according to the preset information.
403、 分别对数据压缩编码和误差压缩编码进行解码解压, 得到解码解 压数据和解码解压误差;  403. Decode and decompress the data compression coding and the error compression coding respectively to obtain decoding and decompressing data and decoding and decompressing errors;
例如, 具体可以采用波形解码方法、 预测和变换算法、 或矢量量化方 法对数据压缩编码进行解码解压, 得到解码解压数据; 相应的, 可以采用 非均勾量化解码算法对该误差压缩编码进行解码解压, 得到解码解压误差。  For example, the waveform decoding method, the prediction and transform algorithm, or the vector quantization method may be used to decode and decompress the data compression coding to obtain decoded decompressed data. Correspondingly, the error compression coding may be decoded and decompressed by using a non-homogeneous quantization decoding algorithm. , get the decoding decompression error.
需说明的是, 这里所采用的解码解压算法需要与压缩编码时所采用压 缩编码算法相对应, 比如, 如果在进行压缩编码时采用的是波形编码方法, 则进行解码解压时需要采用波形解码方法, 依此类推。 其中, 具体采用何 种算法的指示信息可以携带在帧头信息中, 或者通过预置信息进行指定。 如果该指示信息携带在帧头信息中, 则具体实施时, 可以根据帧头信息分 别对数据压缩编码和误差压缩编码进行解码解压; 如果是通过预置信息进 行指定, 则具体实施时, 可以根据预置信息分别对数据压缩编码和误差压 缩编码进行解码解压。 It should be noted that the decoding and decompression algorithm used here needs to correspond to the compression coding algorithm used in compression coding. For example, if the waveform coding method is used in compression coding, the waveform decoding method is needed for decoding and decompression. , So on and so forth. The indication information of the specific algorithm may be carried in the frame header information, or specified by using preset information. If the indication information is carried in the frame header information, in the specific implementation, the data compression coding and the error compression coding may be separately decoded and decompressed according to the frame header information; if the preset information is used If the line is specified, the data compression coding and the error compression coding may be separately decoded and decompressed according to the preset information.
404、 对二级误差、 解码解压数据和解码解压误差进行相加, 得到重构 数据。  404. Add the two-level error, the decoded decompressed data, and the decoding and decompression error to obtain the reconstructed data.
需说明的是, 如果是无失真的压缩编码, 则此时得到的重构数据与原 始数据相同, 如果是有失真的压缩编码, 则此时得到的重构数据与原始数 据会存在少许误差。  It should be noted that if the compression coding is distortion-free, the reconstructed data obtained at this time is the same as the original data. If there is distortion compression coding, there is a slight error between the reconstructed data obtained at this time and the original data.
由上可知, 本实施例提供了与实施例三相对应的解码解压方法, 可见, 本实施例可以实现与实施例三同样的有益效果, 即相对于现有技术而言, 可以达到较高的压缩比, 以及较高的压缩质量, 而且, 相对于实施例二而 言, 也可以进一步提高压缩质量。  As can be seen from the above, the present embodiment provides a decoding and decompression method corresponding to the three-phase of the embodiment. It can be seen that the embodiment can achieve the same beneficial effects as the third embodiment, that is, higher than the prior art. The compression ratio, as well as the higher compression quality, can also further improve the compression quality with respect to the second embodiment.
根据前面实施例所描述的方法, 以下将在实施例五和实施例六中举例 作进一步详细说明。  The method described in the previous embodiment will be further described in detail in the fifth embodiment and the sixth embodiment.
实施例五、  Embodiment 5
在本实施例中, 将对有失真的压缩编码方法 (实施例一和二)作进一 步详细说明。  In the present embodiment, the compression encoding method with distortion (Embodiments 1 and 2) will be further explained in detail.
参见图 5a和图 5b, 其中, 图 5a为压缩编码器的原理框图, 该压缩编码器 包括数据压缩编码模块 A501、 压缩编码器的数据解码解压模块 A502、 压缩 编码器的加法器 A503、 误差压缩编码模块 A504、 误差熵编码模块 A505、 数 据熵编码模块 A506和帧封装模块 A507; 图 5b为解码解压器的原理框图, 该 解码解压器包括帧解封模块 B501、 误差熵解码模块 B502、 数据熵解码模块 B503、 误差解码解压模块 B504、 解码解压器的数据解码解压模块 B505和解 码解压器的加法器 B506。  Referring to FIG. 5a and FIG. 5b, FIG. 5a is a schematic block diagram of a compression encoder including a data compression coding module A501, a data decoding decompression module A502 of a compression encoder, an adder A503 of a compression encoder, and error compression. Encoding module A504, error entropy encoding module A505, data entropy encoding module A506 and frame encapsulating module A507; FIG. 5b is a schematic block diagram of a decoding decompressor including a frame deblocking module B501, an error entropy decoding module B502, and data entropy The decoding module B503, the error decoding decompression module B504, the data decoding decompression module B505 of the decoding decompressor, and the adder B506 of the decoding decompressor.
为了描述方便, 在本实施例中, 以编码帧中包括了帧头信息为例进行 说明, 另外, 在本实施例中, 设定数据压缩编码模块 A501采用了 ADPCM编 码算法,误差压缩编码模块 A504采用 Lloyd-Max非均匀标量量化算法,误差 熵编码模块 A505和数据熵编码模块 A506采用 Huffman编码算法, 而数据解 压解码模块 B505则对应地采用了 ADPCM解码算法,误差解码解压模块 B504 对应地采用 Lloyd-Max非均勾标量量化算法,误差熵解码模块 B502和数据熵 解码模块 B503对应地采用 Huffman解码算法,则该压缩编码器和解码解压器 的处理流程如下: For the convenience of description, in the embodiment, the frame header information is included in the coded frame as an example. In addition, in this embodiment, the data compression coding module A501 is configured to adopt an ADPCM coding algorithm, and the error compression coding module A504 is used. Lloyd-Max non-uniform scalar quantization algorithm, error The entropy coding module A505 and the data entropy coding module A506 adopt the Huffman coding algorithm, and the data decompression decoding module B505 correspondingly adopts the ADPCM decoding algorithm, and the error decoding decompression module B504 correspondingly adopts the Lloyd-Max non-uniform hook scalar quantization algorithm, error entropy The decoding module B502 and the data entropy decoding module B503 correspondingly adopt the Huffman decoding algorithm, and the processing flow of the compression encoder and the decoding decompressor is as follows:
(一)压缩编码器  (1) Compression encoder
步骤 1、数据压缩编码模块 A501采用 ADPCM编码算法对原始数据 S进行 压缩编码, 得到数据压缩编码 Sc, 将数据压缩编码 Sc输送给压缩编码器的 数据解码解压模块 A502和数据熵编码模块 A506;  Step 1. The data compression coding module A501 uses the ADPCM coding algorithm to compress and encode the original data S, obtains the data compression coding Sc, and supplies the data compression coding Sc to the data decoding decompression module A502 and the data entropy coding module A506 of the compression encoder;
其中, 原始数据 S可以是任意来源和任意类型的数据, 比如一般的数据 序列、 采样通信信号、 采样时间序列、 语音信号、 音频信号等。  The original data S may be any source and any type of data, such as a general data sequence, a sample communication signal, a sampling time series, a voice signal, an audio signal, and the like.
步骤 2、 压缩编码器的数据解码解压模块 A502采用 ADPCM解码算法对 数据压缩编码 Sc进行解码解压,得到解码解压数据 S,,然后将解码解压数据 S,发送给压缩编码器的加法器 A503。  Step 2. The data decoding and decompression module of the compression encoder A502 decodes and decompresses the data compression code Sc by using the ADPCM decoding algorithm to obtain the decoded decompressed data S, and then sends the decoded decompressed data S to the adder A503 of the compression encoder.
步骤 3、 压缩编码器的加法器 A503计算原始数据 S与解码解压数据 S,之 间的误差, 即将原始数据 S减去解码解压数据 S,, 得到误差数据 , 然后将 误差数据 发送给误差压缩编码模块 A504。  Step 3. The adder A503 of the compression encoder calculates an error between the original data S and the decoded decompressed data S, that is, subtracts the decompressed data S from the original data S, obtains error data, and then sends the error data to the error compression coding. Module A504.
步骤 4、 误差压缩编码模块 A504采用 Lloyd-Max非均匀标量量化算法对 误差数据 进行压缩编码,得到误差压缩编码 c, 然后将误差压缩编码 c 发送给误差熵编码模块 A505。  Step 4: The error compression coding module A504 uses Lloyd-Max non-uniform scalar quantization algorithm to compress and encode the error data to obtain error compression coding c, and then sends the error compression coding c to the error entropy coding module A505.
步骤 5、误差熵编码模块 A505采用 Huffman编码算法对误差压缩编码 RlC 进行熵编码,得到误差熵编码 Rie,然后将误差熵编码 Rie发送给帧封装模块 步骤 6、 数据熵编码模块 A506采用 Huffman编码算法对数据压缩编码 Sc 进行熵编码, 得到数据熵编码 Se, 然后将数据熵编码 Se发送给帧封装模块 A507。 步骤 6与步骤 2 ~ 5的执行不分先后。 步骤 7、 帧封装模块 A507将误差熵编码 e和数据熵编码 Se组合, 再加 上帧头信息 Hi, 输出完整的编码帧, 从而形成编码比特流 Β1 β 其中, 帧头 信息 Hi携带当前编码帧的编码模式; 当然, 根据具体的应用需求, 该帧头 信息还可以携带帧长、 编码速率和量化编码表格等信息。 Step 5: The error entropy coding module A505 uses the Huffman coding algorithm to entropy encode the error compression coding R lC to obtain the error entropy coding R ie , and then sends the error entropy coding R ie to the frame encapsulation module step 6, and the data entropy coding module A506 adopts The Huffman coding algorithm entropy encodes the data compression coding Sc, obtains the data entropy coding Se, and then sends the data entropy coding Se to the frame encapsulation module A507. Step 6 and steps 2 ~ 5 are performed in no particular order. Step 7. The frame encapsulation module A507 combines the error entropy coding e and the data entropy coding Se, and adds the frame header information Hi to output a complete coding frame, thereby forming an encoded bit stream Β 1 β , wherein the frame header information Hi carries the current coding. The coding mode of the frame; of course, according to specific application requirements, the frame header information may also carry information such as frame length, coding rate, and quantization coding table.
参见图 5c, 该图为编码帧结构和编码比特流的示意图。 其中, 编码比 特流 包括多个编码帧: 编码帧 i-l、 编码帧 i和编码帧 i+l, 等等, 而编码帧 则包括帧头信息、 数据熵编码 Se和误差熵编码 e。  See Figure 5c, which is a schematic diagram of an encoded frame structure and an encoded bitstream. The coded bitstream includes a plurality of coded frames: an encoded frame i-l, an encoded frame i and an encoded frame i+l, and the like, and the encoded frame includes a frame header information, a data entropy coding Se, and an error entropy coding e.
该编码比特流 ^根据实际应用的需求, 即可以送入信道进行传输, 也 可以存入存储介质中。  The coded bit stream ^ can be sent to the channel for transmission according to the needs of the actual application, or can be stored in the storage medium.
(二)解码解压器  (two) decoding decompressor
步骤 1、 帧解封模块 B501从编码比特流 中接收到编码帧后, 将编码帧 分解为帧头信息、 误差熵编码 e和数据熵编码 Se, 然后将误差熵编码 e 发送给误差熵解码模块 B502,将数据熵编码 Se发送给数据熵解码模块 B503。  Step 1. After receiving the encoded frame from the encoded bitstream, the frame deblocking module B501 decomposes the encoded frame into frame header information, error entropy coding e, and data entropy coding Se, and then sends the error entropy coding e to the error entropy decoding module. B502: Send data entropy coding Se to the data entropy decoding module B503.
步骤 2、误差熵解码模块 B502采用 Huffman解码对误差熵编码 e进行熵 解码,得到误差压缩编码 RlC,然后将误差压缩编码 RlC发送给误差解码解压 模块 B504。 Step 2: The error entropy decoding module B502 performs entropy decoding on the error entropy coding e by using Huffman decoding, obtains an error compression code R lC , and then sends the error compression code R lC to the error decoding decompression module B 504.
数据熵解码模块 B503采用 Huffman解码对数据熵编码 Se进行熵解码,得 到数据压缩编码 Sc, 然后将数据压缩编码 Sc发送给解码解压器的数据解码 解压模块 B505。  The data entropy decoding module B503 uses Huffman decoding to entropy decode the data entropy coding Se, obtains the data compression coding Sc, and then sends the data compression coding Sc to the data decoding decompression module B505 of the decoding decompressor.
步骤 3、 误差解码解压模块 B504采用 Lloyd-Max非均匀标量量化算法对 误差压缩编码 RlC进行解码解压, 得到解码解压误差 ,, 然后将解码解压误 差 ,发送给解码解压器的加法器 B506; Step 3, the error decoding decompression module B504 uses Lloyd-Max non-uniform scalar quantization algorithm to decode and decompress the error compression code R lC to obtain a decoding decompression error, and then send the decoding decompression error to the adder B506 of the decoding decompressor;
解码解压器的数据解码解压模块 B505采用 ADPCM解码算法对数据压 缩编码 Sc进行解码解压,得到解码解压数据 S,, 然后将解码解压数据 S,发送 给解码解压器的加法器 B506。  The data decoding decompression module of the decoding decompressor B505 decodes and decompresses the data compression coding Sc by the ADPCM decoding algorithm to obtain the decoded decompressed data S, and then sends the decoded decompressed data S to the adder B506 of the decoding decompressor.
步骤 4、解码解压器的加法器 B506对解码解压数据 S,和解码解压误差 , 进行相加, 得到重构数据 sriStep 4. The adder B506 of the decoding decompressor decompresses the decompressed data S, and decodes the decompression error. The addition is performed to obtain the reconstructed data s ri .
需说明的是, 以上仅仅以编码帧中包括帧头信息为例进行说明, 编码 帧中不包括帧头信息的处理流程与此类似, 具体可参见前面实施例, 在此 不再赘述。  It should be noted that the above description only takes the frame header information in the coded frame as an example. The process of not including the frame header information in the coded frame is similar to the foregoing. For details, refer to the foregoing embodiment, and details are not described herein again.
由上可知, 本实施例将压缩编码算法分成两级进行, 第一级是对原始 数据 S进行压缩编码, 第二级是对在第一级压缩编码时所产生的误差数据 进行压缩编码, 然后再分别对这两级压缩编码得到的数据压缩编码 Sc和误 差压缩编码 RlC进行熵编码, 由于本方案对数据进行了多次压缩编码, 所以 相对于现有技术只进行一次压缩编码而言, 可以达到较高的压缩比, 而且, 由于在本方案中, 除了对原始数据 S进行压缩编码外, 还特别对第一级压缩 编码时所产生的误差数据 进行了压缩编码, 并分别对压缩编码得到的数 据压缩编码 Sc和误差压缩编码 c进行熵编码, 所以相对于现有技术而言, 可以提高压缩质量。 As can be seen from the above, in this embodiment, the compression coding algorithm is divided into two levels. The first stage is to compress and encode the original data S, and the second stage is to compress and encode the error data generated during the first stage compression coding, and then Then, the data compression coding Sc and the error compression coding R lC obtained by the two stages of compression coding are entropy coded respectively. Since the data is compressed and coded multiple times by the present scheme, compared with the prior art, only one compression coding is performed. A higher compression ratio can be achieved, and, in addition, in the present scheme, in addition to compressing and encoding the original data S, the error data generated during the first-stage compression encoding is compression-encoded, and compression encoding is separately performed. The obtained data compression code Sc and error compression code c are entropy coded, so that the compression quality can be improved relative to the prior art.
实施例六、  Embodiment 6
在本实施例中, 将对无失真的压缩编码方法 (实施例三和四)作进一 步详细说明。  In the present embodiment, the distortion-free compression encoding method (Embodiments 3 and 4) will be further explained in detail.
参见图 6a和图 6b, 其中, 图 6a为压缩编码器的原理框图, 该压缩编码器 与实施例五中的压缩编码器相比, 多了与二级误差相关的几个模块: 压缩 编码器的误差解码解压模块 A608、 压缩编码器的第二加法器 A609和二级误 差熵编码模块 A610; 即本实施例的压缩编码器可以包括数据压缩编码模块 A601、 压缩编码器的数据解码解压模块 A602、 压缩编码器的第一加法器 A603、 误差压缩编码模块 A604、 误差熵编码模块 A605、 数据熵编码模块 A606、 帧封装模块 A607、 压缩编码器的误差解码解压模块 A608、 压缩编码 器的第二加法器 A609和二级误差熵编码模块 A610。 图 6b为解码解压器的原 理框图, 该解码解压器包括帧解封模块 B601、 误差熵解码模块 B602、 数据 熵解码模块 B603、 解码解压器的误差解码解压模块 B604、 解码解压器的数 据解码解压模块 B605、 解码解压器的加法器 B606和二级误差熵解码模块 B607。 Referring to FIG. 6a and FIG. 6b, FIG. 6a is a schematic block diagram of a compression coder which has several modules related to the second-order error compared with the compression coder in the fifth embodiment: a compression coder The error decoding decompression module A608, the second adder A609 of the compression encoder and the second error entropy coding module A610; that is, the compression encoder of the embodiment may include a data compression coding module A601, a data decoding decompression module A602 of the compression encoder a first adder A603 of the compression encoder, an error compression coding module A604, an error entropy coding module A605, a data entropy coding module A606, a frame encapsulation module A607, an error decoding decompression module A608 of the compression encoder, and a second compression encoder Adder A609 and secondary error entropy encoding module A610. 6b is a schematic block diagram of a decoding decompressor including a frame deblocking module B601, an error entropy decoding module B602, a data entropy decoding module B603, an error decoding decompression module B604 of a decoding decompressor, and a number of decoding decompressors. According to the decoding decompression module B605, the adder B606 of the decoding decompressor and the second-order error entropy decoding module B607.
为了描述方便, 在本实施例中, 以编码帧中包括了帧头信息为例进行 说明, 另外, 在本实施例中, 设定数据压缩编码模块 A601采用了 ADPCM编 码算法,误差压缩编码模块 A604采用 Lloyd-Max非均勾标量量化算法,误差 熵编码模块 A605和数据熵编码模块 A606采用 Huffman编码算法, 而数据解 压解码模块 B605则对应地采用了 ADPCM解码算法,误差解码解压模块 B604 对应地采用 Lloyd-Max非均勾标量量化算法, 二级误差熵解码模块 B607、误 差熵解码模块 B602和数据熵解码模块 B603对应地采用 Huffman解码算法, 则该压缩编码器和解码解压器的处理流程如下:  For the convenience of description, in the embodiment, the frame header information is included in the coded frame as an example. In addition, in this embodiment, the data compression coding module A601 is configured to adopt an ADPCM coding algorithm, and the error compression coding module A604 is used. Using Lloyd-Max non-uniform hook scalar quantization algorithm, error entropy coding module A605 and data entropy coding module A606 adopt Huffman coding algorithm, and data decompression decoding module B605 correspondingly adopts ADPCM decoding algorithm, error decoding decompression module B604 correspondingly adopts The Lloyd-Max non-uniform hook scalar quantization algorithm, the second error entropy decoding module B607, the error entropy decoding module B602 and the data entropy decoding module B603 correspondingly adopt the Huffman decoding algorithm, and the processing flow of the compression encoder and the decoding decompressor is as follows:
(一)压缩编码器  (1) Compression encoder
步骤 1、数据压缩编码模块 A601采用 ADPCM编码算法对原始数据 S进行 压缩编码, 得到数据压缩编码 Sc, 将数据压缩编码 Sc输送给压缩编码器的 数据解码解压模块 A602和数据熵编码模块 A606;  Step 1. The data compression coding module A601 uses the ADPCM coding algorithm to compress and encode the original data S, obtains the data compression coding Sc, and supplies the data compression coding Sc to the data decoding decompression module A602 and the data entropy coding module A606 of the compression encoder;
其中, 原始数据 S可以是任意来源和任意类型的数据, 比如一般的数据 序列、 采样通信信号、 采样时间序列、 语音信号、 音频信号等。  The original data S may be any source and any type of data, such as a general data sequence, a sample communication signal, a sampling time series, a voice signal, an audio signal, and the like.
步骤 2、 数据解码解压模块 A602采用 ADPCM解码算法对数据压缩编码 Sc进行解码解压,得到解码解压数据 S,, 然后将解码解压数据 S,发送给压缩 编码器的第一加法器 A603。  Step 2: The data decoding and decompression module A602 decodes and decompresses the data compression code Sc by using the ADPCM decoding algorithm to obtain the decoded decompressed data S, and then sends the decoded decompressed data S to the first adder A603 of the compression encoder.
步骤 3、 压缩编码器的加法器 A603计算原始数据 S与解码解压数据 S,之 间的误差, 即将原始数据 S减去解码解压数据 S,, 得到误差数据 , 然后将 误差数据 发送给误差压缩编码模块 A604和第二加法器 A609。  Step 3. The adder A603 of the compression encoder calculates an error between the original data S and the decoded decompressed data S, that is, subtracts the decompressed data S from the original data S, obtains error data, and then sends the error data to the error compression coding. Module A 604 and second adder A 609.
步骤 4、 误差压缩编码模块 A604采用 Lloyd-Max非均匀标量量化算法对 误差数据 进行压缩编码,得到误差压缩编码 c, 然后将误差压缩编码 c 发送给误差熵编码模块 A605和压缩编码器的误差解码解压模块 A608;  Step 4: The error compression coding module A604 uses the Lloyd-Max non-uniform scalar quantization algorithm to compress and encode the error data to obtain an error compression code c, and then sends the error compression code c to the error entropy coding module A605 and the error decoding of the compression encoder. Decompression module A608;
步骤 5、 压缩编码器的误差解码解压模块 A608采用 Lloyd-Max非均匀标 量量化算法对误差压缩编码 C进行解码解压,得到解码解压误差 ,, 然后 将解码解压误差 ,发送给第二加法器 A609。 Step 5: The error decoding decompression module A608 of the compression encoder adopts the Lloyd-Max non-uniform standard The quantity quantization algorithm decodes and decompresses the error compression code C to obtain a decoding decompression error, and then transmits the decoding decompression error to the second adder A609.
步骤 6、 第二加法器 A609将误差数据 减去解码解压误差 ,, 得到二 级误差 R2, 然后将二级误差 R2发送给二级误差熵编码模块 A610。 Step 6. The second adder A609 subtracts the error decompression error from the error data to obtain a second-order error R 2 , and then sends the second-order error R 2 to the second-order error entropy encoding module A610.
步骤 7、 二级误差熵编码模块 A610采用 Huffman编码算法对二级误差 R2 进行熵编码,得到二级误差熵编码 R2e, 然后将二级误差熵编码 R2e发送给帧 封装模块 A607。 Step 7. The second-order error entropy coding module A610 uses the Huffman coding algorithm to entropy encode the second-order error R 2 to obtain a second-order error entropy code R 2 e , and then sends the second-order error entropy code R 2 e to the frame encapsulation module A607. .
步骤 8、误差熵编码模块 A605采用 Huffman编码算法对误差压缩编码 c 进行熵编码,得到误差熵编码 Rie,然后将误差熵编码 Rie发送给帧封装模块 步骤 9、 数据熵编码模块 A606采用 Huffman编码算法对数据压缩编码 Sc 进行熵编码, 得到数据熵编码 Se, 然后将数据熵编码 Se发送给帧封装模块 A607。 步骤 6与步骤 2 ~ 5的执行不分先后。 Step 8. The error entropy coding module A605 uses the Huffman coding algorithm to entropy encode the error compression coding c, obtains the error entropy coding R ie , and then sends the error entropy coding R ie to the frame encapsulation module. Step 9. The data entropy coding module A606 adopts Huffman. The encoding algorithm entropy encodes the data compression code Sc to obtain a data entropy code Se, and then sends the data entropy code Se to the frame encapsulation module A607. Step 6 and steps 2 ~ 5 are performed in no particular order.
步骤 7、 帧封装模块 A607将二级误差熵编码 R2e、 误差熵编码 R e和数据 熵编码 Se组合, 再加上帧头信息 Hi, 输出完整的编码帧, 从而形成编码比 特流 Β1 β Step 7. The frame encapsulation module A607 combines the second-order error entropy coding R 2 e, the error entropy coding R e and the data entropy coding Se, and adds the frame header information Hi to output a complete coding frame, thereby forming an encoded bit stream Β 1 β
参见图 6c, 该图为编码帧结构和编码比特流的示意图。 其中, 编码比 特流 包括多个编码帧: 编码帧 i-l、 编码帧 i和编码帧 i+l, 等等, 而编码帧 则包括帧头信息、 数据熵编码 Se、 误差熵编码 e和二级误差熵编码 R2e。 Referring to Figure 6c, the figure is a schematic diagram of an encoded frame structure and an encoded bitstream. The coded bit stream includes a plurality of coded frames: an encoded frame il, an encoded frame i, and an encoded frame i+l, and the like, and the encoded frame includes frame header information, data entropy coding Se, error entropy coding e, and second order error. Entropy coding R 2 e.
该编码比特流 ^根据实际应用的需求, 即可以送入信道进行传输, 也 可以存入存储介质中。  The coded bit stream ^ can be sent to the channel for transmission according to the needs of the actual application, or can be stored in the storage medium.
(二)解码解压器  (two) decoding decompressor
步骤 1、 帧解封模块 B601从编码比特流 中接收到编码帧后, 将编码帧 分解为帧头信息、 二级误差熵编码 R2e、误差熵编码 e和数据熵编码 Se, 然 后将二级误差熵编码 R2e发送给二级误差熵解码模块 B607, 将误差熵编码 e发送给误差熵解码模块 B602, 将数据熵编码 Se发送给数据熵解码模块 B603。 Step 1. After receiving the encoded frame from the encoded bit stream, the frame deblocking module B601 decomposes the encoded frame into frame header information, second-order error entropy coding R 2 e, error entropy coding e, and data entropy coding Se, and then The level error entropy coding R 2 e is sent to the second error entropy decoding module B607, the error entropy coding e is sent to the error entropy decoding module B602, and the data entropy coding Se is sent to the data entropy decoding module. B603.
步骤 2、 二级误差熵解码模块 B607采用 Huffman解码对二级误差熵编码 R2e进行熵解码, 得到二级误差 R2, 然后将二级误差 R2发送给解码解压器的 加法器 B606。 Step 2: The second-order error entropy decoding module B607 performs entropy decoding on the second-order error entropy coding R 2 e by Huffman decoding to obtain a second-order error R 2 , and then sends the second-order error R 2 to the adder B 606 of the decoding decompressor.
误差熵解码模块 B602采用 Huffman解码对误差熵编码 e进行熵解码, 得到误差压缩编码 RlC, 然后将误差压缩编码 RlC发送给误差解码解压模块 B604。 The error entropy decoding module B602 performs entropy decoding on the error entropy coding e by using Huffman decoding, obtains an error compression code R lC , and then sends the error compression code R lC to the error decoding decompression module B604.
数据熵解码模块 B603采用 Huffman解码对数据熵编码 Se进行熵解码,得 到数据压缩编码 Sc,然后将数据压缩编码 Sc发送给数据解码解压模块 B605。  The data entropy decoding module B603 uses Huffman decoding to entropy decode the data entropy coding Se, obtains the data compression coding Sc, and then sends the data compression coding Sc to the data decoding decompression module B605.
步骤 3、 误差解码解压模块 B604采用 Lloyd-Max非均匀标量量化算法对 误差压缩编码 RlC进行解码解压, 得到解码解压误差 ,, 然后将解码解压误 差 ,发送给解码解压器的加法器 B606; Step 3, the error decoding decompression module B604 uses Lloyd-Max non-uniform scalar quantization algorithm to decode and decompress the error compression code R lC to obtain a decoding decompression error, and then send the decoding decompression error to the adder B606 of the decoding decompressor;
数据解码解压模块 B605采用 ADPCM解码算法对数据压缩编码 Sc进行 解码解压,得到解码解压数据 S,, 然后将解码解压数据 S,发送给解码解压器 的加法器 B606。  The data decoding and decompression module B605 uses the ADPCM decoding algorithm to decode and decompress the data compression code Sc to obtain the decoded decompressed data S, and then sends the decoded decompressed data S to the adder B606 of the decoding decompressor.
步骤 4、 解码解压器的加法器 B606对二级误差 R2、 解码解压数据 S,和解 码解压误差 ,进行相加, 得到重构数据 Sr2Step 4. The adder B606 of the decoding decompressor adds the second-order error R 2 , the decoded decompressed data S, and the decoding decompression error to obtain the reconstructed data Sr 2 .
由上可知, 本实施例除了可以实现实施例五所描述的有益效果之外, 进一步的, 还可以对二级误差作进一步的熵编码, 从而相对于实施例五而 言, 可以进一步压缩质量, 实现无失真压缩。  As can be seen from the above, in addition to the beneficial effects described in the fifth embodiment, the second embodiment can further perform entropy coding on the second-order error, so that the quality can be further compressed and implemented in comparison with the fifth embodiment. No distortion compression.
实施例七、  Example VII.
为了更好地实施以上方法, 本发明实施例还相应地提供一种压缩编码 器, 如图 7a所示, 该压缩编码器包括压缩编码单元 701、 熵编码单元 702和 封装单元 703;  In order to better implement the above method, the embodiment of the present invention further provides a compression coder, as shown in FIG. 7a, the compression coder includes a compression coding unit 701, an entropy coding unit 702, and a packaging unit 703;
压缩编码单元 701, 用于分别对原始数据和误差数据进行压缩编码, 得 到数据压缩编码和误差压缩编码, 其中, 误差数据为对原始数据进行压缩 编码所产生的误差; The compression coding unit 701 is configured to separately compress and encode the original data and the error data to obtain data compression coding and error compression coding, where the error data is to compress the original data. The error produced by the coding;
熵编码单元 702, 用于分别对压缩编码单元 701得到的数据压缩编码和 误差压缩编码进行熵编码, 得到数据熵编码和误差熵编码; 例如, 可以采 用 Huffman编码、 和 /或算术编码、 和 /或其他不等长编码算法分别对数据压 缩编码和误差压缩编码进行熵编码。  The entropy encoding unit 702 is configured to entropy encode the data compression coding and the error compression coding obtained by the compression coding unit 701, respectively, to obtain data entropy coding and error entropy coding; for example, Huffman coding, and/or arithmetic coding, and/or may be adopted. Or other unequal length coding algorithms entropy coding data compression coding and error compression coding, respectively.
封装单元 703, 用于将熵编码单元 702得到的数据熵编码和误差熵编码 进行帧封装以形成编码帧。  The encapsulating unit 703 is configured to perform frame encapsulation on the data entropy coding and error entropy coding obtained by the entropy coding unit 702 to form an encoded frame.
需说明的是, 当压缩编码器和解码解压器工作在固定模式时, 编码帧 中可以不需要帧头信息, 但是, 当压缩编码器和解码解压器工作在时变的 模式时, 编码帧中必须携带帧头信息, 该帧头信息携带当前编码帧的编码 模式, 当然, 根据具体的应用需求, 该帧头信息还可以携带帧长、 编码速 率和量化编码表格等信息。 所以, 封装单元 703, 还用于将帧头信息, 以及 熵编码单元 702得到的数据熵编码和误差熵编码进行帧封装以形成编码帧。  It should be noted that when the compression encoder and the decoding decompressor operate in the fixed mode, the header information may not be needed in the encoded frame, but when the compression encoder and the decoding decompressor operate in the time varying mode, the encoded frame is The frame header information carries the coding mode of the current coded frame. The frame header information may also carry information such as the frame length, the coding rate, and the quantization code table according to specific application requirements. Therefore, the encapsulating unit 703 is further configured to frame the header information, and the data entropy encoding and the error entropy encoding obtained by the entropy encoding unit 702 to form an encoded frame.
参见图 7b,其中,压缩编码单元 701可以包括数据压缩编码子单元 7011、 数据解码解压子单元 7012、 计算子单元 7013和误差压缩编码子单元 7014; 数据压缩编码子单元 7011, 用于对原始数据进行压缩编码, 得到数据 压缩编码; 比如, 可以采用波形编码方法、 预测和变换算法或 VQ方法对原 始数据进行压缩编码, 等等;  Referring to FIG. 7b, the compression coding unit 701 may include a data compression coding subunit 7011, a data decoding decompression subunit 7012, a calculation subunit 7013, and an error compression coding subunit 7014. The data compression coding subunit 7011 is configured to use the original data. Perform compression coding to obtain data compression coding; for example, the original data may be compression-encoded by using a waveform coding method, a prediction and transformation algorithm, or a VQ method;
数据解码解压子单元 7012, 用于对数据压缩编码子单元 7011得到的数 据压缩编码进行解码解压, 得到解码解压数据;  The data decoding and decompressing subunit 7012 is configured to decode and decompress the data compression coding obtained by the data compression coding subunit 7011 to obtain decoded decompressed data;
计算子单元 7013, 用于计算原始数据与数据解码解压子单元 7012得到 的解码解压数据之间的误差, 得到误差数据;  The calculating subunit 7013 is configured to calculate an error between the original data and the decoded decompressed data obtained by the data decoding and decompressing subunit 7012, to obtain error data;
误差压缩编码子单元 7014, 用于对计算子单元 7013得到的误差数据进 行压缩编码, 得到误差压缩编码; 例如, 可以采用 SQ方法对误差数据进行 压缩编码等。  The error compression coding sub-unit 7014 is configured to perform compression coding on the error data obtained by the calculation sub-unit 7013 to obtain error compression coding; for example, the error data may be compression-coded by using an SQ method.
以上压缩编码器可以实现有失真的压缩编码, 即该压缩编码器为有失 真的压缩编码器, 进一步的, 还可以实现无失真的压缩编码, 则此时需要 在该有失真的压缩编码器中增加相应的单元, 以对二级误差进行处理, 从 而构成无失真的压缩编码器; 如下: The above compression coder can realize distortion compression coding, that is, the compression coder has a loss The compression encoder is really, and further, the distortion-free compression coding can be realized. In this case, the corresponding unit needs to be added to the distortion compression encoder to process the second-order error, thereby forming distortion-free compression. Encoder; as follows:
如图 7b所示, 该压缩编码器还可以包括误差解码解压单元 704和运算单 元 705;  As shown in Figure 7b, the compression coder may further include an error decoding decompression unit 704 and an operation unit 705;
误差解码解压单元 704, 用于对压缩编码单元 701得到的误差压缩编码 进行解码解压, 得到解码解压误差; 比如, 具体可以用于对误差压缩编码 子单元 7014得到的误差压缩编码进行解码解压, 得到解码解压误差。  The error decoding and decompression unit 704 is configured to perform decoding and decompression on the error compression coding obtained by the compression coding unit 701 to obtain a decoding and decompression error. For example, the error compression coding obtained by the error compression coding subunit 7014 can be decoded and decompressed. Decode the decompression error.
运算单元 705, 用于计算误差数据与误差解码解压单元 704得到的解码 解压误差之间的误差, 得到二级误差;  The operation unit 705 is configured to calculate an error between the error data and the decoding and decompression error obtained by the error decoding and decompression unit 704, to obtain a second-order error;
则此时, 熵编码单元 702, 还用于对运算单元 705得到的二级误差进行 熵编码, 得到二级误差熵编码; 例如, 可以采用 Huffman编码、 和 /或算术编 码、 和 /或其他不等长编码算法对二级误差进行熵编码。  Then, the entropy coding unit 702 is further configured to entropy encode the second-order error obtained by the operation unit 705 to obtain a second-level error entropy coding; for example, Huffman coding, and/or arithmetic coding, and/or other The equal length coding algorithm entropy encodes the second order error.
封装单元 703, 还用于将熵编码单元 702得到的数据熵编码、 误差熵编 码和二级误差熵编码进行帧封装以形成编码帧。  The encapsulating unit 703 is further configured to perform frame encapsulation on the data entropy coding, error entropy coding, and second-order error entropy coding obtained by the entropy coding unit 702 to form an encoded frame.
以上各个单元的具体实施可参见前面实施例, 在此不再赘述。  For the specific implementation of the above various units, refer to the foregoing embodiments, and details are not described herein again.
需说明的是, 在具体实施时, 以上各个单元可以作为独立的实体实现, 也可以作为若干个实体实现, 比如, 参见实施例五和实施例六, 压缩编码 单元 701可以由数据压缩编码模块、 数据解码解压模块、 加法器(实施例五 中的压缩编码器的加法器或实施例六中的第一加法器)和误差压缩编码模 块组成, 熵编码单元 702则可以由数据熵编码模块和数据熵编码模块组成, 而封装单元 703则由帧封装模块来实现, 误差解码解压单元 704作为误差解 码解压模块, 运算单元 705由实施例六中的第二加法器来实现, 等等, 具体 的实现形式可以根据实际需求进行设定。  It should be noted that, in a specific implementation, the foregoing units may be implemented as a separate entity, or may be implemented as a plurality of entities. For example, referring to Embodiment 5 and Embodiment 6, the compression coding unit 701 may be implemented by a data compression coding module. The data decoding decompression module, the adder (the adder of the compression encoder in the fifth embodiment or the first adder in the sixth embodiment) and the error compression coding module, the entropy coding unit 702 may be the data entropy coding module and the data The entropy coding module is composed, and the encapsulation unit 703 is implemented by the frame encapsulation module, the error decoding decompression unit 704 is used as the error decoding decompression module, and the operation unit 705 is implemented by the second adder in the sixth embodiment, etc., the specific implementation The form can be set according to actual needs.
由上可知, 本实施例提供的压缩编码器的压缩编码单元 701可以将压缩 编码算法分成两级进行, 第一级是对原始数据进行压缩编码, 第二级是对 在第一级压缩编码时所产生的误差进行压缩编码, 然后再由熵编码单元 702 分别对这两级压缩编码得到的数据压缩编码和误差压缩编码进行熵编码, 由于本方案对数据进行了多次压缩编码, 所以相对于现有技术只进行一次 压缩编码而言, 可以达到较高的压缩比, 而且, 由于在本方案中, 压缩编 码单元 701除了可以对原始数据进行压缩编码之外, 还特别对第一级压缩编 码时所产生的误差进行了压缩编码, 并由熵编码单元 702分别对压缩编码得 到的数据压缩编码和误差压缩编码进行熵编码, 所以相对于现有技术而言, 可以提高压缩质量。 It can be seen that the compression coding unit 701 of the compression encoder provided in this embodiment can divide the compression coding algorithm into two levels. The first stage is to compress and encode the original data, and the second level is The error generated during the first-stage compression coding is compression-encoded, and then the entropy coding unit 702 separately entropy encodes the data compression coding and the error compression coding obtained by the two-stage compression coding, because the scheme performs more data on the data. Sub-compression coding, so that a higher compression ratio can be achieved with respect to the prior art only one compression coding, and, in this scheme, the compression coding unit 701 can not only compress and encode the original data, but also In particular, the error generated in the first stage compression coding is compression-encoded, and the entropy coding unit 702 separately entropy encodes the data compression coding and the error compression coding obtained by compression coding, so that it can be compared with the prior art. Improve compression quality.
实施例八、  Example VIII.
相应的, 针对有失真的压缩编码器, 本发明实施例还提供了一种解码 解压器, 如图 8所示, 该解码解压器包括第一解封单元 801、 第一熵解码单 元 802、 第一解码解压单元 803和第一重构单元 804;  Correspondingly, for a compression coder with distortion, an embodiment of the present invention further provides a decoding decompressor. As shown in FIG. 8, the decoding decompressor includes a first decapsulation unit 801, a first entropy decoding unit 802, and a first a decoding decompression unit 803 and a first reconstruction unit 804;
第一解封单元 801, 用于对编码帧进行解封装, 以得到数据熵编码和误 差熵编码;  The first decapsulation unit 801 is configured to decapsulate the encoded frame to obtain data entropy coding and error entropy coding;
第一熵解码单元 802, 用于分别对第一解封单元 801得到的数据熵编码 和误差熵编码进行熵解码, 得到数据压缩编码和误差压缩编码;  The first entropy decoding unit 802 is configured to perform entropy decoding on the data entropy coding and the error entropy coding obtained by the first decapsulation unit 801, respectively, to obtain data compression coding and error compression coding;
第一解码解压单元 803, 用于分别对第一熵解码单元 802得到的数据压 缩编码和误差压缩编码进行解码解压, 得到解码解压数据和解码解压误差; 第一重构单元 804, 用于对第一解码解压单元 803得到的解码解压数据 和解码解压误差进行相加, 得到重构数据。  The first decoding and decompressing unit 803 is configured to separately decode and decompress the data compression coding and the error compression coding obtained by the first entropy decoding unit 802 to obtain the decoded decompressed data and the decoding decompression error. The first reconstruction unit 804 is configured to The decoded decompressed data obtained by the decoding and decompressing unit 803 and the decoding decompression error are added to obtain reconstructed data.
需说明的是, 这里所采用的解码解压算法、 以及熵解码算法需要与压 缩编码时所采用压缩编码算法、 以及熵编码算法相对应, 比如, 如果在进 行压缩编码时采用的是波形编码方法, 则进行解码解压时需要采用波形解 码方法, 如果在进行熵编码时采用的是 Huffman编码, 则在进行熵解码时需 要采用 Huffman解码, 依此类推。  It should be noted that the decoding and decompression algorithm and the entropy decoding algorithm used herein need to correspond to the compression coding algorithm used in compression coding and the entropy coding algorithm. For example, if the compression coding is performed, the waveform coding method is adopted. The waveform decoding method is needed for decoding and decompression. If Huffman coding is used for entropy coding, Huffman decoding is required for entropy decoding, and so on.
以上各个单元的具体实施可参见前面实施例, 在此不再赘述。 需说明的是, 在具体实施时, 以上各个单元可以作为独立的实体实现, 也可以作为若干个实体实现, 比如, 参见实施例五, 第一解封单元 801可以 由帧解封模块来实现, 第一熵解码单元 802可以由误差熵解码模块和数据熵 解码模块组成, 第一解码解压单元 803可以由数据解码解压模块和误差解码 解压模块责成, 而第一重构单元则由加法器来实现, 等等, 具体的实现形 式可以根据实际需求进行设定。 For the specific implementation of the above various units, refer to the foregoing embodiments, and details are not described herein again. It should be noted that, in a specific implementation, each of the foregoing units may be implemented as a separate entity, or may be implemented as a plurality of entities. For example, referring to Embodiment 5, the first decapsulation unit 801 may be implemented by a frame decapsulation module. The first entropy decoding unit 802 may be composed of an error entropy decoding module and a data entropy decoding module, and the first decoding decompression unit 803 may be instructed by the data decoding decompression module and the error decoding decompression module, and the first reconstruction unit is implemented by an adder. , etc., the specific implementation can be set according to actual needs.
由上可知, 本实施例提供的解码解压器的第一解封单元 801可以将编码 帧分解成数据熵编码和误差熵编码, 由第一熵解码单元 802分别对数据熵编 码和误差熵编码进行熵解码以得到解码解压数据和解码解压误差, 然后由 第一解码解压单元 803分别对解码解压数据和解码解压误差进行解码解压, 得到解码解压数据和解码解压误差, 最后由第一重构单元 804对解码解压数 据和解码解压误差进行组合, 以实现数据的重构, 由于该解码解压器与实 施例七中的有失真的压缩解码器相对应, 所以可以实现与实施例七同样的 有益效果, 即相对于现有技术而言, 可以达到较高的压缩比, 以及较高的 压缩质量。  It can be seen that the first deblocking unit 801 of the decoding decompressor provided in this embodiment can decompose the encoded frame into data entropy coding and error entropy coding, and the first entropy decoding unit 802 performs data entropy coding and error entropy coding, respectively. The entropy decoding is performed to obtain the decoded decompressed data and the decoding decompression error, and then the decoding decompression data and the decoding decompression error are respectively decoded and decompressed by the first decoding decompression unit 803 to obtain the decoded decompressed data and the decoding decompression error, and finally by the first reconstruction unit 804. The decoding decompressed data and the decoding decompression error are combined to implement data reconstruction. Since the decoding decompressor corresponds to the distorted compression decoder in the seventh embodiment, the same advantageous effects as in the seventh embodiment can be achieved. That is, a higher compression ratio and a higher compression quality can be achieved than in the prior art.
实施例九、  Example IX.
相应的, 针对无失真的压缩编码器, 本发明实施例还提供了一种解码 解压器, 如图 9所示, 该解码解压器包括第二解封单元 901、 第二熵解码单 元 902、 第二解码解压单元 903和第二重构单元 904;  Correspondingly, for a distortion-free compression coder, an embodiment of the present invention further provides a decoding decompressor. As shown in FIG. 9, the decoding decompressor includes a second deblocking unit 901, a second entropy decoding unit 902, and a second Two decoding decompression unit 903 and second reconstruction unit 904;
第二解封单元 901, 用于对编码帧进行解封装, 得到二级误差熵编码、 数据熵编码和误差熵编码;  The second decapsulation unit 901 is configured to decapsulate the encoded frame to obtain two-level error entropy coding, data entropy coding, and error entropy coding;
第二熵解码单元 902, 用于分别对第二解封单元 901得到的二级误差熵 编码、 数据熵编码和误差熵编码进行熵解码, 得到二级误差、 数据压缩编 码和误差压缩编码;  The second entropy decoding unit 902 is configured to perform entropy decoding on the second-order error entropy coding, the data entropy coding, and the error entropy coding obtained by the second deblocking unit 901, to obtain a second-order error, a data compression coding, and an error compression coding;
第二解码解压单元 903, 用于分别对第二熵解码单元 902得到的数据压 缩编码和误差压缩编码进行解码解压, 得到解码解压数据和解码解压误差; 第二重构单元 904, 用于对第二熵解码单元 903得到的二级误差, 以及 第二解码解压单元 903得到的解码解压数据和解码解压误差进行相加, 得到 重构数据。 a second decoding and decompressing unit 903, configured to separately decode and decompress data compression coding and error compression coding obtained by the second entropy decoding unit 902, to obtain decoding decompressed data and decoding decompression error; The second reconstruction unit 904 is configured to add the second-level error obtained by the second entropy decoding unit 903, and the decoded decompressed data obtained by the second decoding and decompressing unit 903 and the decoding decompression error to obtain reconstructed data.
需说明的是, 这里所采用的解码解压算法、 以及熵解码算法需要与压 缩编码时所采用压缩编码算法、 以及熵编码算法相对应, 比如, 如果在进 行压缩编码时采用的是波形编码方法, 则进行解码解压时需要采用波形解 码方法, 如果在进行熵编码时采用的是 Huffman编码, 则在进行熵解码时需 要采用 Huffman解码, 依此类推。  It should be noted that the decoding and decompression algorithm and the entropy decoding algorithm used herein need to correspond to the compression coding algorithm used in compression coding and the entropy coding algorithm. For example, if the compression coding is performed, the waveform coding method is adopted. The waveform decoding method is needed for decoding and decompression. If Huffman coding is used for entropy coding, Huffman decoding is required for entropy decoding, and so on.
以上各个单元的具体实施可参见前面实施例, 在此不再赘述。  For the specific implementation of the above various units, refer to the foregoing embodiments, and details are not described herein again.
需说明的是, 在具体实施时, 以上各个单元可以作为独立的实体实现, 也可以作为若干个实体实现, 比如, 参见实施例六, 第二解封单元 901可以 由帧解封模块来实现, 第二熵解码单 902可以由二级误差熵解码模块、 误差 熵解码模块和数据熵解码模块组成, 第二解码解压单元 903可以由数据解码 解压模块和误差解码解压模块责成, 而第二重构单元 904则由加法器来实 现, 等等, 具体的实现形式可以根据实际需求进行设定。  It should be noted that, in a specific implementation, each of the foregoing units may be implemented as a separate entity, or may be implemented as a plurality of entities. For example, referring to Embodiment 6, the second decapsulation unit 901 may be implemented by a frame decapsulation module. The second entropy decoding unit 902 may be composed of a two-level error entropy decoding module, an error entropy decoding module, and a data entropy decoding module, and the second decoding and decompressing unit 903 may be instructed by the data decoding decompression module and the error decoding decompression module, and the second reconstruction Unit 904 is implemented by an adder, etc., and the specific implementation form can be set according to actual needs.
由上可知, 本提供的解码解压器的第二解封单元 901可以将编码帧分解 成二级误差熵编码、 数据熵编码和误差熵编码, 由第二熵解码单元 902分别 对二级误差熵编码、 数据熵编码和误差熵编码进行熵解码以得到二级误差、 解码解压数据和解码解压误差, 然后由第二解码解压单元 903分别对解码解 压数据和解码解压误差进行解码解压, 得到解码解压数据和解码解压误差, 最后由第二重构单元 904对二级误差、 解码解压数据和解码解压误差进行组 合, 以实现数据的重构, 由于该解码解压器与实施例七中的无失真的压缩 解码器相对应, 所以可以实现与实施例七同样的有益效果, 即相对于现有 技术而言, 可以达到较高的压缩比, 以及较高的压缩质量, 而且, 相对于 实施例八所提供的解码解压器而言, 本实施例所提供的解码解压器可以具 有更高压缩质量, 实现无失真压缩编码。 实施例十、 As can be seen from the above, the second deblocking unit 901 of the decoding decompressor provided by the present invention can decompose the encoded frame into two-level error entropy coding, data entropy coding and error entropy coding, and the second entropy decoding unit 902 respectively performs the second-order error entropy. Encoding, data entropy coding and error entropy coding are performed to obtain two-level error, decoding decompressed data and decoding decompression error, and then decoding and decompressing the decompressed data and the decoding decompression error by the second decoding and decompressing unit 903, respectively, to obtain decoding and decompression Data and decoding decompression error, and finally the second reconstruction unit 904 combines the secondary error, the decoded decompressed data, and the decoding decompression error to achieve data reconstruction, since the decoding decompressor and the distortion-free in the seventh embodiment The compression decoder corresponds to the same, so that the same advantageous effect as in the seventh embodiment can be achieved, that is, a higher compression ratio and a higher compression quality can be achieved than in the prior art, and, in contrast, the eighth embodiment is The decoding decompressor provided in this embodiment can have higher compression quality in terms of the provided decoding decompressor. Achieve lossless compression encoding. Embodiment 10
相应地, 本发明实施例还提供一种通信系统, 包括本发明实施例提供 的任一种压缩编码器和解码解压器; 即该通信系统可以包括有失真的压缩 解码器和其相对应的解码解压器, 或者, 该通信系统也可以无失真的压缩 解码器和其相对应的解码解压器, 具体可参见前面实施例, 在此不再赘述。  Correspondingly, the embodiment of the present invention further provides a communication system, including any of the compression encoder and the decoding decompressor provided by the embodiments of the present invention; that is, the communication system may include a distortion compression decoder and corresponding decoding. The decompressor, or the communication system can also be a distortion-free compression decoder and its corresponding decoding decompressor. For details, refer to the previous embodiment, and details are not described herein again.
本发明实施例所提供的压缩编码器和解码解压器可以应用面向通信的 数据压缩和传输系统中, 也可以应用在面向存储的数据压缩系统中。  The compression coder and the decoding decompressor provided by the embodiments of the present invention can be applied to a communication-oriented data compression and transmission system, and can also be applied to a storage-oriented data compression system.
其中, 面向通信的数据压缩和传输系统包括: 通过各类信道和网络的 远程数据通信, 比如数据通信、 文件传输、 语音通信、 音频通信等; 通过 近程和系统内部的数据通信, 比如通用公共无线接口中的数据传输和拉远 等; 通过设备内或板内模块之间的数据传输, 比如模拟信号转数字信号 / 数字信号转模拟信号 (AD/DA, Analog to Digital/ Digital to Analog ) 变换 器与其它部件的数据交换等。  Among them, the communication-oriented data compression and transmission system includes: remote data communication through various channels and networks, such as data communication, file transmission, voice communication, audio communication, etc.; through short-range and internal data communication, such as general public Data transmission and remoteness in the wireless interface; data transmission between modules within the device or within the board, such as analog to digital / digital to analog conversion (AD / DA, Analog to Digital / Digital to Analog) Data exchange with other components.
面向存储的数据压缩系统可以包括: 数据的高效存储、 数字媒体存储、 数字图书馆等。  Data storage systems for storage can include: efficient storage of data, digital media storage, digital libraries, and the like.
由上可知, 本实施例提供的通信系统中的压缩编码器可以将压缩编码 算法分成两级进行, 第一级是对原始数据进行压缩编码, 第二级是对在第 一级压缩编码时所产生的误差进行压缩编码, 然后再分别对这两级压缩编 码得到的数据压缩编码和误差压缩编码进行熵编码, 由于本方案对数据进 行了多次压缩编码, 所以相对于现有技术只进行一次压缩编码而言, 可以 达到较高的压缩比, 而且, 由于在本方案中, 压缩编码器除了对原始数据 进行压缩编码外, 还特别对第一级压缩编码时所产生的误差进行了压缩编 码, 并分别对压缩编码得到的数据压缩编码和误差压缩编码进行熵编码, 所以相对于现有技术而言, 可以提高压缩质量。  As can be seen from the above, the compression coder in the communication system provided by this embodiment can divide the compression coding algorithm into two levels. The first stage is to compress and encode the original data, and the second stage is to compress and encode the first stage. The generated error is compression-encoded, and then the data compression coding and the error compression coding obtained by the two-stage compression coding are entropy-encoded respectively. Since the data is compressed and encoded multiple times, it is only performed once compared with the prior art. In the case of compression coding, a higher compression ratio can be achieved, and, in this scheme, in addition to compressing and encoding the original data, the compression encoder compresses and encodes the error generated in the first-stage compression coding. And entropy coding the data compression coding and error compression coding obtained by compression coding, respectively, so that the compression quality can be improved compared with the prior art.
进一步的, 由于可以将本发明实施例提供的通信系统应用在面向通信 的数据压缩和传输系统中或面向存储的数据压缩系统中, 所以可以提高面 向通信的数据压缩和传输系统或面向存储的数据压缩系统的处理性能, 即, 如果将本发明实施例提供的通信系统应用在面向通信的数据压缩和传输系 统中, 则可以提高通信信号和数据的传输效率, 提高信道的利用率, 从而 降低运营成本; 如果将本发明实施例提供的通信系统应用在面向存储的数 据压缩系统中, 则可以提高通信信号和数据的存储效率, 提高存储设备利 用率, 从而降低系统和设备的硬件成本。 Further, since the communication system provided by the embodiment of the present invention can be applied to a communication-oriented data compression and transmission system or a storage-oriented data compression system, the surface can be improved. Processing performance to a data compression and transmission system or a storage-oriented data compression system of communication, that is, if the communication system provided by the embodiment of the present invention is applied to a communication-oriented data compression and transmission system, communication signals and data can be improved The transmission efficiency improves the utilization of the channel, thereby reducing the operating cost. If the communication system provided by the embodiment of the present invention is applied to a data-oriented data compression system, the storage efficiency of the communication signal and the data can be improved, and the utilization of the storage device can be improved. Rate, thereby reducing hardware costs for systems and equipment.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分 步骤是可以通过程序来指令相关的硬件来完成, 该程序可以存储于一计算 机可读存储介质中, 存储介质可以包括: 只读存储器 (ROM, Read Only Memory )、 随机存取己忆体 ( RAM, Random Access Memory) , 磁盘或光盘 等。  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: Read Only Memory (ROM), Random Access Memory (RAM), disk or optical disk.
以上对本发明实施例所提供的压缩编码方法、 解码解压方法、 装置和 方式进行了阐述, 以上实施例的说明只是用于帮助理解本发明的方法及其 核心思想; 同时, 对于本领域的一般技术人员, 依据本发明的思想, 在具 体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应 理解为对本发明的限制。  The compression coding method, the decoding and decompression method, the device and the manner provided by the embodiments of the present invention are described above. The description of the above embodiments is only for helping to understand the method and the core idea of the present invention. Meanwhile, the general technology in the field In the following, the description of the present invention is not limited to the scope of the present invention.

Claims

权利要求 Rights request
1、 一种压缩编码方法, 其特征在于, 包括:  A compression coding method, comprising:
分别对原始数据和误差数据进行压缩编码, 得到数据压缩编码和误差 压缩编码, 所述误差数据为对所述原始数据进行压缩编码所产生的误差; 分别对所述数据压缩编码和所述误差压缩编码进行熵编码, 得到数据 熵编码和误差熵编码;  Compressing and encoding the original data and the error data respectively, and obtaining data compression coding and error compression coding, wherein the error data is an error generated by compression coding the original data; respectively compressing the data and performing the error compression The encoding is entropy encoded to obtain data entropy coding and error entropy coding;
将所述数据熵编码和所述误差熵编码进行帧封装以形成编码帧。  The data entropy coding and the error entropy coding are frame encapsulated to form an encoded frame.
2、 根据权利要求 1所述的方法, 其特征在于, 所述分别对原始数据和 误差数据进行压缩编码, 得到数据压缩编码和误差压缩编码包括:  2. The method according to claim 1, wherein the compressing and encoding the original data and the error data respectively to obtain data compression coding and error compression coding comprises:
对原始数据进行压缩编码, 得到数据压缩编码;  Compressing and encoding the original data to obtain data compression coding;
对数据压缩编码进行解码解压, 得到解码解压数据;  Decoding and decompressing the data compression coding to obtain decoded decompressed data;
计算原始数据与解码解压数据之间的误差, 得到误差数据;  Calculating the error between the original data and the decoded decompressed data to obtain error data;
对误差数据进行压缩编码, 得到误差压缩编码。  The error data is compression-encoded to obtain error compression coding.
3、 根据权利要求 2所述的方法, 其特征在于, 所述对原始数据进行压 缩编码包括:  3. The method according to claim 2, wherein the compressing and encoding the original data comprises:
采用波形编码方法、 预测和变换算法、 或矢量量化方法对原始数据进 行压缩编码;  The original data is compression-encoded using a waveform encoding method, a prediction and transform algorithm, or a vector quantization method;
则相应的, 所述对数据压缩编码进行解码解压包括: 采用波形解码方 法、 预测和变换算法、 或矢量量化方法对数据压缩编码进行解码解压。  Correspondingly, the decoding and decompressing the data compression coding comprises: decoding and decompressing the data compression coding by using a waveform decoding method, a prediction and transformation algorithm, or a vector quantization method.
4、 根据权利要求 2或 3所述的方法, 其特征在于, 所述对误差数据进行 压缩编码包括:  The method according to claim 2 or 3, wherein the compressing and encoding the error data comprises:
采用非均匀量化编码算法对误差数据进行压缩编码。  The error data is compression-coded by a non-uniform quantization coding algorithm.
5、 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 所述分别对 数据压缩编码和误差压缩编码进行熵编码包括:  The method according to any one of claims 1 to 3, wherein the entropy encoding the data compression coding and the error compression coding respectively comprises:
采用霍夫曼 Huffman编码分别对数据压缩编码和误差压缩编码进行熵 编码; 和 /或, 采用算术编码分别对数据压缩编码和误差压缩编码进行熵编码。 Entropy coding of data compression coding and error compression coding by Huffman Huffman coding; and/or, The data compression coding and the error compression coding are entropy encoded by arithmetic coding.
6、 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 还包括: 所述编码帧中还包括帧头信息, 所述帧头信息携带当前编码帧的编码 模式。  The method according to any one of claims 1 to 3, further comprising: the coding frame further includes frame header information, where the frame header information carries an encoding mode of the current coded frame.
7、 根据权利要求 6所述的方法, 其特征在于, 还包括:  7. The method according to claim 6, further comprising:
所述帧头信息还携带帧长、 编码速率和量化编码表格。  The header information also carries a frame length, a coding rate, and a quantization coding table.
8、 根据权利要求 2所述的方法, 其特征在于, 还包括: 对误差压缩编 码进行解码解压, 得到解码解压误差;  8. The method according to claim 2, further comprising: decoding and decompressing the error compression code to obtain a decoding and decompression error;
计算误差数据与解码解压误差之间的误差, 得到二级误差;  Calculating the error between the error data and the decoding decompression error, and obtaining the second-order error;
对所述二级误差进行熵编码, 得到二级误差熵编码;  Entropy encoding the second-order error to obtain a second-order error entropy coding;
则相应的, 所述将数据熵编码和误差熵编码进行帧封装以形成编码帧 具体为: 将数据熵编码、 误差熵编码和二级误差熵编码进行帧封装以形成 编码帧。  Correspondingly, the data entropy coding and the error entropy coding are frame-encapsulated to form an encoded frame. Specifically, the data entropy coding, the error entropy coding, and the second-order error entropy coding are frame-encapsulated to form an encoded frame.
9、 一种解码解压方法, 其特征在于, 包括:  9. A decoding and decompression method, comprising:
对编码帧进行解封装, 得到数据熵编码和误差熵编码;  Decapsulating the encoded frame to obtain data entropy coding and error entropy coding;
分别对所述数据熵编码和所述误差熵编码进行熵解码, 得到数据压缩 编码和误差压缩编码;  Entropy decoding the data entropy coding and the error entropy coding, respectively, to obtain data compression coding and error compression coding;
分别对所述数据压缩编码和所述误差压缩编码进行解码解压, 得到解 码解压数据和解码解压误差;  Decoding and decompressing the data compression coding and the error compression coding respectively to obtain decoding decompression data and decoding decompression error;
对所述解码解压数据和所述解码解压误差进行相加, 得到重构数据。 The decoded decompressed data and the decoding decompression error are added to obtain reconstructed data.
10、 根据权利要求 9所述的方法, 其特征在于, 所述编码帧中还包括帧 头信息, 则所述对编码帧进行解封装, 得到数据熵编码和误差熵编码具体 为: The method according to claim 9, wherein the coded frame further includes frame header information, and the coded frame is decapsulated to obtain data entropy coding and error entropy coding.
将编码帧分解为帧头信息、 数据熵编码和误差熵编码。  The encoded frame is decomposed into frame header information, data entropy coding, and error entropy coding.
11、 一种解码解压方法, 其特征在于, 包括:  11. A decoding and decompression method, comprising:
对编码帧进行解封装, 得到二级误差熵编码、 数据熵编码和误差熵编 码; Decoding the coded frame to obtain two-level error entropy coding, data entropy coding and error entropy coding code;
分别对所述二级误差熵编码、 数据熵编码和误差熵编码进行熵解码, 得到二级误差、 数据压缩编码和误差压缩编码;  Entropy decoding the second-order error entropy coding, data entropy coding and error entropy coding, respectively, to obtain two-level error, data compression coding and error compression coding;
分别对所述数据压缩编码和误差压缩编码进行解码解压, 得到解码解 压数据和解码解压误差;  Decoding and decompressing the data compression coding and the error compression coding respectively to obtain decoding decompression data and decoding decompression error;
对二级误差、 解码解压数据和解码解压误差进行相加, 得到重构数据。 The two-level error, the decoded decompressed data, and the decoding decompression error are added to obtain reconstructed data.
12、 根据权利要求 11所述的方法, 其特征在于, 所述编码帧中还包括 帧头信息, 则所述对编码帧进行解封装, 得到二级误差熵编码、 数据熵编 码和误差熵编码具体为: The method according to claim 11, wherein the coded frame further includes frame header information, and the coded frame is decapsulated to obtain two-level error entropy coding, data entropy coding, and error entropy coding. Specifically:
将编码帧分解为帧头信息、 二级误差熵编码、 数据熵编码和误差熵编 码。  The coded frame is decomposed into frame header information, second order error entropy coding, data entropy coding, and error entropy coding.
13、 一种压缩编码器, 其特征在于, 包括:  13. A compression encoder, comprising:
压缩编码单元, 用于分别对原始数据和误差数据进行压缩编码, 得到 数据压缩编码和误差压缩编码, 所述误差数据为对原始数据进行压缩编码 所产生的误差;  a compression coding unit, configured to compress and encode the original data and the error data respectively, to obtain data compression coding and error compression coding, where the error data is an error generated by compression coding the original data;
熵编码单元, 用于分别对压缩编码单元得到的数据压缩编码和误差压 缩编码进行熵编码, 得到数据熵编码和误差熵编码;  An entropy coding unit, configured to entropy encode data compression coding and error compression coding obtained by the compression coding unit, respectively, to obtain data entropy coding and error entropy coding;
封装单元, 用于将熵编码单元得到的数据熵编码和误差熵编码进行帧 封装以形成编码帧。  And an encapsulating unit, configured to perform frame encapsulation on the data entropy coding and error entropy coding obtained by the entropy coding unit to form an encoded frame.
14、 根据权利要求 13所述的压缩编码器, 其特征在于, 所述压缩编码 单元包括:  The compression encoder according to claim 13, wherein the compression coding unit comprises:
数据压缩编码子单元, 用于对原始数据进行压缩编码, 得到数据压缩 编码;  a data compression coding sub-unit, configured to compress and encode the original data to obtain data compression coding;
数据解码解压子单元, 用于对数据压缩编码子单元得到的数据压缩编 码进行解码解压, 得到解码解压数据;  a data decoding and decompressing subunit, configured to decode and decompress the data compression code obtained by the data compression coding subunit, to obtain decoded decompressed data;
计算子单元, 用于计算原始数据与数据解码解压子单元得到的解码解 压数据之间的误差, 得到误差数据; a calculation subunit, which is used to calculate the decoding solution obtained by the original data and the data decoding decompression subunit Error between the pressure data to obtain error data;
误差压缩编码子单元, 用于对计算子单元得到的误差数据进行压缩编 码, 得到误差压缩编码。  The error compression coding sub-unit is configured to compress and encode the error data obtained by the calculation sub-unit to obtain error compression coding.
15、 根据权利要求 13或 14所述的压缩编码器, 其特征在于, 还包括误 差解码解压单元和运算单元;  The compression encoder according to claim 13 or 14, further comprising an error decoding decompression unit and an operation unit;
误差解码解压单元, 用于对压缩编码单元得到的误差压缩编码进行解 码解压, 得到解码解压误差;  An error decoding decompression unit is configured to decompress and decompose the error compression coding obtained by the compression coding unit to obtain a decoding and decompression error;
运算单元, 用于计算误差数据与误差解码解压单元得到的解码解压误 差之间的误差, 得到二级误差;  An operation unit, configured to calculate an error between the error data and the decoding and decompression error obtained by the error decoding and decompression unit, to obtain a second-order error;
所述熵编码单元, 还用于对运算单元得到的二级误差进行熵编码, 得 到二级误差熵编码;  The entropy coding unit is further configured to entropy encode a second-order error obtained by the operation unit, to obtain a second-order error entropy coding;
所述封装单元, 还用于将熵编码单元得到的数据熵编码、 误差熵编码 和二级误差熵编码进行帧封装以形成编码帧。  The encapsulating unit is further configured to frame encapsulate data entropy coding, error entropy coding, and second-order error entropy coding obtained by the entropy coding unit to form an encoded frame.
16、 一种解码解压器, 其特征在于, 包括:  16. A decoding decompressor, comprising:
第一解封单元, 用于对编码帧进行解封装, 以得到数据熵编码和误差 熵编码;  a first decapsulation unit, configured to decapsulate the encoded frame to obtain data entropy coding and error entropy coding;
第一熵解码单元, 用于分别对第一解封单元得到的数据熵编码和误差 熵编码进行熵解码, 得到数据压缩编码和误差压缩编码;  a first entropy decoding unit, configured to perform entropy decoding on data entropy coding and error entropy coding obtained by the first deblocking unit, respectively, to obtain data compression coding and error compression coding;
第一解码解压单元, 用于分别对第一熵解码单元得到的数据压缩编码 和误差压缩编码进行解码解压, 得到解码解压数据和解码解压误差;  a first decoding decompression unit, configured to respectively decode and decompress the data compression coding and the error compression coding obtained by the first entropy decoding unit, to obtain decoding decompression data and decoding decompression error;
第一重构单元, 用于对第一解码解压单元得到的解码解压数据和解码 解压误差进行相加, 得到重构数据。  The first reconstruction unit is configured to add the decoded decompressed data obtained by the first decoding and decompressing unit and the decoding and decompression error to obtain the reconstructed data.
17、 一种解码解压器, 其特征在于, 包括:  17. A decoding decompressor, comprising:
第二解封单元, 用于对编码帧进行解封装, 得到二级误差熵编码、 数 据熵编码和误差熵编码;  a second decapsulation unit, configured to decapsulate the encoded frame to obtain two-level error entropy coding, data entropy coding, and error entropy coding;
第二熵解码单元, 用于分别对第二解封单元得到的二级误差熵编码、 数据熵编码和误差熵编码进行熵解码, 得到二级误差、 数据压缩编码和误 差压缩编码; a second entropy decoding unit, configured to separately encode the second-order error entropy obtained by the second de-seal unit, Data entropy coding and error entropy coding are used for entropy decoding to obtain two-level error, data compression coding and error compression coding;
第二解码解压单元, 用于分别对第二熵解码单元得到的数据压缩编码 和误差压缩编码进行解码解压, 得到解码解压数据和解码解压误差;  a second decoding and decompressing unit, configured to separately decode and decompress data compression coding and error compression coding obtained by the second entropy decoding unit, to obtain decoding decompressed data and decoding decompression error;
第二重构单元, 用于对第二熵解码单元得到的二级误差, 以及第二解 码解压单元得到的解码解压数据和解码解压误差进行相加, 得到重构数据。  And a second reconstruction unit, configured to add the second-order error obtained by the second entropy decoding unit, and the decoded decompressed data obtained by the second decoding and decompressing unit and the decoding and decompression error to obtain the reconstructed data.
18、 一种通信系统, 其特征在于, 该通信系统包括权利要求 13至 14所 述的任一种压缩编码器和权利要求 16所述的解码解压器, 或者, 该通信系 统包括权利要求 15所述的压缩编码器和权利要求 17所述的解码解压器。  18. A communication system, comprising: any of the compression encoders of claims 13 to 14 and the decoding decompressor of claim 16, or the communication system comprises the apparatus of claim 15. The compression encoder and the decoding decompressor of claim 17.
PCT/CN2011/074850 2010-09-29 2011-05-30 Method and device for compression encoding, method and device for decompression decoding, and communication system WO2011137841A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 201010298614 CN101945286B (en) 2010-09-29 2010-09-29 Compression coding method, decoding decompression method, device and communication system
CN201010298614.4 2010-09-29

Publications (1)

Publication Number Publication Date
WO2011137841A1 true WO2011137841A1 (en) 2011-11-10

Family

ID=43437008

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/074850 WO2011137841A1 (en) 2010-09-29 2011-05-30 Method and device for compression encoding, method and device for decompression decoding, and communication system

Country Status (2)

Country Link
CN (1) CN101945286B (en)
WO (1) WO2011137841A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101945286B (en) * 2010-09-29 2013-06-05 上海华为技术有限公司 Compression coding method, decoding decompression method, device and communication system
CN103079075B (en) * 2013-01-23 2016-02-24 清华大学 Towards the method for compressing image of sampling image in biology body cavity
CN104113759B (en) * 2013-04-17 2018-03-23 展讯通信(上海)有限公司 Video system, video frame buffer recompression/decompression method and device
CN104679775B (en) * 2013-12-02 2019-04-23 上海联影医疗科技有限公司 A kind of data processing method based on Huffman table
CN104244012B (en) * 2014-10-14 2017-08-04 重庆真测科技股份有限公司 A kind of CT data compression methods
CN106253910A (en) * 2016-09-22 2016-12-21 山东华旗新能源科技有限公司 A kind of compaction coding method
CN113225160B (en) * 2021-03-30 2022-04-12 大勺科技(北京)有限公司 Data sending method, data receiving method, device and system based on magnetic communication
CN114629504B (en) * 2021-08-05 2024-04-30 中国石油天然气集团有限公司 Downhole while-drilling data compression method and system based on FPGA

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1639984A (en) * 2002-03-08 2005-07-13 日本电信电话株式会社 Digital signal encoding method, decoding method, encoding device, decoding device, digital signal encoding program, and decoding program
CN1777038A (en) * 2005-12-01 2006-05-24 武汉大学 Two-dimensional vector data compression method
CN1889687A (en) * 2006-06-02 2007-01-03 清华大学 Non-predicted circulation anti-code error video frequency coding method
CN101945286A (en) * 2010-09-29 2011-01-12 上海华为技术有限公司 Compression coding method, decoding decompression method, device and communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1639984A (en) * 2002-03-08 2005-07-13 日本电信电话株式会社 Digital signal encoding method, decoding method, encoding device, decoding device, digital signal encoding program, and decoding program
CN1777038A (en) * 2005-12-01 2006-05-24 武汉大学 Two-dimensional vector data compression method
CN1889687A (en) * 2006-06-02 2007-01-03 清华大学 Non-predicted circulation anti-code error video frequency coding method
CN101945286A (en) * 2010-09-29 2011-01-12 上海华为技术有限公司 Compression coding method, decoding decompression method, device and communication system

Also Published As

Publication number Publication date
CN101945286B (en) 2013-06-05
CN101945286A (en) 2011-01-12

Similar Documents

Publication Publication Date Title
WO2011137841A1 (en) Method and device for compression encoding, method and device for decompression decoding, and communication system
RU2417518C2 (en) Efficient coding and decoding conversion units
CN101795407B (en) Method and device for encoding a bit sequence
EP2146436B1 (en) The method, apparatus and system for multiple-description coding and decoding
CN103873877A (en) Image transmission method and device for remote desktop
CA2604521C (en) Lossless encoding of information with guaranteed maximum bitrate
CN102368385A (en) Backward block adaptive Golomb-Rice coding and decoding method and apparatus thereof
WO2012119463A1 (en) Coding method, decoding method, and equipments for transform coefficients
CN1622593B (en) Apparatus and method for processing video for implementing signal to noise ratio scalability
JP2015065644A (en) Image estimation method
JP2011528807A (en) Method, system and apparatus for digital signal compression or decompression
Zhou et al. Distributed video coding using interval overlapped arithmetic coding
Mahmud An improved data compression method for general data
CN103826122B (en) Complexity-balanced video coding method and decoding method thereof
JP5529255B2 (en) Method and apparatus for encoding an input bit sequence and corresponding decoding method and apparatus
CN102055974B (en) Data compressing and uncompressing method, data compressing and uncompressing device and data compressing and uncompressing system
KR100667595B1 (en) Variable length decoder
CN104113394B (en) The compression of communication modulation signal and decompressing method
WO2011150810A1 (en) Data encoding method, decoding method, encoder and decoder
SE0301664D0 (en) Method of compression of data
CN103533351A (en) Image compression method for multi-quantization table
JP2015065645A (en) Image estimation method
Mohamed Wireless Communication Systems: Compression and Decompression Algorithms
Agostini et al. Multiple description video decoding using MAP
TW202349966A (en) Filtering method, filtering model training method and related apparatus

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

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

Country of ref document: EP

Kind code of ref document: A1