CN105376568B - A kind of optimization method of ABR video frequency coding rates control - Google Patents
A kind of optimization method of ABR video frequency coding rates control Download PDFInfo
- Publication number
- CN105376568B CN105376568B CN201510979146.XA CN201510979146A CN105376568B CN 105376568 B CN105376568 B CN 105376568B CN 201510979146 A CN201510979146 A CN 201510979146A CN 105376568 B CN105376568 B CN 105376568B
- Authority
- CN
- China
- Prior art keywords
- encoded frame
- frame
- current encoded
- current
- quantization parameter
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000005457 optimization Methods 0.000 title claims abstract description 47
- 238000013139 quantization Methods 0.000 claims abstract description 91
- 230000007773 growth pattern Effects 0.000 claims description 10
- 108010035947 CPLX inhibitor Proteins 0.000 claims description 9
- 230000003139 buffering effect Effects 0.000 claims description 7
- 230000006835 compression Effects 0.000 claims description 6
- 238000007906 compression Methods 0.000 claims description 6
- 230000008859 change Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 5
- 230000005540 biological transmission Effects 0.000 description 10
- 238000012937 correction Methods 0.000 description 2
- 230000012010 growth Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000011217 control strategy Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a kind of optimization methods of ABR video frequency coding rates control, including to current encoded frame quantization parameter Optimization Steps;It is as follows:Obtain the coding information of encoded frame;The quantization parameter of the actual bit rate and current encoded frame of current encoded frame is obtained according to encoded frame information;The code check for obtaining current encoded frame controls error;Adjust the quantization parameter of current encoded frame:Judge whether the code check control error of current encoded frame is less than setting error;If the code check control error of current encoded frame is less than setting error, judge whether current encoded frame is key frame;If so, lower quantization parameter in error range, increases the bit number of current encoded frame;If it is not, then increasing quantization parameter in error range, reduce the bit number of current encoded frame;If the code check control error of current encoded frame is more than or equal to setting error, terminate the Optimization Steps of current encoded frame quantization parameter.The method of the present invention can effectively reduce code check control error.
Description
Technical field
The present invention relates to stream media technology fields, are led mainly for the low bandwidth for carrying out transmission of video using wireless network
A kind of domain, and in particular to optimization method of ABR video frequency coding rates control.
Background technology
21 century is an information-based society, and stream media technology has been applied to extensive field, and such as digital broadcasting has
Line TV, DVD player, video conference etc..In application process, it is necessary to make the processing capacity of video information and the number of computer
It is adapted according to the data transmission capabilities of processing capacity and network, and to ensure that view quality has to reach people general simultaneously
Receiving it is horizontal.In order to save transmission bandwidth, memory space, Video coding early has become domestic and international scientific research and engineer application
One of hot spot.For the acquisition better image quality under network bandwidth, delay, the limitation of caching, and in order to given
Coded data is efficiently transmitted under code check, and ensures the receiving terminal quality well and stablized, and code check control is as Video coding
One of important content, more one of the key technology of Video coding.
Code check control is as an important technology in transmission of video, and the purpose is to by adjusting coding parameter, control is compiled
Data volume of the code video flowing within the unit interval, ensures video flowing in the range of allowing bandwidth, smooth outputting high quality
Video.During video carries out real-time Transmission by wireless network, due to the diversification of collected video pictures, cause to regard
The code stream variation of frequency coding output is bigger, is easy for leading to occur showing for frame losing in video transmitting procedure under limited bandwidth
As even smudgy so as to cause the video quality appearance fluctuation of video decoding end.In addition the bandwidth of wireless network can be random
How fluctuation adjusts the variation adaptive coding that code check enables video according to bandwidth, and then ensures the facile transport of video just
It is particularly important.Rate control techniques are exactly and then to ensure transmission of video by adjusting the code check in video transmitting procedure
Fluency.
For the encoder X264 that increases income more commonly used at present, its coding mode is broadly divided into twice (2pass)
Pattern and (1pass) pattern.Wherein twice of pattern is to use to encode twice, and coded frame can be obtained after encoding for the first time
Associated statistical information can select optimal quantization according to these information when second time while selecting suitable code check
For parameter QP to obtain best image quality, but due to the more than once coding of 2pass patterns, real-time is poor.One time (1pass) is compiled
Pattern is divided into as ABR (Average Bit-rate, mean bit rate) pattern, CBR (Constant Bit-rate, constant ratio
Special rate) pattern, CRF (Constant Ratefactor, constant rate of speed) pattern, CQP (Constant Quantizer, constant basis
Change parameter) pattern.A time coding mode due to not no current encoded frame coding information, so being adjusted using in coding
Mode, the quantization parameter of uncoded unit is adjusted according to the information of current encoded frame encoded unit.Wherein abr mode energy
It is enough to obtain the error for encoding much the same video quality with 2pass, but having 10, it in this way can be most
The size of control coding file while small limit sacrifices video quality.CBR patterns are exactly to allow code check to remain unchanged as far as possible,
Be essentially each frame in this way and all distribute much the same bit number, complicated scene bit number is possible to it is not enough, and it is simple
Single scene can cause the waste of bit number again, so the video quality variation under this coding mode is bigger.X264 is provided
Various code rate control strategy, can select different code check control models according to different needs.If it is intended to high video
Quality, but less lie in real-time when may be selected by 2pass patterns, if should ensure that video quality takes into account reality again
Shi Xing can select abr mode.It can be good at taking into account coding quality and reality using the coding mode of ABR in existing technology
Shi Xing, but the application condition of ABR coding modes is big, has 10 error.It is therefore desirable to ABR coding modes
Code check control optimizes.
Invention content
The shortcomings that it is an object of the invention to overcome the prior art and deficiency provide a kind of ABR video frequency coding rates control
Optimization method, the optimization method can effectively reduce code check control error, make the actual bit rate more adjunction in transmission of video
Code check is hoped in the recent period.
The purpose of the invention is achieved by the following technical solution:A kind of optimization method of ABR video frequency coding rates control, packet
Include the step of optimizing to current encoded frame quantization parameter;
Described the step of optimizing to current encoded frame quantization parameter, is specific as follows:
S11, the coding information for obtaining encoded frame, including the practical total bit number of encoded frame, the key of encoded frame
The frame per second of number of frames and encoded frame;
S12, it is obtained according to the crucial number of frames of the practical total bit number of encoded frame, the frame per second of encoded frame and encoded frame
Take the actual bit rate of current encoded frame;According to the complexity cusum of encoded frame, equal interval quantizing control coefrficient, code rate
The quantization parameter of parameter and buffer overflow parameter acquiring current encoded frame;
S13, it is obtained according to the actual bit rate of the current encoded frame calculated in step S12 and the expectation code check of current encoded frame
The code check of current encoded frame controls error;
S14, it controls according to the code check of current encoded frame the key of error and current encoded frame and adjusts current encoded frame
Quantization parameter;Judge whether the code check control error of current encoded frame is less than setting error;
If so, entering step S15;
If it is not, then terminating the Optimization Steps to current encoded frame quantization parameter;
S15, judge whether current encoded frame is key frame;
If so, reducing the quantization parameter of current encoded frame, increase the bit number of current encoded frame;
If it is not, then increasing the quantization parameter of current encoded frame, reduce the bit number of current encoded frame.
Preferably, further include the steps that optimizing to present encoding frame buffer zone growth pattern, it is specific as follows:
S21, the buffer size for obtaining encoded frame, obtain the phase of the practical total bit number and encoded frame of encoded frame
Hope total bit number;
S22, according to the buffer size of the upper coded frame of current encoded frame and the practical total bit number of encoded frame
The buffer size of current encoded frame is obtained with the deviation of the expectation total bit number of encoded frame:
Wherein ABR 'bufFor the buffer size of current encoded frame, ABRbufFor current encoded frame a upper coded frame it is slow
Area's size is rushed,For the practical total bit number of encoded frame, BitiFor the actual bit number of the encoded frame of the i-th frame, n is
The number of frames of coded frame, ESbitFor the expectation total bit number of encoded frame.
Preferably, in step S12 current encoded frame actual bit rate RbitFor:
WhereinFor the practical total bit number of encoded frame, BitiFor the actual bit number of the encoded frame of the i-th frame, Fps
For the frame per second of encoded frame, IframFor the crucial number of frames of encoded frame, n is the number of frames of encoded frame.
Preferably, the code check control error D of current encoded frame is in the step S13:
Wherein RbitFor the actual bit rate of current encoded frame, EbitFor the expectation code check of current encoded frame.
Preferably, the quantization parameter acquisition process of current encoded frame is as follows in the step S12:
S121, the complexity that current encoded frame is predicted according to the complexity cusum of encoded frame;
S122, current compile is calculated according to the complexity and equal interval quantizing control coefrficient of the step S121 current encoded frames predicted
The former quantization parameter of code frame;
S123, first the former quantization parameter of current encoded frame is adjusted according to coding rate parameter, obtains present encoding
Then first quantization parameter of frame is adjusted the first quantization parameter of current encoded frame further according to buffer overflow parameter,
Obtain the quantization parameter of current encoded frame.
Further, in the step S121, the complexity CPLX of the current encoded frame of predictionblurFor:
Wherein n is the number of frames of encoded frame, CPLXsumFor the complexity cusum of encoded frame;
The complexity cusum CPLX of the preceding encoded frame of i framessum,iFor:
CPLXsum,i=CPLXsum,i-1×0.5+SATDi-1, i=1,2,3 ..., n;
Wherein CPLXsum,i-1For the complexity cusum of the preceding encoded frame of i-1 frames, SATDi-1It is encoded for preceding i-1 frames
The prediction residual absolute value summation of frame;
The complexity cusum CPLX of encoded framesumFor:
CPLXsum=CPLXsum,n。
Further, in the step S122, the former quantization parameter Q of current encoded framescaleFor:
Qscale=CPLXblur (1-QC);
Wherein CPLXblurFor the complexity of the current encoded frame of prediction, QC is the equal interval quantizing parameter level degree of compression.
Further, equal interval quantizing parameter level degree of compression QC=0.6.
Further, the former quantization parameter of current encoded frame is carried out according to coding rate parameter in the step S123
First quantization parameter Q of the current encoded frame after adjustmentscale' be:
Wherein rate_factor is the code rate of current encoded frame, and rate_factor is:
Wherein EbitFor the expectation code check of current encoded frame, CPLXsumFor the complexity cusum of encoded frame.
Further, in the step S123 according to buffer overflow parameter to the first quantization parameter of current encoded frame
The quantization parameter Q of current encoded frame after being adjustedscale" it is:
Qscale"=Qscale′×overflow;
Wherein Qscale' for the current volume after being adjusted to the former quantization parameter of current encoded frame according to coding rate parameter
First quantization parameter of code frame, overflow be according to the expectation mark of the practical total bit number of encoded frame and encoded frame always than
The preventing of deviation setting between special number overflows parameter, and wherein overflow is:
WhereinFor the practical total bit number of encoded frame, BitiFor the actual bit number of the encoded frame of the i-th frame,
ESbitFor the expectation total bit number of encoded frame;abrbufferFor the average buffer size of encoded frame;
IfThen overflow=0.5;
IfThen
IfThen overflow=2.
The present invention has the following advantages and effects with respect to the prior art:
(1) optimization method of the present invention includes the optimization to current encoded frame quantization parameter, and basis has been compiled in optimization process
The coding information of code frame gets the actual bit rate of current encoded frame and the quantization parameter of current encoded frame, is then compiled according to current
The actual bit rate of code frame and the code check control error for it is expected code check acquisition current encoded frame of current encoded frame;According to present encoding
The code check control error of frame and the key of current encoded frame adjust the quantization parameter of current encoded frame;In current encoded frame
Code check controls the adjustment that quantization parameter is carried out when error is less than setting error, if current encoded frame is key frame, lower quantization
Parameter increases quantization parameter, to realize the adjustment of quantization parameter if current encoded frame is non-key frame.The present invention quantifies
The optimization method of parameter can reduce the ratio that little coded frame is influenced on decoding and reconstituting when current encoded frame is key frame
Special number, and increase the bit number of key frame, the quality of decoding end reconstructed image is not interfered with, and current encoded frame is not key frame
When I frames, reduce the bit number used in non-key frame, amount of coded data is saved in realization under the premise of not influencing video quality.This
Invention quantization parameter optimization method can effectively reduce code check control error, and the actual bit rate in transmission of video is made to be more nearly
It is expected that code check.
(2) optimization method of the present invention further includes being optimized to present encoding frame buffer zone growth pattern, which overcomes
The growth pattern of buffering area is led to being monotonic increase after the growth of buffering area no upper limit and 49 frames in the prior art
Cause the increase buffering area with coding frame number can be increasing, the technical problem that the delay of video also can be increasing.Pass through this
Optimization of the invention to present encoding frame buffer zone growth pattern so that the delay smaller of transmission of video, real-time are more preferable.
Description of the drawings
Fig. 1 is the method for the present invention flow chart.
Fig. 2 is current encoded frame quantization parameter optimized flow chart of the present invention.
Fig. 3 is the quantization parameter flow chart that the present invention obtains current encoded frame.
When Fig. 4 is input chip source video sequence Mobile, the method for the present invention and the obtained code check control of art methods
Error Graph processed.
Fig. 5 is for input film source when being video sequence Parils, the method for the present invention and the obtained code of art methods
Rate controls Error Graph.
Specific implementation mode
Present invention will now be described in further detail with reference to the embodiments and the accompanying drawings, but embodiments of the present invention are unlimited
In this.
Embodiment 1
Present embodiment discloses a kind of optimization methods of ABR video frequency coding rates control, as shown in Figure 1, including to current
The step of coded frame quantization parameter optimizes;
Wherein as shown in Fig. 2, the step of optimizing to current encoded frame quantization parameter is specific as follows:
S11, the coding information for obtaining encoded frame, including the practical total bit number of encoded frame, the key of encoded frame
The frame per second of frame (I frames) quantity and encoded frame.
S12, it is obtained according to the crucial number of frames of the practical total bit number of encoded frame, the frame per second of encoded frame and encoded frame
Take the actual bit rate of current encoded frame;According to the complexity cusum of encoded frame, equal interval quantizing control coefrficient, code rate
The quantization parameter of parameter and buffer overflow parameter acquiring current encoded frame;
The actual bit rate R of current encoded frame in this stepbitFor:
WhereinFor the practical total bit number of encoded frame, BitiFor the actual bit number of the encoded frame of the i-th frame, Fps
For the frame per second of encoded frame, IframFor the crucial number of frames of encoded frame, n is the number of frames of encoded frame.
As shown in figure 3, the quantization parameter acquisition process of current encoded frame is as follows in this step:
S121, the complexity that current encoded frame is predicted according to the complexity cusum of encoded frame;It is pre- in the present embodiment
The complexity CPLX of the current encoded frame of surveyblurFor:
Wherein n is the number of frames of encoded frame, CPLXsumFor the complexity cusum of encoded frame;
The complexity cusum CPLX of the preceding encoded frame of i framessum,iFor:
CPLXsum,i=CPLXsum,i-1×0.5+SATDi-1, i=1,2,3 ..., n;
Wherein CPLXsum,i-1For the complexity cusum of the preceding encoded frame of i-1 frames, SATDi-1It is encoded for preceding i-1 frames
The prediction residual absolute value summation of frame;
The then complexity cusum CPLX of encoded framesumFor:
CPLXsum=CPLXsum,n。
S122, current compile is calculated according to the complexity and equal interval quantizing control coefrficient of the step S121 current encoded frames predicted
The former quantization parameter of code frame;The former quantization parameter Q for the current encoded frame being calculated in this stepscaleFor:
Qscale=CPLXblur (1-QC);
Wherein QC is the equal interval quantizing parameter level degree of compression, in the present embodiment equal interval quantizing parameter level degree of compression QC=
0.6。
S123, first the former quantization parameter of current encoded frame is adjusted according to coding rate parameter, obtains present encoding
Then first quantization parameter of frame is adjusted the first quantization parameter of current encoded frame further according to buffer overflow parameter,
Obtain the quantization parameter of current encoded frame.
Present encoding after being adjusted to the former quantization parameter of current encoded frame according to coding rate parameter in this step
First quantization parameter Q of framescale' be:
Wherein rate_factor is the code rate of current encoded frame, and rate_factor is:
Wherein EbitFor the expectation code check of current encoded frame, CPLXsumFor the complexity cusum of encoded frame.
It is current after being adjusted to the first quantization parameter of current encoded frame according to buffer overflow parameter in this step
The quantization parameter Q of coded framescale" it is:
Qscale"=Qscale′×overflow;
Wherein overflow be according to the practical total bit number of encoded frame and the expectation mark total bit number of encoded frame it
Between deviation setting prevent overflow parameter, wherein overflow is:
WhereinFor the practical total bit number of encoded frame, BitiFor the actual bit number of the encoded frame of the i-th frame,
ESbitFor the expectation total bit number of encoded frame;abrbufferFor the average buffer size of encoded frame;
Wherein x264_clip3f () function is used for judgingValue whether between 0.5 and 2,
It is specific as follows:
IfThen overflow=0.5;
IfThen
IfThen overflow=2.
S13, it is obtained according to the actual bit rate of the current encoded frame calculated in step S12 and the expectation code check of current encoded frame
The code check of current encoded frame controls error;The code check of the current encoded frame got controls error D:
Wherein RbitFor the actual bit rate of current encoded frame, EbitFor the expectation code check of current encoded frame.
S14, it controls according to the code check of current encoded frame the key of error and current encoded frame and adjusts current encoded frame
Quantization parameter;Judge whether the code check control error of current encoded frame is less than setting error;Wherein the setting of the present embodiment misses
Difference is 3%.
If so, entering step S15;
If it is not, then terminating the Optimization Steps to current encoded frame quantization parameter;
S15, judge whether current encoded frame is key frame;
If so, reduce current encoded frame quantization parameter, increase the bit number of current encoded frame, in the present embodiment when
The quantization parameter of preceding coded frame reduces 2;
If it is not, then increasing the quantization parameter of current encoded frame, reduce the bit number of current encoded frame, in the present embodiment when
The quantization parameter of preceding coded frame increases 2.
Judge whether current encoded frame is key frame in the present embodiment above-mentioned steps S15, is key frame I in current encoded frame
In the case of frame, since the influence of the key frame I frames in video decoded reconstructed image is bigger, other coded frames are to decoding end weight
The influence of composition picture is smaller, therefore can suitably reduce the quantization parameter of key frame I frames, and the quantization parameter for increasing other frames comes
Code check control is carried out, this makes it possible to reduce the bit number for influencing little coded frame on decoding and reconstituting, and increases key frame
Bit number, and do not interfere with the quality of decoding end reconstructed image.It, can in the case where current encoded frame is not key frame I frames
With the quantization parameter appropriate for increasing non-key frame, reduce the bit number used in non-key frame, realization is not influencing video quality
Under the premise of save amount of coded data.
In the present embodiment, when it is standard yuv video sequence Mobile to input film source, code check controls former algorithm and passes through this
Rate control algorithm correction data after the optimization of embodiment quantization parameter is as shown in table 1;
Table 1
Be illustrated in figure 4 input film source be above-mentioned standard yuv video sequence Mobile when, in ABR Video codings, pass through
Obtained code check control Error Graph and not above-mentioned quantization through this embodiment after the above-mentioned quantization parameter optimization method of the present embodiment
Obtained code check controls Error Graph after parameter optimization method.In wherein Fig. 4, the curve d1 being located above is ABR Video codings
In the obtained code check of above-mentioned quantization parameter optimization method does not control error through this embodiment, underlying curve d2 is
Obtained code check controls error after above-mentioned quantization parameter optimization method through this embodiment in ABR Video codings.As it can be seen that ABR
When Video coding after the above-mentioned quantization parameter optimization method of the present embodiment, code check control error can be limited within 1%, especially
It is in low bandwidth, and code check controls error smaller, and can improve the PSNR values of image to a certain extent.
In the present embodiment, when input film source is standard yuv video sequence Parils, code check controls former algorithm and passes through this reality
The rate control algorithm correction data applied after quantization parameter optimization is as shown in table 2;
Table 2
Be illustrated in figure 5 input film source be above-mentioned standard yuv video sequence Parils when, in ABR Video codings, pass through
Obtained code check control Error Graph and not above-mentioned quantization through this embodiment after the above-mentioned quantization parameter optimization method of the present embodiment
Obtained code check controls Error Graph after parameter optimization method.In wherein Fig. 5, the curve d1 being located above is ABR Video codings
In the obtained code check of above-mentioned quantization parameter optimization method does not control error through this embodiment, underlying curve d2 is
Obtained code check controls error after above-mentioned quantization parameter optimization method through this embodiment in ABR Video codings.As it can be seen that ABR
When Video coding after the above-mentioned quantization parameter optimization method of the present embodiment, code check control error can be limited within 2%, be passed through
The actual bit rate for crossing the video of quantization parameter optimization is more nearly desired code check, and can improve image to a certain extent
PSNR values reduce the distortion factor of image.
Embodiment 2
The present embodiment 2 discloses a kind of optimization method of ABR video frequency coding rates control, with ABR videos in embodiment 1
The optimization method of encoder bit rate control differs only in, and as shown in fig. 1, the present embodiment further includes being buffered to current encoded frame
The step of area's growth pattern optimization.
The step of present encoding frame buffer zone growth pattern is optimized in the present embodiment, it is specific as follows:
S21, the buffer size for obtaining encoded frame, obtain the phase of the practical total bit number and encoded frame of encoded frame
Hope total bit number;
S22, according to the buffer size of the upper coded frame of current encoded frame and the practical total bit number of encoded frame
The buffer size of current encoded frame is obtained with the deviation of the expectation total bit number of encoded frame:
Wherein ABR 'bufFor the buffer size of current encoded frame, ABRbufFor current encoded frame a upper coded frame it is slow
Rush area's size, BitiFor the actual bit number of the encoded frame of the i-th frame,For the practical total bit number of encoded frame, n is
The number of frames of coded frame, ESbitFor the expectation total bit number of encoded frame.
S21 and S22 optimizes present encoding frame buffer zone growth pattern to the present embodiment through the above steps, overcomes
The growth pattern of buffering area is to being monotonic increase after the no upper limit of the growth of buffering area and 49 frames in the prior art, cause with
The increase buffering area for coding frame number can be increasing, the technical problem that the delay of video also can be increasing.By to current
Encode the optimization of frame buffer zone growth pattern so that the delay smaller of transmission of video, real-time are more preferable.
The above embodiment is a preferred embodiment of the present invention, but embodiments of the present invention are not by above-described embodiment
Limitation, it is other it is any without departing from the spirit and principles of the present invention made by changes, modifications, substitutions, combinations, simplifications,
Equivalent substitute mode is should be, is included within the scope of the present invention.
Claims (9)
1. a kind of optimization method of ABR video frequency coding rates control, which is characterized in that including excellent to current encoded frame quantization parameter
The step of change;
Described the step of optimizing to current encoded frame quantization parameter, is specific as follows:
S11, the coding information for obtaining encoded frame, include the crucial frame number of the practical total bit number of encoded frame, encoded frame
The frame per second of amount and encoded frame;
S12, worked as according to the acquisition of the crucial number of frames of the practical total bit number of encoded frame, the frame per second of encoded frame and encoded frame
The actual bit rate of preceding coded frame;According to the complexity cusum of encoded frame, equal interval quantizing control coefrficient, coding rate parameter
With the quantization parameter of buffer overflow parameter acquiring current encoded frame;
S13, it is obtained currently according to the actual bit rate of the current encoded frame calculated in step S12 and the expectation code check of current encoded frame
The code check of coded frame controls error;
S14, it controls according to the code check of current encoded frame the key of error and current encoded frame and adjusts the amount of current encoded frame
Change parameter;Judge whether the code check control error of current encoded frame is less than setting error;
If so, entering step S15;
If it is not, then terminating the Optimization Steps to current encoded frame quantization parameter;
S15, judge whether current encoded frame is key frame;
If so, reducing the quantization parameter of current encoded frame, increase the bit number of current encoded frame;
If it is not, then increasing the quantization parameter of current encoded frame, reduce the bit number of current encoded frame;
The quantization parameter acquisition process of current encoded frame is as follows in the step S12:
S121, the complexity that current encoded frame is predicted according to the complexity cusum of encoded frame;
S122, current encoded frame is calculated according to the complexity and equal interval quantizing control coefrficient of the step S121 current encoded frames predicted
Former quantization parameter;
S123, first the former quantization parameter of current encoded frame is adjusted according to coding rate parameter, obtains current encoded frame
Then first quantization parameter is adjusted the first quantization parameter of current encoded frame further according to buffer overflow parameter, obtains
The quantization parameter of current encoded frame.
2. the optimization method of ABR video frequency coding rates control according to claim 1, which is characterized in that further include to working as
It is the step of preceding coding frame buffer zone growth pattern optimization, specific as follows:
S21, the buffer size for obtaining encoded frame, the expectation of the practical total bit number and encoded frame that obtain encoded frame are total
Bit number;
S22, according to the buffer size of a upper coded frame and the practical total bit number of encoded frame of current encoded frame and
The deviation of the expectation total bit number of coded frame obtains the buffer size of current encoded frame:
Wherein ABR 'bufFor the buffer size of current encoded frame, ABRbufFor the buffering area of a upper coded frame for current encoded frame
Size,For the practical total bit number of encoded frame, BitiFor the actual bit number of the encoded frame of the i-th frame, n is encoded
The number of frames of frame, ESbitFor the expectation total bit number of encoded frame.
3. the optimization method of ABR video frequency coding rates according to claim 1 control, which is characterized in that in step S12 when
The actual bit rate R of preceding coded framebitFor:
WhereinFor the practical total bit number of encoded frame, BitiFor the actual bit number of the encoded frame of the i-th frame, Fps is
The frame per second of coded frame, IframFor the crucial number of frames of encoded frame, n is the number of frames of encoded frame.
4. the optimization method of ABR video frequency coding rates control according to claim 1, which is characterized in that the step S13
The code check of middle current encoded frame controls error D:
Wherein RbitFor the actual bit rate of current encoded frame, EbitFor the expectation code check of current encoded frame.
5. the optimization method of ABR video frequency coding rates control according to claim 1, which is characterized in that the step
In S121, the complexity CPLX of the current encoded frame of predictionblurFor:
Wherein n is the number of frames of encoded frame, CPLXsumFor the complexity cusum of encoded frame;
The complexity cusum CPLX of the preceding encoded frame of i framessum,iFor:
CPLXsum,i=CPLXsum,i-1×0.5+SATDi-1, i=1,2,3 ..., n;
Wherein CPLXsum,i-1For the complexity cusum of the preceding encoded frame of i-1 frames, SATDi-1For the pre- of the preceding encoded frame of i-1 frames
Survey residual absolute value summation;
The complexity cusum CPLX of encoded framesumFor:
CPLXsum=CPLXsum,n。
6. the optimization method of ABR video frequency coding rates control according to claim 5, which is characterized in that the step
In S122, the former quantization parameter Q of current encoded framescaleFor:
Qscale=CPLXblur (1-QC);
Wherein CPLXblurFor the complexity of the current encoded frame of prediction, QC is the equal interval quantizing parameter level degree of compression.
7. the optimization method of ABR video frequency coding rates control according to claim 6, which is characterized in that equal interval quantizing is joined
Number order compression degree QC=0.6.
8. the optimization method of ABR video frequency coding rates control according to claim 6, which is characterized in that the step
First amount of the current encoded frame after being adjusted to the former quantization parameter of current encoded frame according to coding rate parameter in S123
Change parameter Qscale' be:
Wherein rate_factor is the code rate of current encoded frame, and rate_factor is:
Wherein EbitFor the expectation code check of current encoded frame, CPLXsumFor the complexity cusum of encoded frame.
9. according to the optimization method of the ABR video frequency coding rates control described in claim 8, which is characterized in that the step
The amount of current encoded frame after being adjusted to the first quantization parameter of current encoded frame according to buffer overflow parameter in S123
Change parameter Qscale" it is:
Qscale"=Qscale′×overflow;
Wherein Qscale' for the current encoded frame after being adjusted to the former quantization parameter of current encoded frame according to coding rate parameter
The first quantization parameter, overflow be according to the practical total bit number of encoded frame and the expectation mark total bit number of encoded frame
Between deviation setting prevent overflow parameter, wherein overflow is:
WhereinFor the practical total bit number of encoded frame, BitiFor the actual bit number of the encoded frame of the i-th frame, ESbitFor
The expectation total bit number of encoded frame;abrbufferFor the average buffer size of encoded frame;
IfThen overflow=0.5;
IfThen
IfThen overflow=2.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510979146.XA CN105376568B (en) | 2015-12-22 | 2015-12-22 | A kind of optimization method of ABR video frequency coding rates control |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510979146.XA CN105376568B (en) | 2015-12-22 | 2015-12-22 | A kind of optimization method of ABR video frequency coding rates control |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN105376568A CN105376568A (en) | 2016-03-02 |
| CN105376568B true CN105376568B (en) | 2018-11-06 |
Family
ID=55378311
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510979146.XA Active CN105376568B (en) | 2015-12-22 | 2015-12-22 | A kind of optimization method of ABR video frequency coding rates control |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105376568B (en) |
Families Citing this family (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105898329A (en) * | 2016-04-12 | 2016-08-24 | 乐视控股(北京)有限公司 | Code rate control method and code rate control device used for video coding |
| WO2018072675A1 (en) | 2016-10-18 | 2018-04-26 | Zhejiang Dahua Technology Co., Ltd. | Methods and systems for video processing |
| CN106572352B (en) * | 2016-10-21 | 2019-09-17 | 浙江大华技术股份有限公司 | A kind of key frame sign control method and device |
| CN108924611B (en) * | 2018-06-27 | 2020-11-27 | 曜科智能科技(上海)有限公司 | ABR coding rate control optimization method, electronic equipment and storage medium |
| CN109168030B (en) * | 2018-10-12 | 2021-03-26 | 中南大学 | A video transcoding method, device and storage medium thereof |
| CN111050175A (en) * | 2018-10-15 | 2020-04-21 | 华为技术有限公司 | Method and apparatus for video coding |
| CN109640114A (en) * | 2018-12-12 | 2019-04-16 | 深圳市网心科技有限公司 | Video compiles transcoding compression method, device, equipment and computer readable storage medium |
| CN109451313A (en) * | 2018-12-14 | 2019-03-08 | 深圳市网心科技有限公司 | A kind of method for video coding, system and electronic equipment and storage medium |
| CN109862362A (en) * | 2018-12-29 | 2019-06-07 | 深圳市网心科技有限公司 | A video MPEG2 encoding method, system, medium and device |
| CN109862315B (en) * | 2019-01-24 | 2021-02-09 | 华为技术有限公司 | Video processing method, related equipment and computer storage medium |
| CN113660491B (en) * | 2021-08-10 | 2024-05-07 | 杭州网易智企科技有限公司 | Encoding method, encoding device, storage medium, and electronic apparatus |
| CN113676730B (en) | 2021-08-12 | 2022-12-02 | 北京百度网讯科技有限公司 | Video coding method and device, electronic equipment and storage medium |
| CN115941946A (en) * | 2022-09-19 | 2023-04-07 | 浙江大华技术股份有限公司 | Video coding method and related device, coding device, storage medium |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007089035A (en) * | 2005-09-26 | 2007-04-05 | Toshiba Corp | Moving image encoding method, apparatus, and program |
| CN103841418A (en) * | 2012-11-22 | 2014-06-04 | 中国科学院声学研究所 | Optimization method and system for code rate control of video monitor in 3G network |
-
2015
- 2015-12-22 CN CN201510979146.XA patent/CN105376568B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007089035A (en) * | 2005-09-26 | 2007-04-05 | Toshiba Corp | Moving image encoding method, apparatus, and program |
| CN103841418A (en) * | 2012-11-22 | 2014-06-04 | 中国科学院声学研究所 | Optimization method and system for code rate control of video monitor in 3G network |
Non-Patent Citations (2)
| Title |
|---|
| X264的平均比特率控制算法优化;田一姝等;《计算机应用》;科学出版社;20130301;第33卷(第3期);680-683 * |
| 基于H.264的可变码率无线视频传输系统的设计与实现;张靖欣;《中国优秀硕士学位论文全文数据库 信息科技辑》;20110515(第05期);24-33 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105376568A (en) | 2016-03-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105376568B (en) | A kind of optimization method of ABR video frequency coding rates control | |
| CN103841418B (en) | The optimization method of video monitor Rate Control and system in a kind of 3G network | |
| CN104683804B (en) | Parameter adaptive multidimensional bit rate control method based on video content features | |
| CN102761741B (en) | Video encoding code rate control system and method on basis of caches at encoding and decoding ends | |
| JP2001511983A (en) | Rate control method and apparatus for performing video encoding at a low bit rate based on a perceptual characteristic-based trellis | |
| CN110996038B (en) | Adaptive code rate adjusting method for multi-person interactive live broadcast | |
| CN1476727A (en) | Method for generating a scalable coded video bitstream with constant quality | |
| CN107071422B (en) | Low complex degree HEVC rate adaption transformation coding method based on image correlation model | |
| CN100568966C (en) | A network transmission method of audio/video data | |
| TWI774383B (en) | Encoder and associated signal processing method | |
| CN101656887A (en) | Method and device for selecting rate control algorithm | |
| CN113596483A (en) | Method and system for determining parameters of coding tree unit | |
| CN116095324A (en) | Video data transmission method, device and equipment | |
| CN102625104B (en) | Video coding method | |
| CN102695058B (en) | Vast-scale buffering policy-based audio/video code stream control method | |
| CN100358364C (en) | Code rate control method for subtle granule telescopic code based on H.264 | |
| CN115550655B (en) | A bit rate control method for real-time monitoring scenarios | |
| CN114071142A (en) | Code rate control method and device based on hardware encoder | |
| CN102724507A (en) | GPU (graphic processing unit) accelerating encoder rate control method | |
| CN112004084B (en) | Code rate control optimization method and system by utilizing quantization parameter sequencing | |
| CN110572661B (en) | Low-delay code rate control method for 4K/8K ultra-high-definition video coding | |
| CN110662045B (en) | 8K-oriented AVS2 ultra-high definition video coding rate control method | |
| CN106254872A (en) | Method and related apparatus for entropy transform coding | |
| CN112004083B (en) | Method and system for optimizing code rate control by utilizing inter-frame prediction characteristics | |
| CN112004087B (en) | Code rate control optimization method taking double frames as control units and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |