A kind of predictive mode fast selecting method and system based on correlation analysis
Technical field
The present invention relates to coding and decoding video field, more particularly to a kind of predictive mode based on correlation analysis is quickly selected
Method and system.
Background technology
In conventional intraframe prediction algorithm, a block generally requires to carry out traversal optimizing on various predictive modes, to obtain
Take optimum prediction mode.The only block of 4x4 just has 9 kinds of predictive modes in H264, and the infra-frame prediction performance boost hand of main flow at present
Section is that by taking the H265 for being in development as an example, its intra prediction mode is at maximum up to 34 kinds by increasing predictive mode.Now,
Travel through according to conventional predictive mode, although the optimization realization of distortion performance, the huge calculating for bringing therewith can be reached
Amount will restrict its application in Practical Project.
The content of the invention
The purpose of the embodiment of the present invention is to propose a kind of predictive mode fast selecting method based on correlation analysis, purport
Solving the problems, such as that the conventional predictive mode traversal amount of calculation of prior art is huge.
The embodiment of the present invention is achieved in that a kind of quick selecting party of intra prediction mode based on correlation analysis
Method, the fast intra-frame predicting method based on correlation analysis specifically includes following steps:
S1061:Calculate the directional correlation coefficient of present encoding block;
S1062:According to the different situations of the directional correlation coefficient of present encoding block, corresponding intra prediction mode is selected to make
For optimal intra prediction mode Candidate Set;
S1063:The infra-frame prediction of the optimal intra prediction mode Candidate Set correspondence direction is carried out to present encoding block.
Second purpose of the embodiment of the present invention is to propose that a kind of intra prediction mode based on correlation analysis is quickly selected
System is selected, the system includes that directional correlation coefficients calculation block, optimal intra prediction mode candidate select module, optimum frame
Interior prediction module,
Directional correlation coefficients calculation block, for calculating the directional correlation coefficient of present encoding block;
Optimal intra prediction mode candidate selects module, for not sympathizing with according to the directional correlation coefficient of present encoding block
Condition, selects corresponding intra prediction mode as optimal intra prediction mode Candidate Set;
Optimal intra-framed prediction module, for carrying out optimal intra prediction mode Candidate Set correspondence direction to present encoding block
Infra-frame prediction.
3rd purpose of the embodiment of the present invention is to propose a kind of quick selecting party of predictive mode based on correlation analysis
Method, the method comprising the steps of,
S101:Judge whether present frame is inter-frame, if yes then enter S102;
S102:The first predictive mode is carried out to present encoding basic block quickly to judge;
S103c:If the quick judged result of the first predictive mode is intra prediction mode, step S104 is directly entered;
S104:Calculate the block complexity of present encoding basic block;
S105:Judge whether mbit,n>Thres1, S106 is if so, then entered, if it is not, S107 is then entered, wherein, mbit,n
Represent the block complexity of present encoding basic block, Thres1Represent the first decision threshold;
S106:Present encoding basic block is divided into into the encoding block less than basic block size, to the encoding block using such as
The Adaptive Mode Selection Method for Intra-Prediction based on correlation analysis described in claim 1 carries out infra-frame prediction;
S107:Using the Adaptive Mode Selection Method for Intra-Prediction pair based on correlation analysis as claimed in claim 1
Present encoding basic block carries out infra-frame prediction;
S108:RDO is carried out to present encoding basic block, optimum prediction mode is obtained;
S109:Change quantization, scanning are carried out to present encoding basic block, entropy code operation completes present encoding basic block
Coding.
S110:Judge that next coding basic block whether there is, if it is present next coding basic block is set to currently
Encoding block, reenters S102;Otherwise judge that next coded frame whether there is, if it is present next coded frame is set to
Current encoded frame, reenters S101;Otherwise, terminate.
It is further, further comprising the steps of after step S102,
S103d:If the quick judged result of the first predictive mode be predictive mode cannot determinating mode, to present encoding
Basic block carries out inter prediction, subsequently into step S104.
It is further, further comprising the steps of after step S102,
S103a:If the quick judged result of the first predictive mode is Skip patterns, present encoding basic block is entered first
Row Skip is predicted, subsequently into S109.
It is further, further comprising the steps of after step S102,
S103b:If the quick judged result of the first predictive mode is inter-frame forecast mode, basic to present encoding first
Block carries out inter prediction, subsequently into S108.
Further, in step S101,
Judge whether present frame is inter-frame, if it is not, then into step S104.
4th purpose of the embodiment of the present invention is to propose that a kind of predictive mode based on correlation analysis quickly selects to be
System, the system includes:
Inter-frame judge module, it is fast if yes then enter the first predictive mode for judging whether present frame is inter-frame
Fast judge module, if otherwise entering block complicated dynamic behaviour module;;
The quick judge module of first predictive mode, quickly sentences for carrying out the first predictive mode to present encoding basic block
It is disconnected;
First judges processing meanss, for according to the quick judged result of the first predictive mode, entering to present encoding basic block
Row is processed;
Block complicated dynamic behaviour module, for calculating the block complexity of present encoding basic block;
5th judge module, for judging whether mbit,n>Thres1, if so, then enter the first fast intra-mode prediction mould
Block;If it is not, then entering the second fast intra-mode prediction module;
mbit,nRepresent the block complexity of present encoding basic block, Thres1Represent the first decision threshold, general Thres1>
25;
First fast intra-mode prediction module, for present encoding basic block to be divided into the coding less than basic block size
Block, it is then quickly square using the intra prediction mode based on correlation analysis as claimed in claim 1 to each encoding block
Method carries out infra-frame prediction;
Second fast intra-mode prediction module, for using the frame based on correlation analysis as claimed in claim 1
Inner estimation mode fast method carries out infra-frame prediction to present encoding basic block.
Optimum prediction mode acquisition module, judges that processing meanss and next code module are connected, for current with first
Coding basic block carries out RDO, obtains optimum prediction mode;
Next code module, judges that processing meanss and next coding basic block judging treatmenting module are connected with first, is used for
Change quantization, scanning are carried out to present encoding basic block, entropy code operation completes the coding of present encoding basic block;
Next coding basic block judging treatmenting module, for judging that next coding basic block whether there is, if it is present
Next coding basic block is set to into present encoding block, the quick judge module of the first predictive mode is reentered;Otherwise, under entrance
One coded frame judging treatmenting module;
Next coded frame judging treatmenting module, for judging that next coded frame whether there is, if it is present by next volume
Code frame is set to current encoded frame, reenters inter-frame judge module;Otherwise, terminate.
Beneficial effects of the present invention
The present invention proposes a kind of predictive mode fast selecting method based on correlation analysis, according to block inner boundary pixel with
The correlation of surrounding block, deletes the little predictive mode of probability of occurrence or directly determines optimal prediction modes, so as to reach reduction
Predictive mode travels through the amount of calculation of optimizing, while keeping the stability of distortion performance.
Description of the drawings
Fig. 1 is Adaptive Mode Selection Method for Intra-Prediction flow chart of the preferred embodiment of the present invention based on correlation analysis;
Fig. 2 is a kind of predictive mode fast selecting method flow chart based on correlation analysis of the preferred embodiment of the present invention;
Fig. 3 is the 4x4 intra prediction mode and its prediction direction figure of preferred embodiment of the present invention h264;
Fig. 4 is that a kind of intra prediction mode based on correlation analysis of the preferred embodiment of the present invention quickly selects system architecture
Figure;
Fig. 5 is that a kind of predictive mode based on correlation analysis of the preferred embodiment of the present invention quickly selects system construction drawing;
Fig. 6 is the structure chart of the quick judge module of the first predictive mode in Fig. 5;
Fig. 7 is the first structure chart for judging processing meanss in Fig. 5;
Fig. 8 is the structure chart of the first fast intra-mode prediction module in Fig. 5;
Fig. 9 is the structure chart of block complicated dynamic behaviour module in Fig. 5.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, it is right below in conjunction with drawings and Examples
The present invention is further elaborated, and for convenience of description, illustrate only the part related to the embodiment of the present invention.Should manage
Solution, the specific embodiment that this place is described is used only for explaining the present invention, not to limit the present invention.
The embodiment of the present invention proposes a kind of predictive mode fast selecting method based on correlation analysis, according to block inner boundary
Pixel and the correlation of surrounding block, delete the little predictive mode of probability of occurrence or directly determine optimal prediction modes, so as to reach
The amount of calculation of optimizing is traveled through to predictive mode is reduced, while keeping the stability of distortion performance.
Embodiment one
Fig. 1 is a kind of Adaptive Mode Selection Method for Intra-Prediction flow process based on correlation analysis of the preferred embodiment of the present invention
Figure, methods described includes:
S1061:Calculate the directional correlation coefficient of present encoding block.
(A)If the predictive mode support of present encoding block and only the 4x4 intra prediction modes of support h264 is all pre-
Direction is surveyed, then calculates the vertical of present encoding block, level, right diagonal, left diagonally opposed coefficient correlation, its computational methods is as follows:
(H265 is included)
Wherein
Wherein, cov, std, mean (variable | condition)Represent respectively and seek covariance, ask mean square deviation, the change to meeting condition
Amount is averaged;YbRepresent the brightness value of present encoding block;Yb(i1,:) represent the i-th of present encoding block1Row brightness value;Yb(i2,:)
Represent the i-th of present encoding block2Row brightness value;Yb(:,j1) represent present encoding block jth1Row row brightness value;Yb(:,j2) table
Show the jth of present encoding block2Row row brightness value;Yb(i, j | condition) represent what the i-th row of the present encoding block jth for meeting condition was arranged
Brightness value;Size (b) represents present encoding block row size;rV、rH、rDDR、rDDLRespectively represent the vertical of present encoding block, level,
Right diagonal, left diagonally opposed coefficient correlation, its subscript represents respectively corresponding prediction direction;rV,i1,i2、rH,j1,j2、
rDDR,k1,k2、rDDL,k1,k2, respectively represent vertical, level, right diagonal, left diagonally opposed coefficient correlation intermediate variable;k1、k2
First, second ranks and difference variable are represented respectively.V, H, DDL, DDR, VL, VR, HU, HD represent the 4x4 infra-frame prediction moulds of h264
Prediction direction title, is also corresponding predictive mode title.
(B)If the predictive mode of present encoding block is only supported in the 4x4 intra prediction modes of h264
A part of direction, then the corresponding related direction coefficient correlation of the predictive mode do not supported without calculate,
Delete relevant variable therein in corresponding computing formula.
The infra-frame prediction of the 16x16 of such as h264 only has tetra- kinds of predictive modes of V, H, DC, Plan(V, H, DC, Plan, expression
The 16x16 infra-frame prediction mould prediction direction titles of h264, are also corresponding predictive mode title), now need to only calculate rV、rH, when
Vertical, horizontal direction coefficient correlation the computational methods of front encoding block are as follows:
(C)If the predictive mode of present encoding block is in addition to prediction direction in the 4x4 intra prediction modes for supporting h264,
The prediction direction more segmented also is supported, then optional selection method one or method two.
Method one:Using step(A)Middle process step.
Method two:Calculation procedure(A)Middle directional correlation coefficient and the coefficient correlation in subdivision direction.
Wherein, method can be according to step " to segment the coefficient correlation in direction "(A)In method directional correlation coefficient is done into class
Push away.
The computational methods of subdivision directional correlation coefficient are exemplified below, the predictive mode of such as encoding block is except comprising HD
Outward, also comprising the prediction direction between DDR and HD, comprising the prediction direction between HD and H, i.e., there is subdivision prediction in HD directions
Pattern.With according to step(A)Similar approach calculated direction correlation coefficient rHD(Fig. 3 is the 4x4 intra prediction modes of h264 and its pre-
Directional diagram is surveyed, V, H, DDL, DDR, VL, VR, HU, HD represent direction title),
,
Wherein
rHDThe coefficient correlation in HD directions is represented, its subscript represents respectively corresponding prediction direction, rHD,k1,k2Represent HD directions
Coefficient correlation intermediate variable;k1、k2First, second ranks and difference variable are represented respectively.
S1062:According to the different situations of the directional correlation coefficient of present encoding block, corresponding intra prediction mode is selected to make
For optimal intra prediction mode Candidate Set.
(a)If the 4x4 infra-frame prediction moulds of h264 are supported and only supported to the predictive mode of present encoding block
All prediction directions of formula, then
Situation 1:IfThen
Optimal intra prediction mode Candidate Set
={max(rV,rH,rDDR,rDDL) corresponding predictive mode, coefficient correlation be equal to 2 corresponding predictive modes
Situation 2:IfThen
Optimal intra prediction mode Candidate Set
={max(rV,rH,rDDR,rDDL) corresponding predictive mode, max less (rV,rH,rDDR,rDDL) corresponding prediction mould
Formula and between above-mentioned two prediction direction corresponding predictive mode, directionless predictive mode, coefficient correlation be equal to 2 pairs
The predictive mode answered }
Situation 3:IfThen
Optimal intra prediction mode Candidate Set
={max(rV,rH,rDDR,rDDL) corresponding predictive mode, positioned at above-mentioned prediction direction and max less (rV,rH,
rDDR,rDDL) correspondingly corresponding predictive mode, directionless predictive mode, coefficient correlation are equal to 2 corresponding predictions between prediction direction
Pattern }
Situation 4:If
Then optimal intra prediction mode Candidate Set
={max less(rV,rH,rDDR,rDDL) corresponding predictive mode, positioned at above-mentioned prediction direction and max (rV,rH,
rDDR,rDDL) correspondingly corresponding predictive mode, directionless predictive mode, coefficient correlation are equal to 2 corresponding predictions between prediction direction
Pattern }
Situation 5:If
Then optimal intra prediction mode Candidate Set
={ it is located at max less (rV,rH,rDDR,rDDL) correspond to prediction direction and max (rV,rH,rDDR,rDDL) correspondence prediction
Corresponding predictive mode, directionless predictive mode, coefficient correlation are equal to 2 corresponding predictive modes between direction }
Situation 6:If above-mentioned situation is all unsatisfactory for, optimal intra prediction mode Candidate Set={ all predictive modes }.
Wherein, max(Variable)The maximum for being not equal to 2 variables is sought in expression;maxless(Variable)Expression is asked and is not equal to 2 changes
The secondary maximum of amount;Abs is represented and is sought absolute value;rinv_maxRepresent perpendicular to max (rV,rH,rDDR,rDDL) correspond in prediction direction
Corresponding coefficient correlation;rinv_maxlessRepresent perpendicular to max less (rV,rH,rDDR,rDDL) correspondence prediction direction on it is corresponding
Coefficient correlation;Thres2Represent the second decision threshold, Thres3Represent the 3rd decision threshold, Thres4The 4th decision threshold is represented,
Thres5Represent the general Thres of the 5th decision threshold2>0.95, general Thres4<0.3<Thres5<0.5<Thres3;It is " directionless
Predictive mode " refers to the predictive mode that cannot sort out prediction direction, the DC predictive modes of such as h264, Plan predictive modes.
(b)If the predictive mode of present encoding block only supports a part of direction in the 4x4 intra prediction modes of h264,
Then according to step(a)In method relevant variable is removed in " optimal intra prediction mode Candidate Set " calculation procedure.
The infra-frame prediction of the 16x16 of such as h264 only has tetra- kinds of predictive modes of V, H, DC, Plan, i.e., only support h264's
Tri- directions of V, H, DC in 4x4 intra prediction modes, now only need to be according to step(a)In method in " optimal infra-frame prediction
Relevant variable is removed in mode candidate collection " calculation procedure, it is specific as follows:
Situation 1:IfThen
Optimal intra prediction mode Candidate Set
={max(rV,rH) corresponding predictive mode, coefficient correlation be equal to 2 corresponding predictive modes
Situation 2:IfThen
Optimal intra prediction mode Candidate Set
={max(rV,rH) corresponding predictive mode, max less (rV,rH) corresponding predictive mode and positioned at above-mentioned
Corresponding predictive mode, directionless predictive mode, coefficient correlation are equal to 2 corresponding predictive modes between two prediction directions }
Situation 3:IfThen
Optimal intra prediction mode Candidate Set
={max(rV,rH) corresponding predictive mode, positioned at above-mentioned prediction direction and max less (rV,rH) correspondence prediction side
Corresponding predictive mode, directionless predictive mode, coefficient correlation are equal to 2 corresponding predictive modes between }
Situation 4:If
Then optimal intra prediction mode Candidate Set
={max less(rV,rH) corresponding predictive mode, positioned at above-mentioned prediction direction and max (rV,rH) correspondence prediction side
Corresponding predictive mode, directionless predictive mode, coefficient correlation are equal to 2 corresponding predictive modes between }
Situation 5:If
Then optimal intra prediction mode Candidate Set
={ it is located at max less (rV,rH,rDDR,rDDL) correspond to prediction direction and max (rV,rH,rDDR,rDDL) correspondence prediction
Corresponding predictive mode, directionless predictive mode, coefficient correlation are equal to 2 corresponding predictive modes between direction }
Situation 6:If above-mentioned situation is all unsatisfactory for, optimal intra prediction mode Candidate Set={ all predictive modes }.
In this case, rinv_maxRepresent perpendicular to max (rV,rH) correspond to corresponding coefficient correlation in prediction direction;
rinv_maxlessRepresent perpendicular to max less (rV,rH) correspond to corresponding coefficient correlation in prediction direction.
(c)If the predictive mode of present encoding block is in addition to prediction direction in the 4x4 intra prediction modes for supporting h264,
The prediction direction more segmented also is supported, then following methods three or method four may be selected.
Method three:Using step(a)Middle process step.
Method four:According to step(a)In method increase phase in " optimal intra prediction mode Candidate Set " calculation procedure
Dependent variable.
When the prediction direction for supporting more to segment is exemplified below, the determination side of its optimal intra prediction mode Candidate Set
Method.The predictive mode of such as encoding block except comprising in addition to HD, also comprising the prediction direction between DDR and HD, comprising between HD and H
Prediction direction, i.e., HD directions exist subdivision predictive mode.Now, according to step(a)In method in " optimal infra-frame prediction
Increase relevant variable in mode candidate collection " calculation procedure, it is specific as follows
Situation 1:IfThen
Optimal intra prediction mode Candidate Set
={max(rV,rH,rDDR,rDDL,rHD) corresponding predictive mode, coefficient correlation be equal to 2 corresponding predictive modes
Situation 2:IfThen
Optimal intra prediction mode Candidate Set
={max(rV,rH,rDDR,rDDL,rHD) corresponding predictive mode, max less (rV,rH,rDDR,rDDL,rHD) corresponding
Predictive mode and between above-mentioned two prediction direction corresponding predictive mode, directionless predictive mode, coefficient correlation etc.
In 2 corresponding predictive modes }
Situation 3:IfThen
Optimal intra prediction mode Candidate Set
={max(rV,rH,rDDR,rDDL,rHD) corresponding predictive mode, positioned at above-mentioned prediction direction and max less (rV,
rH,rDDR,rDDL,rHD) correspondingly corresponding predictive mode, directionless predictive mode, coefficient correlation are equal to 2 correspondences between prediction direction
Predictive mode
Situation 4:If
Then optimal intra prediction mode Candidate Set
={max less(rV,rH,rDDR,rDDL,rHD) corresponding predictive mode, positioned at above-mentioned prediction direction and max (rV,
rH,rDDR,rDDL,rHD) correspondingly corresponding predictive mode, directionless predictive mode, coefficient correlation are equal to 2 correspondences between prediction direction
Predictive mode
Situation 5:If
Then optimal intra prediction mode Candidate Set
={ it is located at max less (rV,rH,rDDR,rDDL,rHD) correspond to prediction direction and max (rV,rH,rDDR,rDDL,rHD) right
Corresponding predictive mode between prediction direction, directionless predictive mode, coefficient correlation is answered to be equal to 2 corresponding predictive modes }
Situation 6:If above-mentioned situation is all unsatisfactory for, optimal intra prediction mode Candidate Set={ all predictive modes } exists
In such cases, rinv_maxRepresent perpendicular to max (rV,rH,rDDR,rDDL,rHD) correspond to corresponding coefficient correlation in prediction direction;
rinv_maxlessRepresent perpendicular to max less (rV,rH,rDDR,rDDL,rHD) correspond to corresponding coefficient correlation in prediction direction.
S1063:Present encoding block only carries out the infra-frame prediction of optimal intra prediction mode Candidate Set correspondence direction.
Embodiment two
Fig. 2 is a kind of predictive mode fast selecting method flow process based on correlation analysis of the preferred embodiment of the present invention
Figure;The method comprising the steps of:
S101:Judge whether present frame is inter-frame, if yes then enter S102;Otherwise, into S104.
S102:The first predictive mode is carried out to present encoding basic block quickly to judge;
First predictive mode quick judgment method is as follows:
S1020:Calculate the symbolic variable flag of present encoding basic block;
S1021:Calculate the time correlation degree of present encoding basic block;
Yt,n={yt(i,j)|yt(i,j)∈mbt,n}、Yt-1,n={yt-1(i,j)|yt-1(i,j)∈mbt-1,n}
dYt,n={yt(i,j)-yt-1(i,j)|yt(i,j)∈mbt,nAnd yt-1(i,j)∈mbt-1,n}
Wherein, cov, std are represented respectively and are sought covariance, seek mean square deviation;yt(i, j) represents the i-th row of current encoded frame jth row
Brightness value;yt-1(i, j) represents the brightness value of the i-th row of former frame jth row;mbt,nRepresent present encoding basic block;mbt-1,nTable
Show that former frame same position encodes basic block;T represents image time sequence number in the video sequence;N represents basic block in its institute
Position number in the picture;ρtt,nRepresent the time correlation degree of present encoding basic block;Basic block refers to the block that encoder is supported
Full-size, such as basic block herein is exactly the macro block of 16x16 in H264, and can be for 64x64 etc. in H265
Large-sized piece;
S1022:If(ρtt,n>Const0 and flag=1)Or (ρ tt,n=0 and flag=0), then present encoding base
This block is Skip patterns;
Otherwise, if(ρtt,n>Const1 and flag=1)Or (ρ tt,n<Const3 and flag=0), then currently compile
Code basic block is inter-frame forecast mode;
Else if(ρtt,n<Const2 and flag=1)Or (ρ tt,n>Const4 and flag=0), it is current to compile basic
Block is intra prediction mode,
Otherwise,(When above-mentioned condition is unsatisfactory for)The current predictive mode for compiling basic block cannot judge.
Wherein, const0, const1, const2, const3, const4 are respectively corresponding decision threshold;It is general desirable
0.99≤const0≤1,0.7<Const1≤1,0≤const2<0.3;Const3=f1 (fps), const4=f2 (fps), f1
For the monotonic decreasing function of frame per second, f2 for frame per second monotonic decreasing function, typically under full frame rate const3≤5, const4 >=
10;Fps represents frame per second.
S103:If the quick judged result of the first predictive mode is Skip patterns, present encoding basic block is entered first
Row Skip is predicted, subsequently into S109;(This step is S103a)
If the quick judged result of the first predictive mode is inter-frame forecast mode, present encoding basic block is carried out first
Inter prediction, subsequently into S108;(This step is S103b)
If the quick judged result of the first predictive mode is intra prediction mode, step S104 is directly entered;(This step
For S103c)
If the quick judged result of the first predictive mode be predictive mode cannot determinating mode, to present encoding basic block
Inter prediction is carried out, subsequently into step S104.(This step is S103d)
Step S103 includes step S103a, S103b, S103c, S103d, and step S103a, S103b, S103c, S103d are not
Successively sequentially.
S104:Calculate the block complexity of present encoding basic block.Specific implementation is as follows
S1041:Calculate the boundary intensity of each pixel in present encoding basic block
yit(i,j)=‖filter(yt(i,j)|yt(i,j)∈mbt,n)‖
S1042:Mean square deviation is asked to the boundary intensity of each pixel in present encoding basic block
mbit,n=std(yit(i,j)|yt(i,j)∈mbt,n)
Wherein, yit(i, j) represents pixel ytThe boundary intensity of (i, j);Filter (variable | condition) represent to meeting condition
Variable carry out boundary filtering, known any one boundary filter operator such as sobel may be selected;‖ variable ‖ are represented to variable
Modulus;mbit,nRepresent the block complexity of present encoding basic block.
S105:Judge whether mbit,n>Thres1, if so, then enter S106;If it is not, then entering S107.
Wherein, Thres1Represent the first decision threshold, general Thres1>25。
S106:Present encoding basic block is divided into into the encoding block less than basic block size, to the encoding block using real
Applying the fast intra-frame predicting method based on correlation analysis described in example one carries out infra-frame prediction;
For example in H264-baseline or H264-main, the quick frame in that step S106 as only carries out 4x4 is pre-
Survey, and in step H264-high, S106 is the fast intra-mode prediction for carrying out 8x8,4x4.
S107:Using the fast intra-frame predicting method based on correlation analysis described in embodiment one to present encoding base
This block carries out infra-frame prediction.
For example in H264, S107 is the fast intra-mode prediction for carrying out 16x16.
S108:RDO is carried out to present encoding basic block(Rate-Distortion Optimization), obtain optimal pre-
Survey pattern.
S109:Normal coded stream journey subsequent operation is carried out to present encoding basic block;
Change quantization, scanning are carried out to present encoding basic block, entropy code operation completes the volume of present encoding basic block
Code.
S110:Judge that next coding basic block whether there is, if it is present next coding basic block is set to currently
Encoding block, reenters S102;Otherwise, it is determined that next coded frame whether there is, if it is present next coded frame is set to
Current encoded frame, reenters S101;Otherwise, terminate.
Embodiment three
Fig. 4 is that a kind of intra prediction mode based on correlation analysis of the preferred embodiment of the present invention quickly selects system architecture
Figure;The system includes:
Directional correlation coefficients calculation block, optimal intra prediction mode candidate select module, optimal intra-framed prediction module,
Directional correlation coefficients calculation block, for calculating the directional correlation coefficient of present encoding block;
The computational methods of the directional correlation coefficient of present encoding block are referring to the technical side in step S1061 in embodiment one
Case, will not be described here.
Optimal intra prediction mode candidate selects module, for not sympathizing with according to the directional correlation coefficient of present encoding block
Condition, selects corresponding intra prediction mode as optimal intra prediction mode Candidate Set;
It is described " to be used for the different situations of the directional correlation coefficient according to present encoding block, select corresponding infra-frame prediction mould
Formula is used as optimal intra prediction mode Candidate Set " method detailed is referring to the technical scheme in step S1062 in embodiment one, here
Repeat no more.
Optimal intra-framed prediction module, for carrying out optimal intra prediction mode Candidate Set correspondence direction to present encoding block
Infra-frame prediction;
Example IV
Fig. 5 is that a kind of predictive mode based on correlation analysis of the preferred embodiment of the present invention quickly selects system construction drawing;
The system includes:Inter-frame judge module, the quick judge module of the first predictive mode, first judge that processing meanss, block are complicated
Degree computing module, the 5th judge module, the first fast intra-mode prediction module, the second fast intra-mode prediction module, optimum prediction mould
Formula acquisition module, next code module, next coding basic block judging treatmenting module, next coded frame judging treatmenting module,
Inter-frame judge module, it is fast if yes then enter the first predictive mode for judging whether present frame is inter-frame
Fast judge module, otherwise, into block complicated dynamic behaviour module;
The quick judge module of first predictive mode, quickly sentences for carrying out the first predictive mode to present encoding basic block
It is disconnected;
First judges processing meanss, for according to the quick judged result of the first predictive mode, entering to present encoding basic block
Row is processed;
Block complicated dynamic behaviour module, for calculating the block complexity of present encoding basic block;Block complicated dynamic behaviour module, bag
Boundary strength calculation module, boundary intensity mean square deviation computing module are included, Fig. 9 is the structure chart of block complicated dynamic behaviour module in Fig. 5;
Boundary strength calculation module, for calculating the boundary intensity of each pixel in present encoding basic block;
yit(i,j)=‖filter(yt(i,j)|yt(i,j)∈mbt,n)‖
Boundary intensity mean square deviation computing module, for asking square to the boundary intensity of each pixel in present encoding basic block
Difference;
mbit,n=std(yit(i,j)|yt(i,j)∈mbt,n)
Wherein, yit(i, j) represents pixel ytThe boundary intensity of (i, j);Filter (variable | condition) represent to meeting condition
Variable carry out boundary filtering, known any one boundary filter operator such as sobel may be selected;‖ variable ‖ are represented to variable
Modulus;mbit,nRepresent the block complexity of present encoding basic block.
5th judge module, for judging whether mbit,n>Thres1, if so, then enter the first fast intra-mode prediction mould
Block;If it is not, then entering the second fast intra-mode prediction module;
mbit,nRepresent the block complexity of present encoding basic block, Thres1The first decision threshold is represented, typically
Thres1>25;
First fast intra-mode prediction module, for present encoding basic block to be divided into the coding less than basic block size
Block, then to the encoding block using the quick selecting party of the intra prediction mode based on correlation analysis described in embodiment one
Method carries out infra-frame prediction;
Second fast intra-mode prediction module, for using the infra-frame prediction based on correlation analysis described in embodiment one
Mode quick selecting method carries out infra-frame prediction to present encoding basic block;
Optimum prediction mode acquisition module, for carrying out RDO to present encoding basic block(Rate-Distortion
Optimization), obtain optimum prediction mode;
Next code module, for carrying out change quantization, scanning to present encoding basic block, entropy code operation completes to work as
The coding of front coding basic block;
Next coding basic block judging treatmenting module, for judging that next coding basic block whether there is, if it is present
Next coding basic block is set to into present encoding block, the quick judge module of the first predictive mode is reentered;Otherwise, under entrance
One coded frame judging treatmenting module;
Next coded frame judging treatmenting module, for judging that next coded frame whether there is, if it is present by next volume
Code frame is set to current encoded frame, reenters inter-frame judge module;Otherwise, terminate.
Further, the quick judge module of first predictive mode also includes symbolic variable computing module, time correlation
Degree computing module, predictive mode judge module, Fig. 6 is the structure chart of the quick judge module of the first predictive mode in Fig. 5;
Symbolic variable computing module, for calculating the symbolic variable flag of present encoding basic block;
Time correlation degree computing module, for calculating the time correlation degree of present encoding basic block;
Yt,n={yt(i,j)|yt(i,j)∈mbt,n}、Yt-1,n={yt-1(i,j)|yt-1(i,j)∈mbt-1,n}
dYt,n={yt(i,j)-yt-1(i,j)|yt(i,j)∈mbt,nAnd yt-1(i,j)∈mbt-1,n}
Wherein, cov, std are represented respectively and are sought covariance, seek mean square deviation;yt(i, j) represents the i-th row of current encoded frame jth row
Brightness value;yt-1(i, j) represents the brightness value of the i-th row of former frame jth row;mbt,nRepresent present encoding basic block;mbt-1,nTable
Show that former frame same position encodes basic block;T represents image time sequence number in the video sequence;N represents basic block in its institute
Position number in the picture;ρtt,nRepresent the time correlation degree of present encoding basic block;Basic block refers to the block that encoder is supported
Full-size;
Predictive mode judge module, if for judging
(ρtt,n>Const0 and flag=1)Or (ρ tt,n=0 and flag=0), then present encoding basic block is Skip
Pattern;
Otherwise, if(ρtt,n>Const1 and flag=1)Or (ρ tt,n<Const3 and flag=0), then currently compile
Code basic block is inter-frame forecast mode;
Else if(ρtt,n<Const2 and flag=1)Or (ρ tt,n>Const4 and flag=0), it is current to compile basic
Block is intra prediction mode,
Otherwise,(When above-mentioned condition is unsatisfactory for)The current predictive mode for compiling basic block cannot judge.
Wherein, const0, const1, const2, const3, const4 are respectively corresponding decision threshold;It is general desirable
0.99≤const0≤1,0.7<Const1≤1,0≤const2<0.3;Const3=f1 (fps), const4=f2 (fps), f1
For the monotonic decreasing function of frame per second, f2 for frame per second monotonic decreasing function, typically under full frame rate const3≤5, const4 >=
10;Fps represents frame per second.
Further, described first judges that processing meanss include that Skip mode treatment modules, inter-frame forecast mode process mould
Block, intra prediction mode processing module, cannot determinating mode processing module, Fig. 7 is the first structure for judging processing meanss in Fig. 5
Figure;
Skip mode treatment modules are right first if being Skip patterns for the quick judged result of the first predictive mode
Present encoding basic block carries out Skip predictions, subsequently into next code module;
Inter-frame forecast mode processing module, if being inter-frame forecast mode for the quick judged result of the first predictive mode,
Then first inter prediction is carried out to present encoding basic block, subsequently into optimum prediction mode acquisition module;
Intra prediction mode processing module, if being intra prediction mode for the quick judged result of the first predictive mode,
Then it is directly entered block complicated dynamic behaviour module;
Cannot determinating mode processing module, if cannot sentence for predictive mode for the quick judged result of the first predictive mode
Mould-fixed, then carry out inter prediction to present encoding basic block, subsequently into block complicated dynamic behaviour module.
Further, the first fast intra-mode prediction module includes encoding block division module, fast intra-mode prediction module, Fig. 8
For the structure chart of the first fast intra-mode prediction module in Fig. 5;
Encoding block division module, for present encoding basic block to be divided into the encoding block less than basic block size;
Fast intra-mode prediction module, for adopting in embodiment one to the encoding block each Suo Shu less than basic block size
The described Adaptive Mode Selection Method for Intra-Prediction based on correlation analysis carries out infra-frame prediction;
It will be understood by those skilled in the art that realize that all or part of step in above-described embodiment method is can
With what is completed by programmed instruction related hardware, described program can be stored in a computer read/write memory medium,
Described storage medium can be ROM, RAM, disk, CD etc..
Presently preferred embodiments of the present invention is the foregoing is only, not to limit the present invention, all essences in the present invention
Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.