Embodiment
Describe the present invention more fully now with reference to accompanying drawing, shown exemplary embodiment of the present invention in the accompanying drawing.
With reference to following detailed description and accompanying drawing to exemplary embodiment, the method that can more easily understand advantage of the present invention and characteristics and realize it.Yet the present invention can be implemented and should not be interpreted as limitation and exemplary embodiment set forth herein with many different forms.These exemplary embodiments are provided so that the disclosure thoroughly and fully and fully design of the present invention is pass on to those skilled in the art, the present invention will only be defined by claims.In whole specification, the identical identical parts of label indication.
Hereinafter, with reference to flow chart description the present invention of method according to an exemplary embodiment of the present invention.The combination that should be appreciated that square frame in each square frame of flow chart and the flow chart can be realized by computer program instructions.These computer program instructions can be provided for the processor of all-purpose computer, special purpose computer or other programmable data processing device, producing a kind of mechanism, thereby create the means of the function that is used for being implemented in one or more flowchart block appointments via the instruction that the processor of computer or other programmable data processing device is carried out.
These computer program instructions also can be stored in computer can with or computer-readable memory in, described memory can instruct computer or other programmable data processing device to play a role in concrete mode, thereby computer can with or computer-readable memory in the instruction of storing produce a kind of product, this product comprises the instruction means of the function that is implemented in appointment in one or more flowchart block.
Computer program instructions also can be written into computer or other programmable data processing device is performed the sequence of operations step on computer or other programmable device, thereby produce a kind of so computer implemented processing, that is, the instruction of carrying out on computer or other programmable device provides the step that is implemented in the function of appointment in one or more flowchart block.
But the part of each square frame representation module, end or the code of flow chart, it comprises one or more executable instructions of the logic function that is used to realize appointment.Should be noted that at some in other the realization, the function of indicating can be not according to occurring in sequence in square frame.For example, depend on the function that relates to, two pieces that show in fact can be carried out substantially concomitantly continuously, and perhaps square frame sometimes can be carried out with opposite order.
About the information of the Forecasting Methodology that shows among Fig. 2, that is,, can be provided with and send by encoder about the data of a method selecting among the Forecasting Methodology that from Fig. 2, shows or about the information of reference data, use with decoded device.Carry out finally packed data nondestructively of entropy coding.Huffman encoding is often used as entropy coding method.Huffman encoding is a kind of parameter length coding and depends on Bit Allocation in Discrete based on the data of data probability.Therefore, in order to increase overall bit efficiency, can revise the data representation method.
The method that a kind of Forecasting Methodology that will select among the Forecasting Methodology shown in Fig. 2 is notified to decoder is to use prediction indication, and this prediction indication indication method selected is with reference to base layer information, for example the residual error data of basic unit or motion vector.The same with prediction indication, whether residual prediction flag or motion prediction sign can be used to notify the decoder base layer information by reference.Because be always each macro block, each sheet, each frame prediction indication is set, so reduce the size of sign or increase compression efficiency during such as the coding of entropy coding very important.In order to realize this purpose, for the decoder configuration information comes prediction indication is predicted and used this information to rebuild this prediction indication.
Fig. 3 illustrates the example of the residual prediction in the video coding.Residual prediction refers to the prediction of carrying out in the residual error data of using a kind of method prediction of selecting among the Forecasting Methodology shown in Fig. 2.Use residual error data, can be according to the macro block (sheet or frame) 14 a kind of method of among the Forecasting Methodology shown in Fig. 2, selecting (for example time inter prediction) structure basic unit.In the case, also can use on macro block, sheet or the frame of base layer residual data in enhancement layer and carry out residual prediction.Although will describe the present invention at macro block hereinafter, the invention is not restricted to this and also can be applied to sheet or frame.
For the macro block in the enhancement layer is realized the time inter prediction, can be with reference to base layer residual.In order to notify decoder with reference to base layer residual in the time inter prediction, residual prediction flag (residual error determination flag) is set to 1.If the value of macro block in the basic unit (macro block that promptly contains residual error data) all is set to zero, the quantity of non-zero pixels is zero or less than predetermined threshold less than predetermined threshold or CBP, and the value of residual prediction flag then needn't be set.This means as to prediction result between the time frame of basic unit, almost do not move.That is because there is not macro block in the enhancement layer to be used for reference data or this reference data deficiency of reference, so the coding of residual prediction flag skipped, thereby saved the required bit number of value that residual prediction flag is set.
Under motion vector in enhancement layer and the similar situation of the motion vector in the basic unit, residual prediction is significant.Therefore, the difference that obtains this two-layer motion vector is the basic problem of the value of prediction residual prediction indication.For briefly, hereinafter, the definite information that is used for the value of prediction residual prediction indication will be called as " sign is determined in prediction ".In joint scalable video model (JSVM) 1, can be by residual prediction flag and the prediction that is marked as PrdRpFlag being determined difference between the sign is encoded rather than by the efficient that residual prediction flag improves entropy coding is set.Therefore, such residual error that is marked as residual_predication_flag_diff judges that the difference sign is introduced into to video information coding.
The method that residual error is judged the difference sign that obtains will be described now.
At first, if the quantity that is present in the non-zero pixels in the base layer residual less than threshold value, is then skipped the coding of residual prediction flag.
On the contrary, if the quantity of non-zero pixels greater than threshold value, then residual error judges that difference sign rather than residual prediction flag are encoded.Judge the difference sign in order to obtain residual error, use the residual error between base layer motion vector BaseMV and enhancing or the current layer motion vector CurrMV.Encode for residual error being judged difference indicates, must obtain to determine sign.
Above process can be by following summary.
If | BaseMV-CurrMV| determines then that less than predetermined threshold sign is set to 1; Otherwise, determine that sign is set to 0.Subsequently, judge that as calculating the residual error of calibrating the difference between will and the residual prediction flag really the difference sign is encoded.
If the energy of base layer residual (or quantity of non-zero pixels) is less than threshold value ThresholdResidual, then the coding of residual prediction flag is skipped.
If | BaseMV-CurrMV| is less than threshold value ThresholdMV, 1 value that deducts residual prediction flag then, that is, the 1-residual prediction flag is encoded; Otherwise, the zero value that subtract residual prediction flag identical with residual prediction flag, that is, the value of 0-residual prediction flag is encoded.
Fig. 4 is the flow chart that the process that realizes above design is shown.With reference to figure 4, in step S101, obtain the base layer residual data by for example time interframe encode with reference to another frame or piece.In step S105, if the base layer residual data less than predetermined threshold, i.e. ThresholdResidual, for example, if the value of base layer residual data be 0 or all energy less than predetermined threshold, then because residual prediction flag does not need to be set up, so its coding is skipped.On the contrary, in step S105, if the base layer residual data are greater than ThresholdResidual, then the value of residual prediction flag optionally is 1 or 0.Selection is marked as the prediction of PrdRpFlag and determines that the basis of sign can be set up.
In step S110, if the difference between BaseMV and the CurrMV less than predetermined threshold, i.e. ThresholdMV, then this means the probability height that uses the base layer residual data, in step S111, prediction determines that sign is set to 1.On the contrary, if the difference between BaseMV and the CurrMV greater than ThresholdMV, then use the probability of base layer residual data low.Therefore, in step S112, prediction determines that sign is set to 0.In step S120, the prediction that in step S111 or S112, is provided with determine sign and and residual prediction flag and prediction determine that the corresponding residual error of difference between the sign judges that the difference sign is encoded.Encoder can based on macro block one by one, piecewise or frame by frame determine that to predicting sign and residual prediction judge that the difference sign encodes.
Fig. 5 illustrates according to an exemplary embodiment of the present invention using the flow chart of the process that the method coded data shown in Fig. 4 decodes.
At first, in step S151, obtain the base layer residual data from coded data.On the one hand, in step S155, (be Threshold if residual error data is not less than predetermined thresholdResidual) (among the step S155 for not), then in step S161, the prediction that residual prediction flag is set to encode determines that sign and residual error judge poor between the difference sign.With in the cataloged procedure shown in Fig. 4, define the same, prediction determines that sign and residual error judge that difference indicates and will be marked as PrdRpFlag and residual_pred_flag_diff respectively.So, residual_pred_flag_diff=PrdRpFlag-residual_predication_f lag.Therefore, can obtain residual_predication_flag by deduct residual_pred_flag_diff from PrdRpFlag.
On the other hand, in step S155, if residual error data is less than ThresholdResidual(among the step S155 for being) this means that enhancement layer is not produced by the reference residual prediction flag, and then in step S162, residual prediction flag is set to 0.
In above description, be encoded be except indication base layer residual data whether by the information the residual prediction flag of reference, thereby increased code efficiency.Similarly, out of Memory can be encoded, rather than the motion prediction sign of indicating basic unit's movable information whether to be used to motion-vector prediction is encoded, to realize identical purpose.
Fig. 6 is the diagrammatic sketch that shows the example of the motion prediction in the video coding according to an exemplary embodiment of the present invention.Motion prediction refers to according to base layer motion vector prediction enhancement layer or current layer motion vector.Therefore, be set to 1, then predict enhancement layer motion vector by the reference base layer motion vector if be marked as the motion prediction sign of motion_prediction_flag.Otherwise, if the motion prediction sign is set to 0, then not with reference to base layer motion vector.Among Fig. 6 21 or 25 expression macro block (or sub-piece), sheet or frames.Explain for convenience, suppose based on macro block ground execution motion prediction one by one.The motion vector of base layer macro block 21 is identical with the motion vector of enhancement layer macro block 25.In the case, do not need the motion prediction encoding flag.If the residual error between described two motion vectors is less than predetermined threshold, i.e. ThresholdMotion, then also can skip coding to the motion prediction sign.
Simultaneously, by comparing base layer motion vector and can determining the motion prediction sign from the motion vector of space adjacent area.The space adjacent area can provide accurate motion vectors; Yet in some cases, motion prediction may not can be accurately carried out.This can cause big motion vector residual error.Although be lower than the accuracy of spatial movement prediction according to the accuracy of the motion prediction of base layer motion vector, the former provides rational accuracy under nearly all situation.Therefore, the residual error between described two motion vectors can be used to the predicted motion prediction indication.
If the residual error between the motion vector of macro block 22 and 26 is greater than predetermined threshold, i.e. ThresholdMV,, determine that sign is set to 1 so be marked as the prediction of prediction_determination_flag then because the motion prediction sign is set to 1 probably.On the other hand, if the residual error between the motion vector of macro block 22 and 26 less than ThresholdMV,, be set to 0 so sign is determined in prediction then because the motion prediction sign is set to 0 probably.
In case be provided with the value that sign is determined in prediction, then determine that corresponding to prediction motion prediction difference sign difference, that be marked as motion_pred_flag_diff between sign and the motion prediction sign is encoded.
Fig. 7 is the flow chart that the method for the code efficiency that improves the motion prediction sign is shown.
With reference to Fig. 7, in step S201, obtain according to the motion vector that is marked as Predict_MV_From_BaseLayer of base layer prediction and the motion vector of predicting according to the space adjacent area that is marked as Predict_MV_From_Spatia.In step S205, on the one hand, if the difference between described two motion vectors less than predetermined threshold, i.e. ThresholdMotion, then the motion prediction sign is not encoded.On the other hand, if the difference between described two motion vectors greater than ThresholdMV, prediction then is set determines that sign comes the predicted motion prediction indication, rather than the motion prediction sign is set.In step S210, according to described difference whether greater than ThresholdMV, prediction determines that sign is set to 1 or 0.
That is, in step S210, if described difference is greater than ThresholdMV, then prediction determines that sign is set to 1 in step S211.If described difference is less than ThresholdMV, then prediction determines that sign is set to 0 in step S212.In step S220, thevalue 1 or 0 of sign is determined in the prediction that is provided with in step S211 or S212, and and residual prediction flag and prediction determine that the corresponding residual error of difference between the sign judges that the difference sign is encoded.
Fig. 8 illustrates according to an exemplary embodiment of the present invention using the flow chart of the method that the method coded data shown in Fig. 7 decodes.
With reference to Fig. 8, in step S251, obtain according to the motion vector of base layer prediction and the motion vector of predicting according to the space adjacent area based on coded data.
In step S255, on the one hand, if the difference between described two motion vectors is not less than predetermined threshold, i.e. ThresholdMotion, then in step S261, the value that is marked as the motion prediction sign of motion_prediction_flag is set to predict determines poor between sign and the motion prediction difference sign.With in above-mentioned cataloged procedure, define the same, prediction determines that sign and motion prediction difference sign are marked as PrdRpFlag and motion_pred_flag_diff respectively.So, motion_pred_flag_diff=PrdRpFlag-motion_prediction_flag.Therefore, can obtain motion_prediction_flag by deduct motion_pred_flag_diff from PrdRpFlag.
On the other hand, in step S255, if described difference is less than ThresholdMotion, then in step S262, motion_prediction_flag is set to 0.
As above described with reference to Fig. 3 to Fig. 8, the data that prediction will be encoded according to base layer data are to reduce the size of the data that will be encoded.The method of the size of the data that the minimizing of another exemplary embodiment according to the present invention will be encoded will be described now.
In the cataloged procedure shown in Fig. 3 to Fig. 8, when base layer data does not need to be used for to predict or to the value that is used to predict described sign rather than when indicating that itself encodes, whether skip the indication base layer data by the coding of the sign of reference.
In a further exemplary embodiment, the use base layer data is skipped the coding to residual prediction flag, and perhaps residual prediction flag can be converted into the new value that is used to encode.
When base layer residual does not have non-zero pixels or when the CBP of basic unit is zero, because residual prediction flag can be predicted, so the coding of residual prediction flag can be skipped.Otherwise because the value of residual prediction flag is 1 probably, so 1 subtract the value of residual prediction flag, promptly the 1-residual prediction flag is encoded.In the case, because the size of the data that will be encoded when 1 is encoded may increase, so 0 rather than 1 can be encoded to improve code efficiency.
Because it is more zero that above method produces, thus when use during based on the encoder of variable length code (VLC) this method be useful.When using, can be compressed in frequent bit or the bit mode that occurs in the data that will be encoded effectively based on contextual adaptive binary arithmetic coding (CABAC).Therefore, contain 1 or 0 bit mode by adjustment and can improve total compression ratio.By based on the code element context for each code element select probabilistic model, based on the partial statistics adjustment with the corresponding probability Estimation of described probabilistic model and to code element execution arithmetic coding, CABAC has realized high compression performance.The cataloged procedure of data symbols comprises four basic steps at the most: 1, binarization; 2, context modeling; 3, arithmetic coding; 4, probability upgrades.
1, binarization
In the CABAC technology, binary arithmetic coding allows the code element of given non-binary values to be mapped as binary sequence uniquely.In CABAC, only binary decision enters cataloged procedure.Code element such as the non-binary values of conversion coefficient or motion vector was converted into binary code before actual arithmetic coding process.Except binary code was encoded in advance by arithmetic encoder before sending, this process was to data symbols to be converted to the parameter length code similar.
Below context modeling, arithmetic coding and the basic operation upgraded of probability about each bit of the code of binarization, i.e. bin and recursively being carried out.
2, context modeling
As the probabilistic model of the one or more bin of the code element that is used for binarization and based on nearest coded data code element statistics and selecteed context model will be used for the probability of each bin and be stored as " 1 " or " 0 ".
3, arithmetic coding
Arithmetic encoder is encoded to each bin based on the probabilistic model of selecting.Each bin only has respectively and " 1 " and " 0 " corresponding two probability subranges.
4, probability upgrades
Value based on actual coding is upgraded the probabilistic model of selecting.That is to say that if the bin value is 1, then " 1 " frequency increase once.
Because according to above-mentioned CABAC is that each sheet (slice) is selected context model, so the probable value of probabilistic model is initialized to the table of the constant value that is used for sheet.Because context model must be upgraded continuously based on the statistics of recent coded data code element, thus with when the information of predetermined amount during by accumulative total, CABAC provides the better code efficiency than traditional VLC.
Fig. 9 is the flow chart that said process is shown, and wherein, uses the energy or the CBP value of base layer residual, and the coding that is labeled as the residual prediction flag of residual_prediction_flag is skipped, or residual prediction flag is converted into new value to be used for coding.
At step S301, obtain the base layer residual data.At step S302, if the energy of base layer residual data or CBP value are 0, these explanation base layer residual data do not have non-zero pixels, then in enhancement layer not with reference to the base layer residual data.Therefore, the coding that does not need residual prediction flag.
Otherwise if the energy of base layer residual data or CBP value are not 0, these explanation base layer residual data have non-zero pixels, and then residual prediction flag is significant, so obtain the value of residual prediction flag at step S312.Thereafter, at step S316, be defined as 1 value that deducts residual prediction flag, i.e. (reverse) residual prediction flag of the counter-rotating of 1-residual_prediction_flag is encoded.
Figure 10 is the flow chart that illustrates the process of using process coded data decoding shown in Figure 9.With reference to Figure 10,, obtain the base layer residual data at step S351.At step S352, if the energy of base layer residual data or CBP value are 0, this explanation does not have data to be used to prediction at enhancement layer, and then at step S364, residual prediction flag is set to 0.Otherwise if the base layer residual data have non-zero pixels, then residual prediction flag is significant.Because according to method coded data shown in Figure 9 is 1 to deduct the value of residual prediction flag, it is the value of 1-residual_prediction_flag, Fan Zhuan residual prediction flag just, so at step S370, residual prediction flag can be set to 1 and deduct residual prediction flag, i.e. the value of 1-residual_prediction_flag.
In Fig. 9 and embodiment shown in Figure 10, cataloged procedure has been described, it can determine whether to use the base layer residual data to the residual prediction flag coding and use the value of the counter-rotating of base layer residual data to carry out coding, thereby improves code efficiency.
Next, when using CABAC, use the context of revising to the residual prediction flag Methods for Coding with describing.As mentioned above, because CABAC is used to based on context code element be encoded, so it depends on that being biased to 0 or 1 context model provides variable compression.For example, when context is biased to 0, when use context to compress to comprise 0 during more than 1 the data that comprise, compression ratio is high.On the other hand, if context is biased to 1, if then use context to compress to comprise 1 during more than 0 the data that comprise, compression ratio is high.As above described with reference to Fig. 9, if residual prediction flag is encoded, then it probably is 1.Therefore, the context according to the correction that is biased to codeelement 1 comes residual prediction flag is encoded.
Figure 11 illustrates according to an exemplary embodiment of the present to use the context the revised flow chart to the process of the residual prediction flag coding that is labeled as residual_prediction_flag.As mentioned above,, use the energy of base layer residual or the coding that the CBP value is skipped residual prediction flag, or use the context that is biased to code element " 1 " that residual prediction flag is encoded according to cataloged procedure.
With reference to Figure 11,, obtain the base layer residual data at step S401.At step S402, if the energy of base layer residual data or CBP value are 0, these explanation base layer residual data do not have non-zero pixels, then at enhancement layer not with reference to the base layer residual data.Therefore, the coding that does not need residual prediction flag.Simultaneously, if use sandwich construction, the CBP value can be from lowermost layer by accumulative total.In the case, if the CBP value that adds up from basic unit is 0, then also skip the coding of residual prediction flag.
If the CBP of the energy of base layer residual data or accumulative total is not 0, these explanation base layer residual data have non-zero pixels, and then residual error data is significant, so obtain the value of residual prediction flag at step S412.Because residual prediction flag probably is 1, so use the context that is biased to code element " 1 " that residual prediction flag is encoded at step S416.
Figure 12 illustrates using the flow chart of process coded data decoding shown in Figure 11.With reference to Figure 12,, obtain the base layer residual data at step S451.At step S452, if the CBP value of the energy of base layer residual data or accumulative total is 0, this explanation does not have to be used to data predicted at enhancement layer, and then at step S464, residual prediction flag is set to 0.Otherwise at step S452, if the base layer residual data have non-zero pixels, then residual prediction flag is significant.Therefore, at step S462, use the context that is biased to codeelement 1 that residual prediction flag is decoded.Thereafter, at step S470, according to the value acquisition enhancement data of residual prediction flag.
In addition, can determine whether to use the energy of base layer residual data or CBP value that residual prediction flag is encoded.If the energy of base layer residual data or CBP value fall into predetermined scope, then can skip the coding of residual prediction flag.Provide the false code that is used to encode below:
If(energy of base layer residual data is 0 or CBP value is 0)
then
skip coding of residual_predication_flag
else
encode residual_predication_flag
As decoded results, if the energy of base layer residual data or CBP value are 0, then decoder is carried out decode procedure, and basic unit is not carried out residual prediction.Otherwise, to the value decoding of residual prediction flag.Provide the false code that is used to decode below:
If(energy of base layer residual data is 0 or CBP value is 0)
then
skip decoding of residual_prediction_flag
else
decode residual_prediction_flag
Figure 13 is the flow chart that the example of the coding mode that changes according to the base layer residual data is shown.
With reference to Figure 13,, obtain the base layer residual data at step S501.In step 520, if the energy of base layer residual data or CBP value are 0, this explanation residual prediction flag is 0, then uses the coding method that high code efficiency is provided for 0 time when residual prediction flag.For example, if CABAC is used to coding, the probabilistic model that then can use the probability that is used to have for " 0 " to be higher than for the CABAC context model of the probability of " 1 " comes residual prediction flag is encoded.
Otherwise if the energy of base layer residual data or CBP value are not 0, then very possible residual prediction flag is 1.Therefore, use the coding method that high code efficiency is provided for 1 time when residual prediction flag at step S530.For example, if CABAC is used as coding method, the probabilistic model that then can use the probability that is used to have for " 1 " to be higher than for the CABAC context model of the probability of " 0 " comes residual prediction flag is encoded.
Below provide the false code that is used for process shown in Figure 13:
If(energy of base layer residual data is 0 or CBP value is 0)
then
encode using a method offering high coding efficiency
when residual predication flag is‘0’
else
encode using a method offering high coding efficiency
when residual predication flag is‘1’
Be encoded as in the video coding of multilayer of basic unit, fine granulation convergent-divergent (fine granularity scalabilityFGS) layer and enhancement layer at video data, can be in basic unit or FGS layer with reference to the energy or the CBP value of residual error data.
Carry out decode procedure in the mode similar to cataloged procedure.That is to say that after obtaining the base layer residual data, if the energy of residual error data or CBP value are 0, this explanation residual prediction flag is 0, then be used for video data decoding encoding when residual prediction flag provides the method for high code efficiency for 0 the time.For example, if CABAC is used to coding,, can use the probability that is used to have for " 0 " to be higher than for the CABAC context model of the probability of " 1 " to come to video data decoding then in order to obtain residual prediction flag.
Otherwise, if the energy of base layer residual data or CBP value are not 0, this illustrates that very possible residual prediction flag is 1, then in the mode similar to coding method to decoding according to the vision signal of the coding method coding that high code efficiency is provided for 1 time when residual prediction flag.For example, if use CABAC as coding method, then in order to obtain residual prediction flag, the probabilistic model that can use the probability that is used to have for " 1 " to be higher than for the CABAC context model of the probability of " 0 " comes video data decoding.Below provide the false code that is used to decode:
If(energy of base layer residual data is 0 or CBP value is 0)
then
decode according to a method offering high coding
efficiency when the residual predication flag is‘0’
else
decode according to a method offering high coding
efficiency when the value of the residual predication flag is‘1’
With reference to Figure 13,, use respectively when residual prediction flag and for 0 the time and when residual prediction flag, provide the coding method of high code efficiency for 1 the time at step S520 and S530.One of method that high code efficiency is provided is to use different context models during entropy coding.
Figure 14 illustrates the flow chart that uses the cataloged procedure of different context models according to an exemplary embodiment of the present invention when using CABAC.With reference to Figure 14,, obtain the base layer residual data at step S601.At step S610, if the energy of base layer residual data or CBP value are 0, this explanation residual prediction flag is 0, then at step S620, uses the probability have for " 0 " to be higher than for the CABAC context model of the probability of " 1 " residual prediction flag is encoded.Otherwise at step S610, if the energy of base layer residual data or CBP value are not 0, then very possible residual prediction flag is 1.Therefore, using the probability have for " 1 " to be higher than for the CABAC context model of the probability of " 0 " at step S630 encodes to residual prediction flag.
Figure 15 illustrates the flow chart that is used for the process of the video data decoding that uses the process coding shown in Figure 14.At step S651, obtain the base layer residual data.At step S652, obtain the bit of the block mode (CBP) of coding.At step S653, respectively, 4 are assigned to the CBP value that is used for brightness than low order in CBP, are labeled as CodedBlockPatternLuma, and 2 higher significance bits are assigned to the CBP value that is used for colourity, are labeled as CodedBlockPatternChroma.Can be worth knowing the CBP value of 4 sub-pieces the macro block from the CBP of CodedBlockPatternLuma.Can be worth knowing the CBP value of DC and AC component from the CBP of CodedBlockPatternChroma.The form of coded_block_pattern, CodedBlockPatternLuma and CodedBlockPatternChroma is as shown in table 1.Coded_block_pattern provides the information that whether has non-zero pixels about the sub-piece of being represented by each bit or macro block.
Table 1
| coded_block_pattern | Position [5] | Position [4] | Position [3] | Position [2] | Position [1] | Position [0] |
| CodedBlockPatternChroma | CodedBlockPatternLuma |
When upper left 8 * 8 luminance block of four 8 * 8 luminance block in macro block had non-zero pixels, the value of bit [0] was 1.When lower-left and bottom right 8 * 8 luminance block had non-zero pixels, the value of bit [1] and bit [2] was 1.
When the DC of the chrominance information in the macro block and AC component had the non-zero pixels value, the value of bit [4] and bit [5] was 1.
Therefore, can determine the existence of non-zero pixels or do not exist according to the value of CBP.At step S660, when at least one the value in four bits forming CodedBlockPatternLuma be 1 or the value of CodedBlockPatternChroma greater than 0 the time, this explanation residual error data has non-zero pixels, very possible residual prediction flag is 1.Therefore, at step S670, the value of context model that is used to select to be used for the entropy decoding that is marked as ctxIdxInc is set to 1.In case the value of ctxIdxInc has been set to 1, just uses when residual prediction flag provides the coding method of high code efficiency for 1 the time coded data is decoded.For example, the CABAC context model that can use the probability with " 1 " to be higher than " 0 " is decoded to coded data.
On the other hand, at step S660, be not 1 if constitute the value of four bits of CodedBlockPatternLuma, and the value of CodedBlockPatternChroma is 0, this explanation residual error data does not have non-zero pixels, and then very possible residual prediction flag is 0.Therefore, at step S680, the value of ctxIdxInc is set to 0 to select to be used for the context model of entropy decoding.In case the value of ctxIdxInc has been set to 0, just use the method for the code efficiency that when residual prediction flag is " 0 ", provides high that coded data is decoded.For example, the CABAC context model that can use the probability that " 1 " is provided to be higher than " 0 " is decoded to coded data.
In case the value of ctxIdxInc optionally is set to 1 or be not set to 0 at step S680 at step S670, at step S690, just uses the value of the ctxIdxInc that is provided with to carry out the entropy decoding.
At step S660, whether the bit of determining to have the value of " 1 " exists among the CBP.As mentioned above, the value of CBP is assigned to CodedBlockPatternLuma and CodedBlockPatternChroma.Use CodedBlockPatternLuma to find that the process of non-zero pixels is as follows:
for(luma8×8BlkIdx=0;i<=3;i++){
if((CodedBlockPatternLuma>>luma8×8BlkIdx)&1)and
(current macroblock is inter-macroblock))
then
residualAvailLuma8×8Blk=1;
break;
else
residualAvailLuma8×8Blk=0;
}
To each Luma8 * 8BlkIdx carry out " with " bit manipulation (﹠amp; ) whether be 0 with the value of each bit of determining CodedBlockPatternLuma, and whether make about current macro be the inspection of inter macroblocks.If current macro is an inter macroblocks, then residualAvailLuma8 * 8Blk is set to 1; Otherwise it is set to 0.ResidualAvaiLuma8 * 8Blk is used to be provided with baseResidualAvailLuma8 * 8Blk, and determines to be identified for the value of ctxIdxInc of the context model of entropy decoding.
Use the process of CodedBlockPatternChroma distribution non-zero pixels as follows:
if((CodedBlockPatternChroma!=0)and
(current macroblock is inter-macroblock))
then
residualAvailChroma=1;
break;
else
residualAvailChroma=0;
If the value of CodedBlockPatternChroma be not 0 and current macro be inter macroblocks, then residualAvaiChroma is set to 1; Otherwise it is set to 0.ResidualAvailLuma8 * 8Blk is used to be provided with baseResidualAvailLuma8 * 8Blk, and determines to be identified for the value of ctxIdxInc of the context model of entropy decoding.
Therefore, if the value of at least one bit among CodedBlockPatternLuma or the CodedBlockPatternChroma is 1, determine that then residual error data has at least one non-zero pixels, thereby ctxIdxInc is set to 1.Otherwise ctxIdxInc is set to 0 to carry out the entropy decoding.
In exemplary embodiment of the present as described below, " unit ", " part " or " module " expression component software or such as the nextport hardware component NextPort of field programmable gate array (FPGA) or application-specific integrated circuit (ASIC) (ASIC).Specific function is carried out in described unit, but is not limited to software and hardware.Described unit can be included in the addressable storage medium, maybe can be configured to play one or more processors.Therefore, the unit can comprise assembly, process, function, attribute, processing, subprogram, program code segments, driver, firmware, microcode, circuit, data, database, data structure, table, array and the parameter such as component software, OO component software, class component and task component.The assembly that assembly that is provided by the unit and feature are combined into lesser amt and the unit of lesser amt maybe can be divided into assembly of a greater number and the unit of a greater number.In addition, can realize them by the mode of one or more CPU (CPU) in assembly and the unit running gear or secure multimedia card (MMC).
Figure 16 is the block diagram ofvideo encoder 500 according to an exemplary embodiment of the present invention, and Figure 17 is the block diagram ofVideo Decoder 550 according to an exemplary embodiment of the present invention.Though describe the present invention with reference to Figure 16 and 17, can use two or more layers about the situation of using a basic unit and an enhancement layer.It will be understood by those skilled in the art that the present invention also can be employed between anterior layer and lower level.
With reference to Figure 16,video encoder 500 mainly comprisesenhancement layer encoder 400 and base layer encoder 300.The configuration of base layer encoder 300 now will be described.
Followingsampler 310 descends sampling according to resolution, frame per second or the video image size of basic unit to input video.Can use under the MPEG that sampler will be sampled as the resolution of basic unit under sampler or the small echo under the incoming frame.Can use frame scheme or frame interpolation scheme to change frame per second simply to descend sampling.Can realize and to be sampled as less size under the image to mate by the size that removes the information the border area from video information or reduce video information with the size of screen.For example, can carry out down sampling is that the ratio of width to height is 4: 3 with the original input video adjustment size that will have 16: 9.
350 pairs of basic frames of exercise estimator are carried out estimation is used for each subregion of basic frame with acquisition motion vector mv.Estimation is such process: seek the zone among the previous reference frame Fr ' that is stored in theframe buffer 380, described zone is the most similar to each subregion in present frame Fc, and has minimum match error.Multiple technologies such as class parameter size block coupling (HVSBM) or fixed size block matching algorithm can be used to estimation.Can provide reference frame Fr ' by frame buffer 380.Though in the superincumbent description, base layer encoder 300 supports to use the closed loop coding of the frame of reconstruct as the reference frame, can adopt use by the open loop encoding scheme of the original basic frame that descendssampler 310 to provide as the reference frame.
Motion compensator 360 uses motion vector mv that reference frame is carried out motion compensation.In order to produce residual frame,subtracter 315 deducts the reference frame of passive movement compensation to produce residual frame from basic unit's present frame.
320 pairs of residual frame of converter are carried out spatial alternation to create conversion coefficient.Spatial transform method can comprise discrete cosine transform (DCT) or wavelet transformation.Specifically, under the situation that adopts DCT, the DCT coefficient can be created, under the situation that adopts wavelet transformation, wavelet coefficient can be created.
330 pairs of conversion coefficients that receive from converter 320 of quantizer quantize.Quantize to refer to centrifugal pump and represent with any real-valued formed conversion coefficient, and the process of the index-matched of the quantization table that centrifugal pump and basis is predetermined.The end value that quantizes is called as quantization parameter.
The quantization parameter that 340 pairs of entropy coding unit are obtained byquantizer 330 and to carry out lossless coding by the motion vector that exercise estimator 350 obtains be base layer bitstream.The multiple lossless coding method that comprises arithmetic coding, parameter length coding etc. is arranged.
371 pairs of quantization parameters that receive fromquantizer 330 of inverse quantizer apply re-quantization.Re-quantization means that the re-quantization process is with the value according to predetermined quantization table recovery of using and the index-matched that produces during quantizing in quantification.
The result of 372 pairs of re-quantizations of inverse converter carries out inverse transformation.For example, inverse spatial transform can be inverse DCT or inverse wavelet transform, by carrying out inverse spatial transform with the order of the reversed in order of the conversion of being carried out by converter 320.
Adder 325 is reconstructed the output valve ofmotion compensator 360 withinverse converter 372 mutually to the present frame that is sent to framebuffer 380 thereafter.The frame offrame buffer 380 interim storage reconstruct also provides it as the reference frame that is used for the basic frame of back is carried out inter prediction.
The frame Fc ' of reconstruct by on be fed toenhancement layer encoder 400 after the sampler 395.Certainly, if basic unit has the resolution identical with enhancement layer, then can skip sampling.
The configuration of enhancement layer decoder 200 now will be described.The frame and the incoming frame that receive from base layer encoder 300 are fed to subtracter 410.Subtracter 410 calculates incoming frames and comprises difference between the basic frame of actual area to produce residual frame.Before being transformed to enhancement layer bit-stream, residual frame is byconverter 420, quantizer 430 and entropy coding unit 440.
Macro block in 420 pairs of incoming frames of converter and the residual signals between the macro block in the basic frame are carried out spatial alternation to create conversion coefficient.Discrete cosine transform (DCT) or wavelet transformation technique can be used for spatial alternation.Because the characteristic of enhancement layer macro block, DCT coefficient (under the situation of DCT) or wavelet coefficient (under the situation of wavelet transformation) have similitude.Therefore,converter 420 removes similitude in these coefficients to increase compression ratio.
Because quantizer 430 is carried out and its appropriate section identical functions/operation in base layer encoder 300, omit detailed description.Unit 435 is set before by the 440 pairs of residual prediction flag codings in entropy coding unit, to carry out the mode of residual prediction flag efficient coding is provided with from the bit stream of quantizer 430 outputs by coded message.
As mentioned above, for about the data of basic frame whether by the information of enhancement layer reference, coded message is provided with poor between determining prediction data and predicting the outcome of unit 435, thereby prevents by entropy coding unit 440 codings and the loss of the information of 440 transmission from the entropy coding unit.The bit allocation procedures that is used for the compression carried out atconverter 420 is described in the process (see figure 7) of the process (seeing Fig. 4,9,11,13 and 14) of prediction residual data and motion vectors.For example, if the energy of the residual error data of basic unit or FGS layer be 0 or the CBP value be 0, then, residual prediction flag is not encoded so coded message is provided with unit 435 because do not need the prediction of base layer residual data; Otherwise it is encoded to residual prediction flag.If the energy of the residual error data in basic unit or FGS layer or CBP value are not 0, then very possible residual prediction flag is 1.As above with reference to Fig. 4,9,11,13 and 14 described, consider code efficiency and residual prediction flag is encoded.
When using cataloged procedure shown in Figure 14, if the energy of base layer residual data or CBP value are 0, this explanation residual prediction flag is 0, and then coded message is provided with the probable value that unit 435 is provided for the CABAC context model, thereby the probability of " 0 " is higher than " 1 ".Otherwise if the energy of base layer residual data or CBP value are not 0, this illustrates that the value of very possible residual prediction flag is 1, and then coded message is provided with the probable value that unit 435 is provided for the CABAC context model, thereby the probability of " 1 " is higher than " 0 ".In one exemplary embodiment, as mentioned above, coded message is provided with unit 435 can be set to 0 or 1 by ctxIdxInc.
Entropy coding unit 440 uses by coded message and the information of unit 435 settings is set to enhancement data execution coding.Because except this operation, the entropy coding unit 340 identical functions/operations in 440 execution of entropy coding unit and the base layer encoder 300 are so omission is to its description.
Enhancement layer encoder 400 shown in Figure 16 can be according to can be with reference to the data of basic frame, and promptly residual error data or motion vector predict that during cataloged procedure whether the data of basic frame are by reference.
Figure 17 is the Video Decoder block diagram according to the embodiment of theinvention.Video Decoder 550 mainly comprisesenhancement layer encoder 700 and base layer encoder 600.The configuration of base layer encoder 600 now will be described.
610 pairs of base layer bitstream of entropy decoding unit are nondestructively decoded to extract data texturing and the exercise data (being motion vector, partition information, reference frame label etc.) in the basic frame.
620 pairs of data texturings of inverse quantizer carry out re-quantization.Re-quantization is the inverse process of the quantification carried out invideo encoder 500, is to use the process that the value of the corresponding quantization index that create during the comfortable quantizing process is reconstructed at the quantization table that uses during the quantizing process.
The result of 630 pairs of re-quantizations of inverse converter carries out inverse spatial transform with the reconstruct residual frame.Inverse spatial transform is the inverse process by the spatial alternation of 320 execution of the converter in the video encoder 500.Inverse DCT or inverse wavelet transform can be used for inverse spatial transform.
Entropy decoding unit 610 will comprise that also the exercise data of motion vector mv offersmotion compensator 660.
The frame of the previous reconstruct that 660 pairs of motion compensators are provided byframe buffer 650, promptly reference frame is carried out motion compensation to produce the frame of passive movement compensation.
Adder 615 will be by the frame of the residual frame ofinverse converter 630 reconstruct and the passive movement that is produced bymotion compensator 660 compensation reconstruct base layer video frame in addition mutually.The base layer video frame of reconstruct can be temporarily stored in theframe buffer 650, and can be provided for the frame ofmotion compensator 660 with the reconstruct back.
The present frame Fc ' of reconstruct by on be fed toenhancement layer decoder 700 after the sampler 680.Therefore, if basic unit has the resolution identical with enhancement layer, then can skip sampling.If base layer video information does not have the information about the zone that occurs in enhancement-layer video information, then also can skip sampling.
The configuration ofenhancement layer decoder 700 now will be described.The enhancement layer bit-stream of 710 pairs of inputs of entropy decoding unit is nondestructively decoded and is used for the data texturing of nonsynchronous frame with extraction.
Thereafter, along with the data texturing that extracts passes through inverse quantizer 720 andinverse converter 730, it is reconfigured as residual frame.Inverse quantizer 720 is carried out the function/operation similar to theinverse quantizer 620 in the base layer decoder device 600.
Adder 715 is added to the basic frame that provided by base layer decoder device 600 so that frame is reconstructed with the residual frame of reconstruct.
Can be to the process shown in 730execution graphs 5,8,10,12 of the inverse converter in theenhancement layer decoder 700 or 15 with the reconstruct residual frame.For the data of the decoding of the basic frame of determining decoding whether by the enhancement data reference, the residual error data or the exercise data that constitute basic frame are checked.If the basic frame data are less than ThresholdResidual, then as above described with reference to Fig. 5, because the base layer residual data are not enhanced a layer residual error data reference, the residual error data sign is set to 0.In addition, as above described with reference to Fig. 8, if base layer motion vector and from the difference between the motion vector of adjacent areas on the space less than ThresholdMotion, then because base layer motion vector not by reference, so the motion prediction sign can be set to 0.
In addition, as above, depend on whether the energy of base layer residual data or CBP value are 0, in prediction enhancement layer residual data, can determine that whether the base layer residual data are by reference with reference to Figure 10,12 or 15 described.Because encoder uses various coding techniquess to carry out coding to improve code efficiency, obtain residual prediction flag so can use with the corresponding coding/decoding method of suitable coding method.
If use decode procedure shown in Figure 15, then resolver 705 obtains the CBP value to check in the bit whether have 1 value from enhancement layer bit-stream.Resolver 705 can determine whether residual error data has non-zero pixels based on the block mode of coding.Because this process is with shown in Figure 15 identical, so omission detailed description.
Resolver 705 can use baseResidualAvailLuma8 * 8Blk[0..3] and baseResidualAvailChroma determine whether residual error data has non-zero pixels.Resolver 705 obtains the CBP bit so that the bit of 4 less meanings and the bit of 2 more meanings are distributed to CodedBlockPatternLuma and CodedBlockPatternChroma respectively.Thereafter, resolver 705 checks whether whether in four bits among the CodedBlockPatternLuma at least one have the value of 1 value and CodedBlockPatternChroma greater than 0.If at least one in four bits has the value of 1 value or CodedBlockPatternChroma greater than 0, then resolver 705 determines that residual error data have at least one non-zero pixels, and value is set to 1; Otherwise the value of its ctxIdxInc is set to 0.Entropy decoding unit 710 uses the value of the ctxInxInc that is provided with by resolver 705 to carry out the entropy decoding.
Though as mentioned above, enhancement layer decoder shown in Figure 17 700 is used from BL prediction in the frame of basic frame and is carried out decoding, it will be understood by those skilled in the art that as reference Fig. 2 describedly, can carry out decoding by inter prediction or infra-frame prediction.
The present invention is by determining whether to provide according to basic frame prediction enhancement data the compression ratio of increase.
It will be apparent to those skilled in the art that under the situation that does not break away from the scope of the invention and spirit, can make various modifications and change it.Therefore, should be appreciated that top embodiment is not restrictive in all fields, but exemplary.Scope of the present invention is defined by claims, rather than by detailed description definitions of the present invention.The all modifications and the change that draw in the scope and spirit of accessory rights requirement and equivalent thereof are interpreted as being included in the scope of the present invention.