CN102377994A - Context-adaptive variable-length coding method and system thereof - Google Patents

Context-adaptive variable-length coding method and system thereof Download PDF

Info

Publication number
CN102377994A
CN102377994A CN2010102488952A CN201010248895A CN102377994A CN 102377994 A CN102377994 A CN 102377994A CN 2010102488952 A CN2010102488952 A CN 2010102488952A CN 201010248895 A CN201010248895 A CN 201010248895A CN 102377994 A CN102377994 A CN 102377994A
Authority
CN
China
Prior art keywords
coefficient
dimension
arrays
nonzero
total number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2010102488952A
Other languages
Chinese (zh)
Other versions
CN102377994B (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to CN201010248895.2A priority Critical patent/CN102377994B/en
Publication of CN102377994A publication Critical patent/CN102377994A/en
Application granted granted Critical
Publication of CN102377994B publication Critical patent/CN102377994B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a context-adaptive variable-length coding method and a system thereof. The method comprises the following steps that: a coefficient block that is needed to be coded is mapped as a one-dimensional coefficient array; and according to positional information of all coefficients in the one-dimensional coefficient array, the total number of nonzero coefficients in the one-dimensional coefficient array as well as a position of a first nonzero coefficient and a position of a last nonzero coefficient in the one-dimensional coefficient array are parsed; and with combination of the total number of the nonzero coefficients in the one-dimensional coefficient array, reversed scanning is carried out on all coefficients between the last nonzero coefficient and the first nonzero coefficient in the one-dimensional coefficient array, wherein the last nonzero coefficient and the first nonzero coefficient are contained in all the coefficients, so that coding on an original coefficient block is completed.

Description

Context-adaptive variable length decoding method and system
Technical field
The present invention relates to image processing field, relate more specifically to a kind of context-adaptive variable length decoding method and system.
Background technology
The video encoding standard of developing jointly by International Telecommunications Union's telecommunication standards tissue (ITU-T) and International Organization for Standardization H.264/AVC with respect to video encoding standard MPEG-4, H.263 and MPEG-2, bit rate has reduced by 39%, 49% and 64% respectively.H.264/AVC standard has been played the part of the key player in HDTV (HDTV) application that requires high compression rate, high video quality and stable transfer bit rate.Recent years, the research of real-time HDTV encoder is caught on.
In standard H.264/AVC, context-adaptive variable length code (CAVLC) is used to the conversion coefficient after the quantification of residual image is encoded.In CAVLC; Otherwise the Run-Length Coding and adaptive variable-length coding (VLC) indumentum of font scanning are used for 4x4 coefficient block or 2x2 coefficient block are encoded; Wherein having only colourity DC coefficient piece is the 2x2 coefficient block, and colourity ac coefficient piece, brightness DC coefficient piece and brightness ac coefficient piece are the 4x4 coefficient block.Generally, the CAVLC coding method can be divided into two stages: gamut sweep phase and coding stage.At the gamut sweep phase, otherwise with all coefficients in the order scan fraction piece of font and the statistical information of collection coefficient piece.Different according to coefficient block type (that is, 4x4 and 2x2 coefficient block), the maximum numbering quantity of coefficient in the coefficient block (gamut scanning) is 4,15 or 16.In coding stage, use look-up table (LUT) order that provides by standard H.264/AVC that five kinds of dissimilar syntactic elements are encoded based on the statistical information of coefficient block.Wherein, syntactic element and be used for the corresponding relation that coefficient block is encoded between the required information is listed in following table:
Figure BSA00000222741000021
Wherein exist five kinds to be used for variable length code table that Coeff_token is encoded, come Coeff_token encoded with any variable length code table actually and depend on the left side that the coefficient block of encoding with needs is adjacent and the number of the nonzero coefficient in the upside coefficient block.
Most of CAVLC encoders have adopted above-mentioned two stages coding method.Particularly,, at first carry out sweep phase with all coefficients in the scan fraction piece and obtain the statistical information of coefficient block, carry out coding stage successively each syntactic element is encoded according to the statistical information of coefficient block then for each coefficient block.In traditional CAVLC encoder, owing to before gamut scanning is accomplished, can't know the statistical information of coefficient block, so must carry out in proper order sweep phase and coding stage.
At Tung-Chien Chen; In " Analysis andArchitecture Design of an HDTV720p 30 Frames/s are Encoder H.264/AVC " that Shao-Yi Chien etc. is shown; When not having nonzero coefficient in the 8x8 coefficient block; Then skip the scan process of 4x4 coefficient block all in this 8x8 coefficient block, quicken the processing of CAVLC encoder through the value of investigating block encoding pattern (CBP).In " A High-PerformanceParallel CAVLC Encoder on a Fine-Grained Many-Core System " that Zhibin Xiao and Bevan Baas are shown; Five different syntactic elements are by parallel encoding; Handle (that is, improving throughput) with speech coding.Yet the throughput of these CAVLC encoders and hardware utilization ratio still can not meet the demands owing to following design defect: 1) than inefficient gamut scan process; 2) sweep phase and coding stage separates; 3) to the storage demand of syntactic element behind all statistical informations and the coding.Because the increase of quantization parameter (QP) makes the decreased number of nonzero coefficient in the coefficient block, the poor efficiency of existing C AVLC encoder design will be more obvious.
Summary of the invention
One or more problems in view of the above the invention provides a kind of context-adaptive variable length decoding method and system of novelty.
A kind of context-adaptive variable length decoding method according to the embodiment of the invention comprises: the coefficient block that will encode is mapped as the one dimension coefficient arrays; And parse the position of first nonzero coefficient and last nonzero coefficient in total number and the one dimension coefficient arrays of nonzero coefficient in the one dimension coefficient arrays according to the positional information of each coefficient in the one dimension coefficient arrays; Wherein, in the one dimension coefficient arrays coefficient put in order with coefficient block in the mapping sequence consensus of coefficient; And the total number that combines nonzero coefficient in the one dimension coefficient arrays, through and the one dimension coefficient arrays in the opposite direction that puts in order of coefficient last nonzero coefficient in the one dimension coefficient arrays, last nonzero coefficient and all coefficients between first nonzero coefficient and first nonzero coefficient in the one dimension coefficient arrays in the one dimension coefficient arrays carried out reverse scanning accomplish coding the coefficient block of needs coding.
Context-adaptive variable length coding system according to the embodiment of the invention comprises: initial resolution unit; The coefficient block that is configured to encode is mapped as the one dimension coefficient arrays; And parse the position of first nonzero coefficient and last nonzero coefficient in total number and the one dimension coefficient arrays of nonzero coefficient in the one dimension coefficient arrays according to the positional information of each coefficient in the one dimension coefficient arrays; Wherein, in the one dimension coefficient arrays coefficient put in order with coefficient block in the mapping sequence consensus of coefficient; And coding performance element; Be configured to combine the total number of nonzero coefficient in the one dimension coefficient arrays, through and said one dimension coefficient arrays in the opposite direction that puts in order of coefficient last nonzero coefficient in the one dimension coefficient arrays, last nonzero coefficient and all coefficients between first nonzero coefficient and first nonzero coefficient in the one dimension coefficient arrays in the one dimension coefficient arrays carried out reverse scanning accomplish coding the coefficient block of needs coding.
Begin the effective scanning scope till first nonzero coefficient of one dimension coefficient arrays according to embodiments of the invention through the positional information of coefficient in the one dimension coefficient arrays being resolved draw from last nonzero coefficient of one dimension coefficient arrays; All coefficients that need not travel through the one dimension coefficient arrays can be accomplished the encoding process to the one dimension coefficient arrays, thereby can improve the utilization ratio that is used to realize the hardware of encoding and reduce memory spending.
Description of drawings
From below in conjunction with understanding the present invention better the description of accompanying drawing specific embodiments of the invention, wherein:
Fig. 1 shows the H.264 block diagram of video coding system;
Fig. 2 shows the block diagram according to the context-adaptive variable length coding system of the embodiment of the invention;
Fig. 3 shows the flow chart according to the context-adaptive variable length decoding method of the embodiment of the invention;
Fig. 4 shows 4 * 4 coefficient block and 2 * 2 coefficient block get into the sketch map of the order of context-adaptive variable length coding system shown in Figure 2;
202 pairs of coefficient block are shone upon the example that obtains the one dimension coefficient arrays thereby Fig. 5 shows initial resolution unit;
Fig. 6 shows the flow chart of the cataloged procedure of coding performance element 204 execution;
Fig. 7 show according to the context-adaptive variable length decoding method of the embodiment of the invention sequential chart;
Fig. 8 shows the effect of improving along with the context-adaptive coder processes throughput of variation employing this method of quantization parameter.
Embodiment
To describe the characteristic and the exemplary embodiment of various aspects of the present invention below in detail.Many details have been contained in following description, so that complete understanding of the present invention is provided.But, it will be apparent to one skilled in the art that the present invention can implement under the situation of some details in not needing these details.Description in the face of embodiment only is in order through example of the present invention is shown the clearer understanding to the present invention to be provided down.Any concrete configuration and the algorithm that are proposed below the present invention never is limited to, but any modification, replacement and the improvement that under the prerequisite that does not break away from spirit of the present invention, have covered coherent element, parts and algorithm.
Fig. 1 shows the H.264 block diagram of video coding system.As shown in Figure 1, H.264 video coding system comprises predicting unit 102, transform and quantization unit 104 and CAVLC coding unit 106.Wherein, Predicting unit 102 acquisitions need the image encoded difference information; The 104 pairs of difference informations in transform and quantization unit carry out transform and quantization to compress required coded data, and 106 pairs of data of CAVLC coding unit are carried out the context-adaptive variable-length encoding with the required coded data of further compression.Conversion coefficient after transform and quantization unit 104 will quantize with the form of coefficient block is stored in the data storage.
The present invention is primarily aimed at the improvement of CAVLC coding unit 106.Fig. 2 shows the block diagram of the context-adaptive variable length coding system (that is, the CAVLC coding unit 106) according to the embodiment of the invention.Fig. 3 shows the flow chart according to the context-adaptive variable-length method of the embodiment of the invention.As shown in Figure 2; This context-adaptive variable length coding system 200 comprises initial resolution unit 202 and coding performance element 204, and realizes context-adaptive variable length decoding method shown in Figure 3 through the initial resolution phase S302 and the processing in coding two stages of execution phase S304.Particularly; In initial resolution phase S302; The coefficient block that initial resolution unit 202 will be encoded is mapped as the one dimension coefficient arrays; And parse according to the positional information of each coefficient in the one dimension coefficient arrays first nonzero coefficient and last nonzero coefficient in total number and the one dimension coefficient arrays of nonzero coefficient in the one dimension coefficient arrays the position (wherein, in the one dimension coefficient arrays coefficient put in order with coefficient block in the mapping sequence consensus of coefficient).In coding execution phase S304, the total number that coding performance element 204 combines nonzero coefficient in the one dimension coefficient arrays through according to and the one dimension coefficient arrays in the opposite order that puts in order of coefficient scan last nonzero coefficient in the one dimension coefficient arrays successively, be in the one dimension coefficient arrays between last nonzero coefficient and first nonzero coefficient the coefficient of position and first nonzero coefficient in the one dimension coefficient arrays is accomplished the coding for the one dimension coefficient arrays.
Fig. 4 shows 4 * 4 coefficient block and 2 * 2 coefficient block get into the sketch map of the order of context-adaptive variable length coding system shown in Figure 2.As shown in Figure 4; For 4 * 4 coefficient block; In each clock cycle with a row coefficient of 4 * 4 coefficient block (promptly; Comprise the coefficient formation of 4 coefficients) from data storage, take out and be input to the context-adaptive variable length coding system, the transmission of accomplishing all coefficients in 4 * 4 coefficient block needs 4 clock cycle altogether.For the 2x2 coefficient block, only need 1 clock cycle can all coefficients in the 2x2 coefficient block be taken out and be input to the context-adaptive variable length coding system as the coefficient formation that comprises 4 coefficients from data storage.
202 pairs of coefficient block are shone upon the example that obtains the one dimension coefficient arrays thereby Fig. 5 shows initial resolution unit.As shown in Figure 5; Initial resolution unit 202 is mapped as the one dimension coefficient arrays with the flexuose order of forward direction with 4 * 4 coefficient block; According to the mapping of coefficient in 4 * 4 coefficient block be arranged in order in proper order in the one dimension coefficient arrays coefficient (promptly; In the one dimension coefficient arrays coefficient put in order with 4 * 4 coefficient block in the mapping sequence consensus of coefficient), and putting in order successively the coefficient storage in the one dimension coefficient arrays in coefficient register according to coefficient in the one dimension coefficient arrays.Wherein, in the one dimension coefficient arrays Position Number of each coefficient in coefficient register since 1 deposited in coefficient register according to each coefficient in the one dimension coefficient arrays order (that is, in the one dimension coefficient arrays coefficient put in order) be that incremental steps is incremented to 16 with 1.In addition, initial resolution unit 202 also is provided with corresponding logical value for each coefficient in the one dimension coefficient arrays.Particularly, the logical value of the nonzero coefficient in the one dimension coefficient arrays is set to 1, and the logical value of the zero coefficient in the one dimension coefficient arrays is set to 0.Here for convenience of description; The positional information that the Position Number and the logical value of any coefficient in the one dimension coefficient arrays is referred to as this coefficient; First nonzero coefficient on putting in order in the one dimension coefficient arrays and last nonzero coefficient are called first nonzero coefficient and last nonzero coefficient in the one dimension coefficient arrays, and the Position Number of first nonzero coefficient in the one dimension coefficient arrays and last nonzero coefficient is expressed as first_coeff_pos and last_coeff_pos respectively.For example, first nonzero coefficient in the one dimension coefficient arrays shown in Figure 5 is respectively 5 and 1 (their Position Number is respectively 3 and 10, and their logical value is 1) with last nonzero coefficient.
Initial resolution unit 202 can be calculated the total number TotalCoeff of nonzero coefficient in the one dimension coefficient arrays according to following equality (1); Wherein the position is numbered the logical value of the coefficient of n in Coeff_pos [n] the expression one dimension coefficient arrays, and MaxCoeffNum representes the total number of coefficient in the one dimension coefficient arrays.
TotalCoeff = Σ n = 1 MaxCoeffNum Coeff _ pos [ n ] - - - ( 1 )
Initial resolution unit 202 can be calculated the total number Total_zeros of the zero coefficient before last nonzero coefficient in the one dimension coefficient arrays according to following equality (2); Wherein last_coeff_pos representes the Position Number of last nonzero coefficient in the one dimension coefficient arrays, and TotalCoeff representes the total number of nonzero coefficient in the one dimension coefficient arrays.
Total_zeros=last_coeff_pos-TotalCoeff (2)
For example, in one dimension coefficient arrays shown in Figure 5, always have 16 coefficients, can know that to the logical value summation of nonzero coefficient in the one dimension coefficient arrays one dimension coefficient arrays has 5 nonzero coefficients according to equality (1).In addition, the Position Number of last nonzero coefficient in the one dimension coefficient arrays is 10, and the total number of nonzero coefficient is 5 in the one dimension coefficient arrays, can know that according to equality (2) total number of the zero coefficient before last nonzero coefficient in the one dimension coefficient arrays is 5.
In the context-adaptive variable length decoding method and system of the embodiment of the invention; Coding performance element 204 through according to the one dimension coefficient arrays in coefficient in the effective scanning scope formed to first nonzero coefficient of opposite sequential scanning last nonzero coefficient from the one dimension coefficient arrays that puts in order of coefficient, accomplish coding to whole one dimension coefficient arrays.For example; Coefficient puts in order to from top to bottom in the one dimension coefficient arrays shown in Figure 5; Coding performance element 204 can be according to from top to bottom order (promptly; The opposite order that puts in order with coefficient in the one dimension coefficient arrays) successively the coefficient that to be 10 coefficient 1 be numbered in the effective scanning scope that 3 coefficient 5 forms to the position of the Position Number in the one dimension coefficient arrays is scanned, thereby accomplish coding whole one dimension coefficient arrays.
Describe the process that 204 pairs of one dimension coefficient arrays of coding performance element are encoded below in detail.In context-adaptive variable length decoding method and system, utilize the count value conduct of count value, the Zero_left_accumulator (counter of the current zero coefficient that also is not encoded in the one dimension coefficient arrays) of count value, the Run_accumulator (counter of zero coefficient between the current nonzero coefficient that is scanned and the previous nonzero coefficient that is scanned) of T1_accumulator (hangover coefficient counter) be used to the to encode control signal of performance element 204 according to the embodiment of the invention.Wherein, the initial value of T1_accumulator is 0, and maximum is 3; The initial value of Run_accumulator is 0; The initial value of Zero_left_accumulator is the total number (being the value of Total_zeros) of the zero coefficient before last nonzero coefficient in the one dimension coefficient arrays.
Begin any current coefficient that is scanned (its Position Number is Curr_scan_pos) in the effective scanning scope till first nonzero coefficient in the one dimension coefficient arrays for last nonzero coefficient from the one dimension coefficient arrays, handle below coding performance element 204 is carried out (as shown in Figure 6):
S602 judges whether the current coefficient that is scanned is zero.
S604 if the current coefficient that is scanned is non-vanishing, judges then whether the current coefficient that is scanned is+1 or-1.
S606; If the current coefficient that is scanned is+1 or-1; Then under the situation of count value of T1_accumulator less than 3 (representing that the current coefficient that is scanned is a hangover coefficient in the one dimension coefficient arrays); Syntactic element Trailing_ones_sign to the symbol of representing the current coefficient that is scanned encodes, and the count value of T1_accumulator is added 1 (S606-2); Under the situation of count value of T1_accumulator greater than 3 (representing that the current coefficient that is scanned is the nonzero coefficient outside the hangover coefficient in the one dimension coefficient arrays); Syntactic element Levels to the amplitude of representing the current coefficient that is scanned encodes; And the current coefficient that is scanned be not under the situation of last nonzero coefficient (its Position Number is last_coeff_pos) in the one dimension coefficient arrays (promptly; The current coefficient that is scanned is not under the situation of first nonzero coefficient that is scanned in the one dimension coefficient arrays); Syntactic element Run_before to the number (count value by Zero_left_accumulator is represented) of the current zero coefficient that also is not encoded in the number (count value by Run_accumulator is represented) of representing the zero coefficient between current coefficient that is scanned and the previous nonzero coefficient that is scanned and the one dimension coefficient arrays encodes; Then with the count value zero clearing of Run_accumulator; The current coefficient that is scanned be under the situation of first nonzero coefficient (its Position Number is first_coeff_pos) in the one dimension coefficient arrays (promptly; The current coefficient that is scanned is under the situation of last nonzero coefficient that is scanned in the one dimension coefficient arrays), also to encode (S606-4) to the syntactic element Total_zeros of the total number of representing the preceding zero coefficient of last nonzero coefficient in the one dimension coefficient arrays (its Position Number is last_coeff_pos); Under equal 3 in the count value of the T1_accumulator situation of (represent the current coefficient that is scanned is that first is scanned outside the hangover coefficient in the one dimension coefficient arrays nonzero coefficient); Syntactic element Levels to the symbol of representing the current coefficient that is scanned encodes, and to the syntactic element Coeff_token of the total number of hangover coefficient in the total number of representing nonzero coefficient in the one dimension coefficient arrays and the one dimension coefficient arrays encode (S606-6).Behind the coding of accomplishing syntactic element Coeff_token, will be packaged in and output (S606-8) corresponding to the coding result of the syntactic element Trailing_ones_sign of the coefficient that respectively trails in the one dimension coefficient arrays coding result with syntactic element Coeff_token.
S608; If the current nonzero coefficient that is scanned is not+1 or-1; Then the syntactic element Levels to the amplitude of representing the current coefficient that is scanned encodes; And the current coefficient that is scanned be not under the situation of last nonzero coefficient (its Position Number is last_coeff_pos) in the one dimension coefficient arrays (promptly; The current coefficient that is scanned is not under the situation of first nonzero coefficient that is scanned in the one dimension coefficient arrays); Syntactic element Run_before to the number (count value by Zero_left_accumulator is represented) of the current zero coefficient that also is not encoded in the number (count value by Run_accumulator is represented) of representing the zero coefficient between current coefficient that is scanned and the previous nonzero coefficient that is scanned and the one dimension coefficient arrays encodes, then with the count value zero clearing (S608-2) of Run_accumulator.The current coefficient that is scanned be under the situation of first nonzero coefficient (its Position Number is first_coeff_pos) in the one dimension coefficient arrays (promptly; The current coefficient that is scanned is under the situation of last nonzero coefficient that is scanned in the one dimension coefficient arrays), also to encode (S608-4) to the syntactic element Total_zeros of the total number of nonzero coefficient in the total number of representing the preceding zero coefficient of last nonzero coefficient in the one dimension coefficient arrays (its Position Number is last_coeff_pos) and the one dimension coefficient arrays.Behind the coding of accomplishing syntactic element Total_zeros, will be packaged in and output (S608-6) corresponding to the coding result of the syntactic element Run_before of each outer nonzero coefficient of hangover coefficient in the one dimension coefficient arrays coding result with syntactic element Total_zeros.
S610 if the current coefficient that is scanned is 0, does not then carry out any coding, and the count value of Run_accumulator is added 1 and the count value of Zero_left_accumulator subtracted 1.
In to the total number of representing nonzero coefficient in the one dimension coefficient arrays and one dimension coefficient arrays the syntactic element Coeff_token of the total number of hangover coefficient, corresponding to the one dimension coefficient arrays in the outer nonzero coefficient of hangover coefficient amplitude syntactic element Levels and represent last nonzero coefficient in the one dimension coefficient arrays before total number and the one dimension coefficient arrays of zero coefficient in behind the syntactic element Total_zeros coding of total number of nonzero coefficient, the coding result of these syntactic elements is packaged in together also exports.
Fig. 7 show according to the context-adaptive variable length decoding method of the embodiment of the invention sequential chart.For any coefficient in the one dimension coefficient arrays, scan process, encoding process and packing are handled by order and are carried out.Yet, because handling for the different coefficients in the one dimension coefficient arrays, can be carried out simultaneously these in the embodiment of the invention, carry out so can walk abreast for the encoding process of different syntactic elements.Therefore, in the context-adaptive variable length coding system according to the embodiment of the invention, the hardware utilization ratio is enhanced, and the memory consumption of the syntactic element after being used to encode is reduced.As a result, the average CAVLC that only needs a clock cycle to carry out for each coefficient in the effective scanning scope encodes.So, according to the CAVLC coding method of the embodiment of the invention to 4x4 or 2x2 coefficient block encode total the time consumption can calculate according to equality (3):
T=InputCycle+1+ScanCycle (3)
Wherein, The InputCycle of 4 * 4 coefficient block was 4 clock cycle; The InputCycle of 2 * 2 coefficient block was 1 clock cycle, and ScanCycle equals to be shone upon by 4 * 4 or 2 * 2 coefficient block the effective scanning scope of the one dimension coefficient arrays that obtains, and can calculate according to following equality (4):
ScanCycle=EfficientScanRange=last_coeff_pos-first_coeff_pos+1
(4)
Fig. 8 shows the effect of improving along with the context-adaptive coder processes throughput of variation employing this method of quantization parameter.As shown in Figure 8, when quantizing more parameters when big, need the quantity of the nonzero coefficient in the coefficient block of coding few more, adopt the said method of the embodiment of the invention context-adaptive coder processes throughput to improve effect just obvious more.Shown in data among Fig. 8: when quantification parameter (QP) was 10, the throughput of the described encoder of the embodiment of the invention was identical with the throughput of conventional codec; When quantification parameter (QP) was 25, the throughput of the described encoder of the embodiment of the invention was the twice of conventional codec; And when quantification parameter (QP) was 35 left and right sides, the throughput of the encoder that the embodiment of the invention is described was 2.5 times of conventional codec.
In sum, context-adaptive variable length decoding method and the system according to the embodiment of the invention introduced the effective scanning scope (it obtains through initial resolution phase) that replaces traditional gamut scanning; Replace traditional two-phase mechanism through Fully-pipelined CAVLC coding stage (it comprises effective scan process, look-up table (LUT) encoding process and self adaptation packing processing) then, thereby improved the hardware utilization ratio and reduced memory spending.The result shows, with respect to conventional method, when quantization parameter QP=25, approximately can throughput (coding rate) be improved 100%, and along with QP increases, it is bigger that improvement can become.
Below the present invention has been described with reference to specific embodiment of the present invention; But those skilled in the art all understand; Can carry out various modifications, combination and change to these specific embodiments, and can not break away from the spirit and scope of the present invention that limit accompanying claims or its equivalent.
Can come execution in step with hardware or software as required.Notice that without departing from the scope of the invention, the flow chart that can in this specification, provide adds step, therefrom removes step or revise step wherein.In general, flow chart just is used for indicating a kind of possible sequence of the basic operation that is used to realize function.
The general purpose digital computer of embodiments of the invention programming capable of using, utilize application-specific integrated circuit (ASIC), programmable logic device, field programmable gate array, light, chemistry, biological, system quantum or nanometer engineering, assembly and mechanism to realize.In general, function of the present invention can be realized by any means known in the art.Can use distributed or networked system, assembly and circuit.The communication of data or to transmit can be wired, wireless or through any other means.
Also will recognize, according to the needs of application-specific, one or more can perhaps even in some cases being removed or being deactivated in the key element shown in the accompanying drawing by more separating or more integrated mode realizes.Program or code that realization can be stored in the machine readable media are carried out above-mentioned any method to allow computer, also within the spirit and scope of the present invention.
In addition, it only is exemplary that any signal arrows in the accompanying drawing should be considered to, rather than restrictive, only if concrete indication is arranged in addition.Separate or the ability of combination when not knowing when term is also contemplated as to make, the combination of assembly or step also will be considered to put down in writing.

Claims (20)

1. context-adaptive variable length decoding method comprises:
The coefficient block of needs coding is mapped as the one dimension coefficient arrays; And parse the position of first nonzero coefficient and last nonzero coefficient in total number and the said one dimension coefficient arrays of nonzero coefficient in the said one dimension coefficient arrays according to the positional information of each coefficient in the said one dimension coefficient arrays; Wherein, in the said one dimension coefficient arrays coefficient put in order with said coefficient block in the mapping sequence consensus of coefficient; And
In conjunction with the total number of nonzero coefficient in the said one dimension coefficient arrays, through and said one dimension coefficient arrays in the opposite direction that puts in order of coefficient first nonzero coefficient in last nonzero coefficient in last nonzero coefficient in the said one dimension coefficient arrays, the said one dimension coefficient arrays and all coefficients between first nonzero coefficient and the said one dimension coefficient arrays carried out reverse scanning accomplish coding for said coefficient block.
2. context-adaptive variable length decoding method according to claim 1; It is characterized in that; The positional information of any coefficient comprises the Position Number of a said coefficient and corresponding to the logical value of a said coefficient in the said one dimension coefficient arrays; Wherein, in the said one dimension coefficient arrays Position Number of each coefficient since 1 with said one dimension coefficient arrays in the consistent order that puts in order of coefficient increase progressively, the incremental steps of the Position Number of each coefficient is 1 in the said one dimension coefficient arrays; And the logical value corresponding to zero coefficient in the said one dimension coefficient arrays is 0, is 1 corresponding to the logical value of nonzero coefficient in the said one dimension coefficient arrays.
3. context-adaptive variable length decoding method according to claim 1 is characterized in that, calculates the total number TotalCoeff of nonzero coefficient in the said one dimension coefficient arrays according to following equality:
TotalCoeff = Σ n = 1 MaxCoeffNum Coeff _ pos [ n ]
Wherein, the position is numbered the logical value of the coefficient of n in the said one dimension coefficient arrays of Coeff_pos [n] expression, and MaxCoeffNum representes the total number of coefficient in the said one dimension coefficient arrays.
4. context-adaptive variable length decoding method according to claim 1 is characterized in that, calculates the total number Total_zeros of the zero coefficient before last nonzero coefficient in the said one dimension coefficient arrays according to following equality:
Total_zeros=last_coeff_pos-TotalCoeff
Wherein, last_coeff_pos representes the Position Number of last nonzero coefficient in the said one dimension coefficient arrays, and TotalCoeff representes the total number of nonzero coefficient in the said one dimension coefficient arrays.
5. context-adaptive variable length decoding method according to claim 1; It is characterized in that; When the total number of nonzero coefficient in the said one dimension coefficient arrays is zero; The total number of hangover coefficient is zero in the said one dimension coefficient arrays, and only the syntactic element Coeff_token of the total number of hangover coefficient in the total number of representing nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays is encoded.
6. context-adaptive variable length decoding method according to claim 1; It is characterized in that; When nonzero coefficient in the said one dimension coefficient arrays total non-vanishing; First nonzero coefficient in reverse last nonzero coefficient, last nonzero coefficient in the said one dimension coefficient arrays and coefficient between first nonzero coefficient and the said one dimension coefficient arrays that scans successively in the said one dimension coefficient arrays, wherein
When the current coefficient that is scanned in the said one dimension coefficient arrays is the coefficient beyond 0 and ± 1, the syntactic element Levels of the amplitude of representing the said current coefficient that is scanned is encoded;
When the current coefficient that is scanned in the said one dimension coefficient arrays is+1 or-1; If the said current coefficient that is scanned is the hangover coefficient in the said one dimension coefficient arrays; Then the syntactic element Trailing_ones_sign to the symbol of representing the said current coefficient that is scanned encodes, otherwise the syntactic element Levels of the amplitude of representing the said current coefficient that is scanned is encoded.
7. context-adaptive variable length decoding method according to claim 6; It is characterized in that; When the said current coefficient that is scanned is in the said one dimension coefficient arrays during first nonzero coefficient that is scanned beyond the coefficient of hangover; Also will the syntactic element Coeff_token of the total number of hangover coefficient in the total number of representing nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays be encoded, the total number of hangover coefficient is predetermined in the wherein said one dimension coefficient arrays.
8. context-adaptive variable length decoding method according to claim 6; It is characterized in that; When the said current coefficient that is scanned is first nonzero coefficient in the said one dimension coefficient arrays, also to the syntactic element Total_zeros of the total number of nonzero coefficient in the total number of representing the zero coefficient before last nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays be encoded.
9. context-adaptive variable length decoding method according to claim 6; It is characterized in that; When the current coefficient that is scanned in the said one dimension coefficient arrays is in the said one dimension coefficient arrays during nonzero coefficient of hangover outside the coefficient; At the said current coefficient that is scanned is not under the situation of last nonzero coefficient in the said one dimension coefficient arrays, also will the syntactic element Run_before of the number of the current zero coefficient that also is not encoded in the number of representing the zero coefficient between said current coefficient that is scanned and the previous nonzero coefficient that is scanned and the said one dimension coefficient arrays be encoded.
10. according to each described context-adaptive variable length decoding method in the claim 6 to 9, it is characterized in that, also comprise:
To be packaged in and output with coding result corresponding to the coding result of the syntactic element Trailing_ones_sign of the coefficient that respectively trails in the said one dimension coefficient arrays corresponding to the syntactic element Coeff_token of the total number of hangover coefficient in the total number of nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays;
To be packaged in and output with coding result corresponding to the coding result of the syntactic element Run_before of each nonzero coefficient in the said one dimension coefficient arrays corresponding to the syntactic element Total_zeros of the total number of nonzero coefficient in the total number of the zero coefficient before last nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays; And
Will be corresponding to the coding result of the syntactic element Coeff_token of the total number of hangover coefficient in the total number of nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays; Coding result corresponding to the syntactic element Levels of hangover coefficient each nonzero coefficient in addition in the said one dimension coefficient arrays; And be packaged in together and output corresponding to the coding result of the syntactic element Total_zeros of the total number of nonzero coefficient in the total number of the zero coefficient before last nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays.
11. a context-adaptive variable length coding system comprises:
Initial resolution unit; The coefficient block that is configured to encode is mapped as the one dimension coefficient arrays; And parse the position of first nonzero coefficient and last nonzero coefficient in total number and the said one dimension coefficient arrays of nonzero coefficient in the said one dimension coefficient arrays according to the positional information of each coefficient in the said one dimension coefficient arrays; Wherein, in the said one dimension coefficient arrays coefficient put in order with said coefficient block in the mapping sequence consensus of coefficient; And
The coding performance element; Be configured to combine the total number of nonzero coefficient in the said one dimension coefficient arrays, through and said one dimension coefficient arrays in the opposite direction that puts in order of coefficient first nonzero coefficient in last nonzero coefficient in last nonzero coefficient in the said one dimension coefficient arrays, the said one dimension coefficient arrays and all coefficients between first nonzero coefficient and the said one dimension coefficient arrays carried out reverse scanning accomplish coding for said coefficient block.
12. context-adaptive variable length coding system according to claim 11; It is characterized in that; The positional information of any coefficient comprises the Position Number of a said coefficient and corresponding to the logical value of a said coefficient in the said one dimension coefficient arrays; Wherein, in the said one dimension coefficient arrays Position Number of each coefficient since 1 with said one dimension coefficient arrays in the consistent order that puts in order of coefficient increase progressively, the incremental steps of the Position Number of each coefficient is 1 in the said one dimension coefficient arrays; And the logical value corresponding to zero coefficient in the said one dimension coefficient arrays is 0, is 1 corresponding to the logical value of nonzero coefficient in the said one dimension coefficient arrays.
13. context-adaptive variable length coding system according to claim 11 is characterized in that, said initial resolution unit is calculated the total number TotalCoeff of nonzero coefficient in the said one dimension coefficient arrays according to following equality:
TotalCoeff = Σ n = 1 MaxCoeffNum Coeff _ pos [ n ]
Wherein, the position is numbered the logical value of the coefficient of n in the said one dimension coefficient arrays of Coeff_pos [n] expression, and MaxCoeffNum representes the total number of coefficient in the said one dimension coefficient arrays.
14. context-adaptive variable length coding system according to claim 11; It is characterized in that said initial resolution unit is calculated the total number Total_zeros of the zero coefficient before last nonzero coefficient in the said one dimension coefficient arrays according to following equality:
Total_zeros=last_coeff_pos-TotalCoeff
Wherein, last_coeff_pos representes the Position Number of last nonzero coefficient in the said one dimension coefficient arrays, and TotalCoeff representes the total number of nonzero coefficient in the said one dimension coefficient arrays.
15. context-adaptive variable length coding system according to claim 11; It is characterized in that; When the total number of nonzero coefficient in the said one dimension coefficient arrays is zero; The total number of hangover coefficient is zero in the said one dimension coefficient arrays, and said coding performance element is only encoded to the syntactic element Coeff_token of the total number of hangover coefficient in the total number of representing nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays.
16. context-adaptive variable length coding system according to claim 11; It is characterized in that; When nonzero coefficient in the said one dimension coefficient arrays total non-vanishing; First nonzero coefficient in reverse last nonzero coefficient, last nonzero coefficient in the said one dimension coefficient arrays and coefficient between first nonzero coefficient and the said one dimension coefficient arrays that scans successively in the said one dimension coefficient arrays of said coding performance element, wherein
When the current coefficient that is scanned in the said one dimension coefficient arrays is the coefficient beyond 0 and ± 1, the syntactic element Levels of the amplitude of representing the said current coefficient that is scanned is encoded;
When the current coefficient that is scanned in the said one dimension coefficient arrays is+1 or-1; If the said current coefficient that is scanned is the hangover coefficient in the said one dimension coefficient arrays; Then the syntactic element Trailing_ones_sign to the symbol of representing the said current coefficient that is scanned encodes, otherwise the syntactic element Levels of the amplitude of representing the said current coefficient that is scanned is encoded.
17. context-adaptive variable length coding system according to claim 16; It is characterized in that; When the said current coefficient that is scanned is in the said one dimension coefficient arrays during first nonzero coefficient that is scanned beyond the coefficient of hangover; Said coding performance element also will be encoded to the syntactic element Coeff_token of the total number of hangover coefficient in the total number of representing nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays, and the total number of hangover coefficient is predetermined in the wherein said one dimension coefficient arrays.
18. context-adaptive variable length coding system according to claim 16; It is characterized in that; When the said current coefficient that is scanned was first nonzero coefficient in the said one dimension coefficient arrays, said coding performance element also will be encoded to the syntactic element Total_zeros of the total number of nonzero coefficient in the total number of representing the zero coefficient before last nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays.
19. context-adaptive variable length coding system according to claim 16; It is characterized in that; When the current coefficient that is scanned in the said one dimension coefficient arrays is in the said one dimension coefficient arrays during nonzero coefficient of hangover outside the coefficient; At the said current coefficient that is scanned is not under the situation of last nonzero coefficient in the said one dimension coefficient arrays, and said coding performance element also will be encoded to the syntactic element Run_before of the number of the current zero coefficient that also is not encoded in the number of representing the zero coefficient between said current coefficient that is scanned and the previous nonzero coefficient that is scanned and the said one dimension coefficient arrays.
20., it is characterized in that according to each described context-adaptive variable length coding system in the claim 16 to 19, also comprise the packing performance element, be configured to:
To be packaged in and output with coding result corresponding to the coding result of the syntactic element Trailing_ones_sign of the coefficient that respectively trails in the said one dimension coefficient arrays corresponding to the syntactic element Coeff_token of the total number of hangover coefficient in the total number of nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays;
To be packaged in and output with coding result corresponding to the coding result of the syntactic element Run_before of each nonzero coefficient in the said one dimension coefficient arrays corresponding to the syntactic element Total_zeros of the total number of nonzero coefficient in the total number of the zero coefficient before last nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays; And
Will be corresponding to the coding result of the syntactic element Coeff_token of the total number of hangover coefficient in the total number of nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays; Coding result corresponding to the syntactic element Levels of hangover coefficient each nonzero coefficient in addition in the said one dimension coefficient arrays; And be packaged in together and output corresponding to the coding result of the syntactic element Total_zeros of the total number of nonzero coefficient in the total number of the zero coefficient before last nonzero coefficient in the said one dimension coefficient arrays and the said one dimension coefficient arrays.
CN201010248895.2A 2010-08-05 2010-08-05 Context-adaptive variable-length coding method and system thereof Expired - Fee Related CN102377994B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010248895.2A CN102377994B (en) 2010-08-05 2010-08-05 Context-adaptive variable-length coding method and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010248895.2A CN102377994B (en) 2010-08-05 2010-08-05 Context-adaptive variable-length coding method and system thereof

Publications (2)

Publication Number Publication Date
CN102377994A true CN102377994A (en) 2012-03-14
CN102377994B CN102377994B (en) 2014-05-07

Family

ID=45795882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010248895.2A Expired - Fee Related CN102377994B (en) 2010-08-05 2010-08-05 Context-adaptive variable-length coding method and system thereof

Country Status (1)

Country Link
CN (1) CN102377994B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428492A (en) * 2013-07-16 2013-12-04 山东大学 Fast zig-zag scanning method for high-definition AVS coding
CN105812803A (en) * 2014-12-31 2016-07-27 浙江大华技术股份有限公司 Method and device for discarding residual error of TU (transformation unit)
CN107438181A (en) * 2016-05-27 2017-12-05 博雅网络游戏开发(深圳)有限公司 A kind of audio/video processing method and device
CN109479134A (en) * 2016-08-10 2019-03-15 松下电器(美国)知识产权公司 Code device, decoding apparatus, coding method and coding/decoding method
CN110545437A (en) * 2019-08-30 2019-12-06 北京大学 coefficient encoding method, coefficient decoding method, electronic device, and medium
WO2020172908A1 (en) * 2019-02-27 2020-09-03 北京大学深圳研究生院 Decoding method and device for quantization block, and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6646578B1 (en) * 2002-11-22 2003-11-11 Ub Video Inc. Context adaptive variable length decoding system and method
CN1665303A (en) * 2005-03-18 2005-09-07 清华大学 Method of entropy coding of transformation coefficient in image/video coding
CN1980395A (en) * 2005-11-30 2007-06-13 联合信源数字音视频技术(北京)有限公司 Entropy coding method and decoding method based on text
US20070262886A1 (en) * 2006-05-11 2007-11-15 Korea Electronics Technology Institute Effective decoding method of h.264/avc context-based adaptive variable length coding
CN101267553A (en) * 2007-03-12 2008-09-17 华为技术有限公司 A method and device for coding and decoding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6646578B1 (en) * 2002-11-22 2003-11-11 Ub Video Inc. Context adaptive variable length decoding system and method
CN1665303A (en) * 2005-03-18 2005-09-07 清华大学 Method of entropy coding of transformation coefficient in image/video coding
CN1980395A (en) * 2005-11-30 2007-06-13 联合信源数字音视频技术(北京)有限公司 Entropy coding method and decoding method based on text
US20070262886A1 (en) * 2006-05-11 2007-11-15 Korea Electronics Technology Institute Effective decoding method of h.264/avc context-based adaptive variable length coding
CN101267553A (en) * 2007-03-12 2008-09-17 华为技术有限公司 A method and device for coding and decoding

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428492A (en) * 2013-07-16 2013-12-04 山东大学 Fast zig-zag scanning method for high-definition AVS coding
CN105812803A (en) * 2014-12-31 2016-07-27 浙江大华技术股份有限公司 Method and device for discarding residual error of TU (transformation unit)
CN105812803B (en) * 2014-12-31 2018-09-28 浙江大华技术股份有限公司 A kind of residual error for converter unit TU gives up method and device
CN107438181A (en) * 2016-05-27 2017-12-05 博雅网络游戏开发(深圳)有限公司 A kind of audio/video processing method and device
CN107438181B (en) * 2016-05-27 2019-12-06 贰陆陆(深圳)游戏开发有限公司 audio and video processing method and device
CN109479134A (en) * 2016-08-10 2019-03-15 松下电器(美国)知识产权公司 Code device, decoding apparatus, coding method and coding/decoding method
WO2020172908A1 (en) * 2019-02-27 2020-09-03 北京大学深圳研究生院 Decoding method and device for quantization block, and electronic device
US11902524B2 (en) 2019-02-27 2024-02-13 Peking University Shenzhen Graduate School Decoding method and device for quantization block, video decoding method, and electronic device
CN110545437A (en) * 2019-08-30 2019-12-06 北京大学 coefficient encoding method, coefficient decoding method, electronic device, and medium
CN110545437B (en) * 2019-08-30 2021-07-20 北京大学 Coefficient encoding method, coefficient decoding method, electronic device, and medium

Also Published As

Publication number Publication date
CN102377994B (en) 2014-05-07

Similar Documents

Publication Publication Date Title
CN104185989B (en) For the improvement infra-frame prediction in lossless coding in the binaryzation scheme and HEVC of intra prediction
JP6465903B2 (en) Data encoding and decoding
TWI431948B (en) Efficient coding and decoding of transform blocks
CN105900420B (en) Select motion vector accuracy
US20190208225A1 (en) Sign prediction in video coding
JP6134055B2 (en) Data encoding and decoding
JP6400092B2 (en) Data encoding and decoding
CN101080014B (en) Video decoding method and apparatus
CN103404141B (en) Video coding and decoding using conversion
CN105120271B (en) Video coding-decoding method and device
CN103650496A (en) Pixel-based intra prediction for coding in HEVC
TWI514779B (en) Entropy coding
CN102377994B (en) Context-adaptive variable-length coding method and system thereof
KR100801364B1 (en) Decoding apparatus or encoding apparatus wherein intermediate buffer is inserted between arithmetic sign decoder or encoder and debinarizer or binarizer
US20140286417A1 (en) Data encoding and decoding
US8552890B2 (en) Lossless coding with different parameter selection technique for CABAC in HEVC
CN1589023A (en) Coding and decoding method and device for multiple coded list lengthening based on context
JP2017169211A (en) Modified coding for transform skipped block for cabac in hevc
EP2235950A1 (en) Separate huffman coding of runlength and size data of dct coefficients
WO2008065822A1 (en) Encoding device and encoding method
TWI705693B (en) Apparatus and method for vector-based entropy coding for display stream compression
CN110337809A (en) Utilize the block-based video encoding/decoding method and its device of prescan
JP6426227B2 (en) High Throughput Residual Coding for Transform Skip Block for CABAC in HEVC
KR20100013142A (en) Copression methode for frame memmory
KR100552345B1 (en) method and apparatus for compressing video image using universal variable length coding

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

Termination date: 20180805