CN101848388B - Method for normalizing arithmetic encoding value based on JPEG (Joint Photographic Experts Group) 2000 standard - Google Patents
Method for normalizing arithmetic encoding value based on JPEG (Joint Photographic Experts Group) 2000 standard Download PDFInfo
- Publication number
- CN101848388B CN101848388B CN 201010128830 CN201010128830A CN101848388B CN 101848388 B CN101848388 B CN 101848388B CN 201010128830 CN201010128830 CN 201010128830 CN 201010128830 A CN201010128830 A CN 201010128830A CN 101848388 B CN101848388 B CN 101848388B
- Authority
- CN
- China
- Prior art keywords
- normalization
- value
- probability
- execution
- newct
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a method for normalizing arithmetic encoding value based on JPEG (Joint Photographic Experts Group) 2000 standard. The problems to be mainly solved are that the prior method has low processing speed and high realization complexity and cannot effectively normalize the code values of any double text symbol pairs. The normalization method comprises the following steps of: firstly, reading the necessary parameters for the encoding, updating the code value and determining the left-shift counting value of the code value; secondly, respectively judging the present normalization type of the different probability types of any text symbol pairs according to the probability interval value, the probability course mark and the probability value of the small probability symbol; finally, normalizing the code values according to the normalization type and generating the corresponding normalization code stream. The invention has the advantages of high processing speed and low realization complexity and can be applied to the image compression encoding of various high-speed digital devices, in particular to the encoding of the high-speed real-time satellite remote image.
Description
Technical field
The present invention relates to image coding technology field, particularly a kind of arithmetic coding code value method for normalizing based on the JPEG2000 standard is used for the high speed image compressed encoding of various digital devices.
Background technology
Along with multimedia and development of internet technology and in the application of aspects such as medical image, remote sensing images and digital picture/video transmission; Existing Joint Photographic Experts Group JPEG can not satisfy current requirement of actual application, and International Standards Organization has formulated new Joint Photographic Experts Group JPEG2000 in November, 2000 for this reason.One of core technology of this standard is exactly that data after adopting arithmetic coding method to wavelet transformation are encoded, and realizes the processed compressed of view data.
The coding principle of described arithmetic coding method is narrated as follows:
Arithmetic coding be input as context symbol to CXD; Comprise context label CX and context judgement D; Its output then is corresponding compressed bit stream, and wherein CX representes that span is 0-18 by the context label of present encoding pixel generation; D representes corresponding contextual judgement, and span is 0-1.Arithmetic coding method is selected the probability of corresponding judgement D adaptively according to the context label CX of input; Be worth Symbol Type to be encoded according to judgement D; Be big probability symbol M PS or small probability symbol LPS; And under small probability symbol LPS situation corresponding probability Qe, adjust corresponding probability interval value A then, and output code value C.This probability interval value A adopts 16 signless integers to represent.This code value C adopts 32 bit representations; And be divided into 5 different fields; I.e. 4 zero data of the 31st to 28 bit representation, the 27th bit representation " carry " position, the 26th to 19 bit representation coding carry-out bit; The the 18th to 16 bit representation is used to cut off 3 framing bits of carry propagation, the decimal place of the 15th to 0 bit representation code value.For the probability Qe of coded identification, adopt an array with 47 index to realize that this array is called probability Estimation table PET, the Qe value of the small probability symbol LPS symbol of one 16 of each correspondences in the table.Regulation according to the JPEG2000 standard; It is 19 * 6 array that the context label CX that the present encoding symbol is corresponding visits a size as the address; Obtain the inlet index Index of probability Estimation table PET; Be that corresponding LPS symbol probability values Qe in the pet sheet is read in the address then with Index, and combine current probability interval value and code value to judge the process of specific coding.If current probability interval value is smaller or equal to 0.75, this value is 0x8000 down corresponding to hexadecimal, in order to prevent to overflow, need carry out the normalization processing to probability interval value and code value, makes the probability interval value greater than 0x8000 through move to left probability interval value and code value.In the normalized while, if code stream is formed whole byte in the code value, then carry out the code stream output procedure, promptly obtain final coding output code flow.In order to prevent the carry transmission,, specific bit fills to block the transmission of carry through being set.
Can know according to the arithmetic coding principle, be a core of whole arithmetic coding method to the normalization of code value.Yet the JPEG2000 standard agreement has only provided in single context symbol under the situation code value being carried out normalized method, when hardware is realized arithmetic encoder, because context symbol is to handling by serial mode, thereby forms speed bottle-neck.Typical arithmetic encoder hardware implementation method; For example; The article that TaiWan, China scholar K.-K.Ong and Jen-ShiunChiang deliver in Int.Conf.Image Process. (ICIP ' 02) in 2002 and IEEE Int.Symp.Circuits and Systems in 2004 international conference respectively " A high throughput low costcontext-based adaptive arithmetic codec for multiple standards " (2002; Vol.1; Pp.I872-I875) and " High-speeds EBCOT with dual context-modeling coding architecture forJPEG2000 " (2004; Vol.3; Pp.865-868.) arithmetic coding method that proposes in, this method is handled the normalization of carrying out code value according to single context symbol, and it is right to make that the encoder throughput is merely 1 context symbol of single clock processing.Article " VLSI Design of a High-Speed and Area-EfficientJPEG2000Encoder " (2007 the 17th volumes that people such as domestic scholars plum chief will delivered on the IEEE Trans.on Circuits and System for VideoTechnology periodical in 2007; The 8th phase; The 1065-1078 page or leaf) arithmetic coding method that proposes in; Though adopt the synchronous flowing water technology of many inputs to realize arithmetic coding; But this method is handled the normalization of code value and also is based on single context symbol to what carry out, and its disposed of in its entirety speed has only 0.625 context symbol of single clock processing right.Domestic scholars is permitted to surpass the arithmetic coding method that proposes in the article of in Int.Conf.Image Process. (ICIP ' 05) in 2005 international conference, delivering " A Dual-Symbol Coding Arithmetic Coder Architecture Design for High SpeedEBCOT Coding Engine in JPEG2000 "; When the right context label of two context symbol not simultaneously; It is right that the speed that this method is handled code value normalization reaches 2 context symbol of single clock processing; But when the right context label of two context symbol was identical, it is right that the disposal ability of this method is merely 1 context symbol of every clock processing.Australia scholar M.Dyer is at IEEE Transactions onCircuitsand Systems-I:Regular Papers periodical in 2006 Concurrency Techniques for ArithmeticCoding in JPEG2000 (VOL.53 that publishes an article; NO.6; Pp.1203-1213, June 2006) in a kind of high speed arithmetic coding method has been proposed.Domestic scholars Liu Qi defends 2 arithmetic coding methods that context symbol is right that Zhejiang University's master thesis " based on the research and the design of JPEG2000 binary arithmetic coder " in 2006 has proposed a kind of 4 grades of stream treatment.Though the method for M.Dyer and Liu Qiwei can realize two context symbol to parallel processing, the complexity in the correlation method is higher, and chip design is caused certain difficulty.
Above-mentioned various arithmetic coding method has following defective when carrying out code value normalization:
The first, the method for K.-K.Ong and Jen-Shiun Chiang can only reach 1 right ability of context symbol of single clock processing, code value is being carried out do not consider that follow-up context symbol to situation, can't improve coding rate when normalization is handled.
The second, the method for Mei Kuizhi, its disposed of in its entirety speed have only 0.625 context symbol of single clock processing right, also do not consider during to input, to the parallel normalized processing of code value, thereby also can't improve coding rate in a plurality of context symbol.
The 3rd; The method of Xu Chao, when the right context label of two context symbol of input was identical, this method can't the right probability interval value of two context symbol of parallel processing be upgraded; Make follow-up code value is carried out normalization also can only serial process, caused the pause of whole encoding process.When the right context label of two context symbol of continuous input was identical, it is right that the disposal ability of this coding method is merely context symbol of single clock processing.
The 4th; Though it is right that the method for M.Dyer and Liu Qiwei can both be handled two preceding text symbols, when these methods are handled in code value normalization, do not adopt the method for the normalization type of code value being carried out Direct Classification; Make that the relation between each module is complicated when handling; To not provide the concrete Rule of judgment of code stream output simultaneously yet, and cause and realize difficulty, and complexity will be higher.
Summary of the invention
The objective of the invention is to avoid the deficiency of above-mentioned prior art; A kind of arithmetic coding code value method for normalizing based on the JPEG2000 standard is provided; The right code value of any two context symbol with to input simultaneously carries out normalization, to improve coding rate, reduces implementation complexity simultaneously.
The key problem in technology of realizing the object of the invention is: through effective sorting technique to code value normalization classify; And in normalization is handled, adopt specific judgment criterion, confirm the byte output type of corresponding normalization code stream respectively; Simplified code value normalization processing procedure; Improved coding rate, reduced implementation complexity simultaneously, implementation step is following:
(1) reads in coding necessary probability interval value, the first probability interval value shift count NumSLA0, the second probability interval value shift count NumSLA1, the first small probability symbol probability values, the second small probability symbol probability values and be used to represent the normalization process identifier of two context symbol to the probability type; And code value upgraded; Confirm the code value count value CT that moves to left, this pair context symbol comprises two big probability symbols, double small probability symbol, small probability/big probability symbol and big probability/small probability symbol to the probability type;
(2), judge current normalization type according to probability interval value, normalization process identifier and small probability symbol probability values:
If the probability type that (2a) two context symbol are right is two big probability symbols, then judge according to following criterion:
If the probability interval value, is then adjusted the first small probability symbol probability values less than the twice of the first small probability symbol probability values; If the adjusted first small probability symbol probability values is less than the twice of the second small probability symbol probability values; Then current normalization type is one type of two normalization; Otherwise, calculate the difference between the adjusted first small probability symbol probability values and the second small probability symbol probability values, if this difference is less than hexadecimal value 0x8000; Then current normalization type is two types of two normalization, otherwise is single normalization;
If the probability interval value is more than or equal to the twice of the first small probability symbol probability values; The difference of the calculating probability interval value and the first small probability symbol probability values; And the relation of this difference and hexadecimal value 0x8000 relatively: if this difference less than hexadecimal value 0x8000, is then adjusted the difference of the probability interval value and the first small probability symbol probability values; If adjusted difference is less than the twice of the second small probability symbol probability values; Then current normalization type is one type of two normalization; Otherwise relatively this adjusted difference and the second small probability symbol probability values are if the difference between this adjusted difference and the second small probability symbol probability values is less than hexadecimal value 0x8000; Then current normalization type is two types of two normalization, otherwise is single normalization; If this difference is more than or equal to hexadecimal value 0x8000; Then compare probability interval value and the difference of the first small probability symbol probability values and the relation of the second small probability symbol probability values: if the difference of the probability interval value and the first small probability symbol probability values is less than the twice of the second small probability symbol probability values; Then current normalization type is single normalization; Otherwise the difference of the calculating probability interval value and the first small probability symbol probability values; If this difference less than the second small probability symbol probability values and hexadecimal value 0x8000's and be worth, then current normalization type is single normalization, otherwise is zero degree normalization.
If the probability type that (2b) two context symbol are right is big probability/small probability symbol, then judge according to following criterion:
If the probability interval value is less than the twice of the first small probability symbol probability values; Then adjust the first small probability symbol probability values; If the adjusted first small probability symbol probability values is less than the twice of the second small probability symbol probability values; Then current normalization type is two types of two normalization, otherwise is one type of two normalization;
If the probability interval value is more than or equal to the twice of the first small probability symbol probability values; And the difference of the probability interval value and the first small probability symbol probability values is more than or equal to hexadecimal value 0x8000; Then current normalization type is single normalization; Otherwise the difference of the adjustment probability interval value and the first small probability symbol probability values is if adjusted difference is more than or equal to the twice of the second small probability symbol probability values; Then current normalization type is one type of two normalization, otherwise is two types of two normalization.
If the probability type that (2c) two context symbol are right is small probability/big probability symbol, then judge according to following criterion:
If the probability interval value is more than or equal to the twice of the first small probability symbol probability values; Then adjust the first small probability symbol probability values; If the adjusted first small probability symbol probability values is less than the twice of the second small probability symbol probability values, then current normalization type is two types of two normalization, otherwise; Calculate the difference of this adjusted first small probability symbol probability values and the second small probability symbol probability values; If this difference is less than hexadecimal value 0x8000, then current normalization type is two types of two normalization, otherwise is single normalization;
If the probability interval value is less than the twice of the first small probability symbol probability values; Then adjust the difference of the probability interval value and the first small probability symbol probability values; If this adjusted difference is less than the twice of the second small probability symbol probability values, then current normalization type is one type of two normalization, otherwise; Relatively this adjusted difference and the second small probability symbol probability values; If the difference between this adjusted difference and the second small probability symbol probability values is less than hexadecimal value 0x8000, then current normalization type is two types of two normalization, otherwise is single normalization;
If the probability type that (2d) two context symbol are right is a double small probability symbol, then normalization type is judged as one type of two normalization;
(3), confirm the byte output type of corresponding normalization code stream respectively according to the normalization type of above-mentioned judgement:
(3a) to single normalization type, judge the byte output type according to following criterion:
If NumSLA0<CT, or NumSLA1<CT, then the byte output type moves to left NumSLA0 time to code value C for the output of zero degree byte simultaneously;
If last two context symbol are hexadecimal number 0xFF to last byte of the normalization code stream of generation; Perhaps going up two context symbol is that hexadecimal number 0xFE and current code value C are more than or equal to hexadecimal number 0x8000000 to last byte of the normalization code stream that produces; It is 7 that the code value count value NewCT that temporarily moves to left is set, otherwise is made as 8; If 0<=NumSLA0-CT<NewCT or 0<=NumSLA1-CT<NewCT; Then the byte output type is the output of single byte; Simultaneously code value C is moved to left NumSLA0-CT time, and the code value count value CT that moves to left is updated to the code value count value NewCT that temporarily moves to left;
If do not satisfy the condition of zero degree byte output and the output of single byte, then the byte output type is that twice byte exported, and simultaneously code value C is moved to left NumSLA0-CT time, and the code value count value CT that moves to left is updated to the code value count value NewCT that temporarily moves to left;
(3b), judge the byte output type according to following steps to one type of two normalization and two types of two normalization:
At first; The code value count value NewCT that temporarily moves to left is set; If last two context symbol are hexadecimal number 0xFF to last byte of the normalization code stream of generation; Perhaps go up two context symbol to last byte of the normalization code stream that produces be hexadecimal number 0xFE and current code value C more than or equal to hexadecimal number 0x8000000, then the code value count value NewCT that temporarily moves to left is set to 7, otherwise is made as 8;
Then, judge the byte output type:
If satisfy NumSLA0<CT, and NumSLA0+NumSLA1<CT, or NumSLA0<CT, and CT<=NumSLA0+NumSLA1<NewCT, then the byte output type is the output of zero degree byte:
If satisfy NumSLA0<CT; And NumSLA0+NumSLA1>=CT, and NumSLA0+NumSLA1>=NewCT, and NumSLA1<NewCT+CT; Or NumSLA0>=CT; And NumSLA0<CT+NewCT, and NumSLA1<CT, then the byte output type is the output of single byte:
If satisfy NumSLA0<CT, and NumSLA0+NumSLA1>=CT, and NumSLA0+NumSLA1>=NewCT; And NumSLA 1>=NewCT+CT, or CT<=NumSLA0<CT+NewCT, and CT<=NumSLA1<NewCT+CT; Or NumSLA0>=CT; And NumSLA0>=CT+NewCT, and NumSLA1<CT, then the byte output type is twice byte output:
If satisfy NumSLA0>=CT, and NumSLA0<CT+NewCT<=NumSLA1, or NumSLA0>=CT, and NumSLA0>=CT+NewCT, and CT<=NumSLA1<NewCT+CT, then the byte output type is three byte output:
If do not satisfy the condition of the output of zero degree byte, the output of single byte, twice byte output and three byte outputs, then the byte output type is four byte output;
For described one type of two normalization, if the byte output type then moves to left NumSLA0+NumSLA1 time to code value C for the output of zero degree byte; Otherwise; If NumSLA0<CT then moves to left CT time to code value C, and the code value count value CT that moves to left is updated to the code value count value NewCT that temporarily moves to left; Otherwise C moves to left NumSLA0 time to code value, and the code value count value CT that moves to left is updated to the code value count value NewCT that temporarily moves to left;
For described two types of two normalization; If the byte output type is the output of zero degree byte; Then earlier code value C is moved to left NumSLA0 time the code value C after will moving to left then and second small probability context symbol probability Qel addition, the moving to left NumSLA1 time more at last with addition with value; If the byte output type is single or twice or three times or four times; And output NumSLA0<CT then moves to left code value C CT time, and the code value count value CT that moves to left is updated to the code value count value NewCT that temporarily moves to left; Otherwise; Earlier code value C is moved to left NumSLA0 time, the code value C after will moving to left then and the second small probability context symbol probability Qel addition, and the code value count value CT that moves to left is updated to the code value count value NewCT that temporarily moves to left;
(4) according to the byte output type with move to left after code value, the code stream byte that output is corresponding.
Above-mentioned steps (1) is described to be upgraded code value, be in first context symbol to being under the condition of big probability symbol, calculate the second small probability symbol probability values and current code value and value, and code value is updated to this and value.
Above-mentioned steps (2a), (2b) and (2c) the described adjustment first small probability symbol probability values are with the first small probability symbol probability values several times that move to left, up to this value more than or equal to hexadecimal value 0x8000.
Above-mentioned steps (2a), (2b) and (2c) difference of described adjustment probability interval value and the first small probability symbol probability values; Be difference with the probability interval value and the first small probability symbol probability values several times that move to left, up to this value more than or equal to hexadecimal value 0x8000.
The present invention is owing to effectively classify respectively to the byte output type of code value normalization and corresponding normalization code stream; Made full use of the degree of parallelism of two context symbol to handling; Simplify code value normalization processing procedure, improved coding rate, reduced implementation complexity simultaneously.The present invention is the cores of the two context symbol of realization of High Speed to the arithmetic entropy coding system of continual stream treatment; Adopt the present invention can significantly improve the coding rate and the efficient of whole arithmetic entropy coding system; In the high-speed real-time image code domain, like high speed digital camera, image retrieval, high speed satellite remote sensing images coding, the battlefield monitoring is civilian and military scenario has huge using value.
Description of drawings
Fig. 1 is overall flow figure of the present invention;
Fig. 2 is that two big probability symbolic code value normalization type of the present invention is judged sub-process figure;
Fig. 3 is that big probability of the present invention/small probability symbol code value normalization type is judged sub-process figure;
Fig. 4 is that small probability of the present invention/big probability symbolic code value normalization type is judged sub-process figure;
Fig. 5 is that sub-process figure is handled in single normalization of the present invention;
Fig. 6 is that sub-process figure is handled in one type of two normalization of the present invention;
Fig. 7 is that sub-process figure is handled in two types of two normalization of the present invention.
Embodiment
Xilinx ISE 9.1 integrated developing software and VHDL, Verilog HDL language are adopted in coding method of the present invention, in the model of Xilinx company are to realize on the programmable chip of XC2V3000-6BG728.
With reference to Fig. 1, the arithmetic coding code value method for normalizing based on the JPEG2000 standard of the present invention comprises the steps:
The coding call parameter comprises: probability interval value A, normalization process identifier RenormTag, the first probability interval value shift count NumSLA0, the second probability interval value shift count NumSLA1, the first small probability symbol probability values Qe0 and the second small probability symbol probability values Qel.Wherein, normalization process identifier RenormTag representes two right probability types of context symbol, i.e. 0 expression double small probability symbol, the two big probability symbols of 1 expression, 2 expression big probability/small probability symbols, 3 expression small probabilities/big probability symbol.
(2.1) according to the normalization process identifier RenormTag that imports; If first context symbol is to being big probability symbol; Be that RenormTag is 1 or 2 o'clock, then calculate the second small probability symbol probability values Qel and current code value C's and value, and code value C is updated to this and value; Otherwise, keep code value C constant;
(2.2), confirm the code value count value CT that moves to left by following mode:
If for the first time context symbol is handled carrying out code value normalization, the initial method that then provides according to the JPEG2000 standard carries out assignment to CT, otherwise, keep the CT value constant.
Step 3 is judged current normalization type.
(3.1), then carry out two big probability symbolic code value normalization types and judge if normalization process identifier RenormTag is 1.With reference to Fig. 2, the concrete realization of this step is following:
If (3.1.1) probability interval value A is less than the twice of the first small probability symbol probability values Qe0, then execution in step (3.1.2); Otherwise, execution in step (3.1.4);
(3.1.2) the first small probability symbol probability values Qe0 is adjusted; The Qe0 that promptly moves to left, until Qe0 more than or equal to hexadecimal value 0x8000, if the adjusted first small probability symbol probability values SHIFT V (Qe0) is less than the twice of the second small probability symbol probability values Qel; Then normalization type is one type of two normalization; And one type of two normalization types indication is set, otherwise, execution in step (3.1.3);
If (3.1.3) difference of the adjusted first small probability symbol probability values SHIFT V (Qe0) and the second small probability symbol probability values Qel is less than hexadecimal value 0x8000; Then normalization type is two types of two normalization; And two types of two normalization types indications are set; Otherwise the normalization type is single normalization, and the indication of single normalization type is set;
If (3.1.4) difference of the probability interval value A and the first small probability symbol probability values Qe0 is less than hexadecimal value 0x8000, execution in step (3.1.5); Otherwise, execution in step (3.1.7);
(3.1.5) difference of the probability interval value A and the first small probability symbol probability values Qe0 is adjusted; If adjusted difference SHIFT_V (A-Qe0) is less than the twice of the first small probability symbol probability values Qe0; Then normalization type is one type of two normalization, and one type of two normalization type indication is set; Otherwise, execution in step (3.1.6);
If (3.1.6) adjusted difference SHIFT_V (A-Qe0) less than the second small probability symbol probability values Qel and hexadecimal value 0x8000 with, then normalization type be two types of two normalization, and two types of two normalization types indications are set; Otherwise the normalization type is single normalization, and the indication of single normalization type is set;
If (3.1.7) difference of the probability interval value A and the first small probability symbol probability values Qe0 is less than the twice of the second small probability symbol probability values Qel, then normalization type is single normalization, and the indication of single normalization type is set; Otherwise, execution in step (3.1.8);
If (3.1.8) difference of the probability interval value A and the first small probability symbol probability values Qe0 less than the second small probability symbol probability values Qel and hexadecimal value 0x8000 with, then normalization type is single normalization, and single normalization type indication is set; Otherwise the normalization type is zero degree normalization, and the indication of zero degree normalization type is set.
(3.2), then carry out big probability/small probability symbol code value normalization type and judge if normalization process identifier RenormTag is 2.With reference to Fig. 3, the concrete realization of this step is following:
If (3.2.1) probability interval value A is less than the twice of the first small probability symbol probability values Qe0, so, execution in step (3.2.2); Otherwise, execution in step (3.2.3);
(3.2.2) the first small probability symbol probability values Qe0 is adjusted, the Qe0 that promptly moves to left, until Qe0 more than or equal to hexadecimal value 0x8000.If the adjusted first small probability symbol probability values SHIFT_V (Qe0) is less than the twice of the second small probability symbol probability values Qel, then normalization type is two types of two normalization, and two types of two normalization type indications are set; Otherwise the normalization type is one type of two normalization, and one type of two normalization type indication is set;
If (3.2.3) difference of the probability interval value A and the first small probability symbol probability values Qe0 is less than hexadecimal value 0x8000, execution in step (3.2.4); Otherwise the normalization type is single normalization, and the indication of single normalization type is set;
(3.2.4) difference of the probability interval value A and the first small probability symbol probability values Qe0 is adjusted; If adjusted difference SHIFT_V (A-Qe0) is less than the twice of the first small probability symbol probability values Qe0; Then normalization type is one type of two normalization, and one type of two normalization type indication is set; Otherwise the normalization type is two types of two normalization, and two types of two normalization type indications are set.
(3.3), then carry out small probability/big probability symbolic code value normalization type and judge if normalization process identifier RenormTag is 3.With reference to Fig. 4, the concrete realization of this step is following:
If (3.3.1) probability interval value A is less than the twice of the first small probability symbol probability values Qe0, execution in step (3.3.2); Otherwise, execution in step (3.3.4);
If (3.3.2) less than the twice of the second small probability symbol probability values Qel, then normalization type is one type of two normalization to the difference of the probability interval value A and the first small probability symbol probability values Qe0 after adjusting, and one type of two normalization type indication is set; Otherwise, execution in step (3.3.3);
(3.3.3) difference of the probability interval value A and the first small probability symbol probability values Qe0 is adjusted; If adjusted difference SHIFT_V (A-Qe0) less than the second small probability symbol probability values Qel and hexadecimal value 0x8000 with; Then normalization type is two types of two normalization, and two types of two normalization type indications are set; Otherwise the normalization type is single normalization, and the indication of single normalization type is set;
(3.3.4) the first small probability symbol probability values Qe0 is adjusted; If the adjusted first small probability symbol probability values SHIFT_V (Qe0) is less than the twice of the second small probability symbol probability values Qel; Then normalization type is two types of two normalization, and two types of two normalization type indications are set; Otherwise, execution in step (3.3.5);
If (3.3.5) difference of the adjusted first small probability symbol probability values SHIFT_V (Qe0) and the second small probability symbol probability values Qel is less than hexadecimal value 0x8000; Then normalization type is one type of two normalization, and two types of two normalization type indications are set; Otherwise the normalization type is one type of two normalization, and the indication of single normalization type is set.
Single normalization type indication expression is only carried out normalization processing to the right code value of this pair context symbol in the above-mentioned steps; One type of two inferior normalization types indication and two types of two normalization type indications represent that will carry out twice-normalization to the right code value of this pair context symbol handles, and the indication of zero degree normalization type representes that then the right code value of this pair context symbol is not carried out normalization to be handled.These four kinds of normalization type indications are used to select corresponding normalization to handle.
Step 4 according to the normalization type, is carried out normalization and is handled.
The normalization type that obtains according to step 3 is carried out corresponding normalization to the code value under single normalization type, one type of two normalization type and two types of two normalization types respectively and is handled, and produces corresponding normalization code stream.
If the normalization type is single normalization, then code value is carried out single normalization and handle, with reference to Fig. 5, the concrete realization as follows:
(4.1) if moving to left less than code value, the first probability interval value shift count NumSLA0 or the second probability interval value shift count NumSLA1 count CT; With code value C move to left NumSLA0 or NumSLA1 time; Do not have corresponding single normalization code stream output, finish current normalization process; Otherwise, execution in step (4.2);
(4.2) if last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream that produces, it is 7 that the code value count value NewCT that temporarily moves to left is set, then execution in step (4.5); Otherwise, execution in step (4.3);
(4.3) if last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream that produces, execution in step (4.4); Otherwise it is 8 that the code value count value NewCT that temporarily moves to left is set, then execution in step (4.5);
(4.4) the count value NewCT that temporarily moves to left is 7 if current code value C, is provided with code value more than or equal to hexadecimal value 0x8000000, is 8 otherwise NewCT is set; Execution in step (4.5) then;
(4.5) code value C is moved to left NumSLA0-CT time, then execution in step (4.6);
(4.6) if the first probability interval value shift count NumSLA0 or the second probability interval value shift count NumSLA1 and code value move to left the difference of count value CT more than or equal to 0; And, then carry out the output of single byte less than the code value count value NewCT that moves to left temporarily; Otherwise carry out twice byte output.
If the normalization type is one type of two normalization type, then carry out one type of two normalization and handle, with reference to Fig. 6, the concrete realization as follows:
(5.1) if NumSLA0-CT less than zero, execution in step (5.2); Otherwise, execution in step (5.3);
(5.2) if NumSLA1-(CT-NumSLA0) less than zero, C moves to left NumSLA0+NumSLA1 time with code value, finishes current normalization process then; Otherwise, execution in step (5.2.1);
(5.2.1) code value C is moved to left NumSLA0 time, and upgrade NewCT, then execution in step (5.2.2) with NewCT-NumSLA0;
If (5.2.2) NumSLA1-NewCT is more than or equal to zero, C moves to left NewCT time with code value, then execution in step (5.2.3); Otherwise, finish current normalization process;
If (5.2.3) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, then execution in step (5.2.6); Otherwise, execution in step (5.2.4);
If (5.2.4) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (5.2.5); Otherwise it is 8 that NewCT is set, execution in step (5.2.6);
If (5.2.5) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT is set, otherwise it is 8 that NewCT is set; Execution in step (5.2.6) then;
If (5.2.6) difference of NumSLA1 and CT is less than NewCT, then carry out the output of single byte, finish current normalization process then, otherwise, carry out twice byte output, finish current normalization process then;
(5.3) code value C is moved to left CT time execution in step (5.3.1);
If (5.3.1) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, execution in step (5.3.4); Otherwise, execution in step (5.3.2);
If (5.3.2) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (5.3.3); Otherwise it is 8 that NewCT is set, execution in step (5.3.4);
If (5.3.3) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT is set, otherwise it is 8 that NewCT is set; Execution in step (5.3.4);
If (5.3.4) difference of shift count NumSLA0 and CT is less than NewCT, execution in step (5.3.5), otherwise execution in step (5.3.10);
If (5.3.5) NumSLA1 deduct CT difference less than zero, then carry out the output of single byte, finish current normalization process then; Otherwise, execution in step (5.3.6);
If (5.3.6) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, then execution in step (5.3.9); Otherwise, execution in step (5.3.7);
If (5.3.7) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (5.3.8); Otherwise it is 8 that NewCT is set, then execution in step (5.3.9);
If (5.3.8) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT is set, otherwise it is 8 that NewCT is set; Execution in step (5.3.9) then;
If (5.3.9) difference of shift count NumSLA1 and CT is less than NewCT, then carry out twice byte output, finish current normalization process then; Otherwise carry out three byte output, finish current normalization process then;
If (5.3.10) NumSLA1 deduct CT difference less than zero, then carry out twice byte output, finish current normalization process then; Otherwise, execution in step (5.3.11);
If (5.3.11) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, then execution in step (5.3.14); Otherwise, execution in step (5.3.12);
If (5.3.12) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (5.3.13); Otherwise it is 8 that NewCT is set, then execution in step (5.3.14);
If (5.3.13) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT is set, otherwise it is 8 that NewCT is set; Execution in step (5.3.14) then;
If (5.3.14) difference of NumSLA1 and CT is less than NewCT, then carry out three byte output, finish current normalization process then; Otherwise carry out four byte output, finish current normalization process then.
If the normalization type is two types of two normalization types, then carry out two types of two normalization and handle, with reference to Fig. 7, the concrete realization as follows:
(6.1) if NumSLA0-CT less than zero, execution in step (6.2); Otherwise, execution in step (6.3);
(6.2) if NumSLA1-(CT-NumSLA0) less than zero, moves to left code value C NumSLA0 time earlier, and code value after will moving to left and Qel addition, again should and value move to left NumSLA1 time, finish current normalization process then; Otherwise, execution in step (6.2.1);
(6.2.1) earlier code value C is moved to left NumSLA0 time, code value after usefulness moves to left then and Qel upgrade code value C with value, upgrade NewCT with NewCT-NumSLA0 simultaneously, execution in step (6.2.2);
If (6.2.2) NumSLA1-NewCT then moves to left code value C NewCT time, then execution in step (6.2.3) more than or equal to zero; Otherwise, finish current normalization process;
If (6.2.3) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, then execution in step (6.2.6); Otherwise, execution in step (6.2.4);
If (6.2.4) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (6.2.5); Otherwise it is 8 that NewCT is set, then execution in step (6.2.6);
If (6.2.5) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT then is set, otherwise it is 8 that NewCT is set; Execution in step (6.2.6) then;
If (6.2.6) NumSLA1-CT is less than NewCT, carry out the output of single byte, finish current normalization process then, otherwise carry out twice byte output, finish current normalization process then;
(6.3) code value C is moved to left CT time, then execution in step (6.3.1);
If (6.3.1) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, then execution in step (6.3.4); Otherwise, execution in step (6.3.2);
If (6.3.2) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (6.3.3); Otherwise it is 8 that NewCT is set, then execution in step (6.3.4);
If (6.3.3) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT then is set, otherwise it is 8 that NewCT is set; Execution in step (6.3.4) then;
If (6.3.4) difference of NumSLA0 and CT is less than NewCT, at first upgrade code value C, execution in step (6.3.5) then with value with code value C and Qel; Otherwise elder generation upgrades code value C, execution in step (6.3.10) then with code value C and Qel's with value;
If (6.3.5) NumSLA1-CT is less than zero, then carry out the output of single byte, finish current normalization process then; Otherwise, execution in step (6.3.6);
If (6.3.6) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT then is set, then execution in step (6.3.9); Otherwise, execution in step (6.3.7);
If (6.3.7) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (6.3.8); Otherwise it is 8 that NewCT is set, then execution in step (6.3.9);
If (6.3.8) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT then is set, otherwise it is 8 that NewCT is set; Execution in step (6.3.9) then;
If (6.3.9) difference of NumSLA1 and CT is less than NewCT, then carry out twice byte output, finish current normalization process then; Otherwise, carry out three byte output, finish current normalization process then;
If (6.3.10) NumSLA1-CT is less than zero, then carry out twice byte output, finish current normalization process then; Otherwise, execution in step (6.3.11);
If (6.3.11) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT then is set, then execution in step (6.3.14); Otherwise, execution in step (6.3.12);
If (6.3.12) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (6.3.13); Otherwise it is 8 that NewCT is set, then execution in step (6.3.14);
If (6.3.13) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT then is set, otherwise it is 8 that NewCT is set; Execution in step (6.3.14) then;
If (6.3.14) difference of NumSLA1 and CT is less than NewCT, then carry out three byte output, finish current normalization process then; Otherwise carry out four byte output, finish current normalization process then.
SHIFT_V in Fig. 2, Fig. 3 and Fig. 4 (X), expression moves to left to operand X, and the X value after moving to left is more than or equal to hexadecimal value 0x8000.
In Fig. 5, Fig. 6 and Fig. 7, what " previous code stream byte " represented is last two context symbol last byte to the normalization code stream of generation.
More than describing only is a specific embodiment of the present invention; Obviously to those skilled in the art; After having understood content of the present invention and principle; All possibly under the situation that does not deviate from the principle of the invention, structure, carry out various corrections and change on form and the details, but these are based on the correction of inventive concept with change still within claim protection range of the present invention.
Claims (4)
1. the arithmetic coding code value method for normalizing based on the JPEG2000 standard comprises the steps:
(1) reads in coding necessary probability interval value, the first probability interval value shift count NumSLA0, the second probability interval value shift count NumSLA1, the first small probability symbol probability values, the second small probability symbol probability values and be used to represent the normalization process identifier of two context symbol to the probability type; And code value upgraded; Confirm the code value count value CT that moves to left, this pair context symbol comprises two big probability symbols, double small probability symbol, small probability/big probability symbol and big probability/small probability symbol to the probability type;
(2), judge current normalization type according to probability interval value, normalization process identifier and small probability symbol probability values:
If the probability type that (2a) two context symbol are right is two big probability symbols, then judge according to following criterion:
If (2a.1) the probability interval value is less than the twice of the first small probability symbol probability values, then adjust the first small probability symbol probability values, and execution in step (2a.2); Otherwise, execution in step (2a.4);
If (2a.2) the adjusted first small probability symbol probability values is less than the twice of the second small probability symbol probability values, then current normalization type is one type of two normalization, finishes current normalization type and judges; Otherwise, execution in step (2a.3);
(2a.3) calculate difference between the adjusted first small probability symbol probability values and the second small probability symbol probability values, if this difference less than hexadecimal value 0x8000, then current normalization type is two types of two normalization, finishes current normalization type judgement; Otherwise be single normalization, finish current normalization type and judge;
(2a.4) difference of the calculating probability interval value and the first small probability symbol probability values, and relatively with the relation of hexadecimal value 0x8000:
If the difference of this probability interval value and the first small probability symbol probability values is then adjusted the difference of the probability interval value and the first small probability symbol probability values less than hexadecimal value 0x8000, and execution in step (2a.5), otherwise, execution in step (2a.7);
If (2a.5) adjusted difference is less than the twice of the second small probability symbol probability values, then current normalization type is one type of two normalization, finishes current normalization type and judges; Otherwise, execution in step (2a.6);
(2a.6) relatively this adjusted difference and the second small probability symbol probability values; If the difference between this adjusted difference and the second small probability symbol probability values is less than hexadecimal value 0x8000; Then current normalization type is two types of two normalization, finishes current normalization type and judges; Otherwise be single normalization, finish current normalization type and judge;
If (2a.7) difference of the probability interval value and the first small probability symbol probability values is less than the twice of the second small probability symbol probability values, then current normalization type is single normalization, finishes current normalization type and judges; Otherwise, execution in step (2a.8);
If (2a.8) difference of the probability interval value and the first small probability symbol probability values less than the second small probability symbol probability values and hexadecimal value 0x8000's and value, then current normalization type is single normalization, finishes current normalization type and judges; Otherwise, be zero degree normalization, finish current normalization type and judge;
If the probability type that (2b) two context symbol are right is big probability/small probability symbol, then judge according to following criterion:
If (2b.1) the probability interval value is less than the twice of the first small probability symbol probability values, then adjust the first small probability symbol probability values, and execution in step (2b.2); Otherwise, execution in step (2b.3);
If (2b.2) the adjusted first small probability symbol probability values is less than the twice of the second small probability symbol probability values, then current normalization type is two types of two normalization, finishes current normalization type and judges; Otherwise, be one type of two normalization, finish current normalization type and judge;
If (2b.3) difference of the probability interval value and the first small probability symbol probability values is more than or equal to hexadecimal value 0x8000, then current normalization type is single normalization, finishes current normalization type and judges; Otherwise, execution in step (2b.4);
(2b.4) difference of the adjustment probability interval value and the first small probability symbol probability values;
If (2b.5) adjusted difference is more than or equal to the twice of the second small probability symbol probability values, then current normalization type is one type of two normalization, finishes current normalization type and judges; Otherwise, be two types of two normalization, finish current normalization type and judge;
If the probability type that (2c) two context symbol are right is small probability/big probability symbol, then judge according to following criterion:
If (2c.1) the probability interval value is more than or equal to the twice of the first small probability symbol probability values, then adjust the first small probability symbol probability values, and execution in step (2c.2); Otherwise, execution in step (2c.5);
If (2c.2) the adjusted first small probability symbol probability values is less than the twice of the second small probability symbol probability values, then current normalization type is two types of two normalization, finishes current normalization type and judges; Otherwise, execution in step (2c.3);
(2c.3) difference of the adjusted first small probability symbol probability values of calculating and the second small probability symbol probability values;
If (2c.4) this difference is less than hexadecimal value 0x8000, then current normalization type is two types of two normalization, finishes current normalization type and judges; Otherwise, be single normalization, finish current normalization type and judge;
(2c.5) difference of the adjustment probability interval value and the first small probability symbol probability values;
If (2c.6) this adjusted difference is less than the twice of the second small probability symbol probability values, then current normalization type is one type of two normalization, finishes current normalization type and judges; Otherwise, execution in step (2c.7);
(2c.7) relatively this adjusted difference and the second small probability symbol probability values;
If (2c.8) difference between this adjusted difference and the second small probability symbol probability values is less than hexadecimal value 0x8000, then current normalization type is two types of two normalization, finishes current normalization type and judges; Otherwise, be single normalization, finish current normalization type and judge;
If the probability type that (2d) two context symbol are right is a double small probability symbol, then normalization type is judged as one type of two normalization;
(3), carry out normalization and handle according to the normalization type:
(3a) to single normalization type, carry out normalization according to following steps and handle:
If (3a.1) the first probability interval value shift count NumSLA0 or the second probability interval value shift count NumSLA1 are less than the code value counting CT that moves to left,, finish current normalization process with code value C move to left NumSLA0 or NumSLA1 time; Otherwise, execution in step (3a.2);
If (3a.2) last two context symbol are hexadecimal number 0xFF to last byte of the normalization code stream that produces, it is 7 that the code value count value NewCT that temporarily moves to left then is set, and execution in step (3a.4), otherwise, execution in step (3a.3);
If (3a.3) last two context symbol are hexadecimal number 0xFE to last byte of the normalization code stream of generation; And current code value C is more than or equal to hexadecimal number 0x8000000; It is 7 that the code value count value NewCT that temporarily moves to left is set, and is 8 otherwise establish NewCT;
(3a.4) code value C moves to left NumSLA0-CT time, then execution in step (3a.5);
If (3a.5) the first probability interval value shift count NumSLA0 or the second probability interval value shift count NumSLA1 and code value move to left the difference of count value CT more than or equal to 0; And, then carry out the output of single byte less than the code value count value NewCT that moves to left temporarily; Otherwise carry out twice byte output;
(3b) to one type of two normalization type, carry out one type of two normalization according to following steps and handle:
If (3b.1) NumSLA0 is less than code value move to left count value CT, then execution in step (3b.2); Otherwise, execution in step (3b.8);
If (3b.2) NumSLA1-(CT-NumSLA0) then moves to left NumSLA0+NumSLA1 time to code value C less than zero, finish to work as pre-treatment; Otherwise, execution in step (3b.3);
(3b.3) code value C is moved to left NumSLA0 time, and the code value count value NewCT that temporarily moves to left is updated to NewCT-NumSLA0, execution in step (3b.4);
If (3b.4) NumSLA1-NewCT is more than or equal to zero, C moves to left NewCT time with code value, then execution in step (3b.5); Otherwise, finish to work as pre-treatment;
If (3b.5) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, then execution in step (3b.8); Otherwise, execution in step (3b.6);
If (3b.6) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (3b.7); Otherwise it is 8 that NewCT is set, and finishes to work as pre-treatment;
If (3b.7) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT is set, otherwise it is 8 that NewCT is set; If the difference of NumSLA1 and CT, is then carried out the output of single byte less than NewCT, finish current normalization process then, otherwise, carry out twice byte output, finish to work as pre-treatment then;
(3b.8) code value C is moved to left CT time execution in step (3b.9);
If (3b.9) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, execution in step (3b.12); Otherwise, execution in step (3b.10);
If (3b.10) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (3b.11); Otherwise it is 8 that NewCT is set, execution in step (3b.12);
If (3b.11) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT is set, otherwise it is 8 that NewCT is set; Execution in step (3b.12);
If (3b.12) difference of shift count NumSLA0 and CT is less than NewCT, execution in step (3b.13), otherwise execution in step (3b.17);
If (3b.13) NumSLA1 deduct CT difference less than zero, then carry out the output of single byte, finish to work as pre-treatment then; Otherwise, execution in step (3b.14);
If (3b.14) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, and finishes to work as pre-treatment; Otherwise, execution in step (3b.15);
If (3b.15) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (3b.16); Otherwise it is 8 that NewCT is set, and finishes to work as pre-treatment;
If (3b.16) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT is set, otherwise it is 8 that NewCT is set; If the difference of shift count NumSLA1 and CT, is then carried out twice byte output less than NewCT, finish to work as pre-treatment then; Otherwise carry out three byte output, finish to work as pre-treatment then;
If (3b.17) NumSLA1 deduct CT difference less than zero, then carry out twice byte output, finish current normalization process then; Otherwise, execution in step (3b.18);
If (3b.18) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, and finishes to work as pre-treatment; Otherwise, execution in step (3b.19);
If (3b.19) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (3b.20); Otherwise it is 8 that NewCT is set, and finishes to work as pre-treatment;
If (3b.20) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT is set, otherwise it is 8 that NewCT is set; If the difference of NumSLA1 and CT, is then carried out three byte output less than NewCT, finish to work as pre-treatment then; Otherwise carry out four byte output, finish to work as pre-treatment then;
(3c) to two types of two normalization types, carry out two types of two normalization according to following steps and handle:
If (3c.1) NumSLA0-CT is less than zero, execution in step (3c.2); Otherwise, execution in step (3c.8);
If (3c.2) NumSLA1-(CT-NumSLA0) is less than zero, earlier code value C is moved to left NumSLA0 time, and code value after will moving to left and Qe1 addition, again should and value move to left end process then NumSLA1 time; Otherwise, execution in step (3c.3);
(3c.3) earlier code value C is moved to left NumSLA0 time, code value after usefulness moves to left then and Qe1 upgrade code value C with value, upgrade NewCT with NewCT-NumSLA0 simultaneously, execution in step (3c.4);
If (3c.4) NumSLA1-NewCT then moves to left code value C NewCT time, then execution in step (3c.5) more than or equal to zero; Otherwise, finish to work as pre-treatment;
If (3c.5) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, and finishes to work as pre-treatment; Otherwise, execution in step (3c.6);
If (3c.6) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (3c.7); Otherwise it is 8 that NewCT is set, and finishes to work as pre-treatment;
If (3c.7) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT then is set, otherwise it is 8 that NewCT is set; If NumSLA1-CT, carries out the output of single byte less than NewCT, finish then to work as pre-treatment, otherwise carry out twice byte output, finish to work as pre-treatment then;
(3c.8) code value C is moved to left CT time, then execution in step (3c.9);
If (3c.9) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT is set, then execution in step (3c.12); Otherwise, execution in step (3c.10);
If (3c.10) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (3c.11); Otherwise it is 8 that NewCT is set, then execution in step (3c.12);
If (3c.11) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT then is set, otherwise it is 8 that NewCT is set; Execution in step (3c.12) then;
If (3c.12) difference of NumSLA0 and CT is less than NewCT, at first upgrade code value C, execution in step (3c.13) then with value with code value C and Qe1; Otherwise elder generation upgrades code value C, execution in step (3c.17) then with code value C and Qe1's with value;
If (3c.13) NumSLA1-CT is less than zero, then carry out the output of single byte, finish to work as pre-treatment; Otherwise, execution in step (3c.14);
If (3c.14) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT then is set, and finishes to work as pre-treatment; Otherwise, execution in step (3c.15);
If (3c.15) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (3c.16); Otherwise it is 8 that NewCT is set, and finishes to work as pre-treatment;
If (3c.16) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT then is set, otherwise it is 8 that NewCT is set; If the difference of NumSLA1 and CT, is then carried out twice byte output less than NewCT, finish to work as pre-treatment then; Otherwise, carry out three byte output, finish to work as pre-treatment then;
If (3c.17) NumSLA1-CT is less than zero, then carry out twice byte output, finish current normalization process then; Otherwise, execution in step (3c.18);
If (3c.18) last two context symbol are hexadecimal value 0xFF to last byte of the normalization code stream of generation, it is 7 that NewCT then is set, and finishes to work as pre-treatment; Otherwise, execution in step (3c.19);
If (3c.19) last two context symbol are hexadecimal value 0xFE to last byte of the normalization code stream of generation, execution in step (3c.20); Otherwise it is 8 that NewCT is set, and finishes to work as pre-treatment;
If (3c.20) code value C is more than or equal to hexadecimal value 0x8000000, it is 7 that NewCT then is set, otherwise it is 8 that NewCT is set; If the difference of NumSLA1 and CT, is then carried out three byte output less than NewCT, finish to work as pre-treatment then; Otherwise carry out four byte output, finish to work as pre-treatment then;
(4) according to the byte output type with move to left after code value, the code stream byte that output is corresponding.
2. the arithmetic coding code value method for normalizing based on the JPEG2000 standard according to claim 1; It is characterized in that step (1) is described upgrades code value; Be to being under the condition of big probability symbol in first context symbol; Calculate the second small probability symbol probability values and current code value and value, and code value is updated to this and value.
3. the arithmetic coding code value method for normalizing based on the JPEG2000 standard according to claim 1; It is characterized in that step (2a), (2b) and (2c) the described adjustment first small probability symbol probability values; Be with the first small probability symbol probability values several times that move to left, up to the first small probability symbol probability values more than or equal to hexadecimal value 0x8000.
4. the arithmetic coding code value method for normalizing based on the JPEG2000 standard according to claim 1; It is characterized in that step (2a), (2b) and (2c) difference of described adjustment probability interval value and the first small probability symbol probability values; Be difference with the probability interval value and the first small probability symbol probability values several times that move to left, up to the difference of the probability interval value and the first small probability symbol probability values more than or equal to hexadecimal value 0x8000.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010128830 CN101848388B (en) | 2010-03-19 | 2010-03-19 | Method for normalizing arithmetic encoding value based on JPEG (Joint Photographic Experts Group) 2000 standard |
PCT/CN2010/080584 WO2011113290A1 (en) | 2010-03-19 | 2010-12-31 | Method for processing arithmetic entropy coding in real time at high-speed based on joint photographic experts group (jpeg) 2000 standard |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010128830 CN101848388B (en) | 2010-03-19 | 2010-03-19 | Method for normalizing arithmetic encoding value based on JPEG (Joint Photographic Experts Group) 2000 standard |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101848388A CN101848388A (en) | 2010-09-29 |
CN101848388B true CN101848388B (en) | 2012-01-04 |
Family
ID=42772819
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010128830 Expired - Fee Related CN101848388B (en) | 2010-03-19 | 2010-03-19 | Method for normalizing arithmetic encoding value based on JPEG (Joint Photographic Experts Group) 2000 standard |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101848388B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011113290A1 (en) * | 2010-03-19 | 2011-09-22 | 西安电子科技大学 | Method for processing arithmetic entropy coding in real time at high-speed based on joint photographic experts group (jpeg) 2000 standard |
CN102523455B (en) * | 2012-01-02 | 2014-04-02 | 西安电子科技大学 | Multi-thread arithmetic coding circuit and method based on standard JPEG 2000 |
CN104394418B (en) * | 2014-09-23 | 2018-06-05 | 清华大学 | A kind of video data encoding, decoded method and device |
CN111818335B (en) * | 2020-07-03 | 2022-04-26 | Tcl华星光电技术有限公司 | Entropy coding method and device and electronic equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6961475B2 (en) * | 2001-03-30 | 2005-11-01 | Ricoh Co., Ltd. | Context model access to memory based on run and skip counts and context model skipping |
CN1267853C (en) * | 2004-04-07 | 2006-08-02 | 西安交通大学 | VLSI realizing method of synchronous flowing arithmetic coder |
CN101222637A (en) * | 2008-02-01 | 2008-07-16 | 清华大学 | Encoding method with characteristic indication |
-
2010
- 2010-03-19 CN CN 201010128830 patent/CN101848388B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101848388A (en) | 2010-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6728385B2 (en) | Digital image recompression | |
CN101841707B (en) | High-speed real-time processing arithmetic coding method based on JPEG 2000 standard | |
Emmons et al. | Cracking open the dnn black-box: Video analytics with dnns across the camera-cloud boundary | |
CN101820549B (en) | High-speed real-time processing arithmetic entropy coding system based on JPEG2000 | |
CN101848388B (en) | Method for normalizing arithmetic encoding value based on JPEG (Joint Photographic Experts Group) 2000 standard | |
Choi et al. | Energy-efficient design of processing element for convolutional neural network | |
CN103246499A (en) | Device and method for parallelly processing images | |
CN101848387A (en) | Method for determining arithmetic encoding probability interval value based on JPEG (Joint Photographic Experts Group) 2000 standard | |
Sjövall et al. | High-level synthesis implementation of an embedded real-time HEVC intra encoder on FPGA for media applications | |
CN102123275B (en) | Video component data information acquiring and extracting method | |
CN113780523A (en) | Image processing method, image processing device, terminal equipment and storage medium | |
CN102088607B (en) | Memory quotient (MQ) coding method and circuit based on JPEG (joint photographic experts group) 2000 standard | |
Sarawadekar et al. | VLSI design of memory-efficient, high-speed baseline MQ coder for JPEG 2000 | |
WO2022258055A1 (en) | Point cloud attribute information encoding and decoding method and apparatus, and related device | |
CN103152567A (en) | Columbus encoder with index of any order and method thereof | |
CN113946617A (en) | Data processing method and device, electronic equipment and storage medium | |
Dhanabal et al. | FPGA based image processing unit usage in coin detection and counting | |
Dong et al. | Implementation of A Real-Time Lossless JPEG-LS Compression Algorithm Based on FPGA | |
Chen et al. | A new area and power efficient DCT circuits using sporadic logarithmic shifters | |
Deng et al. | The FPGA design of JPEG-LS image lossless decompression IP core | |
Di et al. | A high-throughput VLSI architecture design of arithmetic encoder in JPEG2000 | |
CN105007490A (en) | OmapL138-chip-based Jpeg compression algorithm | |
CN107809643A (en) | A kind of coding/decoding method of image, device and medium | |
WO2023025024A1 (en) | Point cloud attribute coding method, point cloud attribute decoding method and terminal | |
WO2024120323A1 (en) | Attribute transformation coding method, attribute transformation decoding method, and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120104 Termination date: 20190319 |