CN102685483B - Decoding method - Google Patents

Decoding method Download PDF

Info

Publication number
CN102685483B
CN102685483B CN201110459512.0A CN201110459512A CN102685483B CN 102685483 B CN102685483 B CN 102685483B CN 201110459512 A CN201110459512 A CN 201110459512A CN 102685483 B CN102685483 B CN 102685483B
Authority
CN
China
Prior art keywords
lcu
coding
size
minimum image
image piece
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
CN201110459512.0A
Other languages
Chinese (zh)
Other versions
CN102685483A (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.)
Huawei Technologies 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 CN201110459512.0A priority Critical patent/CN102685483B/en
Publication of CN102685483A publication Critical patent/CN102685483A/en
Application granted granted Critical
Publication of CN102685483B publication Critical patent/CN102685483B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a coding method, a coding device, a decoding method, a decoding device, a coding system and a decoding system. The coding method comprises the following steps that: a coder acquires data to be coded, wherein the data to be coded is at least one largest coding unit (LCU); the coder determines a quantization depth parameter of the LCU according to a code rate control algorithm, and writes the quantization depth parameter into the data to be coded; the coder determines a quantization parameter (QP) of each CU according to a minimum image block dimension and the dimension of each CU in the LCU; the coder calculates a QP difference of each CU according to the QP and a QP predicted value of the CU; for each CU consistent with a preset condition, the coder carries the QP difference of the CU into the CU; and the coder codes the quantization depth parameter, the QP difference of the CU consistent with the preset condition and each CU to obtain a code stream. The embodiment of the invention also provides the decoding method, the coding device and the decoding device. By the embodiment of the invention, code rate control accuracy and compression efficiency can be effectively improved.

Description

Coding/decoding method
Technical field
The present invention relates to data processing field, relate in particular to a kind of coding method and device, coding/decoding method and device.
Background technology
In existing encoding video pictures process, coding side need to carry out spatial alternation to the image block difference data after original image blocks of data or prediction, and conversion coefficient is carried out to quantization operation, then the coefficient after quantizing is carried out to entropy coding.Decoding end is carried out inverse quantization operation to the entropy coefficient obtaining of decoding, and rebuilds and obtains conversion coefficient, then carry out inverse transformation operation and obtain original image blocks of data or image block difference data.
For carrying out inverse quantization operation in decoding end, decoding end need be obtained the quantization step (QStep) adopting in coding side quantizing process.Therefore, coding side need to write adopted Qstep information in code stream.Represent because different Qstep can use different quantization parameter (QP, Quantization Parameter), so coding side can be encoded to QP, and be transferred to decoding end.
Efficient video coding test model (HM, High efficiency video coding test Model) in image is divided into etc. to big or small maximum coding unit (LCU, Largest Coding Unit), in each LCU, can comprise the unfixed CU of one or more sizes.
In a kind of method for encoding images of the prior art, allowing to have the independently minimum image of QP is LCU, that is to say, the corresponding QP of each LCU.
Coding side in the time encoding, QP relevant information being described as in picture parameter set (PPS, Picture Parameter Set):
Being described as in slice header (SH, Slice Header):
Being described as in LCU:
Coding side completes after coding in a manner mentioned above, and the data after coding are sent to decoding end, and decoding end, to each LCU, is calculated the quantization parameter QP of current LCU in the following way lCU:
QP LCU=lcu_qp_delta+slice_qp_delta+pic_init_qp_minus26+26。
Decoding end obtains the QP of current LCU lCUafter, can decode.
From the scheme of above-mentioned prior art, can find out:
In prior art, the corresponding QP of each LCU, coding side is by adjusting QP when carrying out Rate Control, can only control for fine granulation with LCU, due to LCU in actual applications tend to arrange larger, for example 64 pixel * 64 pixels (be easy description, follow-up referred to as 64*64, other data class are seemingly), so the scheme of prior art has affected the precision of Rate Control.
In prior art, in another method for encoding images, in each CU of each LCU, carry the qp_delta information of this CU, thereby can improve the precision of Rate Control.
But, in the prior art, because minimum CU can be set to 8*8, if carry the qp_delta information of this CU in each CU, can increase a large amount of coding expenses, thereby affect the overall compression efficiency of Image Coding.
Summary of the invention
The embodiment of the present invention provides a kind of coding method and device, coding/decoding method and device and coding/decoding system, can effectively improve rate control accuracy and compression efficiency.
The coding method that the embodiment of the present invention provides, comprising: coding side obtains data to be encoded, and described data to be encoded are at least a maximum coding unit LCU; Coding side is determined the quantisation depth parameter of described LCU according to preset rate control algorithm, and by data to be encoded described in described quantisation depth parameter read-in, described quantisation depth parameter is for representing that described LCU has the minimum image piece size of independent QP; Coding side is determined the QP of each CU according to the size of the each CU comprising in described minimum image piece size and described LCU; Coding side is poor according to the QP of the each CU of QP predictor calculation of the QP of described each CU and each CU; The CU that meets prerequisite for each, the QP that coding side carries this CU in this CU is poor; Coding side is encoded and is obtained code stream described quantisation depth parameter, the poor and each CU of QP that meets the CU of prerequisite.
The coding/decoding method that the embodiment of the present invention provides, comprising: decoding end is resolved and obtained quantisation depth parameter the code stream receiving, and described quantisation depth parameter is for representing that LCU has the minimum image piece size of independent QP; Decoding end is calculated the QP predicted value of each CU according to the size of the each CU comprising in described minimum image piece size and described LCU; Meet the CU of prerequisite for each, decoding end resolves from code stream that to obtain its QP poor; The poor QP that calculates each CU of QP that decoding end obtains according to QP predicted value and the parsing of described each CU; Decoding end is decoded to each CU according to the QP of described each CU.
The code device that the embodiment of the present invention provides, comprising: data capture unit, and for obtaining data to be encoded, described data to be encoded are at least a maximum coding unit LCU; Depth parameter processing unit, for determine the quantisation depth parameter of described LCU according to preset rate control algorithm, and the data to be encoded that data capture unit described in described quantisation depth parameter read-in is got, described quantisation depth parameter is for representing that described LCU has the minimum image piece size of independent QP; Quantization parameter determining unit, determines the QP of each CU for the size of each CU of comprising according to described minimum image piece size and described LCU; Computing unit, for poor according to the QP of the definite QP of each CU of described quantization parameter determining unit and the each CU of QP predictor calculation of each CU; Filler cells, for meet the CU of prerequisite for each, the QP that carries this CU in this CU is poor; Coding unit, for encoding and obtain code stream described quantisation depth parameter, the poor and each CU of QP that meets the CU of prerequisite.
The decoding device that the embodiment of the present invention provides, comprising: the first resolution unit, and for the code stream receiving is resolved and obtained quantisation depth parameter, described quantisation depth parameter is for representing that LCU has the minimum image piece size of independent QP; Parameter prediction unit, calculates the QP predicted value of each CU for the size of each CU of comprising according to described minimum image piece size and described LCU; The second resolution unit, for each being met to the CU of prerequisite, resolves from code stream that to obtain its QP poor; Parameter calculation unit, resolves the QP of the each CU of the poor calculating of QP obtaining for the QP predicted value of each CU that obtains according to described parameter prediction unit and described the second resolution unit; Decoding unit, decodes to each CU for the QP of each CU of calculating according to described parameter calculation unit.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, coding side can write the quantisation depth parameter for representing the minimum image piece size with independent QP in the time of coding in data to be encoded, and each is met in the CU of prerequisite, the QP that carries this CU is poor, make a no longer merely corresponding QP of each LCU, and by the corresponding QP of the CU that meets prerequisite in LCU, so coding side can carry out Rate Control for fine granulation with CU, owing to often comprising multiple CU in a LCU, therefore can effectively improve the rate control accuracy of LCU;
In addition, the QP that coding side only just carries this CU in the CU that meets prerequisite is poor, and it is poor in all CU, all to carry QP, thus can reduce coding expense, thus effectively improve overall compression efficiency.
Brief description of the drawings
Fig. 1 is embodiment schematic diagram of coding method of the present invention;
Fig. 2 is embodiment schematic diagram of coding/decoding method of the present invention;
Fig. 3 is embodiment schematic diagram of decoding method of the present invention;
Fig. 4 is the position relationship schematic diagram between CU of the present invention and contiguous CU;
Fig. 5 is LCU structural representation of the present invention;
Fig. 6 is a kind of code flow structure schematic diagram after the present invention encodes;
Fig. 7 is another embodiment schematic diagram of decoding method of the present invention;
Fig. 8 is another code flow structure schematic diagram after the present invention encodes;
Fig. 9 is embodiment schematic diagram of code device of the present invention;
Figure 10 is another embodiment schematic diagram of code device of the present invention;
Figure 11 is another embodiment schematic diagram of code device of the present invention;
Figure 12 is embodiment schematic diagram of decoding device of the present invention;
Figure 13 is another embodiment schematic diagram of decoding device of the present invention;
Figure 14 is another embodiment schematic diagram of decoding device of the present invention.
Embodiment
The embodiment of the present invention provides a kind of coding method and device, coding/decoding method and device, can effectively improve rate control accuracy and compression efficiency.
Refer to Fig. 1, in the embodiment of the present invention, embodiment of coding method comprises:
101, coding side obtains data to be encoded;
In the present embodiment, coding side can get data to be encoded, and these data to be encoded are at least a LCU, and these data to be encoded can be a LCU, can be also the data of multiple LCU compositions.
102, coding side is determined the quantisation depth parameter of LCU according to preset rate control algorithm, and by quantisation depth parameter read-in data to be encoded;
Coding side obtains the quantisation depth parameter of LCU according to preset rate control algorithm, this quantisation depth parameter is for representing that LCU has the minimum image piece size of independent QP.
It should be noted that, the size described in the present embodiment and subsequent embodiment refers to the length of side, and for example certain CU is 32*32, is dimensioned to 32.
Coding side can adopt to be attempted alternative mode and obtains the quantisation depth parameter of LCU, constantly adjusts and quantizes the numerical value of depth parameter and carry out analog encoding, makes code check after coding meet the requirement of expection, and detailed process is not construed as limiting herein.
After coding side has been determined quantisation depth parameter, can by these quantisation depth parameter read-in data to be encoded to be ready for sending to decoding end.
103, coding side is determined the QP of each CU according to the size of the each CU comprising in minimum image piece size and LCU;
After coding side gets the quantisation depth parameter of LCU, can know the corresponding minimum image piece size with independent QP of this quantisation depth parameter, and determine the QP of each CU according to the size of the each CU comprising in minimum image piece size and LCU.
104, coding side is poor according to the QP of the each CU of QP predictor calculation of the QP of each CU and each CU;
In the present embodiment, coding side can calculate according to the QP of the each CU obtaining in step 103 the QP predicted value of each CU, then according to this QP predicted value, in conjunction with QP, the QP that calculates each CU is poor.
In the present embodiment, the QP difference of certain CU can be defined as the difference between the QP of this CU and the QP predicted value of this CU.
105, meet the CU of prerequisite for each, the QP that coding side carries this CU in this CU is poor;
After coding side has determined that the QP of each CU is poor, can from each CU, choose the CU that meets prerequisite, and it is poor in these meet the CU of prerequisite, to carry its QP.
106, coding side is encoded and is obtained code stream quantisation depth parameter, the poor and each CU of QP that meets the CU of prerequisite.
In the present embodiment, coding side is by quantisation depth parameter read-in data to be encoded, and after QP difference is write to the CU that meets prerequisite, can encode to whole data to be encoded, quantisation depth parameter, the poor and each CU of QP that meets the CU of prerequisite are encoded, thereby obtain code stream.
In the present embodiment, coding side can write the quantisation depth parameter for representing the minimum image piece size with independent QP in the time of coding in data to be encoded, and each is met in the CU of prerequisite, the QP that carries this CU is poor, make a no longer merely corresponding QP of each LCU, and by the corresponding QP of the CU that meets prerequisite in LCU, so coding side can carry out Rate Control for fine granulation with CU, owing to often comprising multiple CU in a LCU, therefore can effectively improve the rate control accuracy of LCU;
In addition, the QP that coding side only just carries this CU in the CU that meets prerequisite is poor, and it is poor in all CU, all to carry QP, thus can reduce coding expense, thus effectively improve overall compression efficiency.
Described the process of the present invention's coding above from the angle of coding side, described the process of the present invention's decoding below from the angle of decoding end, referred to Fig. 2, embodiment of coding/decoding method of the present invention comprises:
201, decoding end is resolved and is obtained quantisation depth parameter the code stream receiving;
In the present embodiment, decoding end can receive the code stream through coding from coding side, because coding side is in the time encoding, in data to be encoded, write quantisation depth parameter, so decoding end can go out this quantisation depth parameter from the corresponding location resolution of code stream according to agreement in advance.
This quantisation depth parameter is for representing that LCU has the minimum image piece size of independent QP.
202, decoding end is calculated the QP predicted value of each CU according to the size of the each CU comprising in minimum image piece size and LCU;
In the present embodiment, after decoding end is resolved and is obtained quantisation depth parameter from code stream, can know the minimum image piece size with independent QP according to this quantisation depth parameter, and calculate the QP predicted value of each CU according to the size of the each CU comprising in this minimum image piece size and LCU.
203, meet the CU of prerequisite for each, decoding end resolves from code stream that to obtain its QP poor;
In the present embodiment, decoding end can also meet to each the CU of prerequisite, resolves that to obtain the QP of this CU poor from code stream.
It should be noted that, the restriction that decoding end obtains process that QP is poor and decoding end calculates the process of the QP predicted value of each CU and there is no sequencing, can first carry out the process that QP is poor that obtains, also can first carry out the process of the QP predicted value of calculating each CU, or can also carry out two processes simultaneously, specifically be not construed as limiting herein.
204, the poor QP that calculates each CU of QP that decoding end obtains according to QP predicted value and the parsing of each CU;
Decoding end by step 202 known the QP predicted value of each CU and step 203 resolve obtain QP poor after, can be according to the QP of the each CU of these calculation of parameter.
205, decoding end is decoded to each CU according to the QP of each CU.
In the present embodiment, after decoding end is known the QP of each CU, can carry out inverse quantization processing and follow-up decode procedure to each CU, specifically be not construed as limiting herein.
In the present embodiment, coding side can write the quantisation depth parameter for representing the minimum image piece size with independent QP in the time of coding in data to be encoded, and each is met in the CU of prerequisite, the QP that carries this CU is poor, make a no longer merely corresponding QP of each LCU, so can decode for each CU in the time that decoding end is decoded, and without decoding for a whole LCU, thereby decoding efficiency can be improved.
For ease of understanding, be described from the angle of encoding and decoding below, refer to Fig. 3, embodiment of decoding method of the present invention comprises:
301, coding side obtains sequence to be encoded, image or band;
In the present embodiment, the data to be encoded that coding side gets are sequence or image or band, it should be noted that, in a sequence, comprise several images, in an image, comprise several bands, in a band, comprise several LCU.
That is to say, in the present embodiment, the data to be encoded that coding side gets are multiple LCU.
302, coding side is determined the quantisation depth parameter l cu_qp_depth of LCU according to preset rate control algorithm;
Coding side obtains the numerical value of corresponding lcu_qp_depth according to preset rate control algorithm, concrete, coding side can adopt the alternative mode of trial to obtain the numerical value of lcu_qp_depth, constantly adjust the numerical value of lcu_qp_depth and carry out analog encoding, make the code check after coding meet the requirement of expection, detailed process is not construed as limiting herein.
The span of lcu_qp_depth in the present embodiment can be got all integers in 0 to MaxSymbol, and wherein, MaxSymbol can calculate in the following way:
MaxSymbol=log 2(max_coding_block_size)-log 2(min_coding_block_size);
Wherein, max_coding_block_size represents the size of maximum CU, i.e. the size of LCU, and min_coding_block_size represents the size of minimum CU.
It should be noted that, the size described in the present embodiment and subsequent embodiment refers to the length of side, and for example certain CU is 32*32, is dimensioned to 32.
In the present embodiment, this lcu_qp_depth is for representing that LCU has the minimum image piece size of independent QP, in the time that lcu_qp_depth is 0, represent that the minimum image piece with independent QP is LCU, in the time that lcu_qp_depth is 1, the CU that represents LCU to be divided into 4 32*32, minimum image piece is of a size of 32, by that analogy.
Lcu_qp_depth in the present embodiment refers to the minimum image piece size with independent QP of each LCU in sequence, image or band, that is to say, all LCU in this sequence, image or band all use identical lcu_qp_depth.
303, lcu_qp_depth is write sequence parameter set, picture parameter set or slice header information by coding side;
In the present embodiment, coding side, after getting the numerical value of lcu_qp_depth, can write data to be encoded by this lcu_qp_depth:
Coding side can write lcu_qp_depth the sequence parameter set (SPS, Sequence Parameter Set) of this sequence, specifically can be as follows:
Or coding side can write lcu_qp_depth the PPS of this image, specifically can be as follows:
Or coding side can write lcu_qp_depth the slice header information of this band, specifically can be as follows:
Be understandable that, the writing position of lcu_qp_depth has only been described with several examples in the present embodiment, in actual applications, this lcu_qp_depth can also write other positions of sequence, image or band, is specifically not construed as limiting herein.
304, coding side calculates the minimum image piece size QPBlkSize that comprises independent QP;
After coding side gets lcu_qp_depth, can calculate according to this lcu_qp_depth the size QPBlkSize of minimum image piece QPBlk.
Suppose that LCU size is for max_coding_block_size, QPBlkSize can calculate by following mode:
QPBlkSize=max_coding_block_size/(2 lcu_qp_depth)。
For example, when max_coding_block_size is that 64, lcu_qp_depth is 2 o'clock, QPBlkSize is 16, the CU that minimum image piece is 16*16.
305, coding side obtains the QP of each CU according to the size of QPBlkSize, CU;
In the present embodiment, coding side can obtain the QP of each CU in the following several ways:
Be more than or equal to the CU of QPBlkSize for size, coding side calculates the QP of this CU according to preset rate control algorithm;
Be less than the CU of QPBlkSize for size, first coding side determines the minimum image piece under this CU, then calculates the QP of this minimum image piece according to preset rate control algorithm, and using the QP of the QP of this minimum image piece all CU in this minimum image piece.
In the present embodiment, the common practise that coding side is those skilled in the art according to the process of preset rate control algorithm calculating QP is specifically not construed as limiting herein.
306, coding side obtains the QP predicted value of each CU;
After coding side gets the QP of each CU, can, according to coding order (decoding order is identical with coding order), use the QP of the contiguous CU having encoded of each CU to obtain the QP predicted value of each CU.Typically, the CU that this vicinity has been encoded comprises left CU, upper CU and upper left CU.
For ease of describing, first to defining with reference to CU:
The CU that each size is more than or equal to QPBlkSize by coding side with reference to CU, and is less than the CU of QPBlkSize as one for size, coding side is determined the minimum image piece under this CU, and using the upper left CU of this minimum image piece as one with reference to CU.
Defined with reference to after CU, coding side can calculate each QP predicted value with reference to CU according to the QP of each this contiguous CU with reference to CU, and concrete account form can have multiple, describes below with several examples:
One, adopt left CU, upper CU and upper left CU to calculate:
Refer to Fig. 4, wherein, CU cfor certain is with reference to CU, this CU can be the CU that a size is more than or equal to QPBlkSize, can be also the CU that is positioned at the upper left corner of minimum image piece.
CU ufor CU cupper CU, CU lfor CU cleft CU, CU uLfor CU cupper left CU, in the present embodiment, CU ccontiguous CU be left CU, upper CU and upper left CU, wherein:
CU ctop left corner pixel coordinate be (x c, y c), CU lfor comprising pixel (x c-1, y c) CU, CU ufor comprising pixel (x c, y c-1) CU, CU uLfor comprising pixel (x c-1, y c-1) CU.
After coding side has been determined the contiguous CU with reference to CU, the result that can calculate according to step 305 is obtained the QP of these CU, wherein, and CU cqP be QP c, CU uqP be QP u, CU lqP be QP l, CU uLqP be QP uL.
It should be noted that, be not that each CU can get its left CU, upper CU and upper left CU, just can there is not left CU in the CU that for example itself is located in image or the band leftmost side, therefore, coding side can be determined according to the following actual conditions the predicted value of each CU:
(1) if CU ccontiguous CU all do not exist, according to this CU caffiliated band and image are determined this CU cqP predicted value QP p;
Concrete, QP p=slice_qp_delta+pic_init_qp_minus26+26, wherein, slice_qp_delta is the information being included in slice header information, pic_init_qp_minus26 is included in the concentrated information of image parameter.
(2) if CU conly there is CU l, by QP las QP p;
(3) if CU conly there is CU u, by QP uas QP p;
(4) if CU ccontiguous CU all exist, obtain QP lwith QP uLbetween the first difference | QP l-QP uL|, and QP uwith QP uLbetween the second difference | QP u-QP uL|.
If | QP l-QP uL| < | QP u-QP uL|, represent QP land QP uLdifference be less than QP uand QP uLdifference.In this case, CU land CU uLprobably belong to the same object in image, object edge appears at CU uand CU uLedge, so can adopt QP uas QP p;
If | QP l-QP uL| >=| QP u-QP uL|, according to above-mentioned reasoning, can be by QP las QP p.
In actual applications, can realize above-mentioned flow process with following code:
Be understandable that, above-mentioned code is only an example in implementation procedure, in actual applications, can also use other similar codes to realize, and specific implementation is not construed as limiting herein.
Two, adopt left CU, upper CU and the last CU of being encoded to calculate:
Refer to equally Fig. 4, in the present embodiment, can use CU land CU uas certain with reference to CU ccontiguous CU, CU ccan be the CU that a size is more than or equal to QPBlkSize, can be also the CU that is positioned at the upper left corner of minimum image piece.
CU ctop left corner pixel coordinate be (x c, y c), CU lfor comprising pixel (x c-1, y c) CU, CU ufor comprising pixel (x c, y c-1) CU, CU cqP be QP c, CU uqP be QP u, CU lqP be QP l.
It should be noted that, be not that each CU can get its left CU and upper CU, and the CU that for example itself is located in image or the band leftmost side just can not exist left CU, and therefore, coding side can be determined according to the following actual conditions the predicted value of each CU:
(1) if CU ccU lexist, by QP las QP p;
(2) if CU ccU ldo not exist, and CU ccU uor this CU clast be encoded CU exist, by QP uor the QP of the last CU that is encoded is as QP p;
(3) if CU ccU ldo not exist, and CU ccU uwith this CU cthe last CU of being encoded all exist, by QP uor the QP of the last CU that is encoded is as QP p, specifically use QP uor the QP of the last CU that is encoded is as QP p, can predetermine at encoding and decoding end;
(4) if CU ccU l, CU uand the last CU of being encoded all do not exist, according to this CU caffiliated band and image are determined QP p:
Concrete, QP p=slice_qp_delta+pic_init_qp_minus26+26, wherein, slice_qp_delta is the information being included in slice header information, pic_init_qp_minus26 is included in the concentrated information of image parameter.
The above-mentioned process that the each QP predicted value with reference to CU of coding side calculating has only been described with two examples, is understandable that, in actual applications, coding side can also adopt more mode to calculate each QP predicted value with reference to CU, is specifically not construed as limiting herein.
307, the poor cu_qp_delta of QP of the CU that meets prerequisite is write this CU by coding side;
Coding side has calculated the QP of each CU by step 305, calculated each QP predicted value with reference to CU by step 306, and coding side can further calculate according to these parameters the poor cu_qp_delta of QP of each CU, and concrete account form can be:
For each, with reference to CU, coding side is poor as this QP with reference to CU with reference to the difference between the QP predicted value of CU with reference to the QP of CU and this using this, i.e. cu_qp_delta=QP c-QP p;
If this is with reference to comprising other CU in the minimum image piece under CU, coding side is using poor this difference of QP with reference to CU QP of other CU in this minimum image piece.
That is to say, be more than or equal to the CU of QPBlkSize for the size of CU, because this class CU itself is with reference to CU, so the difference that coding side can be between the QP of these CU and QP predicted value is as the cu_qp_delta of these CU;
Be less than the CU of QPBlkSize for the size of CU, be equivalent to comprise several CU in a minimum image piece, the CU in the upper left corner of this minimum image piece is with reference to CU, can know this QP predicted value with reference to CU by step 306, then the QP calculating in integrating step 305 can obtain this cu_qp_delta=QP with reference to CU c-QP pagain this cu_qp_delta assignment with reference to CU is given afterwards in this minimum image piece to other CU, it should be noted that, in actual applications, except using assign operation, can also adopt other mode processing, if for example judge, in this minimum image piece, certain CU meets prerequisite, will in this CU, carry the cu_qp_delta of reference CU of the minimum image piece under this CU.
In the present embodiment, after coding side gets the cu_qp_delta of each CU, can in the CU that meets prerequisite, carry the cu_qp_delta of this CU, the concrete CU that meets prerequisite can be the CU of conversion coefficient after existing non-zero to quantize in its compressed bit stream.
If certain CU adopts skip coding mode, conversion coefficient after can not existing non-zero to quantize in its compressed bit stream, this type of CU does not meet prerequisite, if do not adopt skip coding mode, CU may include the rear conversion coefficient of non-zero quantification in its compressed bit stream, and this part CU meets prerequisite.
In the present embodiment, for the CU that meets prerequisite, coding side the cu_qp_delta of this CU can be write this CU as upper/lower positions:
Wherein, sig_coeff_num > 0 is the judgment condition that whether has cu_qp_delta in the code stream that current C U is corresponding, if this judgment condition is true, illustrate in the code stream that current C U is corresponding and have cu_qp_delta, if this judgment condition is false, illustrates and in the code stream that current C U is corresponding, do not have cu_qp_delta.
It should be noted that, for the CU that is less than QPBlkSize for size, coding side judges according to coding order whether the CU in the minimum image piece under this CU meets prerequisite successively, if a CU does not meet prerequisite, continue to judge whether follow-up CU meets prerequisite, if certain follow-up CU meets prerequisite, the cu_qp_delta of this CU is write in this CU, and stop judgement, no longer for other CU in this minimum image piece write cu_qp_delta, and no matter whether these CU meet prerequisite.
It should be noted that, owing to being not that all CU all meet this prerequisite, so coding side, except carrying in the CU that meets prerequisite the cu_qp_delta of this CU, can also reset the QP of the CU that does not meet prerequisite, concrete mode can be:
The CU that does not meet prerequisite for each, coding side arranges the QP of this CU in the following way:
Be more than or equal to the CU of QPBlkSize for size, the QP of coding side using the QP predicted value of this CU as this CU;
Be less than the CU of QPBlkSize for size, if other CU in the minimum image piece under this CU does not all meet prerequisite, the QP predicted value of the reference CU in the minimum image piece of coding side under this CU is as the QP of this CU.
To not meeting the resetting of QP of CU of prerequisite, can ensure that next code CU can obtain the predicted value identical with decoding end in the time carrying out QP prediction by above-mentioned.
308, coding side is encoded and is obtained code stream lcu_qp_depth, cu_qp_delta and each CU;
Coding side can be encoded to each CU after getting lcu_qp_depth, cu_qp_delta, in the present embodiment,
The process that coding side is encoded to lcu_qp_depth can comprise:
Coding side adopts fixed length code or variable length code to carry out binaryzation to lcu_qp_depth and obtains corresponding binary code word;
Coding side by obtain binary code word according to the corresponding code stream in position definite in the method write step 302 of block code, variable-length encoding or arithmetic entropy coding.
Wherein, the variable length code that coding side adopts can be signless index Columbus code, or other similar variable length codes, is specifically not construed as limiting herein.
The process that coding side is encoded to cu_qp_delta can comprise:
Coding side adopts variable length code to carry out binaryzation and obtain corresponding binary code word meeting the cu_qp_delta of CU of prerequisite;
Coding side writes code stream by the binary code word of acquisition according to the method for variable-length encoding or arithmetic entropy coding.
Coding side by obtain binary code word according to the corresponding code stream in position definite in the method write step 307 of block code, variable-length encoding or arithmetic entropy coding.
Wherein, the variable length code that coding side adopts can be signed index Columbus code, or other similar variable length codes, is specifically not construed as limiting herein.
In the present embodiment, coding side is not construed as limiting the cataloged procedure of CU herein, obtains code stream after coding completes, and coding side can send this code stream to decoding end.
309, decoding end is decoded and is obtained lcu_qp_depth the code stream receiving;
After decoding end receives code stream, can be according to knowing that with the agreement of coding side lcu_qp_depth residing position in code stream is SPS in advance, or PPS, or SH, thereby use the method for fixed length decoding, variable length decoding or the decoding of arithmetic entropy to obtain binary code word to the content of this part;
Decoding end adopts fixed length code or variable length code to carry out contrary binaryzation to binary code word and obtains lcu_qp_depth.
Variable length code in the present embodiment can be signless index Columbus code, or other similar variable length codes, is specifically not construed as limiting herein.
Lcu_qp_depth in the present embodiment is for representing to have in sequence or image or each LCU of band the minimum image piece size of independent QP.
310, decoding end is calculated the minimum image piece size QPBlkSize that comprises independent QP;
After decoding end calculates lcu_qp_depth, can calculate QPBlkSize according to this lcu_qp_depth, concrete account form can be identical with the mode of coding side calculating QPBlkSize in abovementioned steps 304, specifically repeats no more herein.
311, decoding end is resolved the cu_qp_delta that obtains this CU from meet the CU of prerequisite;
In the present embodiment, the CU that meets prerequisite for each, the position that decoding end can be corresponding from the code stream of this CU is used the method for variable length decoding or the decoding of arithmetic entropy to obtain binary code word;
Decoding end adopts variable length code binary code word to be carried out obtaining against binaryzation the cu_qp_delta of this CU.
Variable length code in the present embodiment can be signed index Columbus code, or other similar variable length codes, is specifically not construed as limiting herein.
It should be noted that, according to the description in abovementioned steps 307, sig_coeff_num > 0 is the judgment condition that whether has cu_qp_delta in the code stream that current C U is corresponding, so decoding end can by this judgment condition of verification to know whether this CU meets prerequisite, the CU that meets prerequisite can be the CU of conversion coefficient after existing non-zero to quantize in its compressed bit stream equally.
In the present embodiment, because not all CU is the CU that meets prerequisite, so decoding end can be determined the cu_qp_delta of all CU in the following manner:
Be more than or equal to the CU of QPBlkSize for each size, decoding end judges whether this CU meets prerequisite, if meet, from this CU, resolves the cu_qp_delta of this CU, if do not meet, the cu_qp_delta of this CU is set to 0;
Be less than the CU of QPBlkSize for size, decoding end is determined the minimum image piece under this CU, and according to the decoding order of CU in this minimum image piece, judge successively in this minimum image piece, whether each CU meets prerequisite, if meet, stop judgement, and using the cu_qp_delta of the cu_qp_delta of this CU all CU in this minimum image piece, if all CU all do not meet prerequisite in this minimum image piece, in this minimum image piece, the cu_qp_delta of all CU is set to 0.
312, decoding end is obtained the QP predicted value of each CU according to the size of QPBlkSize, CU;
After decoding end gets QPBlkSize, can obtain according to the size of each CU and this QPBlkSize the QP predicted value of each CU.
The mode of QP predicted value that this step detailed process and coding side in abovementioned steps 306 obtain each CU is identical.In 306, describe, adjacent domain is for encoding or decoded region, because coding order is identical with decoding order, so coding region is unified region with the region of decoding.Because the QP of CU can obtain in this close region, so can obtain according to identical method in 306 the QP predicted value of each CU.
After obtaining the QP predicted value of each CU, the cu_qp_delta of the each CU getting in integrating step 311, can obtain the QP of this CU, i.e. QP=QP predicted value+cu_qp_delta.
313, decoding end is calculated the QP of each CU according to the QP predicted value of each CU and cu_qp_delta;
After decoding end calculates the QP predicted value of each CU, can calculate according to the QP predicted value of each CU and cu_qp_delta the QP of each CU, concrete mode can be:
Be more than or equal to QPBlkSize for size, and do not meet the CU of prerequisite, the QP of decoding end using the QP predicted value of this CU as this CU;
Be more than or equal to QPBlkSize for size, and meet the CU of prerequisite, the QP of decoding end using the cu_qp_delta sum of the QP predicted value of this CU and this CU as this CU;
Be less than the CU of QPBlkSize for size, if this CU meets prerequisite, decoding end is obtained the QP predicted value of the upper left CU of the affiliated minimum image piece of this CU, and QP using this QP predicted value and this cu_qp_delta sum as this CU, and using the QP of the QP of this CU all CU in this minimum image piece;
Be less than the CU of QPBlkSize for size, if all CU all do not meet prerequisite in the minimum image piece under this CU, decoding end is obtained the QP predicted value of the upper left CU of the affiliated minimum image piece of this CU, and using the QP of this QP predicted value all CU in this minimum image piece.
314, decoding end is decoded to each CU according to the QP of each CU.
In the present embodiment, decoding end can be used the QP that obtains each CU in step 313 to carry out inverse quantization processing and follow-up decode procedure to each CU, is specifically not construed as limiting herein.
For ease of understanding, with an instantiation, decoding method of the present invention is briefly described below, refer to Fig. 5, Fig. 5 is LCU structural representation of the present invention, wherein, max_coding_block_size is that 64, QPBlkSize is 16.
As can be seen from Figure 5, in this LCU, comprise 37 CU, wherein, the CU that draws fork is the CU that adopts skip coding, do not meet the CU of prerequisite, in remaining CU, suppose that it is all 0 that CU3 and CU23 comprise the rear conversion coefficient of quantification in its compressed bit stream, CU3 and CU23 be not for meeting the CU of prerequisite yet, and remaining CU is the CU that meets prerequisite.
According to the cataloged procedure described in earlier figures 3 embodiment, the LCU shown in Fig. 5 through the code flow structure that obtains after coding as shown in Figure 6, M1, M2...M37 etc. are header, C1, and C4...C37 etc. are conversion coefficient, DQP1, DQP4...DQP37 etc. are cu_qp_delta.
In the present embodiment, coding side can write the quantisation depth parameter for representing the minimum image piece size with independent QP in the time of coding in data to be encoded, and each is met in the CU of prerequisite, the QP that carries this CU is poor, make a no longer merely corresponding QP of each LCU, and carry out corresponding QP by the CU that meets prerequisite in LCU, so coding side can carry out Rate Control for fine granulation with CU, owing to often comprising multiple CU in a LCU, therefore can effectively improve the rate control accuracy of LCU;
Secondly, the QP that coding side only just carries this CU in the CU that meets prerequisite is poor, and it is poor in all CU, all to carry QP, thus can reduce coding expense, thus effectively improve overall compression efficiency;
Again, in the present embodiment, coding side and decoding end can adopt multiple prediction mode while calculating the QP predicted value of CU, make computational process more flexible, thereby can adapt to multiple different environment.
Introduced a kind of decoding method above, introduced another decoding method below, specifically referred to Fig. 7, another embodiment of decoding method of the present invention comprises:
701, coding side obtains LCU to be encoded;
In the present embodiment, the data to be encoded that coding side gets are a LCU.
702, coding side is determined the quantisation depth parameter l cu_qp_depth of LCU according to preset rate control algorithm;
Coding side obtains the numerical value of corresponding lcu_qp_depth according to preset rate control algorithm, concrete, coding side can adopt the alternative mode of trial to obtain the numerical value of lcu_qp_depth, constantly adjust the numerical value of lcu_qp_depth and carry out analog encoding, make the code check after coding meet the requirement of expection, detailed process is not construed as limiting herein.
The span of lcu_qp_depth in the present embodiment can be got all integers in 0 to MaxSymbol, and wherein, MaxSymbol can calculate in the following way:
MaxSymbol=log 2(max_coding_block_size)-log 2(min_coding_block_size);
Wherein, max_coding_block_size represents the size of maximum CU, i.e. the size of LCU, and min_coding_block_size represents the size of minimum CU.
It should be noted that, the size described in the present embodiment and subsequent embodiment refers to the length of side, and for example certain CU is 32*32, is dimensioned to 32.
In the present embodiment, this lcu_qp_depth is for representing that LCU has the minimum image piece size of independent QP, in the time that lcu_qp_depth is 0, represent that the minimum image piece with independent QP is LCU, in the time that lcu_qp_depth is 1, the CU that represents LCU to be divided into 4 32*32, minimum image piece is of a size of 32, by that analogy.
Lcu_qp_depth in the present embodiment refers to the minimum image piece size with independent QP of a current LCU, that is to say, each LCU in this sequence, image or band all uses independently lcu_qp_depth, and the lcu_qp_depth that each LCU uses is all likely not identical.
703, coding side writes lcu_qp_depth in current LCU in the CU of conversion coefficient after first exists non-zero to quantize in its compressed bit stream by coding order;
In the present embodiment, coding side, after getting the numerical value of lcu_qp_depth, can write this lcu_qp_depth in current LCU in the CU of conversion coefficient after first exists non-zero to quantize in its compressed bit stream by coding order:
Wherein, introducing lcu_qp_depthFlag variable is the object of transmitting lcu_qp_depth in the CU for conversion coefficient exist non-zero to quantize at first after only for reaching in its compressed bit stream.Certainly also can use other method to realize same code flow structure.
In the present embodiment, sig_coeff_num > 0 is the judgment condition that whether has lcu_qp_depth in current C U code stream.In the time meeting this judgment condition, lcu_qp_depth also can be placed on other position in current C U code stream, is specifically not construed as limiting herein.
Owing to being not that each CU meets the condition of carrying lcu_qp_depth, so, in the present embodiment, coding side is in current LCU, according to the coded sequence of CU, check it whether to possess the condition of carrying lcu_qp_depth to each CU, whether this CU is the CU of conversion coefficient after first exists non-zero to quantize in its compressed bit stream.
If current C U does not possess the condition of carrying lcu_qp_depth, coding side continues the follow-up CU of current LCU kind to test.If find in certain CU, it possesses the condition of carrying lcu_qp_depth, in the position of aforementioned regulation, lcu_qp_depth is write to this CU.
In the present embodiment, after coding side has write lcu_qp_depth in certain CU, in other CU without the LCU under this CU, write again lcu_qp_depth.
704~708, identical with aforementioned step 304~308 in embodiment illustrated in fig. 3, repeat no more herein.
709, decoding end is decoded and is obtained lcu_qp_depth the code stream receiving;
After decoding end receives code stream, can be according to knowing lcu_qp_depth residing position in code stream with the agreement of coding side in advance, thus use the method for fixed length decoding, variable length decoding or the decoding of arithmetic entropy to obtain binary code word to the content of this part;
Decoding end adopts fixed length code or variable length code to carry out contrary binaryzation to binary code word and obtains lcu_qp_depth.
Variable length code in the present embodiment can be signless index Columbus code, or other similar variable length codes, is specifically not construed as limiting herein.
Lcu_qp_depth in the present embodiment is for representing that current LCU has the minimum image piece size of independent QP.
710~714, identical with step 310~314 of aforementioned middle description embodiment illustrated in fig. 3, repeat no more herein.
For ease of understanding, with an instantiation, decoding method of the present invention is briefly described below, refer to equally Fig. 5, Fig. 5 is LCU structural representation of the present invention, wherein, max_coding_block_size is that 64, QPBlkSize is 16.
As can be seen from Figure 5, in this LCU, comprise 37 CU, wherein, the CU that draws fork is the CU that adopts skip coding, do not meet the CU of prerequisite, in remaining CU, suppose that it is all 0 that CU3 and CU23 comprise the rear conversion coefficient of quantification in its compressed bit stream, CU3 and CU23 be not for meeting the CU of prerequisite yet, and remaining CU is the CU that meets prerequisite.
According to aforementioned cataloged procedure described in embodiment illustrated in fig. 7, the code flow structure that LCU shown in Fig. 5 obtains through coding afterwards as shown in Figure 8, depth is lcu_qp_depth, M1, M2...M37 etc. are header, C1, and C4...C37 etc. are conversion coefficient, DQP1, DQP4...DQP37 etc. are cu_qp_delta.
In the present embodiment, coding side can write the quantisation depth parameter for representing the minimum image piece size with independent QP in the time of coding in data to be encoded, and each is met in the CU of prerequisite, the QP that carries this CU is poor, make a no longer merely corresponding QP of each LCU, and by the corresponding QP of the CU that meets prerequisite in LCU, so coding side can carry out Rate Control for fine granulation with CU, owing to often comprising multiple CU in a LCU, therefore can effectively improve the rate control accuracy of LCU;
Secondly, the QP that coding side only just carries this CU in the CU that meets prerequisite is poor, and it is poor in all CU, all to carry QP, thus can reduce coding expense, thus effectively improve overall compression efficiency;
Again, in the present embodiment, coding side and decoding end can adopt multiple prediction mode while calculating the QP predicted value of CU, make computational process more flexible, thereby can adapt to multiple different environment;
Further, in the present embodiment, lcu_qp_depth is for representing that current LCU has the minimum image piece size of independent QP, so each LCU can carry a lcu_qp_depth, make different LCU can use different lcu_qp_depth, thereby can further improve the rate control accuracy of LCU.
Below code device embodiment of the present invention is described, refers to Fig. 9, embodiment of code device of the present invention comprises:
Data capture unit 901, for obtaining data to be encoded, these data to be encoded are at least a maximum coding unit LCU;
Depth parameter processing unit 902, for determine the quantisation depth parameter of this LCU according to preset rate control algorithm, and the data to be encoded that this data capture unit 901 of this quantisation depth parameter read-in is got, this quantisation depth parameter is for representing that this LCU has the minimum image piece size of independent QP;
Quantization parameter determining unit 903, determines the QP of each CU for the size of each CU of comprising according to this minimum image piece size and this LCU;
Computing unit 904, for poor according to the QP of the definite QP of each CU of this quantization parameter determining unit 903 and the each CU of QP predictor calculation of each CU;
Filler cells 905, for meet the CU of prerequisite for each, the QP that carries this CU in this CU is poor;
Coding unit 906, for encoding and obtain code stream this quantisation depth parameter, the poor and each CU of QP that meets the CU of prerequisite.
For ease of understanding, below code device of the present invention is described in detail, specifically refer to Figure 10, another embodiment of code device of the present invention comprises:
Data capture unit 1001, for obtaining data to be encoded, these data to be encoded are at least a maximum coding unit LCU;
Depth parameter processing unit 1002, for determine the quantisation depth parameter of this LCU according to preset rate control algorithm, and the data to be encoded that this data capture unit 1001 of this quantisation depth parameter read-in is got, this quantisation depth parameter is for representing that this LCU has the minimum image piece size of independent QP;
Quantization parameter determining unit 1003, determines the QP of each CU for the size of each CU of comprising according to this minimum image piece size and this LCU;
Computing unit 1005, for poor according to the QP of the definite QP of each CU of this quantization parameter determining unit 1003 and the each CU of QP predictor calculation of each CU;
Filler cells 1006, for meet the CU of prerequisite for each, the QP that carries this CU in this CU is poor;
Coding unit 1007, for encoding and obtain code stream this quantisation depth parameter, the poor and each CU of QP that meets the CU of prerequisite.
Code device in the present embodiment can further include:
Predicting unit 1004, for calculating each QP predicted value with reference to CU according to the QP of each contiguous CU with reference to CU;
Be more than or equal to the CU of this minimum image piece size for size, each CU with reference to CU, is less than the CU of this minimum image piece size as one for size, the upper left CU of the minimum image piece under this CU as one with reference to CU.
Predicting unit 1004 in the present embodiment comprises:
The first correction verification module 10041, for to each with reference to CU, judge whether this contiguous CU with reference to CU exists, and this contiguous CU with reference to CU comprises this left CU with reference to CU, upper CU and upper left CU;
The first prediction module 10042, in the time that this contiguous CU with reference to CU does not all exist, determines this QP predicted value with reference to CU according to this with reference to the band under CU and image;
The second prediction module 10043, in the time only there is left CU with reference to CU in this, using the QP of this left CU as this QP predicted value with reference to CU;
The 3rd prediction module 10044, in the time only there is upper CU with reference to CU in this, using the QP of CU on this as this QP predicted value with reference to CU;
The 4th prediction module 10045, for in the time that this contiguous CU with reference to CU all exists, obtain the first difference between the QP of left CU and the QP of upper left CU, and the second difference between the QP of upper CU and the QP of upper left CU, if this first difference is less than the second difference, using the QP of CU on this as this QP predicted value with reference to CU, if this first difference is more than or equal to the second difference, using the QP of this left CU as this QP predicted value with reference to CU.
Refer to Figure 11, another embodiment of code device of the present invention comprises:
Data capture unit 1101, for obtaining data to be encoded, these data to be encoded are at least a maximum coding unit LCU;
Depth parameter processing unit 1102, for determine the quantisation depth parameter of this LCU according to preset rate control algorithm, and the data to be encoded that this data capture unit 1101 of this quantisation depth parameter read-in is got, this quantisation depth parameter is for representing that this LCU has the minimum image piece size of independent QP;
Quantization parameter determining unit 1103, determines the QP of each CU for the size of each CU of comprising according to this minimum image piece size and this LCU;
Computing unit 1105, for poor according to the QP of the definite QP of each CU of this quantization parameter determining unit 1103 and the each CU of QP predictor calculation of each CU;
Filler cells 1106, for meet the CU of prerequisite for each, the QP that carries this CU in this CU is poor;
Coding unit 1107, for encoding and obtain code stream this quantisation depth parameter, the poor and each CU of QP that meets the CU of prerequisite.
Code device in the present embodiment can further include:
Predicting unit 1104, for calculating each QP predicted value with reference to CU according to the QP of each contiguous CU with reference to CU;
Be more than or equal to the CU of this minimum image piece size for size, each CU with reference to CU, is less than the CU of this minimum image piece size as one for size, the upper left CU of the minimum image piece under this CU as one with reference to CU.
Predicting unit 1104 in the present embodiment comprises:
The second correction verification module 11041, for to each with reference to CU, judge whether this left CU with reference to CU exists;
The 5th prediction module 11042, in the time that this left CU with reference to CU exists, using the QP of this left CU as this QP predicted value with reference to CU;
The 6th prediction module 11043, for not existing as this left CU with reference to CU, and this upper CU with reference to CU or this last CU of being encoded with reference to CU are while existing, using the QP of the QP of CU on this or the last CU that is encoded as this QP predicted value with reference to CU;
The 7th prediction module 11044, for as this left CU with reference to CU, when upper CU and the last CU of being encoded all do not exist, determines this QP predicted value with reference to CU according to this with reference to the band under CU and image.
In the present embodiment, coding side can write the quantisation depth parameter for representing the minimum image piece size with independent QP in the time of coding in data to be encoded, and each is met in the CU of prerequisite, the QP that carries this CU is poor, make a no longer merely corresponding QP of each LCU, and by the corresponding QP of the CU that meets prerequisite in LCU, so coding side can carry out Rate Control for fine granulation with CU, owing to often comprising multiple CU in a LCU, therefore can effectively improve the rate control accuracy of LCU;
Secondly, the QP that coding side only just carries this CU in the CU that meets prerequisite is poor, and it is poor in all CU, all to carry QP, thus can reduce coding expense, thus effectively improve overall compression efficiency.
Below code device embodiment of the present invention is described, refers to Figure 12, embodiment of decoding device of the present invention comprises:
The first resolution unit 1201, for the code stream receiving is resolved and obtained quantisation depth parameter, this quantisation depth parameter is for representing that LCU has the minimum image piece size of independent QP;
Parameter prediction unit 1202, calculates the QP predicted value of each CU for the size of each CU of comprising according to this minimum image piece size and this LCU;
The second resolution unit 1203, for each being met to the CU of prerequisite, resolves from code stream that to obtain its QP poor;
Parameter calculation unit 1204, resolves the QP of the poor each CU of calculating of QP obtaining for the QP predicted value of each CU of obtaining according to this parameter prediction unit 1202 and this second resolution unit 1203;
Decoding unit 1205, decodes to each CU for the QP of each CU of calculating according to this parameter calculation unit 1204.
For ease of understanding, below code device of the present invention is described in detail, specifically refer to Figure 13, another embodiment of decoding device of the present invention comprises:
The first resolution unit 1301, for the code stream receiving is resolved and obtained quantisation depth parameter, this quantisation depth parameter is for representing that LCU has the minimum image piece size of independent QP;
Parameter prediction unit 1302, calculates the QP predicted value of each CU for the size of each CU of comprising according to this minimum image piece size and this LCU;
The second resolution unit 1303, for each being met to the CU of prerequisite, resolves from code stream that to obtain its QP poor;
Parameter calculation unit 1304, resolves the QP of the poor each CU of calculating of QP obtaining for the QP predicted value of each CU of obtaining according to this parameter prediction unit 1302 and this second resolution unit 1303;
Decoding unit 1305, decodes to each CU for the QP of each CU of calculating according to this parameter calculation unit.
Wherein, parameter prediction unit 1302 may further include:
The first parameter verification module 13021, be used for each with reference to CU, judge whether this contiguous CU with reference to CU exists, this contiguous CU with reference to CU comprises this left CU with reference to CU, upper CU and upper left CU, be more than or equal to the CU of this minimum image piece size for size, each CU as one with reference to CU, be less than the CU of this minimum image piece size for size, the upper left CU of the minimum image piece under this CU as one with reference to CU;
The first parameter prediction module 13022, in the time that this contiguous CU with reference to CU does not all exist, determines this QP predicted value with reference to CU according to this with reference to the band under CU and image;
The second parameter prediction module 13023, in the time only there is left CU with reference to CU in this, using the QP of this left CU as this QP predicted value with reference to CU;
The 3rd parameter prediction module 13024, in the time only there is upper CU with reference to CU in this, using the QP of CU on this as this QP predicted value with reference to CU;
The 4th parameter prediction module 13025, for in the time that this contiguous CU with reference to CU all exists, obtain the first difference between the QP of left CU and the QP of upper left CU, and the second difference between the QP of upper CU and the QP of upper left CU, if this first difference is less than the second difference, using the QP of CU on this as this QP predicted value with reference to CU, if this first difference is more than or equal to the second difference, using the QP of this left CU as this QP predicted value with reference to CU.
Parameter calculation unit 1304 in the present embodiment may further include:
The first computing module 13041, for size being more than or equal to this minimum image piece size, and does not meet the CU of prerequisite, the QP using the QP predicted value of this CU as this CU;
The second computing module 13042, for size being more than or equal to this minimum image piece size, and meets the CU of prerequisite, the QP using poor the QP of the QP predicted value of this CU and this CU sum as this CU;
The 3rd computing module 13043, for size being less than to the CU of this minimum image module unit size, if this CU meets prerequisite, obtain the QP predicted value of the upper left CU of the affiliated minimum image piece of this CU, and the QP of this QP predicted value and this CU is differed to the QP of sum as this CU, and using the QP of the QP of this CU all CU in this minimum image piece;
The 4th computing module 13044, for size being less than to the CU of this minimum image module unit size, if all CU all do not meet prerequisite in the minimum image piece under this CU, obtain the QP predicted value of the upper left CU of the affiliated minimum image piece of this CU, and using the QP of this QP predicted value all CU in this minimum image piece.
Refer to Figure 14, another embodiment of decoding device of the present invention comprises:
The first resolution unit 1401, for the code stream receiving is resolved and obtained quantisation depth parameter, this quantisation depth parameter is for representing that LCU has the minimum image piece size of independent QP;
Parameter prediction unit 1402, calculates the QP predicted value of each CU for the size of each CU of comprising according to this minimum image piece size and this LCU;
The second resolution unit 1403, for each being met to the CU of prerequisite, resolves from code stream that to obtain its QP poor;
Parameter calculation unit 1404, resolves the QP of the poor each CU of calculating of QP obtaining for the QP predicted value of each CU of obtaining according to this parameter prediction unit 1402 and this second resolution unit 1403;
Decoding unit 1405, decodes to each CU for the QP of each CU of calculating according to this parameter calculation unit.
Wherein, parameter prediction unit 1402 may further include:
The second parameter verification module 14021, be used for each with reference to CU, judge whether this left CU with reference to CU exists, be more than or equal to the CU of this minimum image piece size for size, each CU as one with reference to CU, be less than the CU of this minimum image piece size for size, the upper left CU of the minimum image piece under this CU as one with reference to CU;
The 5th parameter prediction module 14022, in the time that this left CU with reference to CU exists, using the QP of this left CU as this QP predicted value with reference to CU;
The 6th parameter prediction module 14023, for not existing as this left CU with reference to CU, and this upper CU with reference to CU or this last CU of being encoded with reference to CU are while existing, using the QP of the QP of CU on this or the last CU that is encoded as this QP predicted value with reference to CU;
The 7th parameter prediction module 14024, for as this left CU with reference to CU, when upper CU and the last CU of being encoded all do not exist, determines this QP predicted value with reference to CU according to this with reference to the band under CU and image.
Parameter calculation unit 1404 in the present embodiment may further include:
The first computing module 14041, for size being more than or equal to this minimum image piece size, and does not meet the CU of prerequisite, the QP using the QP predicted value of this CU as this CU;
The second computing module 14042, for size being more than or equal to this minimum image piece size, and meets the CU of prerequisite, the QP using poor the QP of the QP predicted value of this CU and this CU sum as this CU;
The 3rd computing module 14043, for size being less than to the CU of this minimum image module unit size, if this CU meets prerequisite, obtain the QP predicted value of the upper left CU of the affiliated minimum image piece of this CU, and the QP of this QP predicted value and this CU is differed to the QP of sum as this CU, and using the QP of the QP of this CU all CU in this minimum image piece;
The 4th computing module 14044, for size being less than to the CU of this minimum image module unit size, if all CU all do not meet prerequisite in the minimum image piece under this CU, obtain the QP predicted value of the upper left CU of the affiliated minimum image piece of this CU, and using the QP of this QP predicted value all CU in this minimum image piece.
In the present embodiment, coding side can write the quantisation depth parameter for representing the minimum image piece size with independent QP in the time of coding in data to be encoded, and each is met in the CU of prerequisite, the QP that carries this CU is poor, make a no longer merely corresponding QP of each LCU, so can decode for each CU in the time that decoding end is decoded, and without decoding for a whole LCU, thereby decoding efficiency can be improved.
The technology that the embodiment of the present invention provides can be applied in digital processing field, and by encoder, decoder is realized.Video encoder, decoder is for example widely used in, in various communication apparatus or electronic equipment: Digital Television, Set Top Box, media gateway, mobile phone, wireless device, personal digital assistant (PDA), hand-hold type or portable computer, GPS receiver/omniselector, camera, video player, video camera, video tape recorder, watch-dog, video conference and videophone device etc.This kind equipment comprises processor, memory, and the interface of transmission data.Video Codec can directly be realized by digital circuit or for example DSP of chip (digital signal processor), or is driven the flow process in a processor software code and realized by software code.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is can carry out the hardware that instruction is relevant by program to complete, this program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
Above a kind of coding method provided by the present invention and device, coding/decoding method and device are described in detail, for one of ordinary skill in the art, according to the thought of the embodiment of the present invention, all will change in specific embodiments and applications, therefore this description should not be construed as limitation of the present invention.

Claims (2)

1. a coding/decoding method, is characterized in that, comprising:
From sequence parameter set, the picture parameter set of image or the slice header information of band of the sequence of the code stream that receives, resolve and obtain quantisation depth parameter; Described quantisation depth parameter is for representing to have in each maximum coding unit LCU of described sequence, image or band the minimum image piece size of independent quantitative parameter QP;
Calculate the QP predicted value of each CU according to the size of the each coding unit CU comprising in described minimum image piece size and described LCU;
Meet the CU of prerequisite for each, from code stream, resolve that to obtain its QP poor;
The QP of the poor each CU of calculating of QP obtaining according to QP predicted value and the parsing of described each CU;
According to the QP of described each CU, each CU is decoded.
2. coding/decoding method according to claim 1, is characterized in that, describedly meets the CU of prerequisite for each, resolves to obtain that its QP is poor to be comprised from code stream:
Be more than or equal to the CU of described minimum image piece size for each size, judge whether this CU meets described prerequisite, if meet, the QP that resolves this CU from this CU is poor, if do not meet, the QP of this CU is poor is set to 0;
Be less than the CU of described minimum image piece size for size, determine the minimum image piece that this CU is affiliated, and according to the decoding order of CU in this minimum image piece, judge successively in this minimum image piece, whether each CU meets described prerequisite, if meet, stop judgement, and using poor QP difference QP of all CU in this minimum image piece of this CU, if all CU all do not meet described prerequisite in this minimum image piece, in this minimum image piece, the QP of all CU is poor is set to 0.
CN201110459512.0A 2011-03-11 2011-03-11 Decoding method Active CN102685483B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110459512.0A CN102685483B (en) 2011-03-11 2011-03-11 Decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110459512.0A CN102685483B (en) 2011-03-11 2011-03-11 Decoding method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201110059194.9A Division CN102685478B (en) 2011-03-11 2011-03-11 Encoding method and device, and decoding method and device

Publications (2)

Publication Number Publication Date
CN102685483A CN102685483A (en) 2012-09-19
CN102685483B true CN102685483B (en) 2014-12-03

Family

ID=46816774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110459512.0A Active CN102685483B (en) 2011-03-11 2011-03-11 Decoding method

Country Status (1)

Country Link
CN (1) CN102685483B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130049523A (en) 2011-11-04 2013-05-14 오수미 Apparatus for generating intra prediction block
CN104581159B (en) * 2013-10-18 2019-04-05 华为技术有限公司 Block partitioning scheme in coding and decoding video determines method and relevant apparatus
CN105095613B (en) * 2014-04-16 2018-05-18 华为技术有限公司 A kind of method and device predicted based on sequence data
CN104363452B (en) * 2014-10-17 2018-02-09 深圳市云宙多媒体技术有限公司 A kind of video block division methods and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1212561A (en) * 1997-06-20 1999-03-31 松下电器产业株式会社 Image processing method, image processing device, and data storage medium
CN101888550A (en) * 2010-06-28 2010-11-17 中兴通讯股份有限公司 Encoding method and device of quantization parameters in slice head information
CN101938657A (en) * 2010-10-07 2011-01-05 西安电子科技大学 Self-adaptively dividing method for code units in high-efficiency video coding
CN101978897A (en) * 2010-09-01 2011-02-23 安徽夏星食品有限公司 Chicken steak

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1212561A (en) * 1997-06-20 1999-03-31 松下电器产业株式会社 Image processing method, image processing device, and data storage medium
CN101888550A (en) * 2010-06-28 2010-11-17 中兴通讯股份有限公司 Encoding method and device of quantization parameters in slice head information
CN101978897A (en) * 2010-09-01 2011-02-23 安徽夏星食品有限公司 Chicken steak
CN101938657A (en) * 2010-10-07 2011-01-05 西安电子科技大学 Self-adaptively dividing method for code units in high-efficiency video coding

Also Published As

Publication number Publication date
CN102685483A (en) 2012-09-19

Similar Documents

Publication Publication Date Title
CN102685478B (en) Encoding method and device, and decoding method and device
US10205953B2 (en) Object detection informed encoding
US10873763B2 (en) Video compression techniques for high dynamic range data
US20140211858A1 (en) Spatially adaptive video coding
EP3817385A1 (en) Method and apparatus for encoding image, method and apparatus for decoding image, electronic device, and system
CN110650349B (en) Image encoding method, decoding method, encoder, decoder and storage medium
US10812832B2 (en) Efficient still image coding with video compression techniques
CN114501010A (en) Image encoding method, image decoding method and related device
CN102685483B (en) Decoding method
CN111432213B (en) Method and apparatus for tile data size coding for video and image compression
EP1227684A2 (en) Encoding of video signals
EP3151559A1 (en) Method for coding and decoding a plurality of picture blocks and corresponding devices
CN102685485B (en) Coding method and device, and decoding method and device
KR101596085B1 (en) Apparatus and method for video coding/decoding using adaptive intra prediction
KR102513756B1 (en) Image encoding method, decoding method, encoder, decoder and storage medium
CN102685484B (en) Coding method and device, and decoding method and device
KR20150095604A (en) Apparatus and method for video coding/decoding using adaptive intra prediction
CN116982262A (en) State transition for dependent quantization in video coding
EP2938074A1 (en) Methods for encoding and decoding a picture and corresponding devices
KR20180081512A (en) Encoding and decoding methods and corresponding devices
WO2015177126A1 (en) Method and device for encoding a frame and/or decoding a bitstream representing a frame

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