CN103796036B - Coding parameter adjusting method and device - Google Patents

Coding parameter adjusting method and device Download PDF

Info

Publication number
CN103796036B
CN103796036B CN201410022408.9A CN201410022408A CN103796036B CN 103796036 B CN103796036 B CN 103796036B CN 201410022408 A CN201410022408 A CN 201410022408A CN 103796036 B CN103796036 B CN 103796036B
Authority
CN
China
Prior art keywords
resolution
coding parameter
current coding
reference field
meansigma methodss
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.)
Active
Application number
CN201410022408.9A
Other languages
Chinese (zh)
Other versions
CN103796036A (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.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network 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 Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201410022408.9A priority Critical patent/CN103796036B/en
Publication of CN103796036A publication Critical patent/CN103796036A/en
Application granted granted Critical
Publication of CN103796036B publication Critical patent/CN103796036B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a coding parameter adjusting method and device and belongs to the technical field of computers. The method comprises the steps that each image frame output in a preset time period is collected; the average value of the peak value noise ratios of all images output in the preset time period and the average value of structure similarity indexes are computed; and according to the average value of the peak value noise ratios and the average value of the structure similarity indexes, current coding parameters are adjusted. The peak value noise ratios and the structure similarity indexes can accurately reflect the current image quality, accordingly, the average value of the peak value noise ratios of all the images output in the preset time period and the average value of the structure similarity indexes are collected by computing, and then according to the average value of the peak value noise ratios and the average value of the structure similarity indexes, the current coding parameters are adjusted, so that the image quality coded by the adjusted current coding parameters is better.

Description

The method and apparatus adjusting coding parameter
Technical field
The present invention relates to field of computer technology, particularly to a kind of method and apparatus adjusting coding parameter.
Background technology
With the development of computer technology, internet video live broadcasting has attracted increasing user with its novel form. In internet video live broadcasting, because user is different to the image quality demand under different video scene, and different image quality is corresponding Coding parameter is also different.Therefore, in order that user can have higher visual experience under different video scene, how Adjust coding parameter, become the problem of those skilled in the art's more concern.
Correlation technique, when adjusting coding parameter, first passes through the code check in transport network layer collection preset time period, loses Bag rate, rtt(round-trip time, round-trip delay) etc. parameter, and then according to the code check collected in preset time period, lose The parameters such as the current code check of the parameter determinations such as bag rate, rtt, packet loss, rtt, then according to current code check, packet loss, rtt etc. Parameter judges current network quality, thus adjusting the current coding ginseng such as resolution and frame per second according to current network quality Number.For example, when network quality is good, heighten the current coding parameter such as resolution and frame per second;When network quality difference, turn down point The current coding parameter such as resolution and frame per second.
During realizing the present invention, inventor find correlation technique at least there is problems in that
Correlation technique when adjusting coding parameter, due to the parameters such as current code check, packet loss, rtt be according to default when Between collect in section code check, packet loss, the parameter determination such as rtt, and the code check collected in preset time period, packet loss, The parameters such as rtt can not react the parameters such as currently practical code check, packet loss, rtt exactly, and because identical coding parameter exists Under different scenes, the image quality encoding out is different, thus the picture being gone out according to coded by the coding parameter that correlation technique is adjusted Matter effect on driving birds is not good.
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.
Brief description
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, will make to required in embodiment description below Accompanying drawing be briefly described it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is the method flow diagram of the regulation coding parameter that the embodiment of the present invention one provides;
Fig. 2 is the method flow diagram of the regulation coding parameter that the embodiment of the present invention two provides;
Fig. 3 is the apparatus structure schematic diagram of the first regulation coding parameter that the embodiment of the present invention three provides;
Fig. 4 is the structural representation of the first adjustment module that the embodiment of the present invention three provides;
Fig. 5 is a kind of structural representation of first adjustment unit that the embodiment of the present invention three provides;
Fig. 6 is the apparatus structure schematic diagram that the second that the embodiment of the present invention three provides adjusts coding parameter;
Fig. 7 is the structural representation of another kind first adjustment unit that the embodiment of the present invention three provides;
Fig. 8 is the apparatus structure schematic diagram of the third regulation coding parameter that the embodiment of the present invention three provides.
Specific embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
Embodiment one
Embodiments provide a kind of method adjusting coding parameter, referring to Fig. 1, side provided in an embodiment of the present invention Method flow process includes:
101: collect each two field picture of output in preset time period.
102: 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.
103: the meansigma methodss of the meansigma methodss according to peak noise ratio and structural similarity index are entered to current coding parameter Row is adjusted.
As a kind of preferred embodiment, coding parameter includes resolution;
The meansigma methodss of the meansigma methodss according to peak noise ratio and structural similarity index are adjusted to current coding parameter Section, comprising:
The meansigma methodss of peak noise ratio and the first reference field are compared, and by the meansigma methodss of structural similarity index with Second reference field is compared;
According to comparative result, the resolution in current coding parameter is adjusted.
As a kind of preferred embodiment, according to comparative result, the resolution in current coding parameter is adjusted, Including:
If the meansigma methodss of peak noise ratio are more than the upper limit of the first reference field, and the meansigma methodss of structural similarity index are more than The upper limit of the second reference field, then judge whether the resolution in current coding parameter is less than the first default resolution;
If the resolution in current coding parameter is less than the first default resolution, improves according to the first default step-length and work as Resolution in front coding parameter.
As a kind of preferred embodiment, coding parameter also includes frame per second;
After improving the resolution in current coding parameter 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 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.
As a kind of preferred embodiment, according to comparative result, the resolution in current coding parameter is adjusted, Including:
If the meansigma methodss of peak noise ratio are less than the lower limit of the first reference field, and the meansigma methodss of structural similarity index are less than The lower limit of the second reference field, then judge whether the resolution in current coding parameter is more than the second default resolution;
If the resolution in current coding parameter is more than the second default resolution, reduces according to the first default step-length and work as Resolution in front coding parameter;
Wherein, the first default resolution is more than the second default resolution.
As a kind of preferred embodiment, coding parameter also includes frame per second;
After reducing the resolution in current coding parameter 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 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.
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 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.
psnr = 10 × log ( 255 2 mse )
mse = σ n - 1 framesize ( i n - p n ) framesize
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)]γ
l ( x , y ) = 2 μ x μ y + c 1 μ x 2 μ y 2 + c 1
c ( x , y ) = 2 σ x σ y + c 2 σ x 2 σ y 2 + c 2 ,
s ( x , y ) = σ xy + c 3 σ x σ y + c 3
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.

Claims (8)

1. a kind of method adjusting coding parameter is it is characterised in that methods described includes:
Collect each two field picture of output in preset time period;
The meansigma methodss calculating the peak noise ratio of all images of output in the described preset time period collected are similar with structure The meansigma methodss of property index;
The meansigma methodss of described peak noise ratio are compared with the first reference field, and described structural similarity index is average Value is compared with the second reference field;
If the meansigma methodss of described peak noise ratio are more than the upper limit of described first reference field, and the meansigma methodss of structural similarity index 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 differentiate Rate;
If the resolution in described current coding parameter is less than the first default resolution, improve institute according to the first default step-length State the resolution in current coding parameter.
2. method according to claim 1 is it is characterised in that described coding parameter also includes frame per second;
Described improve the resolution in described current coding parameter according to the first default step-length after, 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, carry according to the second default step-length Frame per second in high described present encoding parameter.
3. method according to claim 1 is it is characterised in that methods described also includes:
If the meansigma methodss of described peak noise ratio are less than the lower limit of described first reference field, and the meansigma methodss of structural similarity index 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 differentiate Rate;
If the resolution in described current coding parameter is more than the described second default resolution, according to the first default step-length fall Resolution in low described current coding parameter;
Wherein, the described first default resolution is more than the described second default resolution.
4. method according to claim 3 is it is characterised in that described coding parameter also includes frame per second;
Described reduce the resolution in described current coding parameter according to the first default step-length after, 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, subtract according to the second default step-length Frame per second in little described current coding parameter.
5. a kind of device adjusting coding parameter is it is characterised in that described device includes:
Collection module, for collecting each two field picture of output in preset time period;
Computing module, in the described preset time period collected for calculating, the peak noise ratio of all images of output is average Value and the meansigma methodss of structural similarity index;
First adjustment module, for being compared the meansigma methodss of described peak noise ratio with the first reference field, and by described knot The meansigma methodss of structure similarity indices are compared with the second reference field;When the meansigma methodss of described peak noise ratio are more than described first When the meansigma methodss of the upper limit of reference field and structural similarity index are more than the upper limit of described second reference field, judge current coding Whether the resolution in parameter is less than the first default resolution;When the resolution in described current coding parameter is pre- less than first If during resolution, improve the resolution in described current coding parameter according to the first default step-length.
6. device according to claim 5 is it is characterised in that 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;Work as institute When stating the upper limit that the frame per second in current coding parameter is less than described 3rd reference field, improve described working as according to the second default step-length Frame per second in front coding parameter.
7. device according to claim 5, it is characterised in that described first adjustment module, is additionally operable to make an uproar when described peak value The meansigma methodss of acoustic ratio are less than the lower limit of described first reference field, and the meansigma methodss of structural similarity index are less than described second reference During the lower limit in domain, judge whether the resolution in current coding parameter is more than the second default resolution;When described current volume When resolution in code parameter is more than the described second default resolution, reduce described current coding ginseng according to the first default step-length Resolution in number;
Wherein, the described first default resolution is more than the described second default resolution.
8. device according to claim 7 is it is characterised in that 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;Work as institute When stating the lower limit that the frame per second in current coding parameter is more than described 3rd reference field, reduce described working as according to the second default step-length Frame per second in front coding parameter.
CN201410022408.9A 2014-01-17 2014-01-17 Coding parameter adjusting method and device Active CN103796036B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410022408.9A CN103796036B (en) 2014-01-17 2014-01-17 Coding parameter adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410022408.9A CN103796036B (en) 2014-01-17 2014-01-17 Coding parameter adjusting method and device

Publications (2)

Publication Number Publication Date
CN103796036A CN103796036A (en) 2014-05-14
CN103796036B true CN103796036B (en) 2017-02-01

Family

ID=50671253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410022408.9A Active CN103796036B (en) 2014-01-17 2014-01-17 Coding parameter adjusting method and device

Country Status (1)

Country Link
CN (1) CN103796036B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105812621A (en) * 2014-12-31 2016-07-27 乐视致新电子科技(天津)有限公司 Method and device for self-adaptive adjustment of noise level of image
TWI599217B (en) * 2015-03-24 2017-09-11 Remote control voice co-play system and its cooperative play method
CN107343208B (en) * 2016-04-29 2019-10-11 掌赢信息科技(上海)有限公司 A kind of control video code rate method and electronic equipment
CN108024126A (en) * 2017-11-28 2018-05-11 北京潘达互娱科技有限公司 Network direct broadcasting video regulation method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110957A (en) * 2007-07-12 2008-01-23 上海交通大学 Video constant quality control method in the mode of pyramid type bidirectional estimation
WO2012171113A1 (en) * 2011-06-14 2012-12-20 Zhou Wang Method and system for structural similarity based rate-distortion optimization for perceptual video coding
CN103067720A (en) * 2013-02-05 2013-04-24 南京信息工程大学 Macroblock layer rate control method based on H264 video encoding standard
CN103237221A (en) * 2013-05-07 2013-08-07 南京信息工程大学 H.264 frame layer code rate control method based on structural similarity coefficient

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120275511A1 (en) * 2011-04-29 2012-11-01 Google Inc. System and method for providing content aware video adaptation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101110957A (en) * 2007-07-12 2008-01-23 上海交通大学 Video constant quality control method in the mode of pyramid type bidirectional estimation
WO2012171113A1 (en) * 2011-06-14 2012-12-20 Zhou Wang Method and system for structural similarity based rate-distortion optimization for perceptual video coding
CN103067720A (en) * 2013-02-05 2013-04-24 南京信息工程大学 Macroblock layer rate control method based on H264 video encoding standard
CN103237221A (en) * 2013-05-07 2013-08-07 南京信息工程大学 H.264 frame layer code rate control method based on structural similarity coefficient

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SSIM-Based Content Adaptive Frame Skipping for Low Bit Rate H.264 Video Coding;Ziguan cui,et.al.;《12th IEEE International Conference on ICCT》;20101014;第485页第2栏 *

Also Published As

Publication number Publication date
CN103796036A (en) 2014-05-14

Similar Documents

Publication Publication Date Title
CN103796036B (en) Coding parameter adjusting method and device
CN103179405B (en) A kind of multi-view point video encoding method based on multi-level region-of-interest
CN106791927A (en) A kind of video source modeling and transmission method based on deep learning
US9049420B1 (en) Relative quality score for video transcoding
CN102801997B (en) Stereoscopic image compression method based on interest depth
CN101835056B (en) Allocation method for optimal code rates of texture video and depth map based on models
WO2019165863A1 (en) Optimization method for encoding-block-level lagrangian multiplier of equirectangular image
CN102137258B (en) Method for controlling three-dimensional video code rates
CN104378636B (en) A kind of video encoding method and device
CN105354795B (en) One kind being based on the relevant self study super-resolution image acquisition method of phase and system
CN105340268A (en) Image processing device, image processing method, and image processing program
CN108810530A (en) A kind of AVC bit rate control methods based on human visual system
CN104079914A (en) Multi-view-point image super-resolution method based on deep information
CN110139112A (en) A kind of method for video coding based on JND model
CN106385584A (en) Spatial correlation-based distributed video compressive sensing adaptive sampling and coding method
CN105049838A (en) Objective evaluation method for compressing stereoscopic video quality
CN104346810A (en) Image quality level classification-based image quality assessment method
CN102801993A (en) Image signal processing device and image signal processing method
CN106303530A (en) A kind of bit rate control method merging vision perception characteristic
CN104023227A (en) Objective video quality evaluation method based on space domain and time domain structural similarities
WO2023159965A1 (en) Visual perception-based rate control method and device
CN101854555B (en) Video coding system based on prediction residual self-adaptation regulation
CN104780383B (en) A kind of 3D HEVC multi-resolution video coding methods
CN103561259A (en) Network conference visual quality automatic evaluation method for application sharing services
CN112437301B (en) Code rate control method and device for visual analysis, storage medium and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20140514

Assignee: All kinds of fruits garden, Guangzhou network technology company limited

Assignor: Guangzhou Huaduo Network Technology Co., Ltd.

Contract record no.: 2015990000266

Denomination of invention: Coding parameter adjusting method and device

License type: Common License

Record date: 20150511

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
CB02 Change of applicant information

Address after: 511446 Guangzhou City, Guangdong Province, Panyu District, South Village, Huambo Business District Wanda Plaza, block B1, floor 28

Applicant after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: 510655, Guangzhou, Whampoa Avenue, No. 2, creative industrial park, building 3-08,

Applicant before: Guangzhou Huaduo Network Technology Co., Ltd.

COR Change of bibliographic data
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210114

Address after: 511442 3108, 79 Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Patentee after: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 511446 28th floor, block B1, Wanda Plaza, Wanbo business district, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20140514

Assignee: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021440000053

Denomination of invention: Method and device for adjusting coding parameters

Granted publication date: 20170201

License type: Common License

Record date: 20210208

EE01 Entry into force of recordation of patent licensing contract