CN100596198C - Encoding method and encoder - Google Patents

Encoding method and encoder Download PDF

Info

Publication number
CN100596198C
CN100596198C CN 200610164457 CN200610164457A CN100596198C CN 100596198 C CN100596198 C CN 100596198C CN 200610164457 CN200610164457 CN 200610164457 CN 200610164457 A CN200610164457 A CN 200610164457A CN 100596198 C CN100596198 C CN 100596198C
Authority
CN
China
Prior art keywords
probability distribution
distribution information
encoded
variable length
length code
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.)
Active
Application number
CN 200610164457
Other languages
Chinese (zh)
Other versions
CN101198055A (en
Inventor
金欣
崔春晖
熊联欢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 200610164457 priority Critical patent/CN100596198C/en
Publication of CN101198055A publication Critical patent/CN101198055A/en
Application granted granted Critical
Publication of CN100596198C publication Critical patent/CN100596198C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a coding method which comprises the following steps: probability distribution information of various symbols waiting for coding of syntactic elements in the prior block is acquired, and probability distribution information which does not conform to sampling conditions is removed from the probability distribution information according to sampling ranges of the prior symbols waiting for coding; a variable length code list is generated by utilization of the probability distribution information after removal, and the current symbols waiting for coding are coded according tothe generated variable length code list. Moreover, the invention also provides a coder, and the entropy coder comprises a probability distribution information removing unit, a variable length code list generating unit and an entropy coding execution unit. The invention has the advantages of capability of improving coding efficiency of entropy coding, reduction of code rate and realization of improvement of peak signal-to-noise ratio.

Description

A kind of coding method and encoder
Technical field
The present invention relates to technology of video compressing encoding, relate in particular to a kind of coding method and a kind of encoder.
Background technology
Vision signal because contain much information, transmission network bandwidth requirement height, therefore before video signal transmission, need carry out compressed encoding, to save transmission bandwidth to it.In order to adapt to global industry and expanding economy, standardization body has accelerated to formulate the paces of video encoding standard both at home and abroad.
Entropy coding is the core technology in the video coding system, is last module of whole video coding framework, and its major function is to remove the statistical redundancy of data.A series of syntactic elements to all modules generations before liking of entropy coding comprise macro block (mb) type, reference frame index, coding mode (CBP), quantization parameter (QP), the residual error of motion vector, the residual error coefficient behind the transform and quantization etc.In all these syntactic elements, the amount of information of residual error coefficient is maximum, simultaneously also is tool encoding compression space, thereby all is the emphasis of entropy coding research all the time.
Entropy coding mainly is divided into two classes: variable-length encoding (VLC, Variable Length Coding) and arithmetic coding (Arithmetic Coding).Arithmetic coding utilizes the joint probability of coded identification, is easy to probability match, the code efficiency height, but, its application is restricted owing to realize complicated cost height.Variable-length encoding realizes simply, computational complexity is low, therefore is widely adopted in video encoding standard and consumption electronic product.As two-dimentional VLC (2D-VLC) entropy coder, the 3D-VLC entropy coder, and based on Variable Length Code (CAVLC) entropy coder of context-adaptive etc.
Traditional elongated entropy coding method is to realize variable-length encoding by the variable length code table of depositing the syntactic element correspondence in encoder.In some content-based entropy coding algorithms, having adopted according to conditional probability is that a syntactic element designs a plurality of variable length code tables, the technology of according to the continuous variation of condition code table being switched in cataloged procedure.Wherein, described variable length code table can be an one dimension, i.e. the corresponding code word of symbol; Also can be two-dimentional, promptly a symbol be to corresponding code word.
But, because these code tables itself are to generate according to the probability distribution of corresponding syntactic element is prior, in whole cataloged procedure, can not change in real time, content-based adaptive degree is limited, so code efficiency is not high.And the complexity of real-time statistics syntactic element probability distribution is too high, implements comparatively complicated.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of coding method, improves the code efficiency of entropy coding.
For achieving the above object, coding method provided by the invention is as follows:
Obtain the probability distribution information of current block each symbol of syntactic element to be encoded, from described probability distribution information, get rid of the probability distribution information of all run values greater than the symbol of nlr according to the span of current symbol to be encoded;
Probability distribution information after utilize getting rid of generates variable length code table, according to the variable length code table that generates to current encoding symbols to be encoded.
In addition, the present invention also provides a kind of encoder, can improve the code efficiency of entropy coding.
This encoder comprises: probability distribution information rejected unit, variable length code table generation unit and coding performance element, wherein,
The probability distribution information rejected unit, be used to obtain the probability distribution information of current block each symbol of syntactic element to be encoded, span according to current symbol to be encoded is got rid of the probability distribution information of all run values greater than the symbol of nlr from the probability distribution information of being obtained, and is used for the probability distribution information after getting rid of is sent to the variable length code table generation unit;
The variable length code table generation unit is used to receive the probability distribution information from the probability distribution information rejected unit, generates variable length code table according to the probability distribution information of receiving, and the variable length code table that is used for generating sends to the coding performance element;
The coding performance element, be used to receive variable length code table from the variable length code table generation unit, and according to the variable length code table of receiving to current encoding symbols to be encoded.
This shows, the present invention is carrying out piece in the process of entropy coding, coding side need be got rid of the probability distribution information of current block each symbol of syntactic element to be encoded according to the value condition of current symbol to be encoded, to get rid of the symbol that can not occur in the reality, then according to the variable length code table that probability distribution information generated after getting rid of to current encoding symbols to be encoded, rather than directly encode according to the variable length code table of preserving.So just the code word of originally distributing to the symbol that can not occur in these reality can be saved, effectively reduce the length of code word, improve the code efficiency of entropy coding, thereby can reduce code check, realize the raising of Y-PSNR.And, probability distribution that need not the real-time statistics syntactic element, thus the complexity of encoding and decoding reduced.
Description of drawings
Fig. 1 is the coder structure schematic diagram in the embodiment of the invention.
Fig. 2 is the coding flow chart in the embodiment of the invention.
Fig. 3 is the probability distribution information rejected unit structural representation in the embodiment of the invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, the embodiment that develops simultaneously with reference to the accompanying drawings is described in further detail the present invention.
The basic thought of elongated entropy coding method provided by the invention is, obtain the probability distribution information of current block each symbol of syntactic element to be encoded, from described probability distribution information, get rid of the probability distribution information that does not meet the value condition according to the span of current symbol to be encoded; Probability distribution information after utilize getting rid of generates variable length code table, according to the variable length code table that generates to current encoding symbols to be encoded.
Corresponding entropy coding method provided by the present invention, the present invention also provides a kind of encoder, and its concrete structure mainly comprises referring to shown in Figure 1: probability distribution information rejected unit, variable length code table generation unit and coding performance element, wherein,
The probability distribution information rejected unit, be used to obtain the probability distribution information of current block each symbol of syntactic element to be encoded, span according to current symbol to be encoded is got rid of the probability distribution information that does not meet the value condition from the probability distribution information of being obtained, and is used for the probability distribution information after getting rid of is sent to the variable length code table generation unit;
The variable length code table generation unit is used to receive the probability distribution information from the probability distribution information rejected unit, generates variable length code table according to the probability distribution information of receiving, and the variable length code table that is used for generating sends to the coding performance element;
The coding performance element, be used to receive variable length code table from the variable length code table generation unit, and according to the variable length code table of receiving to current encoding symbols to be encoded.
The present invention is applicable to the entropy coding that various employing variable length code tables are encoded.For ease of understanding, be that the present invention is described in detail for example below with 2D-VLC.
2D-VLC is the elongated entropy coding at discrete cosine transform (DCT) coefficient coding, this technology is shown as (run by " z " font (zig-zag) scanning and Run-Length Coding with the piece coefficient table, level) form, and adopt variable length code encode this (run, level) several right.Wherein, run represents zero stroke, and level represents zero coefficient values.Because 2D-VLC adopts the VLC table to carry out variable-length encoding, the application of policies that therefore the present invention dynamically can be generated the VLC table is in this entropy coding method.
In the present embodiment, the bivariate table vlc_table that the encoding and decoding end is deposited no longer is (the run that generates in advance according to probability distribution originally, level) codeword table codenum_table, but direct reflection (run, level) the dimensional probability distribution table percent_table of probability distribution.Each point in this percent_table table corresponding a kind of possible (run, level) probability that takes place of situation, the i.e. probability distribution information of each symbol of syntactic element to be encoded.This dimensional probability distribution table percent_table can be stored in the probability distribution information rejected unit shown in Figure 1.
Referring to shown in Figure 2, the elongated entropy coding flow process in the present embodiment mainly may further comprise the steps:
Step 201: add up prefabricated information numcoeff and totrun.
Wherein, numcoeff represents the nonzero coefficient number of current block; Totrun represents the summation of all run of the run sequence of current block, the i.e. summation of the run of all symbols to be encoded.Such as, be example with the 4x4 piece, the span of numcoeff is 0~16, the span of totrun is 0~15.
For ease of the decoding end decoding, coding side need send to decoding end with described prefabricated information, and before sending, coding side need be encoded to described prefabricated information.The concrete mode that numcoeff and totrun are encoded can realize by searching corresponding 1D_VLC table.
Such as, formulate a cover be used for the encoding 1D_VLC table of numcoeff, utilize adjacent piece that the numcoeff of current block is predicted, which adopts open 1D_VLC table when selecting to encode the numcoeff of current block, and numcoeff is encoded by the 1D_VLC table of searching selection according to predicted value.The mode of this choosing table is to come the distribution codeword for numcoeff according to conditional probability P (the adjacent piece of current block numcoeff/ is to the predicted value of current block numcoeff) in essence, can utilize the correlation between the adjacent block on the space like this.
In addition, also can formulate a cover be used for the encoding 1D_VLC table of totrun, the numcoeff that utilizes current block predicts the totrun of current block, which adopts open 1D_VLC table when selecting to encode the totrun of current block according to predicted value then, and totrun is encoded by the 1D_VLC table of searching selection.Here be actually the numcoeff that utilized current block and restriction relation totrun<=16-numcoeff of totrun.
Step 202: first of block to be encoded is treated coded identification (run, level) encode before, a counting variable k and a variable nlr are set.
Wherein, k represents current remaining uncoded (run, level) logarithm; Nlr represent current remaining all not coded identification (run, run's level) and.Under initial situation, k=numcoeff, nlr=totrun is k initialize numcoeff; Be nlr initialize totrun.
Step 203: whether judge k greater than 0, if then execution in step 204; Otherwise (run, level) to encoded intact, process ends is finished the whole cataloged procedures to this piece to all of expression current block.
Step 204: dimensional probability distribution table percent_table is adjusted according to nlr.
Because for current a pair of (run, level), wherein the value of run can not exceed current nlr, i.e. run<=nlr, therefore can block that one dimension that characterizes run among the dimensional probability distribution table percent_table according to nlr, give up those points of run>nlr.That is to say, get rid of in those current reality can not occur (run, level) right, from described dimensional probability distribution table, get rid of the probability distribution information of all run values greater than the symbol of nlr.
Step 204 can be finished by the probability distribution information rejected unit among Fig. 1.
Step 205: dynamically generate (run, variable length code table level) according to adjusted dimensional probability distribution table percent_table.
Step 206: to be encoded (run is level) to encoding to current according to the variable length code table of dynamic generation.
Such as, probability distribution table after blocking is carried out index Columbus (Exp_golomb) coding, dynamically generate corresponding golomb_codenum table, escape table and golomb_grab, then, (run is level) to encoding to current according to the golomb_codenum of dynamic generation table, escape table and golomb_grab.
Wherein, step 205 can be finished by the variable length code table generation unit among Fig. 1; Step 206 can be finished by the coding performance element among Fig. 1.
Step 207: encoded current (run, level) to after, variable k and nlr are upgraded, and after renewal, return execution in step 203.
Wherein, the k=k-1 after the renewal, the nlr=nlr-run after the renewal, run herein are meant (run, level) run of centering that firm coding is intact.
Return execution in step 203 be actually determining step 206 described current symbols to be encoded (run, level) be step 207 just encoded (whether run is last symbol to be encoded level), if, process ends then; Otherwise, continue next one encoding symbols to be encoded.
Referring to shown in Figure 3, in the present embodiment, probability distribution information rejected unit shown in Figure 1 can comprise: information acquisition unit, information rejected unit and information transmitting unit, wherein,
Information acquisition unit is used to obtain the probability distribution information of described current block each symbol of syntactic element to be encoded, and the probability distribution information of obtaining is sent to the information rejected unit;
The information rejected unit, be used to receive probability distribution information from information acquisition unit, and be used for calculating described all not coded identification run's and nlr, from the probability distribution information of receiving, get rid of the probability distribution information of all run values, and will send to information transmitting unit through the probability distribution information of getting rid of greater than the symbol of nlr;
Information transmitting unit is used to receive the probability distribution information of self information rejected unit, and the probability distribution information of receiving is sent to the variable length code table generation unit.
Adopt method shown in Figure 2, can with originally distribute to can not occur in these reality (run, level) right code word saves, and distributes to the current symbol that might occur.Such strategy can effectively reduce the length of code word, improves the code efficiency of entropy coding, thereby realizes the raising of Y-PSNR, reduces code check.
Present embodiment mainly is so that (run level) to for syntactic element has been described in detail, need to prove, for the syntactic element of other form, as run, level, (level) etc., the present invention is suitable equally for last, run.Such as, for syntactic element is the situation of run, can deposit the one dimension symbol probability distribution table of run in advance at the encoding and decoding end, in the entropy coding process, value variation according to run is adjusted described one dimension symbol probability distribution table, gets rid of the symbol that can not occur in the current reality, and then according to adjusted probability distribution table run is encoded, wherein concrete processing procedure is similar to the above embodiments, gives unnecessary details no longer one by one here.
The above has carried out further detailed description to purpose of the present invention, technical scheme and beneficial effect; institute is understood that; the above is not in order to restriction the present invention; within the spirit and principles in the present invention all; any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1, a kind of coding method is characterized in that, this method comprises:
Obtain the probability distribution information of current block each symbol of syntactic element to be encoded, from described probability distribution information, get rid of all zero stroke run values all probability distribution information of run and symbol nlr of coded identification not greater than described middle current residual according to the span of current symbol to be encoded;
Probability distribution information after utilize getting rid of generates variable length code table, according to the variable length code table that generates to current encoding symbols to be encoded.
2, method according to claim 1 is characterized in that, described syntactic element be zero stroke run or run and zero coefficient values level several to (run, level).
3, method according to claim 1 is characterized in that, the initial value of described nlr for coding before the summation of the run of all symbols to be encoded in described.
4, according to each described method of claim 1 to 3, it is characterized in that, described to further comprising after the current encoding symbols to be encoded:
Judge whether the symbol to be encoded of just having encoded is last symbol to be encoded, if, method ends then; Otherwise, continue next one encoding symbols to be encoded.
5, method according to claim 4 is characterized in that,
Probability distribution information after described utilization is got rid of generates variable length code table and comprises: adjusted probability distribution information is carried out Columbus's index E xp_golomb coding, generate corresponding golomb_codenum table, escape table and golomb_grab;
Describedly current encoding symbols to be encoded is comprised according to the variable length code table that generates: according to the golomb_codenum table that generates, escape table and golomb_grab to current encoding symbols to be encoded.
6, method according to claim 4 is characterized in that, this method further comprises:
Calculate all run sum totrun of described nonzero coefficient number n umcoeff and described run sequence, and send to decoding end after numcoeff and totrun encoded respectively.
7, method according to claim 6 is characterized in that,
Described numcoeff is encoded comprises: for numcoeff is provided with a cover one dimension variable-length encoding 1D_VLC table, utilize adjacent piece that the numcoeff of current block is predicted, select the 1D_VLC table according to predicted value, and numcoeff is encoded by the 1D_VLC table of searching selection;
Described totrun is encoded comprises: for totrun is provided with a cover 1D_VLC table, the numcoeff that utilizes current block predicts the totrun of current block, select the 1D_VLC table according to predicted value, and totrun is encoded by the 1D_VLC table of searching selection.
8, method according to claim 1 is characterized in that, the described probability distribution information of obtaining current block each symbol of syntactic element to be encoded further comprises before: the probability distribution information of preserving current block each symbol of syntactic element to be encoded.
9, a kind of encoder is characterized in that, this encoder comprises: probability distribution information rejected unit, variable length code table generation unit and coding performance element, wherein,
The probability distribution information rejected unit, be used to obtain the probability distribution information of current block each symbol of syntactic element to be encoded, from the probability distribution information of being obtained, get rid of all zero stroke run values all probability distribution information of run and symbol nlr of coded identification not according to the span of current symbol to be encoded, and be used for the probability distribution information after getting rid of is sent to the variable length code table generation unit greater than current residual;
The variable length code table generation unit is used to receive the probability distribution information from the probability distribution information rejected unit, generates variable length code table according to the probability distribution information of receiving, and the variable length code table that is used for generating sends to the coding performance element;
The coding performance element, be used to receive variable length code table from the variable length code table generation unit, and according to the variable length code table of receiving to current encoding symbols to be encoded.
10, encoder according to claim 9 is characterized in that, described probability distribution information rejected unit comprises: information acquisition unit, information rejected unit and information transmitting unit, wherein,
Information acquisition unit is used to obtain the probability distribution information of described current block each symbol of syntactic element to be encoded, and the probability distribution information of obtaining is sent to the information rejected unit;
The information rejected unit, be used to receive probability distribution information from information acquisition unit, and be used for calculating described all not coded identification zero stroke run's and nlr, from the probability distribution information of receiving, get rid of the probability distribution information of all run values, and will send to information transmitting unit through the probability distribution information of getting rid of greater than the symbol of nlr;
Information transmitting unit is used to receive the probability distribution information of self information rejected unit, and the probability distribution information of receiving is sent to the variable length code table generation unit.
CN 200610164457 2006-12-05 2006-12-05 Encoding method and encoder Active CN100596198C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610164457 CN100596198C (en) 2006-12-05 2006-12-05 Encoding method and encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200610164457 CN100596198C (en) 2006-12-05 2006-12-05 Encoding method and encoder

Publications (2)

Publication Number Publication Date
CN101198055A CN101198055A (en) 2008-06-11
CN100596198C true CN100596198C (en) 2010-03-24

Family

ID=39548149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610164457 Active CN100596198C (en) 2006-12-05 2006-12-05 Encoding method and encoder

Country Status (1)

Country Link
CN (1) CN100596198C (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795168B (en) * 2009-02-03 2012-12-26 雷凌科技股份有限公司 Approaching method of signal-to-noise ratio flexible message used for communication system
WO2011042645A1 (en) * 2009-10-05 2011-04-14 France Telecom Methods for encoding and decoding images, corresponding encoding and decoding devices and computer programs
US9094691B2 (en) * 2010-03-15 2015-07-28 Mediatek Singapore Pte. Ltd. Methods of utilizing tables adaptively updated for coding/decoding and related processing circuits thereof
CN102377996B (en) * 2010-08-05 2014-04-30 华为技术有限公司 Context-adaptive variable-length coding method and apparatus thereof
PT3349360T (en) * 2011-01-14 2019-12-09 Ge Video Compression Llc Entropy encoding and decoding scheme
CN102186087B (en) * 2011-06-24 2013-06-12 哈尔滨工业大学 Parallel non-zero coefficient context modeling method for binary arithmetic coding
CN108092670B (en) * 2017-11-03 2019-06-07 西安万像电子科技有限公司 Coding method and device
EP3780607A4 (en) 2018-04-13 2021-02-17 Zhejiang University Information maintaining encoding and decoding method and device
CN110545435B (en) * 2018-05-28 2023-05-12 深信服科技股份有限公司 Table top pixel coding method, device and storage medium based on probability model
US10652581B1 (en) * 2019-02-27 2020-05-12 Google Llc Entropy coding in image and video compression using machine learning
CN116233389A (en) * 2021-12-03 2023-06-06 维沃移动通信有限公司 Point cloud coding processing method, point cloud decoding processing method and related equipment

Also Published As

Publication number Publication date
CN101198055A (en) 2008-06-11

Similar Documents

Publication Publication Date Title
CN100596198C (en) Encoding method and encoder
CN102870413B (en) For the variable-length code (VLC) of decoding video data
CN101420614B (en) Image compression method and device integrating hybrid coding and wordbook coding
CA2498384C (en) Context-based adaptive variable length coding for adaptive block transforms
KR0180169B1 (en) A variable length coder
NO934396L (en) Subordinate system for further image processing with signal compression using adaptively adaptive signal blocks
Chrysafis et al. SBHP-a low complexity wavelet coder
US20140010278A1 (en) Method and apparatus for coding adaptive-loop filter coefficients
CN104365099A (en) Parameter update method for entropy coding and decoding of conversion coefficient level, and entropy coding device and entropy decoding device of conversion coefficient level using same
CN104205831A (en) Golomb-Rice/EG coding technique for CABAC in HEVC
US10127913B1 (en) Method of encoding of data stream, method of decoding of data stream, and devices for implementation of said methods
Spiegel et al. A comparative experimental study of lossless compression algorithms for enhancing energy efficiency in smart meters
CN101267553A (en) A method and device for coding and decoding
CA2289858C (en) Lossless image compression with tree coding
CN102355578B (en) A kind of entropy decoding method, device
CN100551064C (en) Variable length encoding method and device
CN102256126A (en) Method for coding mixed image
Rao et al. Evaluation of lossless compression techniques
CN102307303A (en) Ternary-representation-based image predictive coding method
CN101047857B (en) Method for implementing layering variable-length code decode
CN113453002B (en) Quantization and entropy coding method and apparatus
CN100469144C (en) Table transformation method for entropy encoder
Miroshnichenko et al. Compression of signs of DCT coefficients for additional lossless compression of JPEG images
CN103002275A (en) Dual-coefficient scanning method for CAVLC (context-based adaptive variable length coding)
Krivoulets Efficient entropy coding for image compression

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210427

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Device Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.