CN103327329A - Method and system for quantitative adjustment of image quality jump - Google Patents

Method and system for quantitative adjustment of image quality jump Download PDF

Info

Publication number
CN103327329A
CN103327329A CN2013102310493A CN201310231049A CN103327329A CN 103327329 A CN103327329 A CN 103327329A CN 2013102310493 A CN2013102310493 A CN 2013102310493A CN 201310231049 A CN201310231049 A CN 201310231049A CN 103327329 A CN103327329 A CN 103327329A
Authority
CN
China
Prior art keywords
frame
quantization parameter
correction value
current encoded
deal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013102310493A
Other languages
Chinese (zh)
Other versions
CN103327329B (en
Inventor
舒倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN YUNZHOU MULTIMEDIA TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN YUNZHOU MULTIMEDIA TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN YUNZHOU MULTIMEDIA TECHNOLOGY Co Ltd filed Critical SHENZHEN YUNZHOU MULTIMEDIA TECHNOLOGY Co Ltd
Priority to CN201310231049.3A priority Critical patent/CN103327329B/en
Publication of CN103327329A publication Critical patent/CN103327329A/en
Application granted granted Critical
Publication of CN103327329B publication Critical patent/CN103327329B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and system for quantitative adjustment of image quality jump. According to the method and system for quantitative adjustment of the image quality jump, on one hand, a method for reducing a difference between a quantization parameter of a preset I frame and a quantization parameter of a before P frame in an image which possibly produces the image quality jump according to the phenomena that the problem of the image quality jump is only caused by the situations that the difference between the quantization parameter of the preset I frame and the quantization parameter of the before P frame is large, and the preset I frame and the before P frame belong to the same scene, thus, a flicker feeling produced due to the image quality jump is reduced, and the subjective effect of an encoder is improved; on the other hand, when the preset I frame and the before P frame belong to different scenes, the image cannot produce the flicker phenomenon even when the quantization parameter difference is large, and the preset I frame can serve as a starting reference frame of a new scene. According to the method and system for quantitative adjustment of the image quality jump, due to the fact that movement intensity is used for adjusting the quantization parameters, the encoder can further adjust the quantization parameters according to the complexity of an encoding film source, and optimization of the encoding objective performance can be achieved.

Description

A kind of quantification method of adjustment and system of picture quality saltus step
Technical field
The present invention relates to the coding and decoding video field, relate in particular to a kind of quantification method of adjustment and system of picture quality saltus step.
Background technology
Prior art when last two field picture is poor quality P frame, is right after when a frame is the I frame of the fine Same Scene of picture quality thereafter in video sequence, can produce saltus step, the flickering of picture quality.To many scenes of complicated movement switching sequence, when adopting little I frame period to carry out Low Bit-rate Coding, the problems referred to above highlight maximization.And when front and back two frame image quality differed greatly but belong to different scene, flickering then can be alleviated.Conventional quantization strategy is not made special design to this, be the unified upper GOP(Group of Pictures of employing) in the average quantisation parameter of P frame determine the quantization parameter (QP) of I frame among the current GOP.
Summary of the invention
The purpose of the embodiment of the invention is to propose a kind of quantification method of adjustment of picture quality saltus step, is intended to solve prior art when the picture quality saltus step occurs, and can produce saltus step, the flickering problem of picture quality.
The embodiment of the invention is achieved in that a kind of quantification method of adjustment of picture quality saltus step, and described method comprises:
Step1: judge whether that current encoded frame is that P frame and next coded frame are the I frame, if then enter Step2;
Step2: judge that whether occurrence scene switches next coded frame with respect to current encoded frame, if not, then makes scene switching mark variable flag=0, if then make flag=1;
Step3: the first correction value (QP that calculates the current encoded frame quantization parameter t M1);
Step4: utilize the first correction value of described quantization parameter that current encoded frame is encoded;
Step5: next coded frame is set to current encoded frame;
Step6: judge whether flag=0, if then enter Step7;
Step7: the second correction value (QP that calculates the current encoded frame quantization parameter t M2), then utilize the second correction value of quantization parameter that current encoded frame is encoded, enter Step8;
Step8: judge whether next coded frame frame exists, if there is no, then finish; Otherwise next coded frame is set to current encoded frame, then reenters Step1.
Further, among the described step Step1, judge whether that current encoded frame is that P frame and next coded frame are the I frame, if not, then: at first, current encoded frame is encoded;
Then, judge whether next coded frame exists, if there is no, then finish, otherwise,
Make that current encoded frame is next coded frame, reenter again Step1.
Further, among the described step Step6, judge whether flag=0, if not, then enter Step9,
Step9: judge that whether next coded frame frame exists, if do not exist, then enters step Step10;
Step10: the 3rd correction value (QP that calculates the current encoded frame quantization parameter t M3), then utilize the 3rd correction value of quantization parameter that current encoded frame is encoded, then finish.
4, the quantification method of adjustment of picture quality saltus step as claimed in claim 3 is characterized in that, among the described step Step9, judges whether next coded frame frame exists, and then enters Step11 if exist;
Step11; Utilize current encoded frame and next coded frame to calculate the 4th correction value of current encoded frame quantization parameter;
Step12: utilize the 4th correction value of quantization parameter that current encoded frame is encoded, then next coded frame is set to current encoded frame, then reenters Step1.
Another purpose of the embodiment of the invention is to propose a kind of quantification Adjustment System of picture quality saltus step, described system comprises: the first judge module, the first coding processing module, the second judge module, the first correction value computing module, the second coding processing module, the 3rd judge module, the second correction value computing module, the 3rd coding processing module
The first judge module is used for judging whether that current encoded frame is that P frame and next coded frame are the I frame, then enters if not the first coding processing module, if then enter the second judge module;
The first coding processing module is used for current encoded frame is encoded; Then, judge whether next coded frame exists, if there is no, then finish; Otherwise, make that current encoded frame is next coded frame, reenter again the first judge module;
The second judge module is used for judging whether occurrence scene switches next coded frame with respect to current encoded frame, and if not, scene switching mark variable flag=0 then is if then flag=1 enters the first correction value computing module;
The first correction value computing module is for the first correction value of calculating the current encoded frame quantization parameter;
The second coding processing module is used for utilizing the first correction value of described quantization parameter that current encoded frame is encoded, and then next coded frame is set to current encoded frame;
The 3rd judge module is used for judging whether scene switching mark variable flag=0, if then enter the second correction value computing module;
The second correction value computing module is for the second correction value (QP that calculates the current encoded frame quantization parameter t M2), enter the 3rd coding processing module;
The 3rd coding processing module is used for utilizing the second correction value of quantization parameter that current encoded frame is encoded, and judges then whether next coded frame frame exists, and if there is no, then finishes; Otherwise next coded frame is set to current encoded frame, then reenters the first judge module.
Further, described system also comprises: the 4th judge module, the 3rd correction value computing module, the 4th coding processing module,
The 3rd judge module is used for judging whether scene switching mark variable flag=0, then enters if not the 4th judge module;
The 4th judge module is used for judging whether next coded frame frame exists, if do not exist, then enters the 3rd correction value computing module;
The 3rd correction value computing module for three correction values of calculating the current encoded frame quantization parameter, enters the 4th coding processing module;
The 4th coding processing module is used for utilizing three correction values of quantization parameter that current encoded frame is encoded, and then finishes.
Further, described system also comprises: the 4th correction value computing module, the 5th coding processing module,
The 4th judge module is used for judging whether next coded frame frame exists, and then enters the 4th correction value computing module if exist,
The 4th correction value computing module is used for utilizing current encoded frame and next coded frame to calculate the 4th correction value of current encoded frame quantization parameter, enters the 5th coding processing module;
The 5th coding processing module is used for utilizing the 4th correction value of quantization parameter that current encoded frame is encoded, and then next coded frame is set to current encoded frame, then reenters the first judge module.
Beneficial effect of the present invention
In order to address the above problem, the embodiment of the invention proposes a kind of quantification method of adjustment and system of picture quality saltus step.Embodiment of the invention method on the one hand, only result from default I frame quantization parameter and last P frame quantization parameter differs greatly and both belong to the phenomenon of a scene together according to picture quality saltus step problem, designed at the image that might produce the picture quality saltus step, reduce both poor methods of quantization parameter, thereby reduce the flickering that produces owing to the picture quality saltus step, promote the subjective effect of encoder.On the other hand, when default I frame and last P frame did not belong to a scene together, image can not produce scintillation yet even quantization parameter differs greatly, and then default I frame will be as the initial reference frame of new scene.Embodiment of the invention method utilizes exercise intensity to adjust quantization parameter, makes encoder further adjust quantization parameter according to the complexity of coding film source, thereby reaches the optimization of the objective performance of coding.
Description of drawings
Fig. 1 is the quantification method of adjustment flow chart of a kind of picture quality saltus step of the preferred embodiment of the present invention;
Fig. 2 is the method flow diagram that step Step11 comprises in Fig. 1 flow chart;
Fig. 3 is the quantification Adjustment System structure chart of a kind of picture quality saltus step of the preferred embodiment of the present invention;
Fig. 4 is the 4th correction value computing module modular structure figure in Fig. 3 structure chart.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated, for convenience of explanation, only show the part relevant with the embodiment of the invention.Should be appreciated that the specific embodiment that this place is described, only be used for explaining the present invention, not in order to limit the present invention.
Embodiment of the invention method on the one hand, only result from default I frame quantization parameter and last P frame quantization parameter differs greatly and both belong to the phenomenon of a scene together according to picture quality saltus step problem, designed at the image that might produce the picture quality saltus step, reduce both poor methods of quantization parameter, thereby reduce the flickering that produces owing to the picture quality saltus step, promote the subjective effect of encoder.On the other hand, when default I frame and last P frame did not belong to a scene together, image can not produce scintillation yet even quantization parameter differs greatly, and then default I frame will be as the initial reference frame of new scene.Embodiment of the invention method utilizes exercise intensity to adjust quantization parameter, makes encoder further adjust quantization parameter according to the complexity of coding film source, thereby reaches the optimization of the objective performance of coding.
Embodiment one
Fig. 1 is the quantification method of adjustment flow chart of a kind of picture quality saltus step of the preferred embodiment of the present invention; Said method comprising the steps of:
Step1: be the I frame if current encoded frame is P frame and next coded frame, then enter Step2; Otherwise, { at first, current encoded frame is encoded; Then, judge whether next coded frame exists, if there is no, then finish; Otherwise, make that current encoded frame is next coded frame, reenter again Step1.}
Step2: judge next coded frame with respect to current encoded frame whether occurrence scene switch (judging namely whether next coded frame is the scene switch frame) if not, flag=0 then, if, flag=1 then.
In full, flag is scene switching mark variable; The scene change detection method can adopt disclosed any method in the industry.
Step3: the first correction value of calculating the current encoded frame quantization parameter.
QP t m1=clip(QP t+temp,QP min,QP max),
Wherein temp is intermediate variable, and its computational methods are as follows:
If flag=0, then
Figure BDA00003330772800051
Otherwise, then temp = Q P t - 1 + Thres 1 - Q P t , Q P t - Q P t - 1 < Thres 1 0 , else
In full, clip ( x , a , b ) = x , a &le; x &le; b a , x < a b , x > b ; QP MinThe presentation code device is set the minimum quantization parameter; QP MaxThe maximum quantization parameter that the presentation code device is set; Thres1 represents the first decision threshold, general Thres1 〉=3; Thres2 represents the second decision threshold, general Thres2〉38; QP tThe quantization parameter of expression current encoded frame; QP t M1The first correction value of expression present frame quantization parameter; QP T-1The quantization parameter that represents previous coded frame; Frame jRepresent j coded frame; QP jRepresent j coded frame quantization parameter; GOP tThe GOP at expression current encoded frame place is also referred to as current GOP;
Figure BDA00003330772800055
Represent current GOP quantization parameter; Expression is averaged to the variable that satisfies condition; Weight 1Represent the first weight factor; Weight 2Represent the second weight factor, general 0<weight 1<weight 2≤ 0.5.
Step4: utilize the first correction value of described quantization parameter that current encoded frame is encoded.
Step5: next coded frame is set to current encoded frame.
Step6: if flag=0 then enters Step7; If not, then enter Step9.
Step7: the second correction value QP that calculates the current encoded frame quantization parameter t M2, then utilize the second correction value of quantization parameter that current encoded frame is encoded, enter Step8.
QP t M2=clip (QP t+ Thres1-2+temp, QP Min, QP Max), wherein temp is intermediate variable, has been calculated by Step3 and has obtained.
Step8: judge whether next coded frame frame exists, if there is no, then finish; Otherwise next coded frame is set to current encoded frame, then reenters Step1.
Step9: judge that whether next coded frame frame exists, if do not exist, then enters step Step10; Then enter Step11 if exist;
Step10: the 3rd correction value QP that calculates the current encoded frame quantization parameter t M3, then utilize the 3rd correction value of quantization parameter that current encoded frame is encoded, then finish.
QP t M3=clip (QP t-temp, QP Min, QP Max), wherein temp is intermediate variable, has been calculated by Step3 and has obtained.
Step11: utilize current encoded frame and next coded frame to calculate the 4th correction value of current encoded frame quantization parameter.
(Fig. 2 is the method flow diagram that step Step11 comprises in Fig. 1 flow chart specifically to comprise following steps; ):
The first step is carried out down-sampling to the monochrome information frame of current encoded frame and is processed, and obtains current processed frame; Again the monochrome information frame of next coded frame carried out the down-sampling processing, obtain next processed frame (Downsapling method can adopt known nearest neighbor algorithm, bilinear interpolation, cubic convolution etc.).
Second step is divided into piece with current processed frame, more next processed frame also is divided into piece; And calculate the piece statistical variable of each piece.
ti _ bloc k t , n = std ( f t deal ( i , j ) - f t + 1 deal ( i , j ) | f t deal ( i , j ) &Element; bloc k t , n deal and f t + 1 deal ( i , j ) &Element; block t + 1 , n deal )
Wherein, block size can determine as required, and is commonly used such as 16x16,8x8 etc.; When block size is 16x16, then be called macro block; When the macro block Further Division is that size is n 1Xn 2Piece then the smaller piece of these sizes be called sub-block (n 1≤ 16 Perhapsn 2≤ 16, but both can not equal 16 simultaneously); N piece of current processed frame is designated as
Figure BDA00003330772800062
N piece of next processed frame is designated as
Figure BDA00003330772800063
Figure BDA00003330772800064
With
Figure BDA00003330772800065
The palpus in the same size;
Figure BDA00003330772800069
Pixel value for the capable j row of current processed frame i;
Figure BDA00003330772800066
Pixel value for the capable j row of next processed frame i; Ti_block T, nExpression piece statistical variable;
Figure BDA00003330772800067
Represent next processed frame; std ( f t deal ( i , j ) - f t + 1 deal i , j ) | f t deal ( i , j ) &Element; bloc k t , n deal and f t + 1 deal ( i , j ) &Element; block t + 1 , n deal ) It is right to represent
Figure BDA000033307728000610
With
Figure BDA00003330772800071
Carry out subtraction, wherein requirement
Figure BDA00003330772800079
Belong to And
Figure BDA00003330772800073
Belong to
Figure BDA00003330772800074
Then all are asked for
Figure BDA00003330772800075
Ask mean square deviation.
The 3rd step, calculate the frame variable, be designated as TI_frame t
TI _ frame t = sum n = 1,2 , . . . , number block ( sign ( ti _ block t , n , Thres 3 ) ) , Wherein
sign ( ti _ block t , n , Thres 3 ) = 1 , ti _ block t , n > Thres 3 0 , else
In full, Thres3 represents the 3rd decision threshold, and it is the decreasing function of fps, general desirable Thres3=8* (1+24/fps); The frame per second of fps presentation code film source; Expression all variable summations to satisfying condition; Number BlockRepresent the piece sum that a two field picture comprises.
The 4th step, the 4th correction value QP of calculating current encoded frame quantization parameter t M4
QP t m4=clip(QP t-clip(const-(TI_frame t>>bit),ΔQP min,ΔQP max),QP min,QP max)
In full,〉〉 the right displacement computing of expression; Δ QP MinThe expression quantization parameter is adjusted lower limit, and is general-10<Δ QP Min<Δ QP MaxΔ QP MaxExpression expression quantization parameter is adjusted the upper limit, general 0<Δ QP Max<10; Const represents quantization parameter adjustment constant, general const=(ceil (number Block* weight 3) bit)+1; Weight 3Represent the 3rd weight factor, general 0.6≤weight 3<1; Ceil (x) expression is greater than the smallest positive integral of x; Bit represents the displacement constant, general 1<bit≤log 2Number Block-1.
Step12: utilize the 4th correction value of quantization parameter that current encoded frame is encoded, then next coded frame is set to current encoded frame, then reenters Step1.
Embodiment two
Fig. 3 is the quantification Adjustment System structure chart of a kind of picture quality saltus step of the preferred embodiment of the present invention; Described system comprises: the first judge module, the first coding processing module, the second judge module, the first correction value computing module, the second coding processing module, the 3rd judge module, the second correction value computing module, the 3rd coding processing module,
The first judge module is used for judging whether that current encoded frame is that P frame and next coded frame are the I frame, then enters if not the first coding processing module, if then enter the second judge module;
The first coding processing module is used for current encoded frame is encoded; Then, judge whether next coded frame exists, if there is no, then finish; Otherwise, make that current encoded frame is next coded frame, reenter again the first judge module;
The second judge module is used for judging whether occurrence scene switches next coded frame with respect to current encoded frame, and if not, scene switching mark variable flag=0 then is if then flag=1 enters the first correction value computing module;
The first correction value computing module is for the first correction value of calculating the current encoded frame quantization parameter;
The second coding processing module is used for utilizing the first correction value of described quantization parameter that current encoded frame is encoded, and then next coded frame is set to current encoded frame;
The 3rd judge module is used for judging whether scene switching mark variable flag=0, if then enter the second correction value computing module;
The second correction value computing module is for the second correction value QP that calculates the current encoded frame quantization parameter t M2, enter the 3rd coding processing module;
The 3rd coding processing module is used for utilizing the second correction value of quantization parameter that current encoded frame is encoded, and judges then whether next coded frame frame exists, and if there is no, then finishes; Otherwise next coded frame is set to current encoded frame, then reenters the first judge module.
Further, described system also comprises: the 4th judge module, the 3rd correction value computing module, the 4th coding processing module,
The 3rd judge module is used for judging whether scene switching mark variable flag=0, then enters if not the 4th judge module;
The 4th judge module is used for judging whether next coded frame frame exists, if do not exist, then enters the 3rd correction value computing module;
The 3rd correction value computing module for three correction values of calculating the current encoded frame quantization parameter, enters the 4th coding processing module;
The 4th coding processing module is used for utilizing three correction values of quantization parameter that current encoded frame is encoded, and then finishes.
Further, described system also comprises: the 4th correction value computing module, the 5th coding processing module,
The 4th judge module is used for judging whether next coded frame frame exists, and then enters the 4th correction value computing module if exist,
The 4th correction value computing module is used for utilizing current encoded frame and next coded frame to calculate the 4th correction value of current encoded frame quantization parameter, enters the 5th coding processing module;
The 5th coding processing module is used for utilizing the 4th correction value of quantization parameter that current encoded frame is encoded, and then next coded frame is set to current encoded frame, then reenters the first judge module.
Further, in the first correction value computing module, the first correction value of described calculating current encoded frame quantization parameter is specially:
QP t m1=clip(QP t+temp,QP min,QP max),
Wherein temp is intermediate variable, and its computational methods are as follows:
If flag=0, then
Figure BDA00003330772800091
Otherwise, then temp = Q P t - 1 + Thresl - Q P t , Q P t - Q P t - 1 < Thresl 0 , else
In full, clip ( x , a , b ) = x , a &le; x &le; b a , x < a b , x > b ; QP MinThe presentation code device is set the minimum quantization parameter; QP MaxThe maximum quantization parameter that the presentation code device is set; Thres1 represents the first decision threshold, general Thres1 〉=3; Thres2 represents the second decision threshold, general Thres2〉38; QP tThe quantization parameter of expression current encoded frame; QP t M1The first correction value of expression present frame quantization parameter; QP T-1The quantization parameter that represents previous coded frame; Frame jRepresent j coded frame; QP jRepresent j coded frame quantization parameter; GOP tThe GOP at expression current encoded frame place is also referred to as current GOP; Represent current GOP quantization parameter;
Figure BDA00003330772800094
Expression is averaged to the variable that satisfies condition; Weight 1Represent the first weight factor; Weight 2Represent the second weight factor, general 0<weight 1<weight 2≤ 0.5.
Further, in the second correction value computing module, the second correction value QP of described calculating current encoded frame quantization parameter t M2Be specially: QP t M2=clip (QP t+ Thres1-2+temp, QP Min, QP Max);
Further, in the 3rd correction value computing module, calculate the 3rd correction value QP of current encoded frame quantization parameter t M3Be specially: QP t M3=clip (QP t-temp, QP Min, QP Max);
Further, the 4th correction value computing module also comprises down-sampling processing module, piece statistical variable computing module, frame variable computing module, the 4th correction value calculating sub module (Fig. 4 is the 4th correction value computing module modular structure figure in Fig. 3 structure chart),
The down-sampling processing module is used for the monochrome information frame of current encoded frame is carried out the down-sampling processing, obtains current processed frame; Again the down-sampling processing is carried out in the monochrome information frame of next coded frame, obtain next processed frame;
Piece statistical variable computing module is used for current processed frame is divided into piece, more next processed frame also is divided into piece; And calculate the piece statistical variable of each piece.
Frame variable computing module is used for calculating the frame variable, is designated as TI_frame t
The 4th correction value calculating sub module is for the 4th correction value of calculating the current encoded frame quantization parameter.
Further, in the piece statistical variable computing module, the piece statistical variable that calculates each piece is specially:
ti _ bloc k t , n = std ( f t deal ( i , j ) - f t + 1 deal ( i , j ) | f t deal ( i , j ) &Element; bloc k t , n deal and f t + 1 deal ( i , j ) &Element; block t + 1 , n deal )
Wherein, block size can determine as required, and is commonly used such as 16x16,8x8 etc.; When block size is 16x16, then be called macro block; When the macro block Further Division is that size is n 1Xn 2Piece then the smaller piece of these sizes be called sub-block (n 1≤ 16 Perhapsn 2≤ 16, but both can not equal 16 simultaneously); N piece of current processed frame is designated as
Figure BDA00003330772800102
N piece of next processed frame is designated as With
Figure BDA00003330772800105
The palpus in the same size;
Figure BDA00003330772800106
Pixel value for the capable j row of current processed frame i;
Figure BDA00003330772800107
Pixel value for the capable j row of next processed frame i; Ti_block T, nExpression piece statistical variable;
Figure BDA00003330772800108
Represent next processed frame;
std ( f t deal ( i , j ) - f t + 1 deal i , j ) | f t deal ( i , j ) &Element; bloc k t , n deal and f t + 1 deal ( i , j ) &Element; block t + 1 , n deal ) It is right to represent
Figure BDA000033307728001010
With Carry out subtraction, wherein requirement
Figure BDA000033307728001012
Belong to
Figure BDA000033307728001013
And
Figure BDA000033307728001014
Belong to
Figure BDA000033307728001015
Then all are asked for
Figure BDA000033307728001016
Ask mean square deviation.
Further, frame variable computing module, calculate frame variable TI_framet and be specially:
TI _ frame t = sum n = 1,2 , . . . , number block ( sign ( ti _ block t , n , Thres 3 ) ) , Wherein
sign ( ti _ block t , n , Thres 3 ) = 1 , ti _ block t , n > Thres 3 0 , else
In full, Thres3 represents the 3rd decision threshold, and it is the decreasing function of fps, general desirable Thres3=8* (1+24/fps); The frame per second of fps presentation code film source;
Figure BDA000033307728001019
Expression all variable summations to satisfying condition; Number BlockRepresent the piece sum that a two field picture comprises.
Further, in the 4th correction value calculating sub module, calculate the 4th correction value of current encoded frame quantization parameter
Figure BDA000033307728001020
Be specially: QP t M4=clip (QP t-clip (const-(TI_frame tBit), Δ QP Min, Δ QP Max), QP Min, QP Max)
In full,〉〉 the right displacement computing of expression; Δ QP MinThe expression quantization parameter is adjusted lower limit, and is general-10<Δ QP Min<Δ QP MaxΔ QP MaxExpression expression quantization parameter is adjusted the upper limit, general 0<Δ QP Max<10; Const represents quantization parameter adjustment constant, general const=(ceil (number Block* weight 3) bit)+1; Weight 3Represent the 3rd weight factor, general 0.6≤weight 3<1; Ceil (x) expression is greater than the smallest positive integral of x; Bit represents the displacement constant, general 1<bit≤log 2Number Block-1.
Those having ordinary skill in the art will appreciate that, all or part of step in realization above-described embodiment method can be finished by the program command related hardware, described program can be stored in the computer read/write memory medium, and described storage medium can be ROM, RAM, disk, CD etc.
The above only is preferred embodiment of the present invention, not in order to limiting the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. the quantification method of adjustment of a picture quality saltus step is characterized in that, described method comprises:
Step1: judge whether that current encoded frame is that P frame and next coded frame are the I frame, if then enter Step2;
Step2: judge that whether occurrence scene switches next coded frame with respect to current encoded frame, if not, then makes scene switching mark variable flag=0, if then make flag=1;
Step3: the first correction value (QP that calculates the current encoded frame quantization parameter t M1);
Step4: utilize the first correction value of described quantization parameter that current encoded frame is encoded;
Step5: next coded frame is set to current encoded frame;
Step6: judge whether flag=0, if then enter Step7;
Step7: the second correction value (QP that calculates the current encoded frame quantization parameter t M2), then utilize the second correction value of quantization parameter that current encoded frame is encoded, enter Step8;
Step8: judge whether next coded frame frame exists, if there is no, then finish; Otherwise next coded frame is set to current encoded frame, then reenters Step1.
2. the quantification method of adjustment of picture quality saltus step as claimed in claim 1 is characterized in that, among the described step Step1, judges whether that current encoded frame is that P frame and next coded frame are the I frame, if not, and then: at first, current encoded frame is encoded;
Then, judge whether next coded frame exists, if there is no, then finish, otherwise,
Make that current encoded frame is next coded frame, reenter again Step1.
3. the quantification method of adjustment of picture quality saltus step as claimed in claim 1 is characterized in that, among the described step Step6, judges whether flag=0, if not, then enters Step9,
Step9: judge that whether next coded frame frame exists, if do not exist, then enters step Step10;
Step10: the 3rd correction value (QP that calculates the current encoded frame quantization parameter t M3), then utilize the 3rd correction value of quantization parameter that current encoded frame is encoded, then finish.
4. the quantification method of adjustment of picture quality saltus step as claimed in claim 3 is characterized in that, among the described step Step9, judges whether next coded frame frame exists, and then enters Step11 if exist;
Step11; Utilize current encoded frame and next coded frame to calculate the 4th correction value of current encoded frame quantization parameter;
Step12: utilize the 4th correction value of quantization parameter that current encoded frame is encoded, then next coded frame is set to current encoded frame, then reenters Step1.
5. the quantification method of adjustment of picture quality saltus step as claimed in claim 1 is characterized in that,
Described " calculating the first correction value of current encoded frame quantization parameter " is specially:
QP t m1=clip(QP t+temp,QP min,QP max),
Wherein temp is intermediate variable, and its computational methods are as follows:
If flag=0, then
Figure FDA00003330772700021
Otherwise, then temp = QP t - 1 + Thres 1 - QP t , QP t - QP t - 1 < Thres 1 0 , else
Wherein, clip ( x , a , b ) = x , a &le; x &le; b a , x < a b , x > b ; QP MinThe presentation code device is set the minimum quantization parameter; QP MaxThe maximum quantization parameter that the presentation code device is set; Thres1 represents the first decision threshold, Thres1 〉=3; Thres2 represents the second decision threshold, Thres2〉38; QP tThe quantization parameter of expression current encoded frame; QP t M1The first correction value of expression present frame quantization parameter; QP T-1The quantization parameter that represents previous coded frame; Frame jRepresent j coded frame; QP jRepresent j coded frame quantization parameter; GOP tThe GOP at expression current encoded frame place,
Figure FDA00003330772700025
Represent current GOP quantization parameter;
Figure FDA00003330772700024
Expression is averaged to the variable that satisfies condition; Weight 1Represent the first weight factor; Weight 2Represent the second weight factor, 0<weight 1<weight 2≤ 0.5;
Described " the second correction value QP of calculating current encoded frame quantization parameter t M2" be specially
QP t m2=clip(QP t+Thres1-2+temp,QP min,QP max)。
6. the quantification method of adjustment of picture quality saltus step as claimed in claim 3 is characterized in that,
Described " the 3rd correction value (QP of calculating current encoded frame quantization parameter t M3) " be specially:
QP t m3=clip(QP t-temp,QP min,QP max)。
7. the quantification method of adjustment of picture quality saltus step as claimed in claim 4 is characterized in that,
Described " calculating the 4th correction value of current encoded frame quantization parameter " comprising:
The first step is carried out down-sampling to the monochrome information frame of current encoded frame and is processed, and obtains current processed frame; Again the down-sampling processing is carried out in the monochrome information frame of next coded frame, obtain next processed frame;
Second step is divided into piece with current processed frame, more next processed frame also is divided into piece; And calculate the piece statistical variable of each piece,
ti _ bloc k t , n = std ( f t deal ( i , j ) - f t + 1 deal ( i , j ) | f t deal ( i , j ) &Element; bloc k t , n deal and f t + 1 deal ( i , j ) &Element; block t + 1 , n deal )
Wherein, n piece with current processed frame is designated as
Figure FDA00003330772700032
N piece of next processed frame is designated as
Figure FDA00003330772700033
Figure FDA00003330772700034
Figure FDA00003330772700035
Figure FDA00003330772700036
In the same size; f t Deal(i, j) is the pixel value of the capable j row of current processed frame i;
Figure FDA00003330772700037
Pixel value for the capable j row of next processed frame i; Ti_block T, nExpression piece statistical variable;
Figure FDA00003330772700038
Represent next processed frame;
std ( f t deal ( i , j ) - f t + 1 deal i , j ) | f t deal ( i , j ) &Element; bloc k t , n deal and f t + 1 deal ( i , j ) &Element; block t + 1 , n deal ) Expression is to f t Deal(i, j) with
Figure FDA000033307727000310
Carry out subtraction, wherein require f t Deal(i, j) belongs to
Figure FDA000033307727000311
And
Figure FDA000033307727000312
Belong to
Figure FDA000033307727000313
Then all are asked for
Figure FDA000033307727000314
Ask mean square deviation;
In the 3rd step, calculate frame variable TI_frame t,
TI _ frame t = sum n = 1,2 , . . . , number block ( sign ( ti _ block t , n , Thres 3 ) ) , Wherein
sign ( ti _ block t , n , Thres 3 ) = 1 , ti _ block t , n > Thres 3 0 , else
Wherein, Thres3 represents the 3rd decision threshold, and it is the decreasing function of fps; Thres3=8* (1+24/fps); The frame per second of fps presentation code film source;
Figure FDA000033307727000317
Expression all variable summations to satisfying condition; Number BlockRepresent the piece sum that a two field picture comprises;
The 4th step, the 4th correction value QP of calculating current encoded frame quantization parameter t M4,
QP t m4=clip(QP t-clip(const-(TI_frame t>>bit),ΔQP min,ΔQP max),QP min,QP max)
Wherein,〉〉 the right displacement computing of expression; Δ QP MinThe expression quantization parameter is adjusted lower limit, and is general-10<Δ QP Min<Δ QP MaxΔ QP MaxExpression expression quantization parameter is adjusted the upper limit, 0<Δ QP Max<10; Const represents quantization parameter adjustment constant, const=(ceil (number Block* weight 3) bit)+1; Weight 3Represent the 3rd weight factor, 0.6≤weight 3<1; Ceil (x) expression is greater than the smallest positive integral of x; Bit represents the displacement constant, 1<bit≤log 2Number Block-1.
8. the quantification Adjustment System of a picture quality saltus step, it is characterized in that, described system comprises: the first judge module, the first coding processing module, the second judge module, the first correction value computing module, the second coding processing module, the 3rd judge module, the second correction value computing module, the 3rd coding processing module
The first judge module is used for judging whether that current encoded frame is that P frame and next coded frame are the I frame, then enters if not the first coding processing module, if then enter the second judge module;
The first coding processing module is used for current encoded frame is encoded; Then, judge whether next coded frame exists, if there is no, then finish; Otherwise, make that current encoded frame is next coded frame, reenter again the first judge module;
The second judge module is used for judging whether occurrence scene switches next coded frame with respect to current encoded frame, and if not, scene switching mark variable flag=0 then is if then flag=1 enters the first correction value computing module;
The first correction value computing module is for the first correction value of calculating the current encoded frame quantization parameter;
The second coding processing module is used for utilizing the first correction value of described quantization parameter that current encoded frame is encoded, and then next coded frame is set to current encoded frame;
The 3rd judge module is used for judging whether scene switching mark variable flag=0, if then enter the second correction value computing module;
The second correction value computing module is for the second correction value (QP that calculates the current encoded frame quantization parameter t M2), enter the 3rd coding processing module;
The 3rd coding processing module is used for utilizing the second correction value of quantization parameter that current encoded frame is encoded, and judges then whether next coded frame frame exists, and if there is no, then finishes; Otherwise next coded frame is set to current encoded frame, then reenters the first judge module.
9. the quantification Adjustment System of picture quality saltus step as claimed in claim 8 is characterized in that,
Described system also comprises: the 4th judge module, the 3rd correction value computing module, the 4th coding processing module,
The 3rd judge module is used for judging whether scene switching mark variable flag=0, then enters if not the 4th judge module;
The 4th judge module is used for judging whether next coded frame frame exists, if do not exist, then enters the 3rd correction value computing module;
The 3rd correction value computing module for three correction values of calculating the current encoded frame quantization parameter, enters the 4th coding processing module;
The 4th coding processing module is used for utilizing three correction values of quantization parameter that current encoded frame is encoded, and then finishes.
10. the quantification Adjustment System of picture quality saltus step as claimed in claim 9 is characterized in that, described system also comprises: the 4th correction value computing module, the 5th coding processing module,
The 4th judge module is used for judging whether next coded frame frame exists, and then enters the 4th correction value computing module if exist,
The 4th correction value computing module is used for utilizing current encoded frame and next coded frame to calculate the 4th correction value of current encoded frame quantization parameter, enters the 5th coding processing module;
The 5th coding processing module is used for utilizing the 4th correction value of quantization parameter that current encoded frame is encoded, and then next coded frame is set to current encoded frame, then reenters the first judge module.
11. the quantification Adjustment System of picture quality saltus step as claimed in claim 8 is characterized in that, in described the first correction value computing module, the first correction value of described calculating current encoded frame quantization parameter is specially:
QP t m1=clip(QP t+temp,QP min,QP max),
Wherein temp is intermediate variable, and its computational methods are as follows:
If flag=0, then
Figure FDA00003330772700051
Otherwise, then temp = QP t - 1 + Thres 1 - QP t , QP t - QP t - 1 < Thres 1 0 , else
Wherein, clip ( x , a , b ) = x , a &le; x &le; b a , x < a b , x > b ; QP MinThe presentation code device is set the minimum quantization parameter; QP MaxThe maximum quantization parameter that the presentation code device is set; Thres1 represents the first decision threshold, Thres1 〉=3; Thres2 represents the second decision threshold, Thres2〉38; QP tThe quantization parameter of expression current encoded frame; QP t M1The first correction value of expression present frame quantization parameter; QP T-1The quantization parameter that represents previous coded frame; Frame jRepresent j coded frame; QP jRepresent j coded frame quantization parameter; GOP tThe GOP at expression current encoded frame place;
Figure FDA000033307727000617
Represent current GOP quantization parameter; Expression is averaged to the variable that satisfies condition; Weight 1Represent the first weight factor; Weight 2Represent the second weight factor, 0<weight 1<weight 2≤ 0.5;
In the second correction value computing module, the second correction value QP of described calculating current encoded frame quantization parameter t M2Be specially: QP t M2=clip (QP t+ Thres1-2+temp, QP Min, QP Max).
12. the quantification Adjustment System of picture quality saltus step as claimed in claim 9 is characterized in that,
In the 3rd correction value computing module, calculate the 3rd correction value of current encoded frame quantization parameter
Figure FDA00003330772700062
Be specially: QP t M3=clip (QP t-temp, QP Min, QP Max).
13. the quantification Adjustment System of picture quality saltus step as claimed in claim 10 is characterized in that,
Further, the 4th correction value computing module also comprises down-sampling processing module, piece statistical variable computing module, frame variable computing module, the 4th correction value calculating sub module,
The down-sampling processing module is used for the monochrome information frame of current encoded frame is carried out the down-sampling processing, obtains current processed frame; Again the down-sampling processing is carried out in the monochrome information frame of next coded frame, obtain next processed frame;
Piece statistical variable computing module is used for current processed frame is divided into piece, more next processed frame also is divided into piece; And calculate the piece statistical variable of each piece;
Frame variable computing module is used for calculating frame variable (TI_frame t);
The 4th correction value calculating sub module is for the 4th correction value of calculating the current encoded frame quantization parameter.
14. the quantification Adjustment System of picture quality saltus step as claimed in claim 13 is characterized in that,
In the piece statistical variable computing module, the piece statistical variable that calculates each piece is specially:
ti _ bloc k t , n = std ( f t deal ( i , j ) - f t + 1 deal ( i , j ) | f t deal ( i , j ) &Element; bloc k t , n deal and f t + 1 deal ( i , j ) &Element; block t + 1 , n deal )
Wherein, n piece of current processed frame is designated as
Figure FDA00003330772700064
N piece of next processed frame is designated as
Figure FDA00003330772700065
With
Figure FDA00003330772700067
In the same size;
Figure FDA00003330772700068
Pixel value for the capable j row of current processed frame i;
Figure FDA00003330772700069
Pixel value for the capable j row of next processed frame i; Ti_block T, nExpression piece statistical variable;
Figure FDA000033307727000610
Represent next processed frame;
std ( f t deal ( i , j ) - f t + 1 deal i , j ) | f t deal ( i , j ) &Element; bloc k t , n deal and f t + 1 deal ( i , j ) &Element; block t + 1 , n deal ) Expression is to f t Deal(i, j) with Carry out subtraction, wherein require f t Deal(i, j) belongs to
Figure FDA000033307727000613
And
Figure FDA000033307727000614
Belong to
Figure FDA000033307727000615
Then all are asked for
Figure FDA000033307727000616
Ask mean square deviation;
In the frame variable computing module, calculate frame variable TI_frame tBe specially:
TI _ frame t = sum n = 1,2 , . . . , number block ( sign ( ti _ block t , n , Thres 3 ) ) , Wherein
sign ( ti _ block t , n , Thres 3 ) = 1 , ti _ block t , n > Thres 3 0 , else
Wherein, Thres3 represents the 3rd decision threshold, and it is the decreasing function of fps, Thres3=8* (1+24/fps); The frame per second of fps presentation code film source;
Figure FDA00003330772700073
Expression all variable summations to satisfying condition; Number BlockRepresent the piece sum that a two field picture comprises;
In the 4th correction value calculating sub module, calculate the 4th correction value QP of current encoded frame quantization parameter t M4Be specially:
QP t m4=clip(QP t-clip(const-(TI_frame t>>bit),ΔQP min,ΔQP max),QP min,QP max)
Wherein,〉〉 the right displacement computing of expression; Δ QP MinThe expression quantization parameter is adjusted lower limit ,-10<Δ QP Min<Δ QP MaxΔ QP MaxExpression expression quantization parameter is adjusted the upper limit, 0<Δ QP Max<10; Const represents quantization parameter adjustment constant, const=(ceil (number Block* weight 3) bit)+1; Weight 3Represent the 3rd weight factor, 0.6≤weight 3<1; Ceil (x) expression is greater than the smallest positive integral of x; Bit represents the displacement constant, general 1<bit≤log 2Number Block-1.
CN201310231049.3A 2013-06-09 2013-06-09 Method and system for quantitative adjustment of image quality jump Expired - Fee Related CN103327329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310231049.3A CN103327329B (en) 2013-06-09 2013-06-09 Method and system for quantitative adjustment of image quality jump

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310231049.3A CN103327329B (en) 2013-06-09 2013-06-09 Method and system for quantitative adjustment of image quality jump

Publications (2)

Publication Number Publication Date
CN103327329A true CN103327329A (en) 2013-09-25
CN103327329B CN103327329B (en) 2017-04-12

Family

ID=49195826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310231049.3A Expired - Fee Related CN103327329B (en) 2013-06-09 2013-06-09 Method and system for quantitative adjustment of image quality jump

Country Status (1)

Country Link
CN (1) CN103327329B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104052998A (en) * 2014-05-26 2014-09-17 深圳百科信息技术有限公司 GOP layer ratio control and adjustment method and system based on exercise intensity
CN110996102A (en) * 2020-03-03 2020-04-10 眸芯科技(上海)有限公司 Video coding method and device for inhibiting intra-frame block respiration effect in P/B frame
CN112492122A (en) * 2020-11-17 2021-03-12 杭州微帧信息科技有限公司 VMAF-based method for adaptively adjusting sharpening parameters
CN113191021A (en) * 2021-05-26 2021-07-30 深圳大学 Trigger control method and device based on multiplicative measurement uncertainty and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1842162A (en) * 2005-03-28 2006-10-04 腾讯科技(深圳)有限公司 Motion image handling method in video coding
US20070274384A1 (en) * 2004-01-05 2007-11-29 Heiko Schwarz Encoding Method, Decoding Method, and Encoding Apparatus for a Digital Picture Sequence
CN101677398A (en) * 2008-09-19 2010-03-24 三星电子株式会社 Scene switching code rate control method
CN101827267A (en) * 2010-04-20 2010-09-08 上海大学 Code rate control method based on video image segmentation technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070274384A1 (en) * 2004-01-05 2007-11-29 Heiko Schwarz Encoding Method, Decoding Method, and Encoding Apparatus for a Digital Picture Sequence
CN1842162A (en) * 2005-03-28 2006-10-04 腾讯科技(深圳)有限公司 Motion image handling method in video coding
CN101677398A (en) * 2008-09-19 2010-03-24 三星电子株式会社 Scene switching code rate control method
CN101827267A (en) * 2010-04-20 2010-09-08 上海大学 Code rate control method based on video image segmentation technology

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104052998A (en) * 2014-05-26 2014-09-17 深圳百科信息技术有限公司 GOP layer ratio control and adjustment method and system based on exercise intensity
CN104052998B (en) * 2014-05-26 2019-10-25 深圳市梦网百科信息技术有限公司 A kind of GOP layer rate control adjusting method and system based on exercise intensity
CN110996102A (en) * 2020-03-03 2020-04-10 眸芯科技(上海)有限公司 Video coding method and device for inhibiting intra-frame block respiration effect in P/B frame
CN110996102B (en) * 2020-03-03 2020-05-22 眸芯科技(上海)有限公司 Video coding method and device for inhibiting intra-frame block respiration effect in P/B frame
CN112492122A (en) * 2020-11-17 2021-03-12 杭州微帧信息科技有限公司 VMAF-based method for adaptively adjusting sharpening parameters
CN113191021A (en) * 2021-05-26 2021-07-30 深圳大学 Trigger control method and device based on multiplicative measurement uncertainty and related equipment
CN113191021B (en) * 2021-05-26 2022-02-01 深圳大学 Trigger control method and device based on multiplicative measurement uncertainty and related equipment

Also Published As

Publication number Publication date
CN103327329B (en) 2017-04-12

Similar Documents

Publication Publication Date Title
US8000393B2 (en) Video encoding apparatus and video encoding method
US8891892B2 (en) Image encoding method using adaptive preprocessing scheme
CN110365983B (en) Macroblock-level code rate control method and device based on human eye vision system
JP4189358B2 (en) Image coding apparatus and method
CN104052998A (en) GOP layer ratio control and adjustment method and system based on exercise intensity
CN104301724A (en) Video processing method, coding device and decoding device
JP2005159419A5 (en)
CN103327329A (en) Method and system for quantitative adjustment of image quality jump
CN103167290B (en) A kind of Video coding exercise intensity quantization method and device
JP5078837B2 (en) Encoding apparatus, encoding apparatus control method, and computer program
KR20210145719A (en) Additional information for video coding with different compression levels
JP4958713B2 (en) Video encoding apparatus and control method thereof
CN105049853A (en) SAO coding method and system based on fragment source analysis
WO2005050564A2 (en) Detection of local visual space-time details in a video signal
CN103281532A (en) Quantification adjustment method and system based on exercise intensity detection
US9635359B2 (en) Method and apparatus for determining deblocking filter intensity
JP5111128B2 (en) Encoding apparatus, encoding apparatus control method, and computer program
CN112312134B (en) Encoding method, encoding device, electronic equipment and readable storage medium
CN104023236A (en) Method and system of adjusting chromaticity balance and quantization parameters
CN105306934A (en) Coding method and system for film source with low complexity
CN103079065B (en) A kind of video data handling procedure and device
CN103517067A (en) Initial quantitative parameter self-adaptive adjustment method and system
CN103227925B (en) A kind of self adaptation B frame coding method and system
JPWO2020008858A1 (en) Video coding device, video coding method, program
CN103024385B (en) A kind of YC balanced decoding method, system and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: The central Shenzhen city of Guangdong Province, 518057 Keyuan Road, Nanshan District science and Technology Park No. 15 Science Park Sinovac A Building 1 unit 403, No. 405 unit

Applicant after: Shenzhen Yunzhou Multimedia Technology Co., Ltd.

Address before: Unit B4 9 building 518057 Guangdong city of Shenzhen province Nanshan District high in the four EVOC Technology Building No. 31

Applicant before: Shenzhen Yunzhou Multimedia Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170412

Termination date: 20190609