Content of the invention
In order to solve problem of the prior art, embodiments provide a kind of method adjusting coding parameter and dress
Put.Described technical scheme is as follows:
A kind of first aspect, there is provided method of regulation coding parameter, methods described includes:
Collect each two field picture of output in preset time period;
Calculate the meansigma methodss of peak noise ratio of all images of output and structure in the described preset time period collected
The meansigma methodss of similarity indices;
The meansigma methodss of the meansigma methodss according to described peak noise ratio and described structural similarity index are joined to current coding
Number is adjusted.
In conjunction with a first aspect, in the first possible implementation of first aspect, described coding parameter includes differentiating
Rate;
The meansigma methodss of the described meansigma methodss according to described peak noise ratio and described structural similarity index are to current volume
Code parameter is adjusted, comprising:
The meansigma methodss of described peak noise ratio are compared with the first reference field, and by described structural similarity index
Meansigma methodss are compared with the second reference field;
According to comparative result, the resolution in current coding parameter is adjusted.
In conjunction with a first aspect, in the possible implementation of the second of first aspect, described according to comparative result to working as
Resolution in front coding parameter is adjusted, comprising:
If the meansigma methodss of described peak noise ratio are more than the upper limit of described first reference field, and structural similarity index is flat
Average is more than the upper limit of described second reference field, then judge whether the resolution in current coding parameter is default less than first and divide
Resolution;
If the resolution in described current coding parameter is less than the first default resolution, carry according to the first default step-length
Resolution in high described current coding parameter.
In conjunction with a first aspect, in the third possible implementation of first aspect, described coding parameter also includes frame
Rate;
After resolution in the described described current coding parameter of raising according to default step-length, also include:
Judge whether the frame per second in current coding parameter is less than the upper limit of the 3rd reference field;
If the frame per second in described current coding parameter is less than the upper limit of described 3rd reference field, according to the second default step
The long frame per second improving in described present encoding parameter.
In conjunction with a first aspect, in the 4th kind of possible implementation of first aspect, described according to comparative result to working as
Resolution in front coding parameter is adjusted, comprising:
If the meansigma methodss of described peak noise ratio are less than the lower limit of described first reference field, and structural similarity index is flat
Average is less than the lower limit of described second reference field, then judge whether the resolution in current coding parameter is default more than second and divide
Resolution;
If the resolution in described current coding parameter is more than the described second default resolution, according to the first default step
The long resolution reducing in described current coding parameter;
Wherein, the described first default resolution is more than the described second default resolution.
In conjunction with a first aspect, in the 5th kind of possible implementation of first aspect, described coding parameter also includes frame
Rate;
After resolution in the described described current coding parameter of reduction according to default step-length, also include:
Judge whether the frame per second in current coding parameter is more than the lower limit of the 3rd reference field;
If the frame per second in described current coding parameter is more than the lower limit of described 3rd reference field, according to the second default step
The long frame per second reducing in described current coding parameter.
A kind of second aspect, there is provided device of regulation coding parameter, described device includes:
Collection module, for collecting each two field picture of output in preset time period;
Computing module, for calculating the peak noise ratio of all images of output in the described preset time period collected
Meansigma methodss and the meansigma methodss of structural similarity index;
First adjustment module, average for the meansigma methodss according to described peak noise ratio and described structural similarity index
Value is adjusted to current coding parameter.
In conjunction with second aspect, in the first possible implementation of second aspect, described first adjustment module, bag
Include:
First comparing unit, for being compared the meansigma methodss of described peak noise ratio with the first reference field, and by institute
State the meansigma methodss of structural similarity index and the second reference field is compared;
First adjustment unit, for being adjusted to the resolution in current coding parameter according to comparative result.
In conjunction with second aspect, in the possible implementation of the second of second aspect, described first adjustment unit, bag
Include:
First judgment sub-unit, for when described peak noise ratio meansigma methodss be more than described first reference field the upper limit and
When the meansigma methodss of structural similarity index are more than the upper limit of described second reference field, judge the resolution in current coding parameter
Whether it is less than the first default resolution;
First regulator unit, for being less than the first default resolution when the resolution in described current coding parameter
When, improve the resolution in described current coding parameter according to the first default step-length.
In conjunction with second aspect, in the third possible implementation of second aspect, described device, also include:
Second adjustment module, for judging whether the frame per second in current coding parameter is less than the upper limit of the 3rd reference field;
When the frame per second in described current coding parameter is less than the upper limit of described 3rd reference field, improve institute according to the second default step-length
State the frame per second in present encoding parameter.
In conjunction with second aspect, in the 4th kind of possible implementation of second aspect, described first adjustment unit, bag
Include:
Second judgment sub-unit, for being less than the lower limit of described first reference field when the meansigma methodss of described peak noise ratio,
And the meansigma methodss of structural similarity index be less than described second reference field lower limit when, judge the resolution in current coding parameter
Whether rate is more than the second default resolution;
Second regulator unit, for being more than the described second default resolution when the resolution in described current coding parameter
During rate, reduce the resolution in described current coding parameter according to the first default step-length;
Wherein, the described first default resolution is more than the described second default resolution.
In conjunction with second aspect, in the 5th kind of possible implementation of second aspect, described device, also include:
3rd adjustment module, for judging whether the frame per second in current coding parameter is more than the lower limit of the 3rd reference field;
When the frame per second in described current coding parameter is more than the lower limit of described 3rd reference field, reduce institute according to the second default step-length
State the frame per second in current coding parameter.
Technical scheme provided in an embodiment of the present invention has the benefit that
Because peak noise can reflect current image quality exactly than with structural similarity index, therefore, by meter
In the preset time period collected, the meansigma methodss of peak noise ratio of all images of output and structural similarity index is flat
Average, and then the meansigma methodss of the meansigma methodss according to peak noise ratio and structural similarity index adjust to current coding parameter
Section so that the image quality quality that goes out coded by current coding parameter after adjusting more preferably.
Embodiment two
With the development of computer technology, internet video live broadcasting gradually enters into the life of people.In internet video live broadcasting,
Because under different video scene, user is different to the demand of image quality, and different coding parameters decides different pictures
Matter, therefore, in order to lift the visual experience of user, embodiments provides a kind of method adjusting coding parameter.In order to
Readily appreciate, the content in conjunction with above-described embodiment one is included as a example resolution by coding parameter, the embodiment of the present invention is provided
Regulation coding parameter method carry out explanation explained in detail.Referring to Fig. 2, method flow bag provided in an embodiment of the present invention
Include:
201: collect each two field picture of output in preset time period.
Each two field picture due to exporting in preset time period is the basis of subsequent adjustment coding parameter, therefore, in order that
Coding parameter can be adjusted, the method that the present embodiment provides needs to collect each frame of output in preset time period in subsequent step
Image.
Wherein, preset time period can be 1 minute, 2 minutes, 5 minutes etc., the embodiment of the present invention is not made to preset time period
Specific restriction.With regard to collecting the mode of each two field picture of output in preset time period, including but not limited to filled by collection
Put each two field picture collecting output in preset time period, and each frame figure that collection device is collected in preset time period
As each two field picture in the preset time period collected.
Due to each two field picture of output in the preset time period of collection in this step, subsequently coding parameter is being adjusted
To be continuing with during section, therefore, after method each two field picture of output in collection preset time period that the present embodiment provides,
Also include the step that each two field picture of output in the preset time period collected is stored.With regard to storing preset time period
The mode of each two field picture of interior output, the present embodiment does not specifically limit, including but not limited to by collect default when
Between in section each two field picture of output store in a queue.
202: calculate the meansigma methodss of peak noise ratio of all images of output and structure in the preset time period collected
The meansigma methodss of similarity indices.
Wherein, peak noise ratio is to represent that a signal maximum possible power and the destructiveness of its expression precision of impact are made an uproar
The ratio of acoustical power.Because, after compression of images, the image of generally output to a certain extent all can with original image not
With therefore, in order to weigh the image quality of output it will usually calculate the peak noise ratio of the image of output, and then according to obtaining
Peak noise ratio weigh output image quality.Concrete the value of peak noise ratio is bigger when weighing, and it is fewer to represent distortion,
The image exporting is closer to original image.Structural similarity index is a kind of New Set weighing two width image similarities.Warp
It is commonly used in image procossing, especially in image denoising process, its value is bigger, and the similarity representing two width images is higher.
Although the peak noise of each two field picture can reflect the image quality of each two field picture than with structural similarity index,
But in order to more accurately react current image quality, method that the present embodiment provides needs to calculate defeated in the preset time period collected
The meansigma methodss of peak noise ratio of all images going out and the meansigma methodss of structural similarity index, so that subsequent step can be according to meter
The meansigma methodss of peak noise ratio of all images of output and structural similarity index in the preset time period collected calculated
Meansigma methodss adjust current coding parameter.
With regard to calculating the meansigma methodss of the peak noise ratio of all images of output in the preset time period collected, including but
It is not limited to following steps:
First, calculate the value of the peak noise ratio of each two field picture of output in the preset time period collected;
Secondly, by the peak noise of all images collected in preset time period than summation, obtain in preset time period
The sum of the peak noise ratio of all images collected;
Again, by the peak noise ratio of all images collected in the preset time period obtaining and and preset time period
The picture number inside collected is made to compare, such that it is able to obtain the average of the peak noise ratio of all images of output in preset time period
Value.
Specifically, when calculating the value of the peak noise ratio of each two field picture of output in the preset time period collected,
Can be calculated using equation below.
Wherein, psnr represents peak noise ratio, and mse represents mean square deviation, and framesize represents current resolution, inTable
Show expression original image, inIn n represent the nth pixel of original image, pnRepresent the image of output, pnIn n represent
N-th pixel of the image of output.
So that framesize is 320 × 240 as a example.During concrete calculating, calculate first between original image and the image of output
From the sum of the 1st difference to the 320th × 240 pixel for the pixel, then by between the original image obtaining and the image of output from
1st pixel is made to compare to the difference of the 320th × 240 pixel with current resolution, obtains the figure of original image and output
Mean square deviation mse of picture, and then the mse obtaining is updated to peak noise ratio in the computing formula of psnr, finally give output
The peak noise ratio of image.
When further, due to being encoded to image using coding system, the image of original image and output all will be by
It is decomposed into tri- components of y, u and v.Wherein, y represents luminance signal, u and v represents two carrier chrominance signals.Therefore, using above-mentioned
When the computing formula of peak noise ratio calculates the peak noise ratio of each two field picture, need the peak value of these three components of y, u and v
Noise ratio is individually calculated.
Concrete calculate these three components of y, u and v peak noise ratio when, the peak noise of y-component ratio can be set for y_
For u_psnr, the peak noise of v component ratio for v_psnr, then adopts above-mentioned peak noise to the peak noise of psnr, u component ratio
The computing formula of ratio is calculated, except that when calculating the peak noise ratio of y, u and v component, the resolution of use is not
With.
Below still so that framesize is 320 × 240 as a example.For y_psnr in concrete calculating, framesize is 320
× 240, for u_psnr in concrete calculating, framesize is (320 × 240)/4, for v_psnr in concrete calculating,
Framesize is (320 × 240)/4, after determining framesize, the calculating of the peak noise ratio of y, u and v component
, with the calculating process of above-mentioned peak noise ratio, here is omitted for journey.
Y, the u and v component having calculated each two field picture peak noise ratio afterwards, the peak value for each two field picture is made an uproar
Acoustic ratio can be calculated using equation below:
f_psnr=(y_psnr*4+u_psnr+v_psnr)/6
Specifically, if the y_psnr calculating a two field picture is 20, u_psnr is 20 for 20, v_psnr, according to above-mentioned public affairs
Formula, f_psnr=(y_psnr*4+u_psnr+v_psnr)/6=(20*4+20+20)/6=20.
Further, calculate the peak noise ratio of each two field picture afterwards, in the preset time period that calculating is collected
During the value of peak noise ratio of all images of output, can be using the peak of all images of output in above-mentioned calculating preset time period
The method of the meansigma methodss of value noise ratio is calculated.For example, if the image collected in preset time period has 4 frames, this 4 two field picture
The value of peak noise ratio be respectively 20,30,25,25, then the peak noise ratio of all images of output in preset time period
Meansigma methodss are (20+30+25+25)/4=25.
When calculating the meansigma methodss of the structural likeness in form index of all images of output in the preset time period collected, by
In structure similarity index, from image definition is independent of brightness, contrast and reflection scene by the angle that image forms, object is tied
The attribute of structure, by distortion modeling be brightness, the combination of contrast and three different factors of structure, and the estimating as brightness with average
Meter, the estimation that standard deviation is spent as a comparison, covariance as the tolerance of structure similarity degree, therefore, is calculating collect pre-
If in the time period during meansigma methodss of structural similarity index of all images of output, can directly calculate the structure of all images
The meansigma methodss of similarity indices.
In structural similar index, can be calculated using equation below:
Ssim (x, y)=[l (x, y)]α[c (x, y)]β[s (x, y)]γ
Wherein, x is original image signal, and y is the picture signal of output, and ssim (x, y) is that the structural similarity of x and y refers to
Mark, l (x, y) is the brightness comparing x and y, and c (x, y) compares the contrast of x and y, and σ (x, y) is the structure comparing x and y, α > 0, β
> 0, γ > 0, for adjusting the parameter of l (x, y), c (x, y), σ (x, y) relative importance, μxAnd μy、σxAnd σyIt is respectively the picture of x and y
The meansigma methodss of element and standard deviation, σxyThe co-variation heteromerism of the pixel for x and y, c1、c2、c3It is all constant, in order to maintain l (x, y), c
(x, y), σ (x, y) stablize.
203: the meansigma methodss of peak noise ratio and the first reference field are compared, and structural similarity index is average
Value is compared with the second reference field.
Wherein, the first reference field is the scope judging whether to need the pre-set peak value noise ratio adjusting resolution, and it has
Upper and lower bound.The size of the first reference field can be (28.5,36) or (38,40), and the present embodiment is not joined to first
The size examining domain is defined.Second reference field is to judge whether to need the model of the preset structure similarity indices adjusting resolution
Enclose, it equally has upper and lower bound.The size of the second reference field can be (0.1,0.5) or (0.6,0.89), this
Embodiment does not make specific restriction to the size of the second reference field.
Because the meansigma methodss of peak noise ratio and the meansigma methodss of structural similarity index can react current image quality,
Therefore, the present embodiment provide method by the meansigma methodss of peak noise ratio and the first reference field are compared, by structure phase
Meansigma methodss like property index are compared with the second reference field, so that can be adjusted according to the comparative result of this step in subsequent step
Current resolution.
The meansigma methodss of peak noise ratio and the first reference field are compared, by the meansigma methodss of structural similarity index and the
Two reference field are compared, comparative result including but not limited to several situations as follows:
The first situation: the meansigma methodss of peak noise ratio are more than the upper limit of the first reference field, and structural similar index
Meansigma methodss are more than the upper limit of the second reference field;
Second situation: the meansigma methodss of peak noise ratio are less than the lower limit of the first reference field, and structural similarity index
Meansigma methodss are less than the lower limit of the second reference field;
The third situation: the meansigma methodss of peak noise ratio are more than the upper limit of the first reference field, and structural similarity index
Meansigma methodss are less than the lower limit of the second reference field;
4th kind of situation: the meansigma methodss of peak noise ratio are less than the lower limit of the first reference field, and structural similarity index
Meansigma methodss are more than the upper limit of the second reference field.
204: according to comparative result, the resolution in current coding parameter is adjusted.
Due to being compared the meansigma methodss of peak noise ratio and the first reference field in above-mentioned steps 203, by structure phase
Meansigma methodss like property index are compared with the second reference field, therefore, this step on the basis of above-mentioned steps 203 will according to than
Relatively result is adjusted to the resolution in current coding parameter.
The first situation: the meansigma methodss of peak noise ratio are more than the upper limit of the first reference field, and structural similarity index
Meansigma methodss are more than the upper limit of the second reference field;
For the first situation, it is more than the upper limit of the first reference field in the meansigma methodss judging peak noise ratio, and structure
When the meansigma methodss of similarity indices are more than the second reference field, in order to further judge whether to need to adjust current resolution,
The method that the present embodiment provides also will determine that whether the resolution in current coding parameter presets resolution less than first, and then
Judge whether to adjust currently practical resolution according to judged result.Wherein, the first default resolution can be 320 × 240,
360 × 480 etc., the present embodiment is not defined to the size of the first default resolution.
When judging whether to adjust currently practical resolution according to judged result, including but not limited to the following two kinds result:
The first result: if the resolution in current coding parameter is less than the first default resolution, pre- according to first
If step-length improves the resolution in current coding parameter;
For the first result, when the resolution in current coding parameter is less than the first default resolution, now press
The image quality showing according to current resolution is poor, in order to improve the image quality of display, needs according to the first default step-length
Improve current resolution.But due to being limited by current business, every kind of business all has the upper limit resolution of permission, therefore, exist
When improving current resolution according to the first default step-length, the current resolution of the raising being not unlimited, but will be current
Till resolution brings up to upper limit resolution.
Wherein, the first default step-length can be 10 pixels, 20 pixels, 30 pixels etc., and the present embodiment is not to first
The size of default step-length makees specific restriction.
Second result: if the resolution in current coding parameter is more than the first default resolution, no longer adjust current
Resolution.
For second result, the image quality due to now showing according to current resolution is preferable, it is therefore not necessary to adjust
Save current resolution.
For said process, explanation explained in detail will be carried out with a specific example below for the ease of understanding.
For example, the first reference field is (10,35), and the second reference field is (0.3,0.8), the first default resolution is 1024 ×
960.If the meansigma methodss calculating the peak noise ratio of all images of output in the preset time period collected are 38, structural phase
Meansigma methodss like index are 0.9.The meansigma methodss of peak noise ratio and the first reference field are compared, by structural similar index
Meansigma methodss and the second reference field when being compared, because the meansigma methodss 38 of peak noise ratio are more than the upper limit of the first reference field
35, the meansigma methodss 0.9 of structural similar index are more than the upper limit 0.8 of the second reference field, in order to further determine whether needs
Adjust current resolution, now need to judge whether the resolution in current coding parameter is less than the first default resolution.
If the resolution in current coding parameter is 320 × 240, because 320 × 240 are less than 1024 × 960, then default according to first
Resolution in step-length raising present encoding parameter is to upper limit resolution;If the resolution in current coding parameter be 1024 ×
1024, because 1024 × 1024 are more than 1024 × 960, then now need not adjust the resolution in present encoding parameter.
Second situation: the meansigma methodss of peak noise ratio are less than the lower limit of the first reference field, and structural similarity index
Meansigma methodss are less than the lower limit of the second reference field;
For second situation, it is less than the lower limit of the first reference field in the meansigma methodss judging peak noise ratio, and structure
When the meansigma methodss of similarity indices are less than the second reference field, in order to further judge whether to need to adjust current resolution,
The method that the present embodiment provides also will determine that whether the resolution in current coding parameter presets resolution more than second, and then
Judge whether to adjust currently practical resolution according to judged result.Wherein, the second default resolution can be 120 × 240,
360 × 480 etc., but no matter the second value presetting resolution is how many, and the second default resolution is total to be less than the first default resolution.
When judging whether to adjust currently practical resolution according to judged result, including but not limited to the following two kinds result:
The first result: if the resolution in current coding parameter is more than the second default resolution, pre- according to first
If step-length reduces the resolution in current coding parameter;
For the first result, when the resolution in current coding parameter is more than the second default resolution, now press
The image quality showing according to current resolution is poor, in order to improve the image quality of display, needs according to the first default step-length
Reduce current resolution.But due to being limited by current business, every kind of business has the lower limit resolution of permission, therefore, is pressing
When reducing current resolution according to the first default step-length, the current resolution of the reduction being not unlimited, but current is divided
Till resolution is reduced to upper limit resolution.
Second result: if the resolution in current coding parameter is less than the second default resolution, now according to current
The image quality that shows of resolution preferably, current resolution need not be adjusted.
For said process, explanation explained in detail will be carried out with a specific example below for the ease of understanding.
For example, the first reference field is (23,35), and the second reference field is (0.5,0.9), the second default resolution is 480 ×
560.If the meansigma methodss calculating the peak noise ratio of all images of output in the preset time period collected are 20, structural phase
Meansigma methodss like index are 0.4, the meansigma methodss of peak noise ratio and the first reference field are compared, by structural similar index
Meansigma methodss and the second reference field when being compared, because the meansigma methodss 20 of peak noise ratio are less than the upper limit of the first reference field
23, the meansigma methodss 0.4 of structural similar index are less than the upper limit 0.5 of the second reference field, in order to further determine whether needs
Adjust current resolution, now need to judge whether the resolution in current coding parameter is more than the second default resolution.
If the resolution in current coding parameter is 480 × 960, because 480 × 960 are more than 480 × 560, then default according to first
Resolution in step-length reduction present encoding parameter is to lower limit resolution;If the resolution in current coding parameter be 320 ×
240, because 320 × 240 are less than 480 × 560, then now need not adjust the resolution in present encoding parameter.
The third situation: the meansigma methodss of peak noise ratio are less than the lower limit of the first reference field, and structural similarity index
Meansigma methodss are less than the lower limit of the second reference field;
For the third situation, due to being less than the lower limit of the first reference field when the meansigma methodss of peak noise ratio, and structure phase
When being less than the lower limit of the second reference field like the meansigma methodss of property index, image quality show according to current resolution is preferable, because
This, need not adjust current resolution for the third situation.
4th kind of situation: the meansigma methodss of peak noise ratio are less than the lower limit of the first reference field, and structural similarity index
Meansigma methodss are more than the upper limit of the second reference field.
For the 4th kind of situation: due to being less than the lower limit of the first reference field when the meansigma methodss of peak noise ratio, and structure phase
When being more than the upper limit of the second reference field like the meansigma methodss of property index, image quality show according to current resolution is preferable, because
This, need not adjust current resolution for the 4th kind of situation.
Said process only taking adjust the resolution in coding parameter is as a example introduced, in order that the image quality of display is more
Good, below by the basis of the resolution in above-mentioned regulation coding parameter, taking adjust the frame per second in coding parameter as a example carry out
Introduce.Frame per second in regulation parameter, including but not limited to the following two kinds situation:
The first situation: on the basis of improve the resolution in current coding parameter according to default step-length, adjust and compile
Frame per second in code parameter, including but not limited to following manner:
Judge whether the frame per second in current coding parameter is less than the upper limit of the 3rd reference field;
If the frame per second in current coding parameter is less than the upper limit of the 3rd reference field, improves according to the second default step-length and work as
Frame per second in front coding parameter.
Wherein, the 3rd reference field is the scope judging whether to need to adjust the preset frame rate of frame per second, its have the upper limit and under
Limit.The size of the 3rd reference field can be (10,20) or (50,70), the present embodiment not size to the 3rd reference field
It is defined.Second default step-length is 2,3,5 etc., and the present embodiment is not defined to the size of the second default step-length.
It should be noted that when whether the frame per second in judging current coding parameter is less than the upper limit of the 3rd reference field,
If judging, frame per second in current coding parameter is more than the upper limit of the 3rd reference field, now, due to according to current frame per second
The image quality of display is preferable, it is therefore not necessary to adjust the frame per second in coding parameter.
For said process, in order to make it easy to understand, explanation explained in detail will be carried out with a specific example below.
For example, the 3rd reference field is (10,20).If the frame per second in current coding parameter is 16, because 16 are less than 20, that is,
Frame per second in current coding parameter is less than the upper limit of the 3rd reference field, therefore, will improve current volume according to the second default step-length
Frame per second in code parameter.
Second situation: on the basis of reduce the resolution in current coding parameter according to default step-length, adjust and compile
Frame per second in code parameter, including but not limited to following manner:
Judge whether the frame per second in current coding parameter is more than the lower limit of the 3rd reference field;
If the frame per second in current coding parameter is more than the lower limit of the 3rd reference field, reduces according to the second default step-length and work as
Frame per second in front coding parameter.
It should be noted that when whether the frame per second in judging current coding parameter is more than the lower limit of the 3rd reference field,
If judging, frame per second in current coding parameter is less than the upper limit to three reference field, now, due to according to current frame per second
The image quality of display is preferable, it is therefore not necessary to adjust the frame per second in coding parameter.
For said process, in order to make it easy to understand, explanation explained in detail will be carried out with a specific example below.
For example, the 3rd reference field is (12,21).If the frame per second in current coding parameter is 15, because 15 are more than 12, that is,
Frame per second in current coding parameter is more than the lower limit of the 3rd reference field, therefore, now will reduce according to the second default step-length and work as
Frame per second in front coding parameter.
Because peak noise can reflect current image quality exactly than with structural similarity index, therefore, the present invention
The method that embodiment provides, in the preset time period collected by calculating, the peak noise ratio of all images of output is average
Value and the meansigma methodss of structural similarity index, and then the meansigma methodss of the meansigma methodss according to peak noise ratio and structural similarity index
Current coding parameter is adjusted so that the quality of the image quality going out coded by current coding parameter after adjusting more preferably.
Embodiment three
Embodiments provide a kind of device adjusting coding parameter, this device be used for executing above-described embodiment one or
The method of the regulation coding parameter that embodiment two is provided.Referring to Fig. 3, this device includes:
Collection module 301, for collecting each two field picture of output in preset time period;
Computing module 302, for calculating the peak noise ratio of all images of output in the preset time period collected
Meansigma methodss and the meansigma methodss of structural similarity index;
First adjustment module 303, for the meansigma methodss pair of the meansigma methodss according to peak noise ratio and structural similarity index
Current coding parameter is adjusted.
Referring to Fig. 4, the first adjustment module 303, comprising:
First comparing unit 3031, for being compared the meansigma methodss of peak noise ratio and the first reference field, and will tie
The meansigma methodss of structure similarity indices are compared with the second reference field;
First adjustment unit 3032, for being adjusted to the resolution in current coding parameter according to comparative result.
Referring to Fig. 5, the first adjustment unit 3032, comprising:
First judgment sub-unit 30321, for being more than the upper limit and the knot of the first reference field when the meansigma methodss of peak noise ratio
When the meansigma methodss of structure similarity indices are more than the upper limit of the second reference field, judge whether the resolution in current coding parameter is little
In the first default resolution;
First regulator unit 30322, when being less than the first default resolution for the resolution in current coding parameter,
Improve the resolution in current coding parameter according to the first default step-length.
Referring to Fig. 6, this device, also include:
Whether the second adjustment module 304, for judging the frame per second in current coding parameter less than the 3rd reference field
Limit;When the frame per second in current coding parameter is less than the upper limit of the 3rd reference field, improve current volume according to the second default step-length
Frame per second in code parameter.
Referring to Fig. 7, the first adjustment unit 3032, comprising:
Second judgment sub-unit 30323, for being less than the lower limit of the first reference field when the meansigma methodss of peak noise ratio, and ties
When the meansigma methodss of structure similarity indices are less than the lower limit of the second reference field, judge whether the resolution in current coding parameter is big
In the second default resolution;
Second regulator unit 30324, for being more than the second default resolution when the resolution in current coding parameter
When, reduce the resolution in current coding parameter according to the first default step-length.
Referring to Fig. 8, this device, also include:
Whether the 3rd adjustment module 305, for judging the frame per second in current coding parameter more than under the 3rd reference field
Limit;When the frame per second in current coding parameter is more than the lower limit of the 3rd reference field, reduce current according to the second default step-length
Frame per second in coding parameter.
In sum, because peak noise can reflect current image quality exactly than with structural similarity index, because
This, device provided in an embodiment of the present invention, made an uproar by calculating the peak value of all images of output in the preset time period collected
The meansigma methodss of acoustic ratio and the meansigma methodss of structural similarity index, and then referred to structural similarity according to the meansigma methodss of peak noise ratio
Current coding parameter is adjusted target meansigma methodss so that the image quality that goes out coded by current coding parameter after adjusting
Quality is more preferably.
It should be understood that above-described embodiment provide regulation coding parameter device adjust coding parameter when, only with
The division of above-mentioned each functional module is illustrated, and in practical application, can distribute above-mentioned functions by not as desired
Same functional module completes, and the internal structure that will adjust the device of coding parameter is divided into different functional modules, to complete
All or part of function described above.In addition, the device of regulation coding parameter that above-described embodiment provides encodes with adjusting
The embodiment of the method for parameter belongs to same design, and it implements process and refers to embodiment of the method, repeats no more here.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can pass through hardware
To complete it is also possible to the hardware being instructed correlation by program is completed, described program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read only memory, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all spirit in the present invention and
Within principle, any modification, equivalent substitution and improvement made etc., should be included within the scope of the present invention.