Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Embodiment one, a kind of bit plane coding method as shown in Figure 2, comprising:
Step 101, the signal after quantizing change into binary code;
In the embodiment of the present invention, the object of bitplanes coding is except the primary signal of input, can also be: the residual signals that certain stage of encoder (as signal enhancement layer) produces, directly to input signal entirely be with time-frequency conversion produce signal, first use bank of filters (QMF) to input signal divide be with after, each subband is carried out the signal of time-frequency conversion generation etc., can also be other signal, this cause limitation of the present invention.
Step 102, described binary code is generated N level bit plane, described N is more than or equal to 1, and the value of N is that maximum by the signal after quantizing in step 101 determines here;
Step 103, with MSB level bit plane as the present bit plane; Be appreciated that when bit planes at different levels are encoded and begin to encode step by step from MSB level bit plane;
Step 105, information and the information that presets on present bit plane are mated, if be consistent, the coding mode with described present bit plane is chosen as the vector coding pattern; If inconsistent, the coding mode with described present bit plane is chosen as Run-Length Coding (Run-length Encoding) pattern or direct coding pattern;
Be appreciated that, here the information that presets is predefined information in encoding device, can be the distributed intelligence of the binary code on indicating bit plane, as the bit plane binary code word be 1 number greater than several, or the number of " 0 " code word that distributes between two " 1 " code in bit plane is greater than several etc.; Can be also the position information of indication bit plane, be the MSB position as bit plane, or lowest order (Least Significant Bits, LSB), or other position etc.; Can also be other information of indication bit plane.
Wherein, the LSB position that comprises the signal after the indicating bit plane is to quantize when the information that presets, the position information on present bit plane is mated with the information that presets, if inconsistent, be that the present bit plane is the non-LSB position of the signal after quantizing, the coding mode with the present bit plane is chosen as direct coding or Run-Length Coding; If be consistent, be that the present bit plane is the LSB position of the signal after quantizing, the coding mode with the present bit plane is vector coding pattern such as grid vector coding mode (Lattice Vector Quantization, LVQ) etc., can be other vector coding pattern, this be construed as limiting the invention yet.The method of the coding mode of this selection bit plane is fairly simple, only needs to determine in the operating process of reality that the present bit plane is MSB or LSB or other.
Comprise the distributed intelligence of the binary code word of bit plane when the information that presets, before this step, can execution in step 104, the distribution of binary code in statistics present bit plane, can be by the present bit plane be scanned, obtain the distribution information such as number of times that in this grade bit plane, " 1 " or " 0 " occurs and position.
More specifically, be that 1 number is greater than reference quantity when the information that presets comprises binary code in the indicating bit plane, or when in the indicating bit plane, binary code is 0 number less than the information of reference quantity, in step 104, the distributed intelligence of statistics is that binary code is 1 number, length as signal is 64, through statistics, 3 (reference quantity) individual above binary code " 1 " is arranged in the present bit plane, or 61 (reference quantity) individual following binary code " 0 ", the coding mode for present bit plane selection is the vector coding pattern; The present bit plane number of binary code " 1 " occurs less than 3, or the number of binary code " 0 " is greater than 61, and the coding mode of selecting for the present bit plane is direct coding or Run-Length Coding pattern; Wherein reference quantity 3 is the length according to signal after quantizing, and determine in conjunction with the signal length after actual quantification.As seen this to select the method for coding mode to implement fairly simple for bit plane, and calculate also fairly simple.
Step 106, according to the coding mode on present bit plane, the binary code on present bit plane being encoded obtains encoding rear binary code;
Coding mode for present bit plane selection in step 105 is chosen as direct coding or Run-Length Coding, and in direct coding present bit plane, binary code is the positional information of " 1 ", can improve like this code efficiency of bit plane; The coding mode of selecting for the present bit plane is chosen as vector coding pattern such as grid vector coding mode, and the binary code with the present bit plane resolves into a plurality of vectors (more than), and described vector is encoded.Use bit quantity few when this vector encoding method is encoded in the application of reality, efficient is higher.
After the coding on step 107, the binary code that will identify described present bit plane coding mode and described present bit plane, binary code is write into code stream accordingly;
Be appreciated that, the binary code that obtains after being encoded according to corresponding coding mode in the binary code of the coding mode on sign present bit plane and present bit plane is write into code stream accordingly, and decoding end just can be correctly decoded after receiving bit stream data like this.
If bit residue is arranged in the described code stream of step 108, with the next stage bit plane on described present bit plane as the present bit plane, and execution in step 105 or step 104; If there is no the bit residue in described code stream, stop.
Need to illustrate, in said method, for at a certain level of coding bit plane, have when occurring first binary code " 1 " on a certain position, need to be after this grade bit plane of having encoded, then spend 1 bit binary code " 0 " (just) or " 1 " (bearing) to represent the symbol of the quantized signal that this position is corresponding.If when still " 1 " occurring on same position in subsequent bitplanes, also need not to spend again the bits of encoded symbolic information.
In addition, in order to make decoding end obtain correct bit plane maximum series, in Bit-Plane Encoding, in the original position of code stream, can take the mode of a primitive encoding (Unary Coding), use unique code word to characterize the progression of encoding in N level bit plane.As shown in table 1 below, be code flow structure signal table, wherein code stream code (U-code) is characterized by the coding situation of this grade bit plane, all encodes as 0 expression, and 10 expression lowermost level bit planes are not encoded; Characterize the coding mode of every grade of bit plane with the pattern of 1 bit-i; Comprised in the code stream of pattern-i this bit plane according to the code stream after selected coding mode coding, also comprised some other important information as: in every grade of bit plane, the distributed intelligence of binary code is as the positional information of " 1 " and quantity information etc.
U-code |
Pattern-i |
The code stream of pattern-i |
...... |
Table 1 code flow structure signal table
Can find out, bit plane coding method of the present invention is to compare to select the corresponding coding mode of bit plane by the information with bit plane with the information that presets, when being consistent, be chosen as the vector coding pattern, and the information after according to the vector coding pattern-coding is write into code stream with bit plane.Bit plane coding method of the present invention can adopt simple method bitplanes to select to encode after coding mode, has simplified and has selected the calculating degree of coding mode, thereby can improve code efficiency and precision; And be chosen as the vector coding pattern when being consistent, can reducing coding and use bit, improve the efficient of Bit-Plane Encoding; The user can preset to select the information of vector coding pattern at coding side according to practical application in addition, has improved user's experience.
Embodiment two, a kind of bit plane coding method, in the present embodiment in practical application the Bit-Plane Encoding of voice be that example illustrates.
Fig. 3 is the flow chart to voice frequency Signal coding, after ultra-broadband signal s (n) the process low pass filter group (L-QMF) and high pass filter group (H-QMF) of input, two passages of minute low strap (0-8kHz) and high-band (8-16kHz) are output signal s respectively
wb(n) and s
swb(n).In the present embodiment, the setting frame length is 5ms, and low band signal is processed through core encoder, a broadband signal can be outputed to multiway analog switch (MUX), obtains the Broadband emission of 0-8kHz with flank speed 64kbps, carries out the ultra broadband expansion; The performance index of existing ultra broadband encoder require frequency range to be at least 0-14kHz, therefore, before carrying out the ultra broadband coding, can be to s
swb(n) carry out low-pass filtering, making its frequency range is 8-14kHz.
To high band signal s
swb(n) coding, existing by following steps reality, structure flow chart as shown in Figure 4:
Al, s
swb(n) be mapped to frequency domain through improving discrete cosine transform (Modified Discrete Cosine Transform, MDCT).By certain calculating, because frame length is 5ms, the MDCT coefficient number of each frame signal is 80, and because effective frequency range is 8-14kHz, effectively the MDCT coefficient is 60, in order to process conveniently, can add 4 zero points at coding side, form a size and be 64 MDCT coefficient array.
A2, the MDCT coefficient is carried out normalized, make the dynamic range of MDCT coefficient unlikely excessive.The normalization factor of trying to achieve can be passed through one deck quantization encoding, can be with a Low Bit-rate Coding device, in the present embodiment with CSVQ as the quantization encoding instrument, tentatively will output to MUX after MDCT coefficient quantization coding.
After CSVQ quantization encoding under A3, process 16kbps, only can slightly quantize the MDCT coefficient, quantization error is larger, and particularly to music signal, output tonequality needs further to promote.Therefore, the present embodiment carries out two layers of meticulous quantization encoding on the basis of one deck quantization encoding.Associated code after two-layer quantization encoding fails to be convened for lack of a quorum and merges the MDCT coefficient that is transferred to the synthetic 8-14kHz of decoding end.
The input signal of two layers of quantization encoding be original MDCT coefficient Y (k) with one deck quantization encoding after (k) poor of the MDCT coefficient Y ' that exports, the namely error signal after one deck quantization encoding.Carry out the flow chart of two layers of quantization encoding as shown in Figure 5, comprising:
B1, error signal is quantized;
B2, the control information after quantizing generate multistage (k level, k 〉=1) bit plane, the superlative degree of bit plane is determined by maximum in error signal, is appreciated that the side information (as: distribution situation of the nonzero element of this layer etc.) that can also obtain bit planes at different levels;
B3, with the MSB level bit plane in k level bit plane as the present bit plane, the information that comprises the LSB position of signal after the indicating bit plane is described quantification when the information that presets, position information and the described information that presets of the error signal after described quantification are mated, can be whether that the lowest order of binary code corresponding to error signal after described quantification is that LSB realizes by judging the present bit plane, if not, execution in step B4; If so, execution in step B5;
B4, the coding mode of selecting for non-LSB bit plane are the position of direct coding " 1 " or Run-Length Coding etc.;
In the present embodiment, select the mode (pulse code) of the position of direct coding " 1 ", with the rear binary code that obtains encoding after the direct coding of non-LSB level plane, be that in non-LSB level bit plane, code word is the binary code of 1 Position Number, because the MDCT coefficient is 64, available 6 bits are write into code stream with the binary code of the Position Number of 1 " 1 " code word.For example: if the binary code of No. 37 positions of a certain level bit plane is " 1 ", " 100101 " are write code stream, improved code efficiency.In addition, if be that " 1 " appears in No. 37 positions first at this moment, also need note down with 1 bit the symbolic information of No. 37 position MDCT coefficients; Also need to characterize the number of pulses that this grade bit plane is encoded at the discernible harbour of interpolation foremost of present bit plane coding code stream, as representing that with 0 the present bit plane is without binary code " 1 "; There is 1 binary code " 1 " on 10 expression present bit planes.
B5, the coding mode of selecting for LSB level bit plane are that vector coding pattern such as grid vector coding mode etc. are encoded, flow chart adopts the grid vector coding mode that the encode rear binary code that obtains encoding of the binary code of LSB level bit plane is realized by following steps as shown in Figure 6 in the present embodiment:
C1, the binary code of LSB level bit plane is decomposed at least one vector.In the present embodiment, because the MDCT coefficient is 64, can to resolve into 8 dimensions be 8 vector to the binary code of LSB level bit plane.
Be appreciated that owing to being subjected to bit limit, in some situation, can not guarantee all can encode with vectors all in one-level.Therefore, after step C1, need execution in step C2.
C2, be that 1 number is carried out priority ordering to above-mentioned 8 vectors according to binary code in each vector.This ranking results has determined the top grade of each vector coding in this grade bit plane.In coding side, in layer, the number of " 1 " is by the inner edge information acquisition in all vectors, and these side informations need not to spend additional bit and store.Grid vector encoder reference edge information is completed prioritization, and when bit was not enough, direct use 1 bit quantization that priority is lower was helped zero vector.After obtaining LSB level plane vector top grade sequencing information, the flow process of grid vector encoder encodes is with G.718 middle correlation module is similar, final, and the grid vector encoder can be carried out following coding step with each vector according to the order from the low frequency to the high frequency.
C3, generate described at least one vector at the location index information in grid vector space and the corresponding relation of coded message.
Be appreciated that, the grid vector space here can be that coding side presets according to the vector dimension of decomposing, and the grid vector space is the reference position that comprises the correspondence of the positional alignment combination (grid vector code book) of all vectors of full zero vector and each vector (yardage).If it is 8 that coding side is set the vector dimension of decomposing, the grid vector space vector comprises: from vector { 0,0,0,0,0,0,0,0} is to vector { 1,1,1,1, the location index information of 1,1,1,1}, and a small amount of code vector is as { 1,0,0,0,0,0,0,0}, { 1,1,0,0,0,0,0,0} etc., these code vectors are called as absolute boot entry.
Coded message in this step refers to write into the information of code stream, another the simple coded message of vector that is about to a complexity associates, and coded message is delivered to away, after decoding end receives bit stream data, can find this vector in the location index information in grid vector space by coded message, and this vector is restored, the bit use amount can be reduced at coding side like this, thereby the code efficiency of grid vector in prior art can be promoted.
In the present invention, coded message includes but are not limited to following information: the vector that resolves in the grid vector space with respect to the relative position index information of a reference position, coded message and the vector that resolves into are realized by the following method at the corresponding relation of the location index information in grid vector space, flow chart as shown in Figure 7:
D1, namely 8 the grid vector space is divided into a plurality of zones according to the dimension of the vector that resolves into;
D2, indicate described a plurality of zone with corresponding identification information respectively, and in each zone definite reference position; The identification information here refers to identify certain regional information, can uniquely find certain zone by identification information; Can carry out the intercepting and capturing of code stream by this identification information in decoding end;
The index information corresponding to reference position in D3, the location index information with described a plurality of zones, the identification information of indicating described a plurality of zones and described a plurality of zones carries out related, forms corresponding relation.
For example, the code book information table shown in following table 2 because the capacity in the grid vector space of vector dimension 8 is 255, can be that 255 grid vector space is divided into six zones with capacity, and the call number interval with the position in table represents; Be that harbour represents an interval with an identification information respectively, and determine a reference position in each is interval, as the fiducial value in table; And the harbour that each is regional, fiducial value and call number interval associate the code book information table in formation table 2.Be appreciated that in this corresponding relation can also be related other information such as codebook number, code word size etc., wherein codebook number Q0 represents that the quantity of " 1 " code word in this regional harbour is 0; Code word size is peaked binary code length in the call number interval; In addition, when the present invention generates the code book information table, also store harbour and be the corresponding informance of " 111111 ", if in LSB level bit plane, remainder vector is that full zero vector and quantity are greater than 6 o'clock, directly with " 111111 " coding entirely.
Table 2 code book information table
C4, obtain the coded message of described at least one vector according to the corresponding relation that forms in step C3, and coded message is write into code stream.
The quantized value of supposing current vector is for { 0,0,0,0,0,0,1,1}, the position that at first finds this quantized value according to the indexation method of classical grid vector coding in the grid vector space is 35.When searching, can search by following table 3, what in table, deviant was corresponding absolute boot entry in the grid vector space is position encoded; The number of permutations is vector number corresponding to absolute boot entry, and the Position Number of these vectors is between the position of the boot entry of correspondence and next definitely boot entry; Q0 is to vector region corresponding to the Q5 absolute boot entry of indication.{ the absolute boot entry that 0,0,0,0,0,0,1,1} is corresponding is vector { 1,1 as vector, 0,0,0,0,0,0}, vector { 0,0, between the Position Number 8 and 36 of 0,0,0,0,1,1}, by searching the vector between 8 to 36 in the grid vector space, the Position Number that obtains this vector is 35;
Absolute boot entry |
The number of permutations |
Skew |
Q0 |
Q1 |
Q2 |
Q3 |
Q4 |
Q5 |
{0,0,0,0,0,0,0,0} |
1 |
- |
× |
? |
? |
? |
? |
? |
{1,0,0,0,0,0,0,0} |
8 |
0 |
? |
× |
? |
? |
? |
? |
{1,1,0,0,0,0,0,0} |
28 |
8 |
? |
× |
× |
× |
? |
? |
{1,1,1,0,0,0,0,0} |
56 |
36 |
? |
? |
? |
× |
× |
? |
{1,1,1,1,0,0,0,0} |
70 |
92 |
? |
? |
? |
? |
× |
× |
{1,1,1,1,1,0,0,0} |
56 |
162 |
? |
? |
? |
? |
? |
× |
{1,1,1,1,1,1,1,0} |
8 |
246 |
? |
? |
? |
? |
? |
× |
{1,1,1,1,1,1,1,1} |
1 |
254 |
? |
? |
? |
? |
? |
× |
Table 3 boot entry information table
{ Position Number 35 of 0,0,0,0,0,0,1,1} call number in above-mentioned table 2 is interval, belongs to the Q3 zone to determine vector;
According to the corresponding relation that table 2 forms, obtain coded message namely the Position Number 35 of this vector with respect to the relative position 3 of fiducial value 32;
With 1 bit, the binary code of identification code pattern is write into code stream, then the binary code of the relative position 3 of this vector in Q3 of the harbour that this vector is corresponding " 1110 " and 5 bits is write into code stream; Due to the uniqueness of harbour, decoding end can be correct solves harbour, and reads the relative position that 5 bits obtain this vector, and then obtains its absolute position, finally rebuilds this vector.
Above-mentioned two layers of quantization encoding process from step B1 to B5, adopt Bit-Plane Encoding, by the order from MSB to LSB, complete the cataloged procedure of the error signal of one deck quantizer.One, after two layers of encoding code stream merge, be transferred to decoding end together with core layer encoder code stream.
Above-mentioned bit plane vector encoding method also can be applied to the coding to image, vision signal, and this is not construed as limiting the invention.And in actual applications, before the Bit-Plane Encoding of above-mentioned two layers, signal need to be carried out normalized, guarantee as far as possible when Bit-Plane Encoding, have enough code streams every one-level of bit plane can be able to be encoded to.
The Bit-Plane Encoding pattern of selecting in the coding method of the present embodiment bit planes has two kinds, selecting the coding mode of LSB level bit plane is the vector coding pattern, the coding mode of selecting non-LSB level bit plane is direct coding pattern or Run-Length Coding pattern etc., has simplified the calculating degree in the present embodiment; And adopt in the grid vector coding mode of selecting for LSB level bit plane in the present embodiment: the vector that Bit Plane Decomposition becomes is write into code stream with simple coded message, reduced the bit use amount, improved code efficiency.
Embodiment three, a kind of bit plane coding/decoding method, flow chart comprises as shown in Figure 8:
The bit stream data that step 301, parsing receive, the binary code that obtains the flag plane coding mode is the vector coding pattern, obtains the vector coding information of described bit plane, and execution in step 303; When the binary code of the flag plane coding mode that obtains is other coding modes such as direct coding or Run-Length Coding, execution in step 302;
Owing to being that every grade of bit plane selects corresponding coding mode to encode at coding side, therefore need to know that in decoding end the coding mode of every grade of bit plane could restore the source binary code of bit planes at different levels.
Step 302, accordingly binary code after the coding of described bit plane is decoded according to other coding modes such as described direct coding or Run-Length Codings, obtain the source binary code of described bit plane, and return to step 301 parsing bit stream data the next stage bit plane of described bit plane is decoded;
In the embodiment of the present invention, coding side is to encode step by step, and decoding end is also decoded step by step.Indicate this grade bit plane to use direct coding or Run-Length Coding if resolve the binary code of the flag plane coding mode that obtains in step 301, after the coding of this grade bit plane, binary code comprises: this level plane code word is distribution, coded input signal length of binary code in the side information of 1 positional information, this grade bit plane such as this grade bit plane etc., decoding end need to be decoded positional information according to side information, can be with the source binary code reduction of this grade bit plane.
Step 303, accordingly the vector coding information of described bit plane is decoded according to described vector coding pattern, obtain the source binary code of described bit plane, and return to step 301 and resolve bit stream data the next stage bit plane of described bit plane is decoded;
If described vector coding is the grid vector coding, due to when carrying out the grid vector coding, to encode take vector as unit, after coding, binary code is vector coding information.If adopt method as described in embodiment two when coding, when decoding, realize by following steps:
Step 3030, obtain described vector coding information and vector at the corresponding relation of the location index information in grid vector space;
The coded message here can be vector described in embodiment two as described in the grid vector space with respect to the relative position index information of a reference position, do not repeat them here.Can obtaining by the side information in code stream when obtaining this corresponding relation, can be also that decoding end presets, and can also obtain by other method, and this is not construed as limiting the invention.
Step 3031, obtain described vector in the location index information in grid vector space according to this corresponding relation, and the source binary code find described vector in described grid vector space in.
For example: the mapping table that decoding end obtains as shown in Table 2 above, and resolve binary code after the coding obtain and be harbour " 110 " with the vector of the 5 bits of encoded binary code 00011 at the relative position of a relative reference position in grid vector space, according to the fiducial value in table 2, obtaining vector is 35 in the position in grid vector space, and the source binary code search this vector in the grid vector space in is { 0,0,0,0,0,0,1,1}.
Being appreciated that said process is the inverse process of coding method, is complementary with bit plane coding method, has improved code efficiency at coding side, decoding end also can be same the raising decoding efficiency.
After the source binary code of step 304, acquisition bit planes at different levels, by source binary code and the supplementary reduction source signal of described bit planes at different levels.
Coding side is the restriction due to the code stream bit in when coding, coding side may all not encoded all levels in the bit plane that generates, decoding end need to be reduced the source binary code according to the binary code after coding when decoding, and by supplementary as: in bit plane, how many levels are encoded, and perhaps bit plane is all encoded etc. and the source quantized signal could be restored.
Be appreciated that the restriction due to the code stream bit, coding side can not be encoded to all grades bit plane when encoding, and has rudimentary bit plane and fails coding, causes the loss of accuracy, and the signal that decodes of decoding end will be lossy.When the coding side vector coding, bit plane being encoded can make when encoding in the embodiment of the present invention uses bit quantity to reduce, other levels in the bits of encoded bit plane of multiresidue are more just arranged simultaneously, in the bit plane of coding side coding, the binary code number can increase like this, correspondingly, the loss meeting of the signal of decoding end reduction reduces.
In addition the bit plane coding/decoding method of above-mentioned the present embodiment be binary code according to the flag plane coding mode with the coding of bit plane after binary code decode, restore source signal, when the binary code of described flag plane coding mode is the vector coding pattern, the bit that coding side uses is fewer, therefore the relative prior art of bit of the decoding of decoding end also can reduce, thereby makes decoding efficiency improve.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the relevant hardware of instruction complete by program, this program can be stored in a computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
System embodiment one, a kind of communication system, structural representation comprises as shown in Figure 9: coding module 100 and decoder module 200, wherein:
Described coding module 100 is used for the information on present bit plane is mated with the information that presets, if be consistent, the coding mode with described present bit plane is chosen as the vector coding pattern; According to described vector coding pattern, the binary code on present bit plane is encoded and obtain encoding rear binary code; Binary code after the coding on the binary code of the described present bit plane coding mode of sign and described present bit plane is write into code stream accordingly; If bit residue is arranged in described code stream, with the next stage bit plane on described present bit plane as the present bit plane, and carry out the step that described information with the present bit plane and the information that presets are mated;
Described decoder module 200 for the bit stream data that receives described coding module 100, is resolved described bit stream data, when the binary code that obtains the flag plane coding mode is the vector coding pattern, obtains the vector coding information of described bit plane; Accordingly the vector coding information of described bit plane is decoded according to described vector coding pattern, obtain the source binary code of described bit plane, and return to the parsing bit stream data next stage bit plane of described bit plane is decoded.
In the communication system of the present embodiment, coding module 100 is by comparing the information of bit plane and the information that presets to select the corresponding coding mode of bit plane, when being consistent, be chosen as the vector coding pattern, and the information after according to the vector coding pattern-coding is write into code stream with bit plane, adopt simple method bitplanes to select to encode after coding mode, simplified and selected the calculating degree of coding mode, thereby can improve code efficiency and precision; And be chosen as the vector coding pattern when being consistent, can reducing coding and use bit, improve the efficient of Bit-Plane Encoding.Simultaneously, decoder module 200 is decoded according to the coding mode of bit plane, and when decoding according to the vector coding pattern, the bit number of decoding is less, has improved decode rate.
Apparatus embodiments one, a kind of encoding device, structural representation comprises as shown in figure 10: preset information storage element 10, matching unit 11, vector selected cell 12, coding unit 13 and code stream form unit 14, wherein:
Preset information storage element 10 is used for storing preset information;
Here the information that presets can be the distributed intelligence of the binary code on indicating bit plane, as the bit plane binary code word be 1 number greater than several, or the number of " 0 " code word that distributes between two " 1 " code in bit plane is greater than several etc.; Can be also the position information of indication bit plane, be the MSB position as bit plane, or the LSB position, or other etc.; Can also be other information of indication bit plane.
Matching unit 11 is used for the information on the present bit plane preset information with 10 storages of described preset information storage element is mated;
The lowest order information that comprises the signal after the indicating bit plane is described quantification when information that preset information storage element 10 stores, matching unit 11 are that MSB position or LSB position or other etc. and preset information mate in this way with the position information on present bit plane when coupling.
Vector selected cell 12 is used for result when described matching unit 11 couplings for being consistent, and the coding mode with described present bit plane is chosen as the vector coding pattern;
The vector coding pattern here can be grid vector coding mode etc.
Coding unit 13 is used for the vector coding pattern selected according to described vector selected cell 12 binary code on present bit plane is encoded;
Code stream forms unit 14, the binary code that is used for the binary code of sign present bit plane coding mode that described vector selected cell 12 is selected and the present bit plane after described coding unit 13 codings is write into code stream accordingly, if the bit residue is arranged in described code stream, with the next stage bit plane on described present bit plane as the present bit plane, and notify described matching unit 11 to mate.
In the encoding device of the present embodiment, by matching unit 11, the information of bit plane and the information that presets are compared to select the corresponding coding mode of bit plane, when being consistent, vector selected cell 12 is chosen as the vector coding pattern, and the information that code stream forms encode coding unit 13 in unit 14 according to vector coding pattern bitplanes after is write into code stream.Encoding device of the present invention can adopt simple method bitplanes to select to encode after coding mode, has simplified and has selected the calculating degree of coding mode, thereby can improve code efficiency and precision; And be chosen as the vector coding pattern when being consistent, can reducing coding and use bit, improve the efficient of Bit-Plane Encoding; The user can revise the information that is used for selecting the vector coding pattern that stores in preset information storage element 10 according to practical application in addition, has improved user's experience.
Apparatus embodiments two, a kind of encoding device, structural representation as shown in figure 11, the encoding device of the present embodiment is compared with apparatus embodiments one has increased distribution statistics unit 15, and mode selecting unit 16, wherein:
Distribution statistics unit 15 is used for comprising when the preset information of described preset information storage element 10 distributed intelligence of the binary code word of bit plane, adds up the distribution of binary code in described present bit plane;
Be that 1 number is greater than the information of reference quantity when preset information that described preset information storage element 10 stores comprises binary code in the indicating bit plane, or in the indicating bit plane binary code be 0 number less than the information of reference quantity, described reference quantity is to determine according to the signal length after described quantification; The information of described distribution statistics unit 15 statistics comprises: in statistics present bit plane, binary code is 1 or 0 number;
Mode selecting unit 16, the result that is used for when described matching unit 11 couplings is inconsistent, the coding mode with described present bit plane is chosen as direct coding pattern or Run-Length Coding pattern.
In the present embodiment, comprise the distributed intelligence of the binary code word of bit plane when the preset information that presets storage element 10 storages, the distribution of binary code in the described present bit of statistics plane, distribution statistics unit 15, after the preset information that matching unit 11 stores information and the described preset information storage element 10 of distribution statistics unit 15 statistics mates, if be consistent, vector selected cell 12 is the vector coding pattern for the coding mode of present bit plane selection; If inconsistent, be chosen as direct coding pattern or Run-Length Coding pattern by mode selecting unit 16 for the coding mode on present bit plane.The vector coding pattern of being selected according to vector selected cell 12 by coding unit 13 is again encoded to the binary code on present bit plane, or the coding mode of selecting according to mode selecting unit 16 is encoded to the binary code on present bit plane.at last, the binary code that is formed the binary code of the sign present bit plane coding mode of unit 14 being selected by described vector selected cell 12 and the present bit plane after described coding unit 13 codings by code stream is write into code stream accordingly, or the binary code on the binary code of the sign present bit plane coding mode selected of mode selecting unit 16 and the present bit plane after described coding unit 13 codings is write into code stream accordingly, if the bit residue is arranged in described code stream, with the next stage bit plane on described present bit plane as the present bit plane, and notify described matching unit 11 to mate.
In the present embodiment, encoding device carries out Bit-Plane Encoding the distribution of the binary code of statistics and the preset information of preset information storage element 10 in distribution statistics unit 15 is compared, this method is fairly simple, thereby makes encoding device adopt simple structure just can realize improving the purpose of code efficiency.
Apparatus embodiments three, a kind of encoding device, structural representation as shown in figure 12, the encoding device of the present embodiment and apparatus embodiments one have been compared refinement coding unit 13 comprises: the grid vector space forms unit 131, corresponding relation generation unit 132 and coded message and obtains unit 133, wherein:
Grid vector resolving cell 131, be used for when described vector selected cell 12 be the grid vector coding mode for the coding mode of present bit plane selection, the binary code of this grade bit plane is decomposed at least one vector;
Corresponding relation generation unit 132 is used for generating at least one vector that described grid vector resolving cell 131 decomposes at the location index information in described grid vector space and the corresponding relation of coded message;
Alternatively, described corresponding relation generation unit 132 can comprise Region Decomposition unit 142, reference position determining unit 152 and associative cell 162, described Region Decomposition unit 142, the dimension that is used at least one vector of decomposing according to described grid vector resolving cell 131 is divided into a plurality of zones with the position in described grid vector space; Described reference position determining unit 152 is used for indicating with corresponding identification information respectively a plurality of zones of described Region Decomposition unit 142 decomposition, and determines a reference position in each zone; Described associative cell 162, index information corresponding to reference position that is used for the identification information in location index information, indication a plurality of zones in a plurality of zones that described Region Decomposition unit 142 is decomposed and described a plurality of zones carries out related, forms corresponding relation.
Coded message obtains unit 133, is used for the coded message that corresponding relation that the associative cell 162 according to described corresponding relation generation unit 132 generates obtains described at least one vector, and described coded message is binary code after the coding of described at least one vector.Be appreciated that vector that the coded message here comprises that grid vector resolving cell 131 the resolves into relative position index information with respect to a reference position in the grid vector space.
Described code stream forms unit 14 coded message that described coded message obtains unit 133 acquisitions is write into code stream.
Alternatively, this coding unit 13 can also comprise: sequencing unit 134, being used for comprising two above vectors when at least one vector that described grid vector resolving cell 131 decomposes, is that 1 number is carried out priority ordering to described two above vectors according to binary code in each vector.And coded message obtains unit 133 and encodes according to the vector of the order of the vector in sequencing unit 134 bitplanes.
In the present embodiment refinement coding unit 13, when the coding mode of selecting for the present bit plane when vector selected cell 12 is the grid vector coding mode, generate corresponding relation by corresponding relation generation unit 132, the grid vector of complexity is mapped with simple coded message, and coded message is write into code stream.When encoding with available technology adopting grid vector coding mode, the grid vector of complexity need to be write into code stream and compare, the encoding device that the present embodiment adopts can reduce bit to be used, and improves code rate.
Apparatus embodiments four, a kind of decoding device, structural representation comprises as shown in figure 13: resolution unit 30, decoding unit 31 and reduction unit 32, wherein:
Resolution unit 30 is used for resolving the bit stream data that receives, and when the binary code that obtains the flag plane coding mode is the vector coding pattern, obtains the vector coding information of described bit plane;
Decoding unit 31, be used for accordingly the vector coding information of described bit plane being decoded according to the vector coding pattern that described resolution unit 30 is resolved, obtain the source binary code of described bit plane, and return to described resolution unit parsing bit stream data the next stage bit plane of described bit plane is decoded.
Alternatively, decoding unit 31 can comprise: corresponding relation obtains unit 310 and searches unit 311, wherein: described corresponding relation obtains unit 310, is used for obtaining vector coding information that described resolution unit 30 obtains and vector at the corresponding relation of the location index information in grid vector space; The described unit 311 of searching, be used for obtaining according to described corresponding relation the corresponding relation that unit 310 obtains and obtain described vector in the location index information in grid vector space, and utilize the source binary code of described location index information find described vector in described grid vector space in.
The decoding device of the present embodiment can be saved coding and use bit with respect to encoding device when encoding due to encoding device, make the bit of decoding when decoding also can relatively reduce, thereby improved decoding efficiency.
Can find out, bit plane coding method of the present invention is to compare to select the corresponding coding mode of bit plane by the information with bit plane with the information that presets, when being consistent, be chosen as the vector coding pattern, and the information after according to the vector coding pattern-coding is write into code stream with bit plane.Bit plane coding method of the present invention can adopt simple method bitplanes to select to encode after coding mode, has simplified and has selected the calculating degree of coding mode, thereby can improve code efficiency and precision; And be chosen as the vector coding pattern when being consistent, can reducing coding and use bit, improve the efficient of Bit-Plane Encoding; The user can preset to select the information of vector coding pattern at coding side according to practical application in addition, has improved user's experience.
Above Bit-Plane Encoding and coding/decoding method, communication system and the relevant device that the embodiment of the present invention is provided is described in detail, used specific embodiment herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.