CN108809521A - A kind of variable length decoding method, device and length variable decoder - Google Patents
A kind of variable length decoding method, device and length variable decoder Download PDFInfo
- Publication number
- CN108809521A CN108809521A CN201810672004.2A CN201810672004A CN108809521A CN 108809521 A CN108809521 A CN 108809521A CN 201810672004 A CN201810672004 A CN 201810672004A CN 108809521 A CN108809521 A CN 108809521A
- Authority
- CN
- China
- Prior art keywords
- max
- equal
- absolute value
- symbol
- transmission time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0014—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the source coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0036—Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the receiver
Landscapes
- Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The embodiment provides a kind of variable length decoding method, device and length variable decoders, it is related to field of communication technology, it solves and when configured transmission while being related to absolute value and when symbol is separately encoded in the prior art, when transmission channel has noise jamming, since length variable decoder can not correctly identify that each transmission character corresponds to the position of code word in the bitstream, along with absolute value and symbol correspond to different code books, therefore the problem of accurately can not correctly restore source signal.This method includes determining the first boundary moment l that stage and fixed stage are dissipated in lattice structureds, fixed stage and merging phase the second boundary moment lsc;According to the symbol posterior probability of each symbol code word in the absolute value posterior probability of each absolute value code word in Parameter Estimation Method, first of transmission time absolute value code book and first of transmission time symbol code book, the information transmitted in first of transmission time is determined.The embodiment of the present invention is used for the manufacture of length variable decoder.
Description
Technical field
The present invention relates to a kind of field of communication technology more particularly to variable length decoding method, device and length variable decoders.
Background technology
As shown in Figure 1, in digital communication, for better transmission character in the channel, source encoder is according to default
Coding rule source signal is converted into bit stream, bit is then streamed to by source decoder by channel, is then believed
Bit stream is converted and is reverted to raw information, wherein coding rule and decoding rule by source decoder according to preset decoding rule
It corresponds;In order to obtain better compression effectiveness in the transmission, variable-length encoding (full name in English can be used:variable-
Length codes, referred to as:VLCs) the information source character of each quantization is mapped as to the bit combination of different number.Due to
VLCs has preferable compression performance, therefore in the communications, VLCs is widely used in image, video and audio coding decoding, than
The widely used high-performance Advanced Audio Coder HE-AAC such as in wireless flow media.In the case where transmitting errorless, VLCs
Decoder can correctly identify that each character corresponds to the beginning and end position of code word in the bitstream, but error-prone
It can not correctly be identified under channel situation, cause serious distortion.And it is once wrong, mistake can accumulate down always.Cause
This is for VLCs, with greater need for a kind of good decoder of robustness.
Some researchs are by means of lattice (trellis) representation, in conjunction with some Soft Inform ation soft-decision decoding sides at present
Method improves robustness.The advantage of lattice representation is that takes into account all possible transmitted bit sums of a certain transmission time.
In traditional lattice representation, the character at all moment is encoded based on same code book, and for some parameters, point
Absolute value and symbol (such as the spectral coefficient of the quantization in high-performance Advanced Audio Coding HE-AAC this ginseng of other transmission character
Number), it is related to absolute value and symbol and is encoded based on different variable-length encoding code books, therefore in order to use soft-decision decoding method
The robustness similar to the spectral coefficient quantified in HE-AAC is improved, needs a kind of decoding based on novel lattice representation
Device, more accurately to restore source signal.
It can be seen from the above, working as transmission when configured transmission is related to absolute value simultaneously and symbol is separately encoded in the prior art
When channel has noise jamming, since length variable decoder can not correctly identify that each transmission character corresponds to the position of code word in the bitstream
Set, along with absolute value and symbol correspond to different code books, how more accurately by source signal correctly restore at
For a urgent problem to be solved.
Invention content
A kind of variable length decoding method of the embodiment of the present invention offer, device and length variable decoder, solve in the prior art
When configured transmission is related to absolute value simultaneously and symbol is separately encoded, when transmission channel has noise jamming, due to variable length decoding
Device can not correctly identify that each transmission character corresponds to the position of code word in the bitstream, along with absolute value and symbol correspond to difference
Code book, therefore the problem of accurately source signal correctly can not be restored.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that:
First aspect, the embodiment of the present invention provide a kind of variable length decoding method, including:Obtain the word transmitted in bit stream
The total B and total bit number R of symbol;Wherein, each character includes absolute value and symbol, and each absolute value and each symbol are single respectively
It solely transmits and is encoded with different code books, each absolute value corresponding absolute value code word in absolute value code book, each
Symbol corresponding symbol code word in symbol code book, the coding mode that absolute value code book uses is variable-length encoding, symbol code book
The coding mode used is variable-length encoding;Wherein, B is the integer more than 0, and R is the integer more than 0;According in absolute value code book
The minimum number bits N that absolute value code word occupiesminWith maximum number bits Nmax, symbol code word occupies in symbol code book minimum bit
The total B and total bit number R of number x and maximum number bits t, character are determined and are dissipated the of stage and fixed stage in lattice structure
One boundary moment lds, fixed stage and merging phase the second boundary moment lsc;According to the first boundary moment ldsAnd the second boundary
Moment lsc, determine the first set of the corresponding state of first of transmission time absolute value and the second collection of the corresponding state of symbol
It closes;Wherein, the minimum value of first of transmission time first set is Vstart, the maximum value of first of transmission time first set is
Vend, the minimum value of first of transmission time second set is V'start, the maximum value of first of transmission time second set is V'end;
Wherein, first set includes at least one possible state, and the state in first set refers to have been passed by the end of the current transmission moment
The total bit number of absolute value, second set include at least one possible state, and the state in second set refers to by the end of current
Transmission time has passed the total bit number of symbol, includes in the corresponding first set of each transmission time in the diverging stage
The total quantity of state shows a rising trend, the state for including in the corresponding first set of each transmission time in the fixed stage
Total quantity remain unchanged, the sum for the state for including in the corresponding first set of each transmission time in merging phase
Amount gradually decreases, and until reaching known character sum B and total number of bits R, diverging stage, fixed stage or merging phase are only
It is distinguished for absolute value;Obtain prior probability and bit error probability;The transmitted according to absolute value code book, each transmission time
The V of one setstart, first set Vend, prior probability and bit error probability, determine in each transmission time absolute value code
The absolute value posterior probability of each absolute value code word in this;The second set transmitted according to symbol code book, each transmission time
V'start, second set V'end, prior probability and bit error probability, determine each in each transmission time symbol code book
The symbol posterior probability of symbol code word;According in Parameter Estimation Method, first of transmission time absolute value code book each absolute value it is exhausted
To the symbol posterior probability of each symbol in value posterior probability and first of transmission time symbol code book, first of transmission time is determined
The information of middle transmission.
Optionally, the minimum number bits N occupied according to absolute value code word in absolute value code bookminWith maximum number bits Nmax、
Minimum number bits x and maximum number bits t, the total B of the character and total bit number R that symbol code word occupies in symbol code book are determined
The first boundary moment l in stage and fixed stage is dissipated in lattice structureds, fixed stage and merging phase the second boundary moment
lsc, including:The minimum number bits N occupied according to absolute value code word in absolute value code bookminWith maximum number bits Nmax, symbol code book
Minimum number bits x and maximum number bits t, the total B of the character and total bit number R that middle symbol code word occupies, determine lattice structure
The minimum number bits N' of the practical code word used of middle absolute valueminWith the maximum of the practical code word used of absolute value in lattice structure
Bit number N'max, intermediate variable R' and intermediate variable l';Wherein,
N'min=max (R-Nmax×(B-1)-t×B,Nmin);
N'max=min (R-Nmin×(B-1),Nmax);
Wherein, the smallest positive integral value that R' is the R for meeting variable formula ", variable formula are:
R " fromStart, constantly add 1, as R and " stops adding 1 when meeting the variable formula;
According to determining minimum number bits N'min, maximum number bits N'max, intermediate variable R' and intermediate variable l', determine lattice
The second boundary moment l of stage and merging phase is fixed in type structurescAnd the sum for the state in first set including is most
Big value qmax;According to qmax, determine the first boundary moment l that stage and fixed stage are dissipated in lattice structuredsAnd second set
The maximum value of the sum for the state for including inside is equal to qmax+t。
Optionally, according to determining minimum number bits N'min, maximum number bits N'max, intermediate variable R' and intermediate variable
L' determines the second boundary moment l in fixed stage and merging phasescAnd the maximum of the sum for the state in first set including
Value qmax, including:
When determining R≤NminWhen × B+t, the second boundary moment lscEqual to B, maximum value qmaxEqual to R-N'min×B+1;
When determining R≤Nmax×(B-l')+NminWhen × l'+t × (B-l'+1), the second boundary moment lscIt is equal toMaximum value qmaxEqual to R-N'min×B+1;
When determining R < R', the second boundary moment lscIt is equal toMaximum value qmaxIt is equal to
(N'max-N'min+t)×(B-lsc)+t+1;
When determining R < NmaxWhen × B+t × (B-1), the second boundary moment lscIt is equal toMaximum value qmax
Equal to (N'max+t)×B-R+1;
When determining R >=NmaxWhen × B+t × (B-1), the second boundary moment lscEqual to B, maximum value qmaxEqual to (N'max+t)
×B-R+1;
According to qmax, determine the first boundary moment l that stage and fixed stage are dissipated in lattice structuredsAnd second set
The maximum value of the sum for the state for including inside is equal to qmax+ t, including:
According to maximum value qmax, determine the first boundary moment ldsIt is equal toThe shape for including in second set
The maximum value of the sum of state is equal to qmax+t。
Optionally, according to the first boundary moment ldsWith the second boundary moment lsc, determine first of transmission time absolute value pair
The second set of the corresponding state of first set and symbol for the state answered, including:
When determine transmission time l be less than or equal to the first boundary moment ldsWhen, determine the V of first setstartEqual to N'min
× l, the V of first setendEqual to N'max× l+t × (l-1), the V' of second setstartEqual to max (Vstart,R-N'max×
(B-l)-t × (B-l)), the V' of second setendEqual to min (Vend+t,R-N'min×(B-l));
When determine transmission time l be more than the first boundary moment ldsAnd transmission time l is less than or equal to the second boundary moment lsc
When, determine the V of first setstartEqual to max (N'min×l,R-t×(B-l+1)-N'max× (B-l)), the V of first setend
Equal to Vstart+qmax- 1, the V' of second setstartEqual to max (Vstart,R-N'max× (B-l)-t × (B-l)), second set
V'endEqual to min (Vend+t,R-N'min×(B-l));
When determine transmission time l be more than the second boundary moment lscWhen, determine the V of first setstartEqual to max (N'min×
l,R-t×(B-l+1)-N'max× (B-l)), the V of first setendEqual to R-N'min× (B-l), the V' of second setstartDeng
In min (Vstart+t,R-t×(B-l)-N'max× (B-l)), the V' of second setendEqual to R-N'min×(B-l)。
Second aspect, the embodiment of the present invention provide a kind of variable length decoding device, including:Acquisition module, for obtaining ratio
The total B and total bit number R of the character transmitted in spy's stream;Wherein, each character includes absolute value and symbol, each absolute value and
Each symbol is individually transmitted and is encoded with different code books, and each absolute value corresponds to one absolutely in absolute value code book
To being worth code word, each symbol corresponding symbol code word in symbol code book, the coding mode that absolute value code book uses is elongated
Coding, the coding mode that symbol code book uses is variable-length encoding;Wherein, B is the integer more than 0, and R is the integer more than 0;Processing
Module, the minimum number bits N for being occupied according to absolute value code word in absolute value code bookminWith maximum number bits Nmax, symbolic code
The total B and acquisition mould of the character of symbol code word occupies in this minimum number bits x and maximum number bits t, acquisition module acquisition
The total bit number R that block obtains determines the first boundary moment l that stage and fixed stage are dissipated in lattice structureds, fixed stage with
The second boundary moment l of merging phasesc;Processing module is additionally operable to according to the first boundary moment ldsWith the second boundary moment lsc,
Determine the first set of the corresponding state of first of transmission time absolute value and the second set of the corresponding state of symbol;Wherein,
The minimum value of first of transmission time first set is Vstart, the maximum value of first of transmission time first set is Vend, first
The minimum value of transmission time second set is V'start, the maximum value of first of transmission time second set is V'end;Wherein, first
Set includes at least one possible state, and the state in first set refers to has passed the total of absolute value by the end of the current transmission moment
Bit number, second set include at least one possible state, and the state in second set refers to be passed by the end of the current transmission moment
The total bit number of complete symbol, the sum for the state for including in the corresponding first set of each transmission time in the diverging stage
Amount shows a rising trend, and the total quantity for the state for including in the corresponding first set of each transmission time in the fixed stage is protected
The total quantity for holding constant, to include in the corresponding first set of each transmission time in merging phase state gradually subtracts
Few, until reaching known character sum B and total number of bits R, diverging stage, fixed stage or merging phase are only for absolute
Value is distinguished;Acquisition module is additionally operable to obtain prior probability and bit error probability;Processing module is additionally operable to according to absolute value code
Originally, the V of the first set of each transmission time transmissionstart, first set Vend, acquisition module obtain prior probability and obtain
The bit error probability that modulus block obtains determines the absolute value of absolute value code word each in each transmission time absolute value code book
Posterior probability;Processing module is additionally operable to the V' for the second set transmitted according to symbol code book, each transmission timestart, second collection
The V' of conjunctionend, acquisition module obtain prior probability and acquisition module obtain bit error probability, determine in each transmission
Carve the symbol posterior probability of each symbol code word in symbol code book;Processing module is additionally operable to according to Parameter Estimation Method, first of biography
Each symbol in the absolute value posterior probability of each absolute value and first of transmission time symbol code book in defeated moment absolute value code book
Symbol posterior probability, determine the information transmitted in first of transmission time.
Optionally, processing module is specifically used for the minimum number bits N occupied according to absolute value code word in absolute value code bookmin
With maximum number bits Nmax, symbol code word occupies in symbol code book minimum number bits x and maximum number bits t, acquisition module obtain
Character total B and acquisition module obtain total bit number R, determine that the practical code word used of absolute value is most in lattice structure
Small bit number N'minWith the maximum number bits N' of the practical code word used of absolute value in lattice structuremax, intermediate variable R' and centre
Variable l';Wherein,
N'min=max (R-Nmax×(B-1)-t×B,Nmin);
N'max=min (R-Nmin×(B-1),Nmax);
Wherein, the smallest positive integral value that R' is the R for meeting variable formula ", variable formula are:
R " fromStart, constantly add 1, as R and " stops adding 1 when meeting the variable formula;
Processing module is specifically used for according to determining minimum number bits N'min, maximum number bits N'max, intermediate variable R' and
Intermediate variable l' determines the second boundary moment l that stage and merging phase are fixed in lattice structurescAnd include in first set
State sum maximum value qmax;Processing module is specifically used for according to qmax, determine and dissipate stage and fixation in lattice structure
The first boundary moment l in stagedsAnd the maximum value of the sum for the state in second set including is equal to qmax+t。
Optionally, processing module is specifically used for as determining R≤NminWhen × B+t, the second boundary moment lscIt is maximum equal to B
Value qmaxEqual to R-N'min×B+1;
Processing module is specifically used for as determining R≤Nmax×(B-l')+NminWhen × l'+t × (B-l'+1), the second boundary
Moment lscIt is equal toMaximum value qmaxEqual to R-N'min×B+1;
Processing module, specifically for when determining R < R', the second boundary moment lscIt is equal to
Maximum value qmaxEqual to (N'max-N'min+t)×(B-lsc)+t+1;
Processing module is specifically used for as determining R < NmaxWhen × B+t × (B-1), the second boundary moment lscIt is equal toMaximum value qmaxEqual to (N'max+t)×B-R+1;
Processing module is specifically used for as determining R >=NmaxWhen × B+t × (B-1), the second boundary moment lscIt is maximum equal to B
Value qmaxEqual to (N'max+t)×B-R+1;
Processing module is specifically used for according to maximum value qmax, determine the first boundary moment ldsIt is equal to
The maximum value of the sum for the state for including in second set is equal to qmax+t。
Optionally, processing module is specifically used for being less than or equal to the first boundary moment l as determining transmission time ldsWhen, really
Determine the V of first setstartEqual to N'min× l, the V of first setendEqual to N'max× l+t × (l-1), second set
V'startEqual to max (Vstart,R-N'max× (B-l)-t × (B-l)), the V' of second setendEqual to min (Vend+t,R-N'min
×(B-l));
Processing module is specifically used for being more than the first boundary moment l as determining transmission time ldsAnd transmission time l is less than or waits
In the second boundary moment lscWhen, determine the V of first setstartEqual to max (N'min×l,R-t×(B-l+1)-N'max×(B-
L)), the V of first setendEqual to Vstart+qmax- 1, the V' of second setstartEqual to max (Vstart,R-N'max×(B-l)-t
× (B-l)), the V' of second setendEqual to min (Vend+t,R-N'min×(B-l));
Processing module is specifically used for being more than the second boundary moment l as determining transmission time lscWhen, determine first set
VstartEqual to max (N'min×l,R-t×(B-l+1)-N'max× (B-l)), the V of first setendEqual to R-N'min× (B-l),
The V' of second setstartEqual to min (Vstart+t,R-t×(B-l)-N'max× (B-l)), the V' of second setendEqual to R-
N'min×(B-l)。
The third aspect, the embodiment of the present invention provide a kind of length variable decoder, include any one provided such as second aspect
Variable length decoding device.
The embodiment of the present invention provides a kind of variable length decoding method, passes through the ratio in the total B and bit stream of transmission character
Special sum R, the minimum number bits N of absolute value code word in absolute value code bookminWith maximum number bits Nmax, symbolic code in symbol code book
The minimum number bits x and maximum number bits t of word, determine boundary moment ldsAnd lsc, may thereby determine that the character received belongs to
Which in stage;And according to the V for the first set that absolute value code book, each transmission time transmitstart, first set Vend, first
Probability and bit error probability are tested, determines the absolute value posteriority of absolute value code word each in each transmission time absolute value code book
Probability;According to the V' for the second set that symbol code book, each transmission time transmitstart, second set V'end, prior probability and
Bit error probability determines the symbol posterior probability of symbol code word each in each transmission time symbol code book;According to parameter
The absolute value posterior probability and first of transmission time symbol of each absolute value in the estimation technique, first of transmission time absolute value code book
The symbol posterior probability of each symbol, determines the information transmitted in first of transmission time in code book;Since reception can be told
To bit stream in each possible initial state of character corresponding bit stream therefore can more accurately know each transmission
The information of moment transmission solves and when configured transmission while being related to absolute value in the prior art and when symbol is separately encoded, working as biography
When defeated channel has noise jamming, since length variable decoder can not correctly not identify that each transmission character corresponds to code word in the bitstream
Position, along with absolute value and symbol correspond to different code books, therefore the problem of accurately can not correctly restore source signal.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is the configuration diagram of telecommunication transmission system in the prior art;
Fig. 2 provides a kind of flow diagram of variable length decoding method for the embodiment of the present invention;
Fig. 3-a provide a kind of one of schematic diagram of the lattice representation of variable length decoding method for the embodiment of the present invention;
Fig. 3-b provide the two of a kind of schematic diagram of the lattice representation of variable length decoding method for the embodiment of the present invention;
Fig. 3-c provide the three of a kind of schematic diagram of the lattice representation of variable length decoding method for the embodiment of the present invention;
Fig. 3-d provide the four of a kind of schematic diagram of the lattice representation of variable length decoding method for the embodiment of the present invention;
Fig. 3-e provide the five of a kind of schematic diagram of the lattice representation of variable length decoding method for the embodiment of the present invention;
Fig. 4 provides a kind of structural schematic diagram of variable length decoding device for the embodiment of the present invention.
Reference numeral:
Variable length decoding device -10;
Acquisition module -101;Processing module -102.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
For the ease of clearly describing the technical solution of the embodiment of the present invention, in an embodiment of the present invention, use " the
One ", the printed words such as " second " distinguish function and the essentially identical identical entry of effect or similar item, and those skilled in the art can
To understand that the printed words such as " first ", " second " are not to be defined to quantity and execution order.
It should be noted that in the embodiment of the present invention, " illustrative " or " such as " etc. words make example, example for indicating
Card or explanation.Be described as in the embodiment of the present invention " illustrative " or " such as " any embodiment or design scheme do not answer
It is interpreted than other embodiments or design scheme more preferably or more advantage.Specifically, " illustrative " or " example are used
Such as " word is intended to that related notion is presented in specific ways.
In actual application, each transmission time l, it is possible to transmit absolute value, it is also possible to transmit symbol;In view of elder generation
It passes absolute value and passes symbol again, it is two transmission node l that the present invention, which defines each transmission time l to be divided to,c(i.e. lcEqual to 1,2 ..., 2 ×
B});Wherein, odd number lcRepresent the absolute value of the character received, even number lcThe symbol for receiving the character is represented, specifically
Realization process is as follows:
Since each character includes absolute value and symbol, so we assume that the absolute value of the spectral coefficient of quantization and corresponding
Symbol share the same transmission time l and be equal to { 1,2,3,4 }, i.e., a character is transmitted in each transmission time l;Such as Fig. 3-a
Shown in Fig. 3-e, abscissa illustrates transmission node lc, ordinate qlcIllustrate the state of each transmission node, absolute value code
The bit number that word occupies includes 1,2 or 3 three kind of (i.e. Nmin=1, Nmax=3), the bit number of symbol code word occupancy includes:0,1
Or 2 three kinds (i.e. x=0, t=2), work as lcFor odd number when (lc=2 × l-1), all possible states composition of the transmission node is exhausted
To the first set of value;Work as lcFor even number when (lc=2 × l), the second collection of all possible states composition symbol of the transmission node
It closes, i.e. when l is equal to 1, expression transmits the 1st character;When l is equal to 2, expression transmits the 2nd character;When l is equal to 3, indicate
Transmit the 3rd character;When l is equal to 4, expression transmits the 4th character;Since each transmission time l includes that two transmission save
Point lc, therefore in each transmission time l, if transmission node lcWhat is transmitted is the absolute value of character, then in lc+ 1 transmission section
What point transmitted is the symbol of the character.
It should be noted that each character transmitted in bit stream might not can carry symbol, such as character of transmission
Just without symbol when being 0, i.e., the symbol that 0 absolute value is 0,0 is empty, need not transmit any bit;Due in symbol code book
Symbol code word occupy bit number constant interval be [x, t], it is contemplated that in actual transmission process there are symbol be it is empty
Situation, i.e. x are equal to 0, and when x is equal to 0, the character only takes up the corresponding bit number of absolute value code word in the bitstream;Therefore, it examines
Consider general scenario, in the variable length decoding method that the embodiment of the present invention provides, the variation zone for the bit number that symbol code word occupies
Between be [0, t], i.e. x be equal to 0.
Specifically, from odd number lc(absolute value) arrives even number lc(symbol), the state change range in lattice structure can be from x to t
(wherein, 0) x is equal to;Opposite, from even number lc(symbol) arrives odd number lc(absolute value), the state change range in lattice structure can
From N'minTo N'max;Illustratively, when the l as shown in Fig. 3-a is equal to 1, including:lcEqual to 1 and lcEqual to 2 two transmission nodes;Its
In, l is equal to 1 and indicates to transmit first character, lcEqual to the absolute value that 1 expression transmits first character, lcIt is indicated equal to 2
The symbol of first character is transmitted, it is each in being equal to 1 that l is equal to the meaning of each transmission node and l during 2, l is equal to 3 and l equal to 4
The meaning of a transmission node is identical, and details are not described herein again.
Specifically, passing absolute value (i.e. odd number l again in view of first passing symbolcRepresent the symbol of the character received, even number
lcRepresent the absolute value for receiving the character), symbol (i.e. odd number l is passed again with absolute value is first passedcRepresent the character received
Absolute value, even number lcRepresent and receive the symbol of the character) realization method it is similar, details are not described herein again.
Embodiment one
The embodiment of the present invention provides a kind of variable length decoding method, includes as shown in Figure 2:
S101, the total B and total bit number R for obtaining the character transmitted in bit stream;Wherein, each character includes absolute value
And symbol, each absolute value and each symbol are individually transmitted and are encoded with different code books, each absolute value is exhausted
To a corresponding absolute value code word in value code book, each symbol a corresponding symbol code word, absolute value code book in symbol code book
The coding mode used is variable-length encoding, and the coding mode that symbol code book uses is variable-length encoding;Wherein, B is whole more than 0
Number, R are the integer more than 0.
It should be noted that in actual application, as shown in Figure 1, source encoder is according to absolute value code book and symbol
Source signal is converted to the bit stream indicated with 0 or 1 by code book.
Illustratively, it is respectively+5, -6 ,+1.2 and 0 to assume that source signal needs 4 characters of transmission ,+5 absolute value pair
It is y to answer the code word in absolute value code book(0)=(1,0,1), it is y that -6 absolute value, which corresponds to the code word in absolute value code book,(1)=
(0), it is y that+1.2 absolute value, which corresponds to the code word in absolute value code book,(2)=(1,1), 0 absolute value correspond in absolute value code book
Code word be y(3)The symbol code word of=(1,0,0), the corresponding symbol code book of "+" number is H(0)=(0), the corresponding symbol code book of "-" number
Symbol code word be H(1)=(0,1), the symbol code word of symbol code book is H when without sign bit(2)=().It (needs to illustrate
It is, when the character of transmission is 0, since the absolute value of character 0 is in 0, and 0 not tape symbol itself, i.e., the bit number of 0 symbol
It is 0, therefore 0 sign bit number is not take up in actual transmission process).
By+5, -6 ,+1.2 and 0, after being converted to bit stream, corresponding bit stream can be expressed as:1010001110100
(the total B of the character of transmission is equal to 4,13) total bit number R is equal to;When the bit stream transmits in transmission channel, decoding apparatus
When receiving the bit stream, need to know any one transmission time, each character corresponding initial position and end in the bitstream
Stop bit is set, and corresponding information could be restored.
S102, the minimum number bits N occupied according to absolute value code word in absolute value code bookminWith maximum number bits Nmax, symbol
Minimum number bits x and maximum number bits t, the total B of the character and total bit number R that symbol code word occupies in number sheet, determine lattice
The first boundary moment l in stage and fixed stage is dissipated in type structureds, fixed stage and merging phase the second boundary moment
lsc。
Optionally, in the variable length decoding method that the embodiment of the present invention provides, according to absolute value code word in absolute value code book
The minimum number bits N of occupancyminWith maximum number bits Nmax, symbol code word occupies in symbol code book minimum number bits x and maximum
Bit number t, the total B of character and total bit number R determine the first boundary moment that stage and fixed stage are dissipated in lattice structure
lds, fixed stage and merging phase the second boundary moment lsc, including:
S1020, the minimum number bits N occupied according to absolute value code word in absolute value code bookminWith maximum number bits Nmax, symbol
Minimum number bits x and maximum number bits t, the total B of the character and total bit number R that symbol code word occupies in number sheet, determine lattice
The minimum number bits N' of the practical code word used of absolute value in type structureminWith the practical code word used of absolute value in lattice structure
Maximum number bits N'max, intermediate variable R' and intermediate variable l';Wherein,
N'min=max (R-Nmax×(B-1)-t×B,Nmin);
N'max=min (R-Nmin×(B-1),Nmax);
Wherein, the smallest positive integral value that R' is the R for meeting variable formula ", variable formula are:
R " fromStart, constantly add 1, as R and " stops adding 1 when meeting the variable formula.
S1021, according to determining minimum number bits N'min, maximum number bits N'max, intermediate variable R' and intermediate variable l',
Determine the second boundary moment l that stage and merging phase are fixed in lattice structurescAnd the state in first set including is total
Several maximum value qmax。
S1022, according to qmax, determine the first boundary moment l that stage and fixed stage are dissipated in lattice structuredsAnd the
The maximum value of the sum for the state for including in two set is equal to qmax+t。
Optionally, S1021 includes in the variable length decoding method that the embodiment of the present invention provides:According to determining minimum bit
Number N'min, maximum number bits N'max, intermediate variable R' and intermediate variable l', determine the second boundary in fixed stage and merging phase
Moment lscAnd the maximum value q of the sum for the state in first set includingmax, including:
S1021-1, when determining R≤NminWhen × B+t, the second boundary moment lscEqual to B, maximum value qmaxEqual to R-N'min×
B+1;
S1021-2, when determining R≤Nmax×(B-l')+NminWhen × l'+t × (B-l'+1), the second boundary moment lscIt is equal toMaximum value qmaxEqual to R-N'min×B+1;
S1021-3, when determining R < R', the second boundary moment lscIt is equal toMaximum value qmax
Equal to (N'max-N'min+t)×(B-lsc)+t+1;
S1021-4, when determining R < NmaxWhen × B+t × (B-1), the second boundary moment lscIt is equal to
Maximum value qmaxEqual to (N'max+t)×B-R+1;
S1021-5, when determining R >=NmaxWhen × B+t × (B-1), the second boundary moment lscEqual to B, maximum value qmaxIt is equal to
(N'max+t)×B-R+1;
S1022, according to qmax, determine the first boundary moment l that stage and fixed stage are dissipated in lattice structuredsAnd the
The maximum value of the sum for the state for including in two set is equal to qmax+ t, including:
S1022-1, according to maximum value qmax, determine the first boundary moment ldsIt is equal toIn second set
Including state sum maximum value be equal to qmax+t。
S103, according to the first boundary moment ldsWith the second boundary moment lsc, determine that first of transmission time absolute value corresponds to
State first set and the corresponding state of symbol second set;Wherein, the minimum of first of transmission time first set
Value is Vstart, the maximum value of first of transmission time first set is Vend, the minimum value of first of transmission time second set is
V'start, the maximum value of first of transmission time second set is V'end;Wherein, first set includes at least one possible shape
State, the state in first set refers to has passed the total bit number of absolute value by the end of the current transmission moment, and second set includes at least
One possible state, the state in second set refers to has passed the total bit number of symbol by the end of the current transmission moment, is located at hair
The total quantity for the state for including in the corresponding first set of each transmission time in the stage of dissipating shows a rising trend, and is located at Fixed-order
The total quantity for the state for including in the corresponding first set of each transmission time in section remains unchanged, and is located in merging phase
The total quantity for the state for including in the corresponding first set of each transmission time gradually decreases, until reaching known character sum
B and total number of bits R, diverging stage, fixed stage or merging phase are distinguished only for absolute value.
Specifically, in actual application, according to traditional lattice representation, present applicant proposes a kind of new lattice tables
Show method, can be directed to absolute value and symbol has the VLCs of different code books.
Illustratively, 4 characters are transmitted with t=2, the absolute value representation of each character is y in absolute value code book(0)=
(1,0,1), y(1)=(0), y(2)=(1,1), y(3)=(1,0,0), the symbolic indication of each character is H in symbol code book(0)=
(0), H(1)=(0,1), H(2)It is illustrated for=();Wherein, the bit number that absolute value code word occupies includes 1,2 or 3 three
Kind, the bit number that symbol code word occupies includes:0,1 or 2 three kind, 5 kinds of differences are set forth as shown in Fig. 3-a to Fig. 3-e
The corresponding lattice tables of total bit number R (R=6, R=10, R=13, R=17 and R=18).
Specifically, it was found that the minimum number bits that absolute value code word occupies in absolute value code book in actual application
NminWith maximum number bits Nmax, symbol code word occupies in symbol code book minimum number bits x and maximum number bits t, character it is total
The minimum number bits N' of number B and total bit number R and the practical absolute value code word used of absolute value in lattice structureminWith lattice knot
The maximum number bits N' of the practical absolute value code word used of absolute value in structuremaxThere are following relationships:
N'min=max (R-Nmax×(B-1)-t×B,Nmin);
N'max=min (R-Nmin×(B-1),Nmax);
Wherein, NminAnd NmaxThe minimum value for having respectively represented all code words in code book (is N in this examplemin=1) and maximum value
(it is N in this examplemax=3).
Correspondingly, for each transmission time, the stage is dissipated, fixed stage and merging phase are only according to the transmission section of odd number
Point lcCorresponding status number, the transmission node l without considering even numbercCorresponding status number.That is, the first boundary moment lds
(diverging stage and fixed stage) and the second boundary moment lsc(fixed stage and merging phase) be about transmission time l (without
It is transmission node lc)。
Illustratively, it is illustrated so that the total bit number of transmission is R=10 as an example as shown in Fig. 3-b, concrete implementation mistake
Journey is as follows:
When l is equal to 1 and lcWhen equal to 1, the absolute value of first character is transmitted, what the absolute value code word that may be transmitted occupied
Bit number includes 1,2 or 3;By the end of current transmission node lcWhen equal to 1, the total number of bits transmitted in bit stream may be 1,
2 or 3;Therefore, lcWhen equal to 1, the first set of absolute value corresponding states is { 1,2,3 }, the i.e. V of first setstartIt is 1,
The V of first setendIt is 3.
When l is equal to 1 and lcWhen equal to 2, the symbol of first character is transmitted, the bit that the symbol code word that may be transmitted occupies
Number includes 0,1 or 2;By the end of current transmission node lcWhen equal to 2, the total number of bits transmitted in bit stream may be 1,2,3,
4 or 5;Therefore, lcWhen equal to 2, the second set of symbol corresponding states is { 1,2,3,4,5 }, the i.e. V' of second setstartFor
1, the V' of second setendIt is 5.
When l is equal to 2 and lcWhen equal to 3, the absolute value of second character is transmitted, what the absolute value code word that may be transmitted occupied
Bit number includes 1,2 or 3;By the end of current transmission node lcWhen equal to 3, the total number of bits transmitted in bit stream may be 2,
3,4,5,6,7 or 8;Therefore, lcWhen equal to 3, the first set of absolute value corresponding states is { 2,3,4,5,6,7,8 }, i.e., the
The V of one setstartIt is 2, the V of first setendIt is 8.
When l is equal to 2 and lcWhen equal to 4, the symbol of second character is transmitted, the bit that the symbol code word that may be transmitted occupies
Number includes 0,1 or 2;By the end of current transmission node lcWhen equal to 4, the total number of bits transmitted in bit stream may be 2,3,4,
5,6,7 or 8;Therefore, lcWhen equal to 4, the second set of symbol corresponding states is { 2,3,4,5,6,7,8 }, i.e. second set
V'startIt is 2, the V' of second setendIt is 8.
When l is equal to 3 and lcWhen equal to 5, the absolute value of third character is transmitted, what the absolute value code word that may be transmitted occupied
Bit number includes 1,2 or 3;By the end of current transmission node lcWhen equal to 5, the total number of bits transmitted in bit stream may be 3,
4,5,6,7,8 or 9;Therefore, lcWhen equal to 5, the first set of absolute value corresponding states is { 3,4,5,6,7,8,9 }, i.e., the
The V of one setstartIt is 3, the V of first setendIt is 9.
When l is equal to 3 and lcWhen equal to 6, the symbol of third character is transmitted, the bit that the symbol code word that may be transmitted occupies
Number includes 0,1 or 2;By the end of current transmission node lcWhen equal to 6, the total number of bits transmitted in bit stream may be 5,6,7,
8 or 9;Therefore, lcWhen equal to 6, the second set of symbol corresponding states is { 5,6,7,8,9 }, the i.e. V' of second setstartFor
5, the V' of second setendIt is 9.
When l is equal to 4 and lcWhen equal to 7, the absolute value of the 4th character is transmitted, what the absolute value code word that may be transmitted occupied
Bit number includes 1,2 or 3;By the end of current transmission node lcWhen equal to 7, the total number of bits transmitted in bit stream may be 8,
9 or 10;Therefore, lcWhen equal to 7, the first set of absolute value corresponding states is { 8,9,10 }, the i.e. V of first setstartFor
8, the V of first setendIt is 10.
When l is equal to 4 and lcWhen equal to 8, the symbol of the 4th character is transmitted, the bit that the symbol code word that may be transmitted occupies
Number includes 0,1 or 2;By the end of current transmission node lcWhen equal to 8, the total number of bits transmitted in bit stream may be 10;Cause
This, lcWhen equal to 8, the second set of symbol corresponding states is { 10 }, the i.e. V' of second setstartIt is 10, second set
V'endIt is 10.
It can be seen from the above, lcThe first set of absolute value corresponding states is { 1,2,3 }, l when equal to 1cAbsolute value when equal to 3
The first set of corresponding states is { 2,3,4,5,6,7,8 }, lcWhen equal to 5 the first set of absolute value corresponding states be 3,4,
5,6,7,8,9 }, lcThe first set of absolute value corresponding states is { 8,9,10 } when equal to 7;Therefore, lcFirst set when equal to 1
The status number for including inside is 3, lcThe status number for including in first set when equal to 3 is 7, lcInclude in first set when equal to 5
Status number is 7, lcThe status number for including in first set when equal to 7 is 3;Due to from lcL is arrived equal to 1cIt is each transmitted in equal to 3
The status number for including in the first set of node gradually increases, therefore lcEqual to 1, lcEqual to 2 and lcEqual to 3 in diverging rank
Section;Due to from lcL is arrived equal to 3cThe status number for including in the first set of each transmission node in equal to 5 remains unchanged, therefore lc
Equal to 3, lcEqual to 4 and lcEqual to 5 in the fixed stage;Due to from lcL is arrived equal to 5cThe of each transmission node in equal to 7
The status number for including in one set is gradually reduced, therefore lcEqual to 5, lcEqual to 6 and lcMerging phase is in equal to 7;Due to,
In lcEqual to 1, lcEqual to 3, lcEqual to 5 and lcThe maximum for the status number for including in the first set of each transmission node in equal to 7
Value is 7, therefore qmaxEqual to 7.
It should be noted that in practical applications as shown in Fig. 3-a, by the end of lcThe ratio transmitted in bit stream when equal to 5
The maximum value of special sum is 9, and total transmitted bit number is R=10, i.e., by the end of lcThe ratio transmitted in bit stream when equal to 8
Special sum is 10;In view of from lcL is arrived equal to 5cIn equal to 7 each transmission node should at least 1 bit transfer, therefore, by the end of
lcWhen equal to 5, the total number of bits transmitted in bit stream can not possibly be more than 9;In another example by the end of lcWhen equal to 7, passed in bit stream
The maximum value of defeated total number of bits is 10, and total transmitted bit number is R=10, i.e., by the end of lcWhen equal to 8 in bit stream
The total number of bits of transmission is 10;In view of from lcL is arrived equal to 7cTransmission node can be without bit transfer in equal to 8;Therefore, end
To lcThe total number of bits transmitted in bit stream when equal to 7 can be 10.
Specifically, since the maximum value of the sum for the state for including in second set is equal to qmax+ t, and in above-described embodiment
T is equal to 2, therefore the maximum value of the sum for the state for including in second set is equal to qmax+2。
Specifically, the V of the R=6 either first sets of R=13 or R=17 or R=18start, first set Vend、
The V' of second setstart, second set V'end、qmax, the diverging stage, fixed stage and merging phase determination process and R
=10 is similar, and details are not described herein again.
Optionally, in the variable length decoding method that the embodiment of the present invention provides, according to the first boundary moment ldsWith the second side
Boundary moment lsc, determine the corresponding state of first of transmission time absolute value first set and the corresponding state of symbol second
Set, including:
S1030, when determine transmission time l be less than or equal to the first boundary moment ldsWhen, determine the V of first setstartDeng
In N'min× l, the V of first setendEqual to N'max× l+t × (l-1), the V' of second setstartEqual to max (Vstart,R-
N'max× (B-l)-t × (B-l)), the V' of second setendEqual to min (Vend+t,R-N'min×(B-l));
S1031, when determine transmission time l be more than the first boundary moment ldsAnd transmission time l is less than or equal to the second boundary
Moment lscWhen, determine the V of first setstartEqual to max (N'min×l,R-t×(B-l+1)-N'max× (B-l)), the first collection
The V of conjunctionendEqual to Vstart+qmax- 1, the V' of second setstartEqual to max (Vstart,R-N'max× (B-l)-t × (B-l)), the
The V' of two setendEqual to min (Vend+t,R-N'min×(B-l));
S1032, when determine transmission time l be more than the second boundary moment lscWhen, determine the V of first setstartEqual to max
(N'min× l, (B-l+1)-× (B-l)), the V of first setendEqual to R-N'min× (B-l), the V' of second setstartIt is equal to
min(Vstart+t,R-t×(B-l)-N'max× (B-l)), the V' of second setendEqual to R-N'min×(B-l)。
S104, prior probability and bit error probability are obtained.
It should be noted that the calculation of prior probability and bit error probability is similarly to the prior art, herein no longer
It repeats.
The V of S105, the first set transmitted according to absolute value code book, each transmission timestart, first set Vend, first
Probability and bit error probability are tested, determines the absolute value posteriority of absolute value code word each in each transmission time absolute value code book
Probability.
The V' of S106, the second set transmitted according to symbol code book, each transmission timestart, second set V'end, first
Probability and bit error probability are tested, determines the symbol posterior probability of symbol code word each in each transmission time symbol code book.
It is S107, general according to the absolute value posteriority of each absolute value in Parameter Estimation Method, first of transmission time absolute value code book
The symbol posterior probability of each symbol, determines the letter transmitted in first of transmission time in rate and first of transmission time symbol code book
Breath.
The embodiment of the present invention provides a kind of variable length decoding method, passes through the ratio in the total B and bit stream of transmission character
Special sum R, the minimum number bits N of absolute value code word in absolute value code bookminWith maximum number bits Nmax, symbolic code in symbol code book
The minimum number bits x and maximum number bits t of word, determine boundary moment ldsAnd lsc, may thereby determine that the character received belongs to
Which in stage;And according to the V for the first set that absolute value code book, each transmission time transmitstart, first set Vend, first
Probability and bit error probability are tested, determines the absolute value posteriority of absolute value code word each in each transmission time absolute value code book
Probability;According to the V' for the second set that symbol code book, each transmission time transmitstart, second set V'end, prior probability and
Bit error probability determines the symbol posterior probability of symbol code word each in each transmission time symbol code book;According to parameter
The absolute value posterior probability and first of transmission time symbol of each absolute value in the estimation technique, first of transmission time absolute value code book
The symbol posterior probability of each symbol, determines the information transmitted in first of transmission time in code book;Since reception can be told
To bit stream in each possible initial state of character corresponding bit stream therefore can more accurately know each transmission
The information of moment transmission solves and when configured transmission while being related to absolute value in the prior art and when symbol is separately encoded, working as biography
When defeated channel has noise jamming, since length variable decoder can not correctly not identify that each transmission character corresponds to code word in the bitstream
Position, along with absolute value and symbol correspond to different code books, therefore the problem of accurately can not correctly restore source signal.
Embodiment two
The embodiment of the present invention provides a kind of variable length decoding device 10, includes as shown in Figure 4:
Acquisition module 101, the total B for obtaining the character transmitted in bit stream and total bit number R;Wherein, each word
Symbol includes absolute value and symbol, and each absolute value and each symbol are individually transmitted and encoded with different code books, often
A absolute value corresponding absolute value code word in absolute value code book, each symbol corresponding symbolic code in symbol code book
Word, the coding mode that absolute value code book uses is variable-length encoding, and the coding mode that symbol code book uses is variable-length encoding;Wherein, B
For the integer more than 0, R is the integer more than 0.
Processing module 102, the minimum number bits N for being occupied according to absolute value code word in absolute value code bookminAnd high specific
Special number Nmax, the minimum number bits x that symbol code word occupies in symbol code book and the word that maximum number bits t, acquisition module 101 obtain
The total bit number R that the total B and acquisition module 101 of symbol are obtained is determined and is dissipated stage and the first of the fixed stage in lattice structure
Boundary moment lds, fixed stage and merging phase the second boundary moment lsc。
Processing module 102 is additionally operable to according to the first boundary moment ldsWith the second boundary moment lsc, when determining first of transmission
Carve the first set of the corresponding state of absolute value and the second set of the corresponding state of symbol;Wherein, first of transmission time
The minimum value of one set is Vstart, the maximum value of first of transmission time first set is Vend, first of transmission time second set
Minimum value be V'start, the maximum value of first of transmission time second set is V'end;Wherein, first set includes at least one
Possible state, the state in first set refers to has passed the total bit number of absolute value, second set by the end of the current transmission moment
Including at least one possible state, the state in second set refers to has passed total bit of symbol by the end of the current transmission moment
It counting, the total quantity for the state for including in the corresponding first set of each transmission time in the diverging stage shows a rising trend,
The total quantity for the state for including in the corresponding first set of each transmission time in the fixed stage remains unchanged, and is located at and closes
And the total quantity for the state in the corresponding first set of each transmission time in the stage including gradually decreases, it is known until reaching
Character sum B and total number of bits R, diverging stage, fixed stage or merging phase distinguished only for absolute value.
Acquisition module 101 is additionally operable to obtain prior probability and bit error probability.
Processing module 102 is additionally operable to the V for the first set transmitted according to absolute value code book, each transmission timestart,
The V of one setend, acquisition module 101 obtain prior probability and acquisition module 101 obtain bit error probability, determine every
The absolute value posterior probability of each absolute value code word in a transmission time absolute value code book.
Processing module 102 is additionally operable to the V' for the second set transmitted according to symbol code book, each transmission timestart, second
The V' of setend, acquisition module 101 obtain prior probability and acquisition module 101 obtain bit error probability, determine every
The symbol posterior probability of each symbol code word in a transmission time symbol code book.
Processing module 102 is additionally operable to according to each absolute value in Parameter Estimation Method, first of transmission time absolute value code book
Absolute value posterior probability and first of transmission time symbol code book in each symbol symbol posterior probability, determine first of transmission
The information transmitted in moment.
Optionally, processing module 102 are specifically used for the minimum number bits occupied according to absolute value code word in absolute value code book
NminWith maximum number bits Nmax, symbol code word occupies in symbol code book minimum number bits x and maximum number bits t, acquisition module
The total bit number R that the total B and acquisition module 101 of 101 characters obtained are obtained, determines in lattice structure that absolute value is practical and uses
Code word minimum number bits N'minWith the maximum number bits N' of the practical code word used of absolute value in lattice structuremax, intermediate become
Measure R' and intermediate variable l';Wherein,
N'min=max (R-Nmax×(B-1)-t×B,Nmin);
N'max=min (R-Nmin×(B-1),Nmax);
Wherein, the smallest positive integral value that R' is the R for meeting variable formula ", variable formula are:
R " fromStart, constantly add 1, as R and " stops adding 1 when meeting the variable formula;
Processing module 102 is specifically used for according to determining minimum number bits N'min, maximum number bits N'max, intermediate variable
R' and intermediate variable l' determines the second boundary moment l that stage and merging phase are fixed in lattice structurescAnd in first set
Including state sum maximum value qmax。
Processing module 102 is specifically used for according to qmax, determine the first side that stage and fixed stage are dissipated in lattice structure
Boundary moment ldsAnd the maximum value of the sum for the state in second set including is equal to qmax+t。
Optionally, processing module 102 are specifically used for as determining R≤NminWhen × B+t, the second boundary moment lscEqual to B, most
Big value qmaxEqual to R-N'min×B+1;
Processing module 102 is specifically used for as determining R≤Nmax×(B-l')+NminWhen × l'+t × (B-l'+1), the second side
Boundary moment lscIt is equal toMaximum value qmaxEqual to R-N'min×B+1;
Processing module 102, specifically for when determining R < R', the second boundary moment lscIt is equal toMaximum value qmaxEqual to (N'max-N'min+t)×(B-lsc)+t+1;
Processing module 102 is specifically used for as determining R < NmaxWhen × B+t × (B-1), the second boundary moment lscIt is equal toMaximum value qmaxEqual to (N'max+t)×B-R+1;
Processing module 102 is specifically used for as determining R >=NmaxWhen × B+t × (B-1), the second boundary moment lscEqual to B, most
Big value qmaxEqual to (N'max+t)×B-R+1;
Processing module 102 is specifically used for according to maximum value qmax, determine the first boundary moment ldsIt is equal toThe maximum value of the sum for the state for including in second set is equal to qmax+t。
Optionally, processing module 102 are specifically used for being less than or equal to the first boundary moment l as determining transmission time ldsWhen,
Determine the V of first setstartEqual to N'min× l, the V of first setendEqual to N'max× l+t × (l-1), second set
V'startEqual to max (Vstart,R-N'max× (B-l)-t × (B-l)), the V' of second setendEqual to min (Vend+t,R-N'min
×(B-l));
Processing module 102 is specifically used for being more than the first boundary moment l as determining transmission time ldsAnd transmission time l is less than
Or it is equal to the second boundary moment lscWhen, determine the V of first setstartEqual to max (N'min×l,R-t×(B-l+1)-N'max×
(B-l)), the V of first setendEqual to Vstart+qmax- 1, the V' of second setstartEqual to max (Vstart,R-N'max×(B-
L)-t × (B-l)), the V' of second setendEqual to min (Vend+t,R-N'min×(B-l));
Processing module 102 is specifically used for being more than the second boundary moment l as determining transmission time lscWhen, determine first set
VstartEqual to max (N'min×l,R-t×(B-l+1)-N'max× (B-l)), the V of first setendEqual to R-N'min×(B-
L), the V' of second setstartEqual to min (Vstart+t,R-t×(B-l)-N'max× (B-l)), the V' of second setendIt is equal to
R-N'min×(B-l)。
The embodiment of the present invention provides a kind of variable length decoding device, passes through the ratio in the total B and bit stream of transmission character
Special sum R, the minimum number bits N of absolute value code word in absolute value code bookminWith maximum number bits Nmax, symbolic code in symbol code book
The minimum number bits x and maximum number bits t of word, determine boundary moment ldsAnd lsc, may thereby determine that the character received belongs to
Which in stage;And according to the V for the first set that absolute value code book, each transmission time transmitstart, first set Vend, first
Probability and bit error probability are tested, determines the absolute value posteriority of absolute value code word each in each transmission time absolute value code book
Probability;According to the V' for the second set that symbol code book, each transmission time transmitstart, second set V'end, prior probability and
Bit error probability determines the symbol posterior probability of symbol code word each in each transmission time symbol code book;According to parameter
The absolute value posterior probability and first of transmission time symbol of each absolute value in the estimation technique, first of transmission time absolute value code book
The symbol posterior probability of each symbol, determines the information transmitted in first of transmission time in code book;Since reception can be told
To bit stream in each possible initial state of character corresponding bit stream therefore can more accurately know each transmission
The information of moment transmission solves and when configured transmission while being related to absolute value in the prior art and when symbol is separately encoded, working as biography
When defeated channel has noise jamming, since length variable decoder can not correctly not identify that each transmission character corresponds to code word in the bitstream
Position, along with absolute value and symbol correspond to different code books, therefore the problem of accurately can not correctly restore source signal.
Embodiment three
The embodiment of the present invention provides a kind of length variable decoder, includes any one variable length decoding dress provided such as embodiment two
Set 10.Specific variable length decoding device 10 may refer to the associated description in above-mentioned apparatus embodiment two, and details are not described herein again.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
Claims (9)
1. a kind of variable length decoding method, which is characterized in that including:
Obtain the total B and total bit number R of the character transmitted in bit stream;Wherein, each character includes absolute value and symbol
Number, each absolute value and each symbol are individually transmitted and are encoded with different code books, and each absolute value is in absolute value
A corresponding absolute value code word in code book, each symbol a corresponding symbol code word, absolute value code book in symbol code book
The coding mode used is variable-length encoding, and the coding mode that the symbol code book uses is variable-length encoding;Wherein, B is more than 0
Integer, R are the integer more than 0;
The minimum number bits N occupied according to absolute value code word in the absolute value code bookminWith maximum number bits Nmax, the symbol
Minimum number bits x and maximum number bits t, the total B of the character and total bit number R that symbol code word occupies in code book,
Determine the first boundary moment l that stage and fixed stage are dissipated in lattice structureds, fixed stage and merging phase the second boundary
Moment lsc;
According to the first boundary moment ldsWith the second boundary moment lsc, determine the corresponding state of first of transmission time absolute value
First set and the corresponding state of symbol second set;Wherein, first set described in first of transmission time is most
Small value is Vstart, the maximum value of first set described in first of transmission time is Vend, described in first of transmission time
The minimum value of two set is V'start, the maximum value of second set described in first of transmission time is V'end;Wherein, described
One set includes at least one possible state, and the state in the first set refers to have been passed absolutely by the end of the current transmission moment
The total bit number of value, the second set include at least one possible state, the state in the second set refer to by the end of
The current transmission moment has passed the total bit number of symbol, the corresponding first set of each transmission time being located in the diverging stage
The total quantity for the state for including inside shows a rising trend, the corresponding first set of each transmission time being located in the fixed stage
The total quantity for the state for including inside remains unchanged, and is located in the corresponding first set of each transmission time in the merging phase
Including the total quantity of state gradually decrease, until reaching known character sum B and total number of bits R, the diverging stage, institute
Fixed stage or merging phase is stated to distinguish only for absolute value;
Obtain prior probability and bit error probability;
According to the absolute value code book, the V of the first set of each transmission time transmissionstart, the first set
Vend, the prior probability and the bit error probability, determine every in the absolute value code book described in each transmission time
The absolute value posterior probability of a absolute value code word;
According to the symbol code book, the V' of the second set of each transmission time transmissionstart, the second set
V'end, the prior probability and the bit error probability, determine each in the symbol code book described in each transmission time
The symbol posterior probability of symbol code word;
Absolute value posteriority according to each absolute value in absolute value code book described in Parameter Estimation Method, first of transmission time is general
The symbol posterior probability of each symbol in symbol code book described in rate and first of transmission time, when determining first of transmission
The information transmitted in quarter.
2. variable length decoding method according to claim 1, which is characterized in that described according to absolute in the absolute value code book
It is worth the minimum number bits N that code word occupiesminWith maximum number bits Nmax, symbol code word occupies in the symbol code book minimum bit
The total B and the total bit number R of number x and maximum number bits t, the character, determine and dissipate stage and fixation in lattice structure
The first boundary moment l in stageds, fixed stage and merging phase the second boundary moment lsc, including:
The minimum number bits N occupied according to absolute value code word in absolute value code bookminWith maximum number bits Nmax, accord in symbol code book
Number character occupy minimum number bits x and maximum number bits t, the total B of the character and total bit number R, determine described in
The minimum number bits N' of the practical code word used of absolute value in lattice structureminWith absolute value is practical in the lattice structure uses
Code word maximum number bits N'max, intermediate variable R' and intermediate variable l';Wherein,
N'min=max (R-Nmax×(B-1)-t×B,Nmin);
N'max=min (R-Nmin×(B-1),Nmax);
Wherein, the smallest positive integral value that R' is the R " for meeting variable formula, the variable formula are:
The R " fromStart, constantly add 1, stops adding when the R " meets the variable formula
1;
According to the determining minimum number bits N'min, the maximum number bits N'max, the intermediate variable R' and the centre
Variable l' determines the second boundary moment l that stage and merging phase are fixed in lattice structurescAnd include in the first set
State sum maximum value qmax;
According to the qmax, determine the first boundary moment l that stage and fixed stage are dissipated in lattice structuredsAnd described second
The maximum value of the sum for the state for including in set is equal to qmax+t。
3. variable length decoding method according to claim 2, which is characterized in that described according to the determining minimum number bits
N'min, the maximum number bits N'max, the intermediate variable R' and the intermediate variable l', determine the fixed stage and merge
The second boundary moment l in stagescAnd the maximum value q of the sum for the state in the first set includingmax, including:
When determining R≤NminWhen × B+t, the second boundary moment lscEqual to B, maximum value qmaxEqual to R-N'min×B+1;
When determining R≤Nmax×(B-l')+NminWhen × l'+t × (B-l'+1), the second boundary moment lscIt is equal toMaximum value qmaxEqual to R-N'min×B+1;
When determining R < R', the second boundary moment lscIt is equal toMaximum value qmaxEqual to (N'max-
N'min+t)×(B-lsc)+t+1;
When determining R < NmaxWhen × B+t × (B-1), the second boundary moment lscIt is equal toMaximum value qmax
Equal to (N'max+t)×B-R+1;
When determining R >=NmaxWhen × B+t × (B-1), the second boundary moment lscEqual to B, maximum value qmaxEqual to (N'max+t)
×B-R+1;
According to the qmax, determine the first boundary moment l that stage and fixed stage are dissipated in lattice structuredsAnd described second
The maximum value of the sum for the state for including in set is equal to qmax+ t, including:
According to the maximum value qmax, determine the first boundary moment ldsIt is equal toIn the second set
Including state sum maximum value be equal to qmax+t。
4. variable length decoding method according to claim 2, which is characterized in that according to the first boundary moment ldsWith second
Boundary moment lsc, determine the corresponding state of first of transmission time absolute value first set and the corresponding state of symbol
Two set, including:
When determine transmission time l be less than or equal to the first boundary moment ldsWhen, determine the V of the first setstartEqual to N'min
× l, the V of the first setendEqual to N'max× l+t × (l-1), the V' of the second setstartEqual to max (Vstart,R-
N'max× (B-l)-t × (B-l)), the V' of the second setendEqual to min (Vend+t,R-N'min×(B-l));
When determine transmission time l be more than the first boundary moment ldsAnd transmission time l is less than or equal to the second boundary moment lscWhen, really
The V of the fixed first setstartEqual to max (N'min×l,R-t×(B-l+1)-N'max× (B-l)), the first set
VendEqual to Vstart+qmax- 1, the V' of the second setstartEqual to max (Vstart,R-N'max× (B-l)-t × (B-l)), institute
State the V' of second setendEqual to min (Vend+t,R-N'min×(B-l));
When determine transmission time l be more than the second boundary moment lscWhen, determine the V of the first setstartEqual to max (N'min×
l,R-t×(B-l+1)-N'max× (B-l)), the V of the first setendEqual to R-N'min× (B-l), the second set
V'startEqual to min (Vstart+t,R-t×(B-l)-N'max× (B-l)), the V' of the second setendEqual to R-N'min×
(B-l)。
5. a kind of variable length decoding device, which is characterized in that including:
Acquisition module, the total B for obtaining the character transmitted in bit stream and total bit number R;Wherein, each character packet
Absolute value and symbol are included, each absolute value and each symbol are individually transmitted and encoded with different code books, each exhausted
To being worth a corresponding absolute value code word in absolute value code book, each symbol a corresponding symbol code word, institute in symbol code book
The coding mode that absolute value code book uses is stated as variable-length encoding, the coding mode that the symbol code book uses is variable-length encoding;Its
In, B is the integer more than 0, and R is the integer more than 0;
Processing module, the minimum number bits N for being occupied according to absolute value code word in the absolute value code bookminAnd maximal bit
Number Nmax, symbol code word occupies in the symbol code book minimum number bits x and maximum number bits t, the acquisition module obtain
The total bit number R that the total B of the character and the acquisition module obtain, determines and dissipates stage and fixation in lattice structure
The first boundary moment l in stageds, fixed stage and merging phase the second boundary moment lsc;
The processing module is additionally operable to according to the first boundary moment ldsWith the second boundary moment lsc, when determining first of transmission
Carve the first set of the corresponding state of absolute value and the second set of the corresponding state of symbol;Wherein, when first of transmission
The minimum value for carving the first set is Vstart, the maximum value of first set described in first of transmission time is Vend, described
The minimum value of second set described in first of transmission time is V'start, the maximum of second set described in first of transmission time
Value is V'end;Wherein, the first set includes at least one possible state, the state in the first set refer to by the end of
The current transmission moment has passed the total bit number of absolute value, and the second set includes at least one possible state, and described second
State in set refers to has passed the total bit number of symbol by the end of the current transmission moment, each biography being located in the diverging stage
The total quantity for the state for including in defeated moment corresponding first set shows a rising trend, each biography being located in the fixed stage
The total quantity for the state for including in defeated moment corresponding first set remains unchanged, each transmission being located in the merging phase
The total quantity for the state for including in moment corresponding first set gradually decreases, until reaching known character sum B and bit
Total R, the diverging stage, the fixed stage or merging phase are distinguished only for absolute value;
The acquisition module is additionally operable to obtain prior probability and bit error probability;
The processing module is additionally operable to the first set according to the absolute value code book, each transmission time transmission
Vstart, the first set Vend, the institute that obtains of the prior probability that obtains of the acquisition module and the acquisition module
Bit error probability is stated, is determined in the absolute value code book described in each transmission time after the absolute value of each absolute value code word
Test probability;
The processing module is additionally operable to the second set transmitted according to the symbol code book, each transmission time
V'start, the second set V'end, the institute that obtains of the prior probability that obtains of the acquisition module and the acquisition module
Bit error probability is stated, determines that the symbol posteriority of each symbol code word in the symbol code book described in each transmission time is general
Rate;
The processing module is additionally operable to according to each exhausted in absolute value code book described in Parameter Estimation Method, first of transmission time
The symbol posterior probability of each symbol in symbol code book described in absolute value posterior probability and first of transmission time to value,
Determine the information transmitted in first of transmission time.
6. variable length decoding device according to claim 5, which is characterized in that the processing module is specifically used for according to absolutely
The minimum number bits N that absolute value code word in value code book is occupiedminWith maximum number bits Nmax, symbol code word occupies in symbol code book
Minimum number bits x and maximum number bits t, the acquisition module obtain the character total B and the acquisition module obtain
The total bit number R taken determines the minimum number bits N' of the practical code word used of absolute value in the lattice structureminAnd institute
State the maximum number bits N' of the practical code word used of absolute value in lattice structuremax, intermediate variable R' and intermediate variable l';Wherein,
N'min=max (R-Nmax×(B-1)-t×B,Nmin);
N'max=min (R-Nmin×(B-1),Nmax);
Wherein, the smallest positive integral value that R' is the R " for meeting variable formula, the variable formula are:
The R " fromStart, constantly add 1, stops adding when the R " meets the variable formula
1;
The processing module is specifically used for according to the determining minimum number bits N'min, the maximum number bits N'max, it is described
The intermediate variable R' and intermediate variable l' determines the second boundary moment l that stage and merging phase are fixed in lattice structurescWith
And the maximum value q of the sum for the state in the first set includingmax;
The processing module is specifically used for according to the qmax, determine the first side that stage and fixed stage are dissipated in lattice structure
Boundary moment ldsAnd the maximum value of the sum for the state in the second set including is equal to qmax+t。
7. variable length decoding device according to claim 6, which is characterized in that the processing module is specifically used for as determining R
≤NminWhen × B+t, the second boundary moment lscEqual to B, maximum value qmaxEqual to R-N'min×B+1;
The processing module is specifically used for as determining R≤Nmax×(B-l')+NminWhen × l'+t × (B-l'+1), described second
Boundary moment lscIt is equal toMaximum value qmaxEqual to R-N'min×B+1;
The processing module, specifically for when determining R < R', the second boundary moment lscIt is equal toMaximum value qmaxEqual to (N'max-N'min+t)×(B-lsc)+t+1;
The processing module is specifically used for as determining R < NmaxWhen × B+t × (B-1), the second boundary moment lscIt is equal toMaximum value qmaxEqual to (N'max+t)×B-R+1;
The processing module is specifically used for as determining R >=NmaxWhen × B+t × (B-1), the second boundary moment lscEqual to B,
Maximum value qmaxEqual to (N'max+t)×B-R+1;
The processing module is specifically used for according to the maximum value qmax, determine the first boundary moment ldsIt is equal toThe maximum value of the sum for the state for including in the second set is equal to qmax+t。
8. variable length decoding device according to claim 6, which is characterized in that the processing module is specifically used for when determination
Transmission time l is less than or equal to the first boundary moment ldsWhen, determine the V of the first setstartEqual to N'min× l, described
The V of one setendEqual to N'max× l+t × (l-1), the V' of the second setstartEqual to max (Vstart,R-N'max×(B-
L)-t × (B-l)), the V' of the second setendEqual to min (Vend+t,R-N'min×(B-l));
The processing module is specifically used for being more than the first boundary moment l as determining transmission time ldsAnd transmission time l is less than or waits
In the second boundary moment lscWhen, determine the V of the first setstartEqual to max (N'min×l,R-t×(B-l+1)-N'max×
(B-l)), the V of the first setendEqual to Vstart+qmax- 1, the V' of the second setstartEqual to max (Vstart,R-
N'max× (B-l)-t × (B-l)), the V' of the second setendEqual to min (Vend+t,R-N'min×(B-l));
The processing module is specifically used for being more than the second boundary moment l as determining transmission time lscWhen, determine the first set
VstartEqual to max (N'min×l,R-t×(B-l+1)-N'max× (B-l)), the V of the first setendEqual to R-N'min×
(B-l), the V' of the second setstartEqual to min (Vstart+t,R-t×(B-l)-N'max× (B-l)), the second set
V'endEqual to R-N'min×(B-l)。
9. a kind of length variable decoder, which is characterized in that including such as claim 5-8 any one of them variable length decoding device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810672004.2A CN108809521B (en) | 2018-06-26 | 2018-06-26 | Variable length decoding method and device and variable length decoder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810672004.2A CN108809521B (en) | 2018-06-26 | 2018-06-26 | Variable length decoding method and device and variable length decoder |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108809521A true CN108809521A (en) | 2018-11-13 |
CN108809521B CN108809521B (en) | 2020-09-11 |
Family
ID=64072016
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810672004.2A Active CN108809521B (en) | 2018-06-26 | 2018-06-26 | Variable length decoding method and device and variable length decoder |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108809521B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101198054A (en) * | 2006-12-05 | 2008-06-11 | 华为技术有限公司 | Variable length coding and decoding method and its coding and decoding device |
CN102651653A (en) * | 2011-02-28 | 2012-08-29 | 中国科学院研究生院 | Low-complexity joint source-channel encoding and decoding method based on space lattice diagram |
US8295362B2 (en) * | 2006-01-05 | 2012-10-23 | Broadcom Corporation | Method and system for redundancy-based decoding of video content |
WO2013170381A1 (en) * | 2012-05-14 | 2013-11-21 | Socovar, Limited Partnership | Method and system for video error correction |
CN106559179A (en) * | 2016-12-07 | 2017-04-05 | 天津君邦科技有限公司 | Variable-length symbol-level reversible coding and decoding method for joint information source channel |
CN106656203A (en) * | 2016-12-06 | 2017-05-10 | 天津君邦科技有限公司 | Combined source channel variable length decoding algorithm based on twist braid grid |
-
2018
- 2018-06-26 CN CN201810672004.2A patent/CN108809521B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8295362B2 (en) * | 2006-01-05 | 2012-10-23 | Broadcom Corporation | Method and system for redundancy-based decoding of video content |
CN101198054A (en) * | 2006-12-05 | 2008-06-11 | 华为技术有限公司 | Variable length coding and decoding method and its coding and decoding device |
CN102651653A (en) * | 2011-02-28 | 2012-08-29 | 中国科学院研究生院 | Low-complexity joint source-channel encoding and decoding method based on space lattice diagram |
WO2013170381A1 (en) * | 2012-05-14 | 2013-11-21 | Socovar, Limited Partnership | Method and system for video error correction |
CN106656203A (en) * | 2016-12-06 | 2017-05-10 | 天津君邦科技有限公司 | Combined source channel variable length decoding algorithm based on twist braid grid |
CN106559179A (en) * | 2016-12-07 | 2017-04-05 | 天津君邦科技有限公司 | Variable-length symbol-level reversible coding and decoding method for joint information source channel |
Non-Patent Citations (2)
Title |
---|
HAN SAI ET AL.: "VARIABLE-LENGTH VERSUS FIXED-LENGTH CODING: ON TRADEOFFS FOR SOFT-DECISION DECODING", 《2014IEEE INTERNATIONAL CONFERENCE ON ACOUSTIC, SPEECH AND SIGNAL PROCESSING(ICASSP)》 * |
TU GUOFANG ET AL.: "Joint Source and Channel Decoding of Variable Length Codes Based on Pruned VLC-Block Trellis", 《2013 IEEE 20TH SYMPOSIUM ON COMMUNICATIONS AND VEHICULAR TECHNOLOGY IN THE BENELUX (SCVT)》 * |
Also Published As
Publication number | Publication date |
---|---|
CN108809521B (en) | 2020-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100353690C (en) | Multiplex system using common network group to transmit multiple 8B/10B bit stream | |
US7487426B2 (en) | 64b/66b coding apparatus and method | |
US7466758B2 (en) | Method and system for dynamic interleaver adaptation scheme in VDSL | |
KR101526990B1 (en) | Method for determining transport block size and signal transmission method using the same | |
US8144802B2 (en) | Digital data encoding and decoding method and system | |
CN1117228A (en) | Voice activated data rate change in simultaneous voice and data transmission | |
EP1175730A1 (en) | Method and apparatus for error control | |
CA2512670A1 (en) | Digital television transmitter and receiver for transmitting and receiving dual stream using 4 level vestigial side band robust data | |
WO2008110107A1 (en) | Data encoding/decoding and receiving/sending method and apparatus | |
EP1775871A2 (en) | Data packet and data packet constructing method using reserved bits | |
US6930621B2 (en) | Method to overlay a secondary communication channel onto an encoded primary communication channel | |
JP2010507926A (en) | Dual transmission stream generating apparatus and method | |
US20140270122A1 (en) | Serial Protocol for Agile Sample Rate Switching | |
WO2009036416A2 (en) | Rate matching to maintain code block resource element boundaries | |
US7599396B2 (en) | Method of encoding and synchronizing a serial interface | |
CA3069594C (en) | Media content-based adaptive method, device and system for fec coding and decoding of systematic code, and medium | |
CN108809521A (en) | A kind of variable length decoding method, device and length variable decoder | |
CN1639982A (en) | Multiplexing an additional bit stream with a primary bit stream | |
CN103050123A (en) | Method and system for transmitting voice information | |
US9013982B2 (en) | M-pair mode protection switching | |
WO2007059389A2 (en) | Method and apparatus for interleaving within a communication system | |
CN108737017A (en) | The method, apparatus and communication equipment of information processing | |
WO2017137436A1 (en) | System and method for line coding based on bit flipping to limit the run length and balance dc power | |
US7676725B1 (en) | Method of code generation that minimizes error propagation | |
CN105376587B (en) | Video transmission method based on RCM encoder matrix weight unequal distributions |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |