CN103796036A - Coding parameter adjusting method and device - Google Patents

Coding parameter adjusting method and device Download PDF

Info

Publication number
CN103796036A
CN103796036A CN201410022408.9A CN201410022408A CN103796036A CN 103796036 A CN103796036 A CN 103796036A CN 201410022408 A CN201410022408 A CN 201410022408A CN 103796036 A CN103796036 A CN 103796036A
Authority
CN
China
Prior art keywords
coding parameter
resolution
current coding
mean value
reference field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410022408.9A
Other languages
Chinese (zh)
Other versions
CN103796036B (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

Images

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

Regulate the method and apparatus of coding parameter
Technical field
The present invention relates to field of computer technology, particularly a kind of method and apparatus that regulates coding parameter.
Background technology
Along with the development of computer technology, internet video live broadcasting has attracted increasing user with its novel form.In the time of internet video live broadcasting, because user is different to the image quality demand under different video scene, and coding parameter corresponding to different image quality is also different.Therefore, in order to make user can there is higher visual experience under different video scene, how to regulate coding parameter, become the problem that those skilled in the art comparatively pay close attention to.
Correlation technique is in the time regulating coding parameter, first collect code check, packet loss, the RTT(Round-Trip Time in Preset Time section by transport network layer, round-trip delay) etc. parameter, and then determine the parameters such as current code check, packet loss, RTT according to parameters such as the code check of collecting in Preset Time section, packet loss, RTT, then judge current network quality according to parameters such as current code check, packet loss, RTT, thereby regulate the current coding parameters such as resolution and frame per second according to current network quality.For example, in the time that network quality is good, heighten the current coding parameter such as resolution and frame per second; In the time that network quality is poor, turn down the current coding parameter such as resolution and frame per second.
Realizing in process of the present invention, inventor finds that correlation technique at least exists following problem:
Correlation technique is in the time regulating coding parameter, because the parameters such as current code check, packet loss, RTT are to determine according to parameters such as the code check of collecting in Preset Time section, packet loss, RTT, and the parameters such as the code check of collecting in Preset Time section, packet loss, RTT can not be reacted the parameters such as the code check, packet loss, RTT of current reality exactly, and because identical coding parameter is under different scenes, the image quality of encoding out is different, thus according to correlation technique regulate coding parameter coded go out image quality poor effect.
Summary of the invention
In order to solve the problem of prior art, the embodiment of the present invention provides a kind of method and apparatus that regulates coding parameter.Described technical scheme is as follows:
First aspect, provides a kind of method that regulates coding parameter, and described method comprises:
Collect each two field picture of output in Preset Time section;
The mean value of peak noise ratio and the mean value of structural similarity index of all images of output in the described Preset Time section that calculating is collected;
According to the mean value of the mean value of described peak noise ratio and described structural similarity index, current coding parameter is regulated.
In conjunction with first aspect, in the possible implementation of the first of first aspect, described coding parameter comprises resolution;
The described mean value according to the mean value of described peak noise ratio and described structural similarity index regulates current coding parameter, comprising:
The mean value of described peak noise ratio and the first reference field are compared, and the mean value of described structural similarity index and the second reference field are compared;
According to comparative result, the resolution in current coding parameter is regulated.
In conjunction with first aspect, in the possible implementation of the second of first aspect, describedly according to comparative result, the resolution in current coding parameter is regulated, comprising:
If the mean value of described peak noise ratio is greater than the upper limit of described the first reference field, and the mean value of structural similarity index is greater than the upper limit of described the second reference field, judges whether the resolution in current coding parameter is less than the first default resolution;
If the resolution in described current coding parameter is less than the first default resolution, improve the resolution in described current coding parameter according to the first default step-length.
In conjunction with first aspect, in the third possible implementation of first aspect, described coding parameter also comprises frame per second;
Described according to after the resolution in the described current coding parameter of default step-length raising, also comprise:
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 the 3rd reference field, improve the frame per second in described present encoding parameter according to the second default step-length.
In conjunction with first aspect, in the 4th kind of possible implementation of first aspect, describedly according to comparative result, the resolution in current coding parameter is regulated, comprising:
If the mean value of described peak noise ratio is less than the lower limit of described the first reference field, and the mean value of structural similarity index is less than the lower limit of described the second reference field, judges whether the resolution in current coding parameter is greater than the second default resolution;
If the resolution in described current coding parameter is greater than the described second default resolution, reduce the resolution in described current coding parameter according to the first default step-length;
Wherein, the described first default resolution is greater than the described second default resolution.
In conjunction with first aspect, in the 5th kind of possible implementation of first aspect, described coding parameter also comprises frame per second;
Described according to after the resolution in the described current coding parameter of default step-length reduction, also comprise:
Judge whether the frame per second in current coding parameter is greater than the lower limit of the 3rd reference field;
If the frame per second in described current coding parameter is greater than the lower limit of described the 3rd reference field, reduce the frame per second in described current coding parameter according to the second default step-length.
Second aspect, provides a kind of device that regulates coding parameter, and described device comprises:
Collection module, for collecting each two field picture of exporting in Preset Time section;
Computing module, for calculating the mean value of peak noise ratio and the mean value of structural similarity index of all images of exporting in the described Preset Time section of collecting;
The first adjustment module, for regulating current coding parameter according to the mean value of the mean value of described peak noise ratio and described structural similarity index.
In conjunction with second aspect, in the possible implementation of the first of second aspect, described the first adjustment module, comprising:
The first comparing unit, for the mean value of described peak noise ratio and the first reference field are compared, and compares the mean value of described structural similarity index and the second reference field;
The first regulon, for regulating the resolution of current coding parameter according to comparative result.
In conjunction with second aspect, in the possible implementation of the second of second aspect, described the first regulon, comprising:
The first judgment sub-unit, for be greater than when the mean value of described peak noise ratio that the upper limit of described the first reference field and the mean value of structural similarity index is greater than described the second reference field upper in limited time, judge whether the resolution in current coding parameter is less than the first default resolution;
First regulates subelement, when be less than the first default resolution when the resolution of described current coding parameter, according to the resolution in the described current coding parameter of the first default step-length raising.
In conjunction with second aspect, in the third possible implementation of second aspect, described device, also comprises:
The second adjustment module, for judging whether the frame per second of current coding parameter is less than the upper limit of the 3rd reference field; Prescribe a time limit when the frame per second in described current coding parameter is less than the upper of described the 3rd reference field, improve the frame per second in described present encoding parameter according to the second default step-length.
In conjunction with second aspect, in the 4th kind of possible implementation of second aspect, described the first regulon, comprising:
The second judgment sub-unit, for be less than the lower limit of described the first reference field when the mean value of described peak noise ratio, and the mean value of structural similarity index is less than the lower of described the second reference field prescribes a time limit, judge whether the resolution in current coding parameter is greater than the second default resolution;
Second regulates subelement, when be greater than the described second default resolution when the resolution of described current coding parameter, according to the resolution in the described current coding parameter of the first default step-length reduction;
Wherein, the described first default resolution is greater than the described second default resolution.
In conjunction with second aspect, in the 5th kind of possible implementation of second aspect, described device, also comprises:
The 3rd adjustment module, for judging whether the frame per second of current coding parameter is greater than the lower limit of the 3rd reference field; Prescribe a time limit when the frame per second in described current coding parameter is greater than the lower of described the 3rd reference field, reduce the frame per second in described current coding parameter according to the second default step-length.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
Due to peak noise than and structural similarity index can reflect exactly current image quality, therefore, the mean value of peak noise ratio of all images of exporting in the Preset Time section of collecting by calculating and the mean value of structural similarity index, and then according to the mean value of the mean value of peak noise ratio and structural similarity index, current coding parameter is regulated, make regulate after current coding parameter coded go out image quality quality better.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow diagram of the adjusting coding parameter that provides of the embodiment of the present invention one;
Fig. 2 is the method flow diagram of the adjusting coding parameter that provides of the embodiment of the present invention two;
Fig. 3 is the apparatus structure schematic diagram that the first of providing of the embodiment of the present invention three regulates coding parameter;
Fig. 4 is the structural representation of the first adjustment module of providing of the embodiment of the present invention three;
Fig. 5 is the structural representation of a kind of the first regulon of providing of the embodiment of the present invention three;
Fig. 6 is the apparatus structure schematic diagram that the second of providing of the embodiment of the present invention three regulates coding parameter;
Fig. 7 is the structural representation of another kind the first regulon of providing of the embodiment of the present invention three;
Fig. 8 be the embodiment of the present invention three provide the third regulate the apparatus structure schematic diagram of coding parameter.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment mono-
The embodiment of the present invention provides a kind of method that regulates coding parameter, and referring to Fig. 1, the method flow that the embodiment of the present invention provides comprises:
101: each two field picture of collecting output in Preset Time section.
102: the mean value of peak noise ratio and the mean value of structural similarity index that calculate all images of output in the Preset Time section of collecting.
103: according to the mean value of the mean value of peak noise ratio and structural similarity index, current coding parameter is regulated.
As a kind of preferred embodiment, coding parameter comprises resolution;
According to the mean value of the mean value of peak noise ratio and structural similarity index, current coding parameter is regulated, comprising:
The mean value of peak noise ratio and the first reference field are compared, and the mean value of structural similarity index and the second reference field are compared;
According to comparative result, the resolution in current coding parameter is regulated.
As a kind of preferred embodiment, according to comparative result, the resolution in current coding parameter is regulated, comprising:
If the mean value of peak noise ratio is greater than the upper limit of the first reference field, and the mean value of structural similarity index is greater than the upper limit of the second reference field, judges 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, improve the resolution in current coding parameter according to the first default step-length.
As a kind of preferred embodiment, coding parameter also comprises frame per second;
After improving the resolution in current coding parameter according to default step-length, also comprise:
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, improve the frame per second in present encoding parameter according to the second default step-length.
As a kind of preferred embodiment, according to comparative result, the resolution in current coding parameter is regulated, comprising:
If the mean value of peak noise ratio is less than the lower limit of the first reference field, and the mean value of structural similarity index is less than the lower limit of the second reference field, judges whether the resolution in current coding parameter is greater than the second default resolution;
If the resolution in current coding parameter is greater than the second default resolution, reduce the resolution in current coding parameter according to the first default step-length;
Wherein, the first default resolution is greater than the second default resolution.
As a kind of preferred embodiment, coding parameter also comprises frame per second;
After reducing the resolution in current coding parameter according to default step-length, also comprise:
Judge whether the frame per second in current coding parameter is greater than the lower limit of the 3rd reference field;
If the frame per second in current coding parameter is greater than the lower limit of the 3rd reference field, reduce the frame per second in current coding parameter according to the second default step-length.
Due to peak noise than and structural similarity index can reflect exactly current image quality, therefore, the method that the embodiment of the present invention provides, the mean value of peak noise ratio of all images of exporting in the Preset Time section of collecting by calculating and the mean value of structural similarity index, and then according to the mean value of the mean value of peak noise ratio and structural similarity index, current coding parameter is regulated, make current coding parameter after regulating coded go out the quality of image quality better.
Embodiment bis-
Along with the development of computer technology, internet video live broadcasting enters into people's life gradually.In the time of internet video live broadcasting, because user under different video scene is different to the demand of image quality, and different coding parameters is determining different image quality, therefore, in order to promote user's visual experience, the embodiment of the present invention provides a kind of method that regulates coding parameter.For the ease of understanding, now comprise that take coding parameter resolution is as example in conjunction with the content of above-described embodiment one, the method for the adjusting coding parameter that the embodiment of the present invention is provided is at length explained.Referring to Fig. 2, the method flow that the embodiment of the present invention provides comprises:
201: each two field picture of collecting output in Preset Time section.
Because each two field picture of exporting in Preset Time section is the basis of subsequent adjustment coding parameter, therefore, in order to make can to regulate coding parameter in subsequent step, the method that the present embodiment provides need to be collected each two field picture of output in Preset Time section.
Wherein, Preset Time section can be 1 minute, 2 minutes, 5 minutes etc., and the embodiment of the present invention is not done concrete restriction to Preset Time section.About the mode of collecting each two field picture of exporting in Preset Time section, include but not limited to collect by gathering-device each two field picture of exporting in Preset Time section, and each two field picture that gathering-device is collected in Preset Time section each two field picture in the Preset Time section of collecting.
Due to each two field picture of exporting in the Preset Time section of collecting in this step, use follow-up will continuation when coding parameter is regulated, therefore, the method that the present embodiment provides, after collecting each two field picture of exporting in Preset Time section, also comprises the step that each two field picture of exporting in the Preset Time section of collecting is stored.About the mode of each two field picture of exporting in storage Preset Time section, the present embodiment is not done concrete restriction, includes but not limited to each two field picture of exporting in the Preset Time section of collecting to store in a queue.
202: the mean value of peak noise ratio and the mean value of structural similarity index that calculate all images of output in the Preset Time section of collecting.
Wherein, peak noise is than being the ratio that represents a signal maximum possible power and affect the destructive noise power of its expression precision.After process image compression; conventionally the image of output to a certain extent all can be different with original image, therefore, and in order to weigh the image quality of output; conventionally can calculate the peak noise ratio of the image of output, and then weigh the image quality of output according to the peak noise ratio obtaining.When concrete measurement, the value of peak noise ratio is larger, represents that distortion is fewer, and the image of output more approaches original image.Structural similarity index is the New Set of a kind of measurement two width image similarities.In being commonly used in image processing, in image denoising is processed, its value is larger, represents that the similarity of two width images is higher especially.
Although the peak noise of each two field picture ratio and structural similarity index can reflect the image quality of each two field picture, but in order to react more accurately current image quality, the method that the present embodiment provides need to be calculated the mean value of peak noise ratio and the mean value of structural similarity index of all images of output in the Preset Time section of collecting, so that subsequent step can regulate current coding parameter according to the mean value of peak noise ratio and the mean value of structural similarity index of all images of exporting in the Preset Time section of collecting of calculating.
The mean value of the peak noise ratio of all images of exporting in the Preset Time section of collecting about calculating, includes but 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 section of collecting;
Secondly, by the peak noise of all images of collecting in Preset Time section than summation, obtain all images of collecting in Preset Time section peak noise ratio and;
Again, by the peak noise ratio of all images of collecting in the Preset Time section obtaining and with Preset Time section in the picture number collected make ratio, thereby can obtain the mean value of the peak noise ratio of all images of output in Preset Time section.
Particularly, when the value of the peak noise ratio of each two field picture of exporting in the Preset Time section of collecting in calculating, can adopt following formula to calculate.
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, I nrepresent original image, I nin n represent n pixel of original image, P nrepresent the image of output, P nin n represent the n pixel of image of output.
Take Framesize as 320 × 240 as example.When concrete calculating, first calculate between original image and the image of output from the difference of 320 × 240 pixels of the 1st pixel to the and, then by between the original image obtaining and the image of output from the difference of 320 × 240 pixels of the 1st pixel to the and do to compare with current resolution, obtain the mean square deviation MSE of the image of original image and output, and then the MSE obtaining is updated to peak noise than in the computing formula of PSNR, finally obtain the peak noise ratio of the image of output.
Further, when image coding due to employing coded system, the image of original image and output all will be broken down into Y, U and tri-components of V.Wherein, Y represents luminance signal, and U and V represent two carrier chrominance signals.Therefore, the peak noise that adopts the computing formula of above-mentioned peak noise ratio to calculate each two field picture than time, need to be by the peak noise of Y, U and these three components of V than calculating separately.
When the concrete peak noise that calculates Y, U and these three components of V compares, can set the peak noise of Y component than being Y_PSNR, the peak noise of U component is than being U_PSNR, the peak noise of V component is than being V_PSNR, then adopt the computing formula of above-mentioned peak noise ratio to calculate, difference be the peak noise that calculates Y, U and V component than time, the resolution difference of use.
Below still take Framesize as 320 × 240 as example.For Y_PSNR when concrete the calculating, Framesize is 320 × 240, for U_PSNR when concrete the calculating, Framesize is (320 × 240)/4, for V_PSNR, in the time specifically calculating, Framesize is (320 × 240)/4, after having determined Framesize, the computational process of the peak noise ratio of Y, U and V component, with the computational process of above-mentioned peak noise ratio, repeats no more herein.
After having calculated the peak noise ratio of the Y of each two field picture, U and V component, can adopt following formula to calculate for the peak noise ratio of each two field picture:
F_PSNR=(Y_PSNR*4+U_PSNR+V_PSNR)/6
Particularly, be that 20, U_PSNR is that 20, V_PSNR is 20 if calculate the Y_PSNR of a two field picture, according to above-mentioned formula, F_PSNR=(Y_PSNR*4+U_PSNR+V_PSNR)/6=(20*4+20+20)/6=20.
Further, after calculating the peak noise ratio of each two field picture, when the value of the peak noise ratio of all images of exporting in the Preset Time section of collecting in calculating, can adopt the method for the mean value of the peak noise ratio of all images of output in above-mentioned calculating Preset Time section to calculate.For example, if the image of collecting in Preset Time section has 4 frames, the value of the peak noise ratio of this 4 two field picture is respectively 20,30,25,25, and in Preset Time section, the mean value of the peak noise ratio of all images of output is (20+30+25+25)/4=25.
When the mean value of the structural likeness in form index of all images of exporting in the Preset Time section of collecting in calculating, because structure similarity index is defined as image to be independent of brightness from the angle of image composition, the attribute of object structures in contrast and reflection scene, be brightness by distortion modeling, the combination of contrast and three different factors of structure, and the estimation as brightness by average, the estimation that standard deviation is spent as a comparison, covariance is as the tolerance of structural similarity degree, therefore, when the mean value of the structural similarity index of all images of exporting in the Preset Time section of collecting in calculating, can directly calculate the mean value of the structural similarity index of all images.
In the time of structural similar index, can adopt following formula to calculate:
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, SSIM (x, y) be the structural similarity index of x and y, l (x, y) is the relatively brightness of x and y, C (x, y) compares the contrast of x and y, σ (x, y) for comparing the structure of x and y, α >0, β >0, γ >0, for adjusting l (x, y), C (x, y), the parameter of σ (x, y) relative importance, μ xand μ y, σ xand σ ybe respectively mean value and the standard deviation of the pixel of x and y, σ xyfor the co-variation heteromerism of the pixel of x and y, C 1, C 2, C 3be all constant, in order to maintain the stable of l (x, y), C (x, y), σ (x, y).
203: the mean value of peak noise ratio and the first reference field are compared, and the mean value of structural similarity index and the second reference field are compared.
Wherein, the first reference field is the scope that judges whether the pre-set peak value noise ratio that need to regulate resolution, and it has upper and lower bound.The size of the first reference field can be (28.5,36), can be also (38,40), and the present embodiment does not limit the size of the first reference field.The second reference field is the scope that judges whether the preset structure similarity indices that need to regulate resolution, and it has upper and lower bound equally.The size of the second reference field can be (0.1,0.5), can be also (0.6,0.89), and the present embodiment is not done concrete restriction to the size of the second reference field.
Because the mean value of peak noise ratio and the mean value of structural similarity index can react current image quality, therefore, the method that the present embodiment provides is by comparing the mean value of peak noise ratio and the first reference field, the mean value of structural similarity index and the second reference field are compared, so that can regulate current resolution according to the comparative result of this step in subsequent step.
The mean value of peak noise ratio and the first reference field are compared, the mean value of structural similarity index and the second reference field are compared, comparative result includes but not limited to following several situation:
The first situation: the mean value of peak noise ratio is greater than the upper limit of the first reference field, and the mean value of structural similar index is greater than the upper limit of the second reference field;
The second situation: the mean value of peak noise ratio is less than the lower limit of the first reference field, and the mean value of structural similarity index is less than the lower limit of the second reference field;
The third situation: the mean value of peak noise ratio is greater than the upper limit of the first reference field, and the mean value of structural similarity index is less than the lower limit of the second reference field;
The 4th kind of situation: the mean value of peak noise ratio is less than the lower limit of the first reference field, and the mean value of structural similarity index is greater than the upper limit of the second reference field.
204: according to comparative result, the resolution in current coding parameter is regulated.
Owing to the mean value of peak noise ratio and the first reference field being compared in above-mentioned steps 203, the mean value of structural similarity index and the second reference field are compared, therefore, this step will regulate the resolution in current coding parameter according to comparative result on the basis of above-mentioned steps 203.
The first situation: the mean value of peak noise ratio is greater than the upper limit of the first reference field, and the mean value of structural similarity index is greater than the upper limit of the second reference field;
For the first situation, be greater than the upper limit of the first reference field at the mean value of judging peak noise ratio, and when the mean value of structural similarity index is greater than the second reference field, in order to judge whether further to regulate current resolution, the method that the present embodiment provides also will judge whether the resolution in current coding parameter is less than the first default resolution, and then judges whether to regulate the resolution of current reality according to judged result.Wherein, the first default resolution can be 320 × 240,360 × 480 etc., and the present embodiment does not limit the size of the first default resolution.
While judging whether to regulate the resolution of current reality according to judged result, include but not limited to following two kinds of results:
The first result: if the resolution in current coding parameter is less than the first default resolution, improve the resolution in current coding parameter according to the first default step-length;
For the first result, when resolution in current coding parameter is less than the first default resolution, the image quality now showing according to current resolution is poor, in order to improve the image quality of demonstration, need to improve current resolution according to the first default step-length.But owing to limited by current business, every kind of business all has the upper limit resolution of permission, therefore, and in the time improving current resolution according to the first default step-length, be not the unlimited current resolution of raising, but till current resolution is brought 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 done concrete restriction to the size of the first default step-length.
The second result: if the resolution in current coding parameter is greater than the first default resolution, no longer regulate current resolution.
For the second result, because the image quality now showing according to current resolution is better, therefore, without regulating current resolution.
For said process, will at length explain with a concrete 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), and the first default resolution is 1024 × 960.If calculating the mean value of the peak noise ratio of all images of output in the Preset Time section of collecting is 38, the mean value of structural similar index is 0.9.The mean value of peak noise ratio and the first reference field are compared, when the mean value of structural similar index and the second reference field are compared, because the mean value 38 of peak noise ratio is greater than the upper limit 35 of the first reference field, the mean value 0.9 of structural similar index is greater than the upper limit 0.8 of the second reference field, in order to determine whether further to regulate 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, be less than 1024 × 960 due to 320 × 240, improve resolution in present encoding parameter to upper limit resolution according to the first default step-length; If the resolution in current coding parameter is 1024 × 1024, be greater than 1024 × 960 due to 1024 × 1024, now without the resolution regulating in present encoding parameter.
The second situation: the mean value of peak noise ratio is less than the lower limit of the first reference field, and the mean value of structural similarity index is less than the lower limit of the second reference field;
For the second situation, be less than the lower limit of the first reference field at the mean value of judging peak noise ratio, and when the mean value of structural similarity index is less than the second reference field, in order to judge whether further to regulate current resolution, the method that the present embodiment provides also will judge whether the resolution in current coding parameter is greater than the second default resolution, and then judges whether to regulate the resolution of current reality according to judged result.Wherein, the second default resolution can be 120 × 240,360 × 480 etc., but no matter the value of the second default resolution be how many, and second presets resolution is always less than first and presets resolution.
While judging whether to regulate the resolution of current reality according to judged result, include but not limited to following two kinds of results:
The first result: if the resolution in current coding parameter is greater than the second default resolution, reduce the resolution in current coding parameter according to the first default step-length;
For the first result, when resolution in current coding parameter is greater than the second default resolution, the image quality now showing according to current resolution is poor, in order to improve the image quality of demonstration, need to reduce current resolution according to the first default step-length.But owing to limited by current business, every kind of business has the lower limit resolution of permission, therefore, and in the time reducing current resolution according to the first default step-length, be not the unlimited current resolution of reduction, but by current decrease resolution till upper limit resolution.
The second result: if the resolution in current coding parameter is less than the second default resolution, the image quality now showing according to current resolution is better, without regulating current resolution.
For said process, will at length explain with a concrete 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), and the second default resolution is 480 × 560.If calculating the mean value of the peak noise ratio of all images of output in the Preset Time section of collecting is 20, the mean value of structural similar index is 0.4, the mean value of peak noise ratio and the first reference field are compared, when the mean value of structural similar index and the second reference field are compared, because the mean value 20 of peak noise ratio is less than the upper limit 23 of the first reference field, the mean value 0.4 of structural similar index is less than the upper limit 0.5 of the second reference field, in order to determine whether further to regulate current resolution, now need to judge whether the resolution in current coding parameter is greater than the second default resolution.If the resolution in current coding parameter is 480 × 960, be greater than 480 × 560 due to 480 × 960, reduce resolution in present encoding parameter to lower limit resolution according to the first default step-length; If the resolution in current coding parameter is 320 × 240, be less than 480 × 560 due to 320 × 240, now without the resolution regulating in present encoding parameter.
The third situation: the mean value of peak noise ratio is less than the lower limit of the first reference field, and the mean value of structural similarity index is less than the lower limit of the second reference field;
For the third situation, owing to being less than the lower limit of the first reference field when the mean value of peak noise ratio, and the mean value of structural similarity index is less than the lower of the second reference field and prescribes a time limit, the image quality showing according to current resolution is better, therefore, for the third situation without regulating current resolution.
The 4th kind of situation: the mean value of peak noise ratio is less than the lower limit of the first reference field, and the mean value of structural similarity index is greater than the upper limit of the second reference field.
For the 4th kind of situation: owing to being less than the lower limit of the first reference field when the mean value of peak noise ratio, and the mean value of structural similarity index is greater than the upper of the second reference field and prescribes a time limit, the image quality showing according to current resolution is better, therefore, for the 4th kind of situation without regulating current resolution.
Said process is only to regulate resolution in coding parameter to be introduced as example, for the image quality that makes to show better, below by the basis of the resolution in above-mentioned adjusting coding parameter, to regulate frame per second in coding parameter to be introduced as example.Regulate the frame per second in parameter, include but not limited to following two kinds of situations:
The first situation: improving on the basis of the resolution in current coding parameter according to default step-length, regulate the frame per second in coding parameter, include but not limited to following mode:
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, improve the frame per second in present encoding parameter according to the second default step-length.
Wherein, the 3rd reference field is the scope that judges whether the default frame per second that need to regulate frame per second, and it has upper and lower bound.The size of the 3rd reference field can be (10,20), can be also (50,70), and the present embodiment does not limit the size of the 3rd reference field.The second default step-length is 2,3,5 etc., and the present embodiment does not limit the size of the second default step-length.
It should be noted that, judge whether frame per second in current coding parameter be less than the 3rd reference field upper in limited time, if judge the upper limit that frame per second in current coding parameter is greater than the 3rd reference field, now, due to according to the image quality that shows of current frame per second better, therefore, without the frame per second regulating in coding parameter.
For said process, for the ease of understanding, will at length explain with a concrete example below.
For example, the 3rd reference field is (10,20).If the frame per second in current coding parameter is 16, be less than 20 due to 16, the frame per second in current coding parameter is less than the upper limit of the 3rd reference field, therefore, will improve the frame per second in present encoding parameter according to the second default step-length.
The second situation: reducing on the basis of the resolution in current coding parameter according to default step-length, regulate the frame per second in coding parameter, include but not limited to following mode:
Judge whether the frame per second in current coding parameter is greater than the lower limit of the 3rd reference field;
If the frame per second in current coding parameter is greater than the lower limit of the 3rd reference field, reduce the frame per second in current coding parameter according to the second default step-length.
It should be noted that, judge whether frame per second in current coding parameter be greater than the 3rd reference field lower in limited time, if the frame per second of judging in current coding parameter is less than the upper limit to three reference field, now, due to according to the image quality that shows of current frame per second better, therefore, without the frame per second regulating in coding parameter.
For said process, for the ease of understanding, will at length explain with a concrete example below.
For example, the 3rd reference field is (12,21).If the frame per second in current coding parameter is 15, be greater than 12 due to 15, the frame per second in current coding parameter is greater than the lower limit of the 3rd reference field, therefore, now will reduce the frame per second in present encoding parameter according to the second default step-length.
Due to peak noise than and structural similarity index can reflect exactly current image quality, therefore, the method that the embodiment of the present invention provides, the mean value of peak noise ratio of all images of exporting in the Preset Time section of collecting by calculating and the mean value of structural similarity index, and then according to the mean value of the mean value of peak noise ratio and structural similarity index, current coding parameter is regulated, make current coding parameter after regulating coded go out the quality of image quality better.
Embodiment tri-
The embodiment of the present invention provides a kind of device that regulates coding parameter, and this device is for the method for the adjusting coding parameter carrying out above-described embodiment one or embodiment bis-and provide.Referring to Fig. 3, this device comprises:
Collection module 301, for collecting each two field picture of exporting in Preset Time section;
Computing module 302, for calculating the mean value of peak noise ratio and the mean value of structural similarity index of all images of exporting in the Preset Time section of collecting;
The first adjustment module 303, for regulating current coding parameter according to the mean value of the mean value of peak noise ratio and structural similarity index.
Referring to Fig. 4, the first adjustment module 303, comprising:
The first comparing unit 3031, for the mean value of peak noise ratio and the first reference field are compared, and compares the mean value of structural similarity index and the second reference field;
The first regulon 3032, for regulating the resolution of current coding parameter according to comparative result.
Referring to Fig. 5, the first regulon 3032, comprising:
The first judgment sub-unit 30321, for be greater than when the mean value of peak noise ratio that the upper limit of the first reference field and the mean value of structural similarity index is greater than the second reference field upper in limited time, judge whether the resolution in current coding parameter is less than the first default resolution;
First regulates subelement 30322, while being less than the first default resolution, improves the resolution in current coding parameter according to the first default step-length for the resolution of current coding parameter.
Referring to Fig. 6, this device, also comprises:
The second adjustment module 304, for judging whether the frame per second of current coding parameter is less than the upper limit of the 3rd reference field; Prescribe a time limit when the frame per second in current coding parameter is less than the upper of the 3rd reference field, improve the frame per second in present encoding parameter according to the second default step-length.
Referring to Fig. 7, the first regulon 3032, comprising:
The second judgment sub-unit 30323, for be less than the lower limit of the first reference field when the mean value of peak noise ratio, and the mean value of structural similarity index is less than the lower of the second reference field prescribes a time limit, judge whether the resolution in current coding parameter is greater than the second default resolution;
Second regulates subelement 30324, when be greater than the second default resolution when the resolution of current coding parameter, preset step-length reduce the resolution in current coding parameter according to first.
Referring to Fig. 8, this device, also comprises:
The 3rd adjustment module 305, for judging whether the frame per second of current coding parameter is greater than the lower limit of the 3rd reference field; Prescribe a time limit when the frame per second in current coding parameter is greater than the lower of the 3rd reference field, reduce the frame per second in current coding parameter according to the second default step-length.
In sum, due to peak noise than and structural similarity index can reflect exactly current image quality, therefore, the device that the embodiment of the present invention provides, the mean value of peak noise ratio of all images of exporting in the Preset Time section of collecting by calculating and the mean value of structural similarity index, and then according to the mean value of the mean value of peak noise ratio and structural similarity index, current coding parameter is regulated, make current coding parameter after regulating coded go out the quality of image quality better.
It should be noted that: the device of the adjusting coding parameter that above-described embodiment provides is in the time regulating coding parameter, only be illustrated with the division of above-mentioned each functional module, in practical application, can above-mentioned functions be distributed and completed by different functional modules as required, the internal structure that is about to the device that regulates coding parameter is divided into different functional modules, to complete all or part of function described above.In addition, the device of the adjusting coding parameter that above-described embodiment provides belongs to same design with the embodiment of the method that regulates coding parameter, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can carry out the hardware that instruction is relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (12)

1. a method that regulates coding parameter, is characterized in that, described method comprises:
Collect each two field picture of output in Preset Time section;
The mean value of peak noise ratio and the mean value of structural similarity index of all images of output in the described Preset Time section that calculating is collected;
According to the mean value of the mean value of described peak noise ratio and described structural similarity index, current coding parameter is regulated.
2. method according to claim 1, is characterized in that, described coding parameter comprises resolution;
The described mean value according to the mean value of described peak noise ratio and described structural similarity index regulates current coding parameter, comprising:
The mean value of described peak noise ratio and the first reference field are compared, and the mean value of described structural similarity index and the second reference field are compared;
According to comparative result, the resolution in current coding parameter is regulated.
3. method according to claim 2, is characterized in that, describedly according to comparative result, the resolution in current coding parameter is regulated, and comprising:
If the mean value of described peak noise ratio is greater than the upper limit of described the first reference field, and the mean value of structural similarity index is greater than the upper limit of described the second reference field, judges whether the resolution in current coding parameter is less than the first default resolution;
If the resolution in described current coding parameter is less than the first default resolution, improve the resolution in described current coding parameter according to the first default step-length.
4. method according to claim 3, is characterized in that, described coding parameter also comprises frame per second;
Described according to after the resolution in the described current coding parameter of default step-length raising, also comprise:
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 the 3rd reference field, improve the frame per second in described present encoding parameter according to the second default step-length.
5. method according to claim 2, is characterized in that, describedly according to comparative result, the resolution in current coding parameter is regulated, and comprising:
If the mean value of described peak noise ratio is less than the lower limit of described the first reference field, and the mean value of structural similarity index is less than the lower limit of described the second reference field, judges whether the resolution in current coding parameter is greater than the second default resolution;
If the resolution in described current coding parameter is greater than the described second default resolution, reduce the resolution in described current coding parameter according to the first default step-length;
Wherein, the described first default resolution is greater than the described second default resolution.
6. method according to claim 5, is characterized in that, described coding parameter also comprises frame per second;
Described according to after the resolution in the described current coding parameter of default step-length reduction, also comprise:
Judge whether the frame per second in current coding parameter is greater than the lower limit of the 3rd reference field;
If the frame per second in described current coding parameter is greater than the lower limit of described the 3rd reference field, reduce the frame per second in described current coding parameter according to the second default step-length.
7. a device that regulates coding parameter, is characterized in that, described device comprises:
Collection module, for collecting each two field picture of exporting in Preset Time section;
Computing module, for calculating the mean value of peak noise ratio and the mean value of structural similarity index of all images of exporting in the described Preset Time section of collecting;
The first adjustment module, for regulating current coding parameter according to the mean value of the mean value of described peak noise ratio and described structural similarity index.
8. device according to claim 7, is characterized in that, described the first adjustment module, comprising:
The first comparing unit, for the mean value of described peak noise ratio and the first reference field are compared, and compares the mean value of described structural similarity index and the second reference field;
The first regulon, for regulating the resolution of current coding parameter according to comparative result.
9. device according to claim 8, is characterized in that, described the first regulon, comprising:
The first judgment sub-unit, for be greater than when the mean value of described peak noise ratio that the upper limit of described the first reference field and the mean value of structural similarity index is greater than described the second reference field upper in limited time, judge whether the resolution in current coding parameter is less than the first default resolution;
First regulates subelement, when be less than the first default resolution when the resolution of described current coding parameter, according to the resolution in the described current coding parameter of the first default step-length raising.
10. device according to claim 9, is characterized in that, also comprises:
The second adjustment module, for judging whether the frame per second of current coding parameter is less than the upper limit of the 3rd reference field; Prescribe a time limit when the frame per second in described current coding parameter is less than the upper of described the 3rd reference field, improve the frame per second in described present encoding parameter according to the second default step-length.
11. devices according to claim 8, is characterized in that, described the first regulon, comprising:
The second judgment sub-unit, for be less than the lower limit of described the first reference field when the mean value of described peak noise ratio, and the mean value of structural similarity index is less than the lower of described the second reference field prescribes a time limit, judge whether the resolution in current coding parameter is greater than the second default resolution;
Second regulates subelement, when be greater than the described second default resolution when the resolution of described current coding parameter, according to the resolution in the described current coding parameter of the first default step-length reduction;
Wherein, the described first default resolution is greater than the described second default resolution.
12. devices according to claim 11, is characterized in that, also comprise:
The 3rd adjustment module, for judging whether the frame per second of current coding parameter is greater than the lower limit of the 3rd reference field; Prescribe a time limit when the frame per second in described current coding parameter is greater than the lower of described the 3rd reference field, reduce the frame per second in described current coding parameter according to the second default step-length.
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 true CN103796036A (en) 2014-05-14
CN103796036B 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)

Cited By (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
CN107343208A (en) * 2016-04-29 2017-11-10 掌赢信息科技(上海)有限公司 One kind 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 (5)

* 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
US20120275511A1 (en) * 2011-04-29 2012-11-01 Google Inc. System and method for providing content aware video adaptation
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

Patent Citations (5)

* 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
US20120275511A1 (en) * 2011-04-29 2012-11-01 Google Inc. System and method for providing content aware video adaptation
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
ZIGUAN CUI,ET.AL.: "SSIM-Based Content Adaptive Frame Skipping for Low Bit Rate H.264 Video Coding", 《12TH IEEE INTERNATIONAL CONFERENCE ON ICCT》 *

Cited By (5)

* 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
CN107343208A (en) * 2016-04-29 2017-11-10 掌赢信息科技(上海)有限公司 One kind control video code rate method and electronic equipment
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

Also Published As

Publication number Publication date
CN103796036B (en) 2017-02-01

Similar Documents

Publication Publication Date Title
US9049420B1 (en) Relative quality score for video transcoding
CN105491414A (en) Synchronous display method and device of images
CN104378636B (en) A kind of video encoding method and device
CN101873429A (en) Processing method and device of image contrast
CN106170093B (en) Intra-frame prediction performance improving coding method
CN103313047B (en) A kind of method for video coding and device
CN103796036A (en) Coding parameter adjusting method and device
CN110620924B (en) Method and device for processing coded data, computer equipment and storage medium
CN112399176B (en) Video coding method and device, computer equipment and storage medium
JP5536231B2 (en) Image quality evaluation method and apparatus using quantization code
CN116563085B (en) Large-scale parallel processing method and system for offline rendering
CN110139112A (en) A kind of method for video coding based on JND model
CN108665417A (en) A kind of license plate image deblurring method, apparatus and system
CN115661008A (en) Image enhancement processing method, device, equipment and medium
US8798383B1 (en) Method of adaptive structure-driven compression for image transmission over ultra-low bandwidth data links
WO2019047663A1 (en) Video format-based end-to-end automatic driving data storage method and device
CN112437301B (en) Code rate control method and device for visual analysis, storage medium and terminal
CN111311584B (en) Video quality evaluation method and device, electronic equipment and readable medium
US20230319292A1 (en) Reinforcement learning based rate control
WO2021073316A1 (en) Image signal conversion method and apparatus, and terminal device
CN111539948B (en) Video quality evaluation method, device, electronic equipment and storage medium
CN109996078B (en) Image compression method and device and electronic equipment
US20210266570A1 (en) Region of interest quality controllable video coding techniques
CN115567712A (en) Screen content video coding perception code rate control method and device based on just noticeable distortion by human eyes
CN112218083B (en) Method for estimating intra-frame image code rate of high-efficiency video coding standard

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
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.

EE01 Entry into force of recordation of patent licensing contract
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