Background technology
In April, 2010, the international video encoding standard of Liang great organizes VCEG and MPEG to set up video compress associatingThe JCT-VC of group (JointcollaborativeTeamonVideoCoding), together exploitationHEVC standard, it is also referred to as H.265. HEVC standard main target is H.264/AVC real with previous generation standardThe now significantly raising of code efficiency, especially for high-resolution video sequence. Its target is to look identicalFrequently the lower code check of quality (PSNR) is reduced to 50% of standard H.264.
With regard to the current stage, HEVC still continues to use the hybrid encoding frame that H.264 just starts employing. Interframe and frameIntraprediction encoding: the correlation of eliminating time-domain and spatial domain. Transition coding: to residual error carry out transition coding withEliminate spatial coherence. Entropy coding: eliminate statistical redundancy. HEVC will be in hybrid encoding frame,Put forth effort to study new coding tools or technology, improve video compression efficiency.
At present, the new features of the many codings that proposed in the discussion of JCT-VC tissue, likely can addIn HEVC standard, the concrete document of discussing for each time can be fromhttp://wftp3.itu.intObtain.
Large young pathbreaker's maximum of encoding block can reach 64x64, and this is mainly the application for HD video compressed encoding.Dct transform coding will be broken through 8x8, and maximum can reach 32x32. For infra-frame prediction, the direction of prediction moreAdd refinement, nearly 35 kinds of infra-frame predictions (intrapredication) pattern, Fig. 2 shows in 35 kinds of framesThe situation of predictive mode, this will make infra-frame prediction better accurately, reduce more efficiently redundancy. Inter prediction is being insertedWhen value, adopt more multitap wave filter, and 1/4 pixel precision, improved the precision of inter prediction. ?Entropy encoding context, has used the CABAC that adaptability is stronger.
Aspect infra-frame prediction, owing to having used nearly 35 kinds of intra prediction modes, therefore, in conducting frameWhen coding, if directly for 35 kinds of intra prediction mode utilization rate aberration optimizings(Rate-Distortionoptimization, RDO) judges optimum prediction mode, and encoder can notBear the operand that all prediction direction is carried out to RDO. Computing while carrying out RDO computing in order to reduce encoderAmount, HM4.0 (HEVCtestmodel4.0) has adopted the method for Hadamard conversion, thick by oneSlightly mode decision (RoughModeDecision, RMD) is selected several preferably candidate pattern. Subsequently,Obtaining optimal mode for carrying out RDO computing by these several better candidate pattern.
In the JCTVC-C207 motion of having adopted at JCT-VC by residual signals Hadamard transform coefficients definitely and(minimumabsolutesumofHadamardTransformedcoefficientsofResidualsignal, HSAD) count computational process and add coarse mode decision-making (RMD) algorithm with mode bit.In motion JCTVC-D283, will combine direction intraframe prediction algorithm and simplify, and add extraction maximum probability mouldFormula (mostprobablemode, MPM) algorithm is applied MPM algorithm after RMD, thereby ensuresIn the candidate pattern set of carrying out RDO computing, comprise all the time MPM. Motion JCTVC-C218 simplifies CU and is divided intoThe redundancy process of PU, these shortcut calculations have reduced the complexity of infra-frame prediction, but these schemes are allBasic solution and do not consider the character of piece.
Aspect infra-frame prediction, although proposed several candidate pattern selection algorithm, reduce finallyThe pattern quantity of row RDO, but the quantity of candidate pattern still has the space of decline.
HEVC (HighEfficientVideoCoding) provides higher compliant compression to complete videoCompression, particularly for the compression of large-size images, provide more effective instrument. For intraframe coding,HEVC has not only proposed new predictive mode (planar prediction), also by original 8 prediction direction H.264Increase to 33 prediction direction. As shown in Figure 1, except Planar (planar prediction) mode and DC mode withThere are 33 prediction direction available outward. If Fig. 2 is taking pattern 29 as example, the method for angle prediction is described.The value of the encoded pixel by block to be encoded top and left side is predicted the value of the pixel in piece.More prediction direction has increased the degree of accuracy of prediction, but has also increased the complexity of coding simultaneously. According to specificationRequirement more orientation angle is predicted, selecting best predictive mode is HEVC intraframe coding unitThe problem that must solve.
From HEVC specification, the problem that infra-frame prediction need to solve is mainly two aspects: the firstth, and toLarge coding unit (as 64x64) is effectively divided, and determines using great as coding unit secondBe after the size of coding unit is determined, select the prediction as present encoding unit of great and which kind of patternPattern. In the identifying code of the encoder providing at HEVC, to the solution of above-mentioned two problems with contraryOrder solves. First all possible coding unit size is all carried out by slightly to smart prediction estimation and mouldFormula decision-making, thus calculate the optimal cost of various under every kind of coding size. Again by the coding cost phase of fritterAdd the coding cost comparison with large coding unit. What total coding Least-cost of which kind of coding size selectsPlant the size of size as coding unit.
In H.264 encoding, for angle how to predict intraframe coding, many algorithms are just proposed. Such asMethod by frequency domain or gradient is estimated pre-measuring angle, finds in addition by the mode of progressively searching forLocal best points. These methods are also applied in the intraframe coding prediction of HEVC. But for HEVCIn new feature, some study also underway more targetedly.
Summary of the invention
In order to solve the technical problem of above-mentioned HEVC frame mode prediction, the present invention proposes a kind of new forThe method of efficient video coding (HEVC) intra-frame encoding mode prediction, comprises following steps:
The first step, utilizes the coding result on top or the left side as the pixel value that predicts the outcome, directly with figure to be encodedObtain the prediction error value of the integer pixel of every row or column as piece computing;
Second step, the angle corresponding to integer pixel prediction error value of every row or column computed in advance;
The 3rd step, carrys out interpolation calculation by the integer pixel prediction error value of every row or column and the angle value of correspondence thereof and goes outThe prediction error value of the pattern of HEVC normalized definition;
The 4th step, merges the prediction error value identical angle mode of horizontal multirow or longitudinal multiple row as correspondingThe prediction error value of pattern;
The 5th step, the predicated error under the different mode estimating by the method is as with this intra prediction modePredicated error assess the coding cost of different mode, thereby find out optimum predictive mode or find out severalPreferably predictive mode, for further mode decision provides little scope of assessment.
According to an aspect of the present invention, in the first step, directly utilize the coding result on top or the left side directly to doFor predicting the outcome, instead of adopt filtered coding result as predicting the outcome.
According to an aspect of the present invention, in the 4th step, by whole the predicated error calculatingization of whole predictive modeBe zero, by estimating that predicated error corresponding to every row or column merges the predicated error as corresponding pattern.
According to an aspect of the present invention, in the first step, utilize the coding result on top or the left side as predictionResult pixel value, with the prediction error value that image block computing to be encoded obtains the integer pixel of every row or column is directly(taking the 4x4 piece as example) realized by following formula:
Wherein, S (x, y) is coded image gray value, and mode is 0 (Planar pattern) or 1 (DC pattern)Or 2 to 34, P (mode, x, y) is predicting the outcome of calculating according to different mode, x=0..3, y=0..3.
According to an aspect of the present invention, in the 4th step, by identical the angle mode of horizontal multirow or longitudinal multiple rowPrediction error value merge as the prediction error value of associative mode and realize (with laterally pre-by following formulaSurvey as example):
Wherein, SAD_Interploted (mode, x)=(Int_SAD(mode_0,x)*(mode_1-mode)+Int_SAD(mode_1,x)*(mode-mode_0))/(mode_1-mode0),mode=19..34
Wherein mode_0 is the Mode value that is less than or equal to current calculating mode in corresponding x value, and mode_1 is rightAnswer the Mode value that is greater than current calculating mode in x value.
According to an aspect of the present invention, taking limit, (horizontal edge or longitudinal edge) is unit, calculates pre-measuring angle correspondingReference edge scope. And only within the scope of this, only select integral point to carry out prediction error value calculating as calculating predicted value.
According to an aspect of the present invention, the prediction error value on each limit is calculated to corresponding angle value, rightThe mode value of answering. And estimate by interpolation method that HEVC proposes by these (angle, prediction error values) 33Individual (angle, prediction error value).
According to an aspect of the present invention, the prediction error value under equal angular (pattern) on every limit is synthetic,Obtain the prediction error value of total fritter, i.e. the prediction error value of each angle predictive mode. And predict with theseThe error amount cost estimation of encoding, completes or has assisted the decision-making of frame mode.
The invention allows for a kind of device for the prediction of efficient video coding (HEVC) intra-frame encoding mode,Comprise: infra-frame prediction is selected module, for intra-frame encoding mode being predicted to selection, prediction selection result is sent outGive intra-framed prediction module; Intra-framed prediction module, for intra-frame encoding mode is predicted, and by predictionResult output selects module to select best predictive mode for infra-frame prediction.
According to an aspect of the present invention, described infra-frame prediction selects module also for realizing: utilize top or a left sideThe coding result on limit, as the pixel value that predicts the outcome, directly obtains the whole of every row or column with image block computing to be encodedThe prediction error value of number pixel; The angle corresponding to integer pixel prediction error value of every row or column computed in advance;Carry out interpolation calculation by the integer pixel prediction error value of every row or column and the angle value of correspondence thereof and go out HEVC specification calmlyThe prediction error value of the pattern of justice; The identical prediction error value of angle mode of horizontal multirow or longitudinal multiple row is closedAnd as the prediction error value of associative mode.
According to an aspect of the present invention, described intra-framed prediction module is also for realizing: the different mode estimatingUnder predicated error assess the coding cost of different mode as the predicated error of this intra prediction mode, fromAnd find out optimum predictive mode or find out several compared with the predictive mode of top grade.
Detailed description of the invention
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and enforcementExample, is further elaborated to the present invention. Should be appreciated that specific embodiment described herein only usesTo explain the present invention, be not intended to limit the present invention.
The method of estimation infra-frame prediction angle proposed by the invention completes for the new feature of HEVC.First this algorithm estimates infra-frame prediction by the infra-frame prediction error amount of the integral point position to every row or column onlyThe prediction error value of algorithm gained, then obtains the specification of every row or column by the method for interpolation defined variousThe predicated error of pattern, is finally synthesized the predicated error of the corresponding predictive mode of whole. This calculationMethod, not losing under the prerequisite of forecasting accuracy, has reduced computational complexity.
Under predictive mode corresponding to different pre-measuring angles, when pre-measuring angle changes, approach (the left side, edgeAnd top) the selected prediction reference pixel of pixel change little, and away from the pixel of edge (left side and top)Selected prediction reference pixel has a greater change. In algorithm of the present invention, to approaching prediction reference limitWhen predicated error is calculated, only use less reference point, while calculating away from the predicated error on prediction reference limit, adoptedBy more reference point, thereby reach the active balance of operation effect and operand. In addition, in HEVC algorithm,Prediction is by the different some interpolation of different choice of the pre-measuring angle of pixel basis on acquired top or the left sideCalculate gained, in the present invention, directly utilize prediction reference limit as predicting the outcome, reduced the computing of interpolation.
Fig. 5 shows the general configuration figure of the video encoder that efficient video coding (HEVC) realizes. HEVCEncoder architecture roughly the same with the encoder architecture that H.264 used, be mainly for institute in modulesThe algorithm using has carried out further research, improvement, especially for high-resolution video sequence, and its improvementTarget be to reduce to 50% of standard H.264 at the lower code check of same video quality (PSNR).
Because the encoder architecture of HEVC is roughly the same with the encoder architecture that H.264 used, therefore forDo not obscure the present invention, only pay close attention to Intra prediction mode selection and infra-frame prediction for HEVC.
Infra-frame prediction is a kind of new intraframe coding side H.264/AVC first adopting in video encoding standardFormula, object is the spatial redundancy of removing between current block and adjacent blocks. In infra-frame prediction, prediction piece P be byPiece when previous coding in anter (slice) and after rebuilding forms. Current block deducts this prediction piece P,Produce residual block, residual block produces the conversion coefficient X after a kind of quantification after piece conversion, quantification, then passes throughEntropy coding, other information (for example, predictive mode quantization parameter, motion vector etc.) required with decoder-sideForm together compression bit stream for transmission and decoding. In video encoding standard H.264/AVC, forThe piece of 4*4, has 9 kinds of predictive modes including direct current (DC), for the piece of 8*8 and 16*16, has bagContain DC and plane (planar) in 4 kinds of interior patterns. Conducting frame inner estimation mode select time, from supportPredictive mode in choose the pattern for example, with current block with optimum Match (, thering is minimum rate distortion (RD)).
In HEVC, adopted size to be respectively 4*4 for infra-frame prediction, 8*8,16*16,32*32 andThe prediction piece (predicationunit) of 64*64, and possible predictive mode is shown in Fig. 2. As Fig. 2Shown in, nearly the predictive mode of 35 kinds comprises 33 kinds of angle intra prediction mode directions, and DC (direct current)Pattern and Planar (plane) pattern.
In order to reduce the number of times of RD computing of infra-frame prediction complexity, the intra prediction mode of HEVC is applied rough mouldFormula decision-making (RoughModeDecision, RMD) and extraction MPM (mostprobablemode, MPM)Method obtained the optimal candidate set of modes of simplifying, thereby reduce RD operation times. RMD object is thickSlightly conjecture optimum frame inner estimation mode, its selection course is considered HSAD operation values and mode bit number, butThat RMD does not excavate the correlation between extraction pattern. Therefore the rule of, analyzing between extraction pattern can be enteredOne step reduces the complexity of associating infra-frame prediction.
RMD algorithm
Operand while carrying out RDO computing in order to reduce encoder, first HM4.0 has adopted Hadamard changeThe method of changing, selects several preferably candidate pattern by RMD. Subsequently, for by these several betterCandidate pattern is carried out RDO computing and is obtained optimal mode.
Particularly, in RMD, come to obtain 8 for the prediction piece of 4*4 and 8*8 size with following formulaIndividual candidate pattern, obtains 3 candidate pattern for the prediction piece of 16*16 and 32*32 size:
Wherein, J is cost,modeFor all intra prediction modes that are up to 35 kinds of HEVC regulation,HSAD(Resmode) represent residual signals Hadamard transform coefficients definitely and, BmodeRepresent the consumption of mode bit numberValue, λ represents Lagrangian constant.
Therefore, RMD algorithm is exactly to use above-mentioned formula in whole supported predictive modes (17 or 35),Choose and there are 3 (for 16*16 and 32*32 size) of minimum cost or 8 (for 4*4 and 8*8 chiVery little) candidate pattern.
More specifically, in RMD algorithm, for each pattern in whole supported predictive modes,The cost J that calculating is associated, and according to the descending of the cost J being associated, each predictive mode is sorted,And choose first 3 (for 16*16 and 32*32 sizes) or 8 (for 4*4 and 8*8 size) predictive modesAs candidate pattern, add in candidate pattern set.
Because the complexity of above-mentioned formula is more much smaller than the complexity of RDO in realization, therefore using RDOBefore algorithm determines optimum prediction mode, use RMD algorithm to carry out once in whole supported predictive modesPreselectedly can reduce significantly the infra-frame prediction time.
RDO algorithm
RDO is the algorithm generally using in infra-frame prediction and inter prediction in Video coding, and it is conventionally based onLittle mean square error and (SSE:SumofSquareError) determine best matching blocks.
MPM algorithm
MPM algorithm is the algorithm just having proposed in HM3.0, and has carried out entering one in JCTVC-D283Step is improved.
In the various motions that relate to MPM algorithm, MPM definite had to variety of way. Use hereinMPM algorithm in JCTVC-D283. Particularly, when using RMD algorithm to obtain the best mould after simplifyingAfter formula candidate collection, by the best mould of the optimal mode of the left side prediction piece of current prediction piece and top prediction pieceFormula is directly as two maximum probability patterns (MPM), and judges whether MPM is included in this candidate collection, asFruit is not included in this set, adds this two MPM. In other words, no matter RDO model selection is before calculatedMethod how, all adds the optimal mode of left side prediction piece and the optimal mode of top prediction piece of current prediction piece.
In HM4.0, associating infra-frame prediction extracts intra prediction mode and has two steps. The first step, all mouldsOptimal mode candidate collection (RMD) is selected in formula process HSAD computing. In this optimal mode candidate collection, patternNumber is by the different youngster's differences of PU size. In 4*4 and the set of 8*8 sized blocks, comprise 8 candidate pattern,And comprise 3 in 16*16 and the set of 32*32 sized blocks. Then the MPM, extracting from contiguous block also addsIn set. Second step, optimizes each pattern in optimal mode set to calculate (RDO) through RD, by itRD consumption figures minimum carry out infra-frame prediction as optimal mode.
According to one embodiment of present invention, for every kind of possible coding unit size, its mode decision processAs shown in Figure 3. After the prediction of HEVC frame mode starts, first calculate the rough RD value of 34 kinds of patterns,Complete the rough estimate to frame mode; Then selecting top n pattern according to rough estimate result adds alternative mode collectionClose; Find out the predictive mode set of maximum possible according to the pattern of periphery piece; By above-mentioned two set merge asThe set of rate-distortion optimization (Rate-Distortionoptimization, RDO) estimation model; Adopt completeRDO mode decision is selected optimization model; Finish the prediction of HEVC frame mode. During pattern rough estimate is wherein calculated,Identifying code has calculated respectively it for 33 directions and has predicted the outcome, and carries out with original picture block to be encodedComputing obtains corresponding predicated error and coding cost.
In HEVC, intra prediction mode comprises two classes: angle mode (pattern 2 to 34) and non-angle mode(planar pattern 0 and DC pattern 1). In angle mode, from the pre-measuring angle of pattern 2 to 34 correspondencesBe linear change, therefore can release corresponding predictive mode according to the angle of prediction. But angle is to connectContinue, and pattern is discrete. And because only calculated integer pixel point herein, corresponding pattern has just become "Mark " value. It is not the pattern in specification.
According to one embodiment of present invention, also having proposed one predicts for HEVC intraframe coding angle modeMethod, the method includes the steps of: the first step, the coding result that utilizes top or the left side is as prediction knotFruit pixel value directly obtains the prediction error value of the integer pixel of every row or column with image block computing to be encoded; SecondStep, the angle that the integer pixel prediction error value of every row or column computed in advance is corresponding and corresponding every a line thereof orThe intra prediction mode of row; The 3rd step, by integer pixel prediction error value and the corresponding pattern thereof of every row or columnValue is carried out interpolation calculation and goes out the prediction error value of the pattern of HEVC normalized definition; The 4th step, by horizontal multirow or verticalThe prediction error value identical to the angle mode of multiple row merges the prediction error value as associative mode; The 5th step,Predicated error under the different mode estimating by the method is as the predicated error with this intra prediction modeAssess the coding cost of different mode, thereby find out optimum predictive mode or find out several pre-compared with top gradeSurvey pattern provides little scope of assessment for further mode decision.
In this embodiment, in the first step, can also directly utilize the coding result on top or the left side directly to doFor predict the outcome instead of adopt its according to the different interpolation result of angle as predicting the outcome.
In second step, can also utilize the corresponding integer pixel prediction of column or row that approaches the left side or topThere is less possibility, and have larger correlation with adjacent limit, reduced operand and do not had or lessGround reduces the accuracy that predicated error is calculated.
In second step to the four steps, the predicated error of whole predictive mode can also be calculated and broken the whole up into parts, logicalCross and estimate that predicated error corresponding to every row or column merges the predicated error as corresponding pattern.
The present embodiment for HEVC intraframe coding angle mode decision-making method of operating, not only can be for to frameThe rough calculation of inner estimation mode, can also coordinate effective code check evaluation method, is directly used in final frameThe decision-making of predictive mode.
Described in the present embodiment, the specific implementation of method can be referring to accompanying drawing 4, and its specific implementation process comprises following steps:After intra prediction mode decision-making technique starts, first computation schema 0(planar prediction planar) and pattern 1(DC) prediction error value; According to the horizontal edge integer predicted value of calculating in advance gained, every horizontal edge is carried out to integer pre-Survey error is calculated; Calculate the prediction error value of the associative mode 2-pattern 18 of every horizontal edge by interpolation; Will be everyThe prediction error value of individual horizontal edge associative mode 2-pattern 18 merges acquisition model prediction error value; According to counting in advanceCalculate the vertical edge integer predicted value of gained every vertical edge is carried out to the calculating of integer predicated error; Calculate often perpendicular by interpolationThe prediction error value of the associative mode 19-mode 34 on limit; Pre-by each vertical edge associative mode 19-mode 34Survey error amount and merge acquisition model rough estimate prediction error value; According to the prediction error value of 35 kinds of patterns and correspondence notThe bit of common mode counts estimated value, calculates total cost and selects optimum candidate pattern by RD method; FinishIntra prediction mode decision-making technique.
For convenience of setting forth, present embodiment is taking the infra-frame prediction of 4x4 piece as example. In to the calculating of predicated errorCalculate as an example of SAD (absolute error and) example.
1. calculate the prediction error value of Planar pattern (0) and DC pattern (1), taking SAD as example:
Calculate the P that predicts the outcome (mode, x, y), x=0..3, y=0..3;Below in formula, p[x, y] be the coding result of current block piece around, if around piece is not yetCoding completes, and uses apart from the gray value of the point after its nearest coding. Herein with in HEVC standardCorresponding calculating is only that 4x4 has been done to corresponding simplification. Detail formula please refer to HEVC specification phaseAnswer chapters and sections.
To Planar pattern:
P(0,x,y)=((3-x)*p[-1,y]+(x+1)*p[4,-1]+(3-y)*p[x,-1]+(y+1)*p[-1,4]+4)>>(Log2(4)+1),x=0..3,y=0..3
To DC pattern, because the image conversion in coding is generally from spatial domain to spatial frequency domain, so willThe average gray of pixel is called DC coefficient, i.e. DC value, and other coefficient is called ac coefficient, i.e. ACValue.
First calculate DC value, i.e. DCVal,
Then calculate each predicted value (to brightness):
P(1,0,0)=(p[-1.0]+2*DCVal+p[0,-1]+2)>>2
P(1,x,0)=(p[x,-1]+3*DCVal+3)>>2,x=1..3
P(1,0,y)=(p[-1,y]+3*DCVal+2)>>2,y=1..3
P(1,x,y)=DCVal,x=1..3,y=1..3
Then calculate its corresponding SAD. Can be calculated as follows:
Wherein S (x, y) is coded image gray value, and mode is 0 (Planar pattern) or 1 (DC pattern).
2. the SAD of longitudinally pre-measuring angle estimation (pattern 2 to 18)
2.1 pairs of each horizontal edges carry out integer SAD prediction while doing longitudinal prediction;
Wherein, y=0..3, S (x, y) is coded image gray value, ModeOffset (mode) be correspondence notThe side-play amount of common mode, Top (x) is the predicted value of picture of prediction piece top a line. To different y valuesDifferent mode (Mode) and corresponding ModeOffset[] be defined as follows (taking 4x4 piece as example).
Y |
Mode |
ModeOffset(mode) |
0 |
2,10,18 |
-1,0,1 |
1 |
2,6,10,14,18 |
-2,-1,0,1,2 |
2 |
2,4.67,7.33,10,12.67,15.33,18 |
-3,-2,-1,0,1,2,3 |
3 |
2,4,6,8,10,12,14,16,18 |
-4,-3,-2,-1,0,1,2,3,4 |
2.2 use Int_SAD (mode, y) interpolations are estimated the sad value of each horizontal edge associative mode 2 to 18. ThisSentencing linear interpolation is the sad value that example is calculated each pattern.
SAD_Interploted(mode,y)=(Int_SAD(mode_0,y)*(mode_1-mode) +Int_SAD(mode_1)*(mode-mode_0))/(mode_1-mode_0)Mode=2..18
Wherein mode_0 is the Mode value that is less than or equal to current calculating mode in upper table in corresponding y value,Mode_1 is the Mode value that is greater than current calculating mode in upper table in corresponding y value.
2.3 the sad value that computation schema is total;
Wherein SAD_Interploted (mode, y) is step 2.2 interpolation gained.
3. lateral prediction SAD estimation (pattern 19 to 34)
3.1 pairs of each longitudinal edges carry out integer SAD prediction;
Wherein, x=0..3, S (x, y) is coded image gray value, ModeOffset (mode) be correspondence notThe side-play amount of common mode, Left (x) is the predicted value of picture of prediction piece left side one row. To different xDifferent mode (Mode) and the corresponding modeOffset[of value] be defined as follows (taking 4x4 piece as example).
x |
Mode |
ModeOffset(mode) |
0 |
18,26,34 |
-1,0,1 |
1 |
18,22,26,30,34 |
-2,-1,0,1,2 |
2 |
18,20.67,23.33,26,28.67,31.33,34 |
-3,-2,-1,0,1,2,3 |
3 |
18,20,22,24,26,28,30,32,34 |
-4,-3,-2,-1,0,1,2,3,4 |
3.2 use Int_SAD (mode, x) interpolations are estimated the sad value of each longitudinal edge associative mode 19 to 34. ThisSentencing linear interpolation is the sad value that example is calculated each pattern.
SAD_Interploted(mode,x)=(Int_SAD(mode_0,x)*(mode_1-mode)+Int_SAD(mode_1,x)*(mode-mode_0))/(mode_1-mode0),mode=19..34
Wherein mode_0 is the Mode value that is less than or equal to current calculating mode in upper table in corresponding x value,Mode_1 is the Mode value that is greater than current calculating mode in upper table in corresponding x value.
3.3 the sad value that computation schema is total;
4. the RD cost of each pattern is calculated,
Cost(mode)=SAD(mode)+estimate_bit_count(mode);Mode=0..34
Therefrom select three Cost () minimum pattern as the set of candidate frame inner estimation mode. Wherein,Estimate_bit_count (mode) adopts the bit of gained compressed bit stream after this pattern-coding for this piece imageNumber can be used by the context model of current encoder, this predictive mode (being mode) being carried out to variable length hereinThe bit number of degree code table (VLC) coding is done rough estimation.
Accompanying drawing 5 shows the HEVC encoder block diagram according to the embodiment of the present invention. Described HEVC encoder is used forRealize preceding method and technical scheme of the present invention, comprising: motion estimation module, for according to reference frame and work asFront frame carries out estimation, estimates the error between present frame and reference frame; Motion compensating module, for rootAccording to the result of estimation, reference frame is carried out to motion compensation, the result of motion compensation is for interframe encode; FrameModule is selected in interior prediction, and for intra-frame encoding mode being predicted to selection, prediction selection result sends in framePrediction module; Intra-framed prediction module, for intra-frame encoding mode is predicted, and by the result output of predictionFor intraframe coding; All the other modules are conventional module, respectively as shown in Figure 5.
It is pre-that described infra-frame prediction selects module and intra-framed prediction module to be respectively used to realize aforementioned intra-frame encoding modeThe method step of surveying. Wherein, infra-frame prediction selects module to can be used for realizing: the coding knot that utilizes top or the left sideFruit is as the pixel value that predicts the outcome, and directly obtains integer pixel pre-of every row or column with image block computing to be encodedSurvey error amount; The angle corresponding to integer pixel prediction error value of every row or column computed in advance; By every row or columnInteger pixel prediction error value and corresponding angle value thereof carry out interpolation calculation and go out the pattern of HEVC normalized definitionPrediction error value; The prediction error value identical angle mode of horizontal multirow or longitudinal multiple row is merged as correspondingThe prediction error value of pattern.
Intra-framed prediction module can be used for realizing: the predicated error under the different mode estimating is as with in this frameThe predicated error of predictive mode is assessed the coding cost of different mode, thus find out optimum predictive mode orFind out several compared with the predictive mode of top grade.
Each module in above-mentioned HEVC encoder also can be used for realizing respectively the corresponding steps in preceding method.
More than describing is only a kind of implementation of this invention. This invention comprises other scheme completing by this thought.
It should be appreciated by those skilled in the art, method and apparatus of the present invention can adopt hardware, software or hardware andThe mode that software combines, by microprocessor, digital signal processor, field programmable logic unit or gate arrayRealize etc. variety of way.
In sum, although the present invention discloses as above with preferred embodiment, but it is not in order to limit thisBright. General technical staff of the technical field of the invention, without departing from the spirit and scope of the present invention, canDo various variations and modification. Therefore, protection scope of the present invention is when the scope defining depending on accompanying claimBe as the criterion.