CN107040788B - A kind of video-frequency compression method and device - Google Patents
A kind of video-frequency compression method and device Download PDFInfo
- Publication number
- CN107040788B CN107040788B CN201610076389.7A CN201610076389A CN107040788B CN 107040788 B CN107040788 B CN 107040788B CN 201610076389 A CN201610076389 A CN 201610076389A CN 107040788 B CN107040788 B CN 107040788B
- Authority
- CN
- China
- Prior art keywords
- frame
- interior
- energy
- sum
- norm
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/146—Data rate or code amount at the encoder output
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
Abstract
The invention discloses a kind of video-frequency compression method and devices.The described method includes:, using Hadamard transform, determining that the first offset in this adjustment period, first offset are used to indicate the quantization parameter gap between I frame and P frame when adjusting period arrival;Using first offset, adjustment is located at the quantization parameter initial value of I frame or P frame in this adjustment period, and carries out video compress using the quantization parameter that adjustment obtains.Such scheme helps to improve video compress quality.
Description
Technical field
The present invention relates to data processing fields, and in particular, to a kind of video-frequency compression method and device.
Background technique
HEVC (English: High Efficiency Video Coding, Chinese: efficient video coding) is a kind of new view
Frequency compression standard.
The purpose of video compress is the various redundancies removed in digital video, such as spatial redundancy, temporal redundancy, entropy redundancy
Deng to save transimission and storage expense.In general, the fidelity etc. after amount of video compression, video compress, mainly by quantization parameter
The influence of (English: Quantization Parameter, abbreviation: QP), therefore, in video coding process, each coding unit
Different QP values can be used, that is, video compress can be improved by way of to each coding unit reasonable distribution QP value
Quality.
Summary of the invention
The object of the present invention is to provide a kind of video-frequency compression method and devices, help to improve video compress quality.
The embodiment of the invention provides a kind of video-frequency compression methods, which comprises
When adjusting the period and reaching, using Hadamard transform, the first offset in this adjustment period is determined, described first
Offset is used to indicate the quantization parameter gap between I frame and P frame;
Using first offset, adjustment is located at the quantization parameter initial value of I frame or P frame in this adjustment period, and
Video compress is carried out using the quantization parameter that adjustment obtains.
Optionally, described to utilize Hadamard transform, determine the first offset in this adjustment period, comprising:
Using the Hadamard transform, the frame self-energy HAD of present frame is calculatedIt is interiorWith interframe energy HADBetween, the interframe energy
Amount is the energy of the present frame and the present frame in the error image for playing the former frame in sequence;
According to the HADIt is interiorAnd HADBetween, obtain the first deviation ratio IPQ=1.4+K1*IPmax* Clip (c, d, K2(1-S));Its
In, K1Indicate adjustment intensity, 0 < K1<1;IPmax=Clip (a, b, 1-DIt is interior/ 40), a and b indicates 1-DIt is interior/ 40 interception range, 0 <
B-a≤3, DIt is interior=SumIt is interior/normIt is interior/ resolution ratio, SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior=K3*normBefore+ 1,0 < K3<1;C and d
Indicate K2The interception range of (1-S), 0 < d-c≤3,1≤K2≤ 3, S indicate relative intensity, by DIt is interiorAnd DBetweenIt calculates and obtains, DBetween=
SumBetween/normBetween/ resolution ratio, SumBetween=K4*SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,0 < K4<1;
Using the IPQ, the first offset IP=(Int) (6log is obtained2(IPQ)+0.5)。
Optionally, the present frame marks off the coding unit of M n × n size, in the frame for calculating the present frame
Energy HADIt is interior, comprising:
It is calculated by the following formula the energy HAD of the coding unit of each n × n sizeCU:
Wherein, C indicates that coding unit matrix, i and j are for indicating after doing the transformation that Hadamard transform obtains to coding unit
Coordinate after transformation in coding unit matrix;
By the energy HAD of the coding unit of M n × n sizeCUThe sum of, it is determined as the frame self-energy of the present frame
HADIt is interior。
Optionally, the quantization parameter initial value of frame is presented as the quantization parameter initial value for each coding unit that the frame marks off,
Then adjust the quantization parameter initial value, comprising:
Using first offset, the quantization parameter initial value of each coding unit is adjusted.
Optionally, the method also includes:
Using the Hadamard transform, determine that the second offset in this adjustment period, second offset are used for table
Show the quantization parameter gap between P frame and B frame;
Using second offset, adjustment is located at the quantization parameter initial value of P frame or B frame in this adjustment period, and
Video compress is carried out using the quantization parameter that adjustment obtains.
Optionally, described to utilize the Hadamard transform, determine the second offset in this adjustment period, comprising:
Using the Hadamard transform, the frame self-energy HAD of present frame is calculatedIt is interiorWith interframe energy HADBetween, the interframe energy
Amount is the present frame and the present frame in the error image energy for playing the former frame in sequence;
According to the HADIt is interiorAnd HADBetween, obtain the second deviation ratio PBQ=1.3+Clip (f, g, 1-S);Wherein, f and g is indicated
The interception range of 1-S, 0 < g-f≤2, S indicate relative intensity, by DIt is interiorAnd DBetweenIt calculates and obtains, DIt is interior=SumIt is interior/normIt is interior/ resolution ratio,
SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior=K3*normBefore+ 1,0 < K3<1;DBetween=SumBetween/normBetween/ resolution ratio, SumBetween=K4*
SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,0 < K4<1;
Using the PBQ, the second offset PB=(Int) (6log is obtained2(PBQ)+0.5)。
The embodiment of the invention provides a kind of video compress device, described device includes:
First shift amount determining unit, for using Hadamard transform, determining this adjustment period when adjusting period arrival
The first interior offset, first offset are used to indicate the quantization parameter gap between I frame and P frame;
Quantization parameter adjustment unit, for utilize first offset, adjustment be located at this adjustment period in I frame or
The quantization parameter initial value of P frame, and video compress is carried out using the quantization parameter that adjustment obtains.
Optionally, first shift amount determining unit includes:
First energy calculation unit calculates the frame self-energy HAD of present frame for utilizing the Hadamard transformIt is interiorAnd frame
Between energy HADBetween, the interframe energy is that the present frame and the present frame are playing the error image of the former frame in sequence
Energy;
First deviation ratio obtaining unit, for according to the HADIt is interiorAnd HADBetween, obtain the first deviation ratio IPQ=1.4+K1*
IPmax* Clip (c, d, K2(1-S));Wherein, K1Indicate adjustment intensity, 0 < K1<1;IPmax=Clip (a, b, 1-DIt is interior/ 40), a and b
Indicate 1-DIt is interior/ 40 interception range, 0 <b-a≤3, DIt is interior=SumIt is interior/normIt is interior/ resolution ratio, SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior
=K3*normBefore+ 1,0 < K3<1;C and d indicates K2The interception range of (1-S), 0 < d-c≤3,1≤K2≤ 3, S indicate relative intensity,
By DIt is interiorAnd DBetweenIt calculates and obtains, DBetween=SumBetween/normBetween/ resolution ratio, SumBetween=K4*SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,
0<K4<1;
First offset obtaining unit obtains the first offset IP=(Int) (6log for utilizing the IPQ2
(IPQ)+0.5)。
Optionally, the present frame marks off the coding unit of M n × n size, first energy calculation unit, tool
Body is used to be calculated by the following formula the energy HAD of the coding unit of each n × n sizeCU, and by M n × n size
The energy HAD of coding unitCUThe sum of, it is determined as the frame self-energy HAD of the present frameIt is interior:
Wherein, C indicates that coding unit matrix, i and j are for indicating after doing the transformation that Hadamard transform obtains to coding unit
Coordinate after transformation in coding unit matrix.
Optionally, the quantization parameter initial value of frame is presented as the quantization parameter initial value for each coding unit that the frame marks off,
Then
The quantization parameter adjustment unit is specifically used for utilizing first offset, adjusts the amount of each coding unit
Change initial parameter values.
Optionally, described device further include:
Second shift amount determining unit determines the second offset in this adjustment period for utilizing the Hadamard transform
Amount, second offset are for indicating the quantization parameter gap between P frame and B frame;
The quantization parameter adjustment unit is also used to using second offset, and adjustment is located at the P in this adjustment period
The quantization parameter initial value of frame or B frame, and video compress is carried out using the quantization parameter that adjustment obtains.
Optionally, second shift amount determining unit includes:
Second energy calculation unit calculates the frame self-energy HAD of present frame for utilizing the Hadamard transformIt is interiorAnd frame
Between energy HADBetween, the interframe energy is the present frame and the present frame in the error image for playing the former frame in sequence
Energy;
Second deviation ratio obtaining unit, for according to the HADIt is interiorAnd HADBetween, obtain the second deviation ratio PBQ=1.3+Clip
(f, g, 1-S);Wherein, f and g indicates the interception range of 1-S, and 0 < g-f≤2, S indicate relative intensity, by DIt is interiorAnd DBetweenIt calculates and obtains,
DIt is interior=SumIt is interior/normIt is interior/ resolution ratio, SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior=K3*normBefore+ 1,0 < K3<1;DBetween=SumBetween/
normBetween/ resolution ratio, SumBetween=K4*SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,0 < K4<1;
Second offset obtaining unit obtains the second offset PB=(Int) (6log for utilizing the PBQ2
(PBQ)+0.5)。
In technical solution of the present invention, Hadamard transform can use, reflect the characteristic of input video, i.e. the present invention program
Defined in texture-rich degree and exercise intensity, in this way, can determine to close in the case where fully considering input video characteristic
Suitable adjustment offset, and then on the basis of QP initial value, QP value after being adjusted, for being used in video compress.Specifically
Ground can determine the first offset for indicating QP gap between I frame and P frame using Hadamard transform according to actual needs, and
It is made the appropriate adjustments using QP initial value of first offset to I frame or P frame;Alternatively, Hadamard can also be utilized according to actual needs
Transformation is determined to indicate the second offset of QP gap between P frame and B frame, and utilizes the second offset at the beginning of the QP of P frame or B frame
Value makes the appropriate adjustments.
Other features and advantages of the present invention will the following detailed description will be given in the detailed implementation section.
Detailed description of the invention
The drawings are intended to provide a further understanding of the invention, and constitutes part of specification, with following tool
Body embodiment is used to explain the present invention together, but is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the flow chart of video-frequency compression method of the present invention;
Fig. 2 is the flow chart for determining the first offset in the present invention using Hadamard transform;
Fig. 3 is the flow chart for determining the second offset in the present invention using Hadamard transform;
Fig. 4 is the structural schematic diagram of video compress device of the present invention.
Specific embodiment
Below in conjunction with attached drawing, detailed description of the preferred embodiments.It should be understood that this place is retouched
The specific embodiment stated is merely to illustrate and explain the present invention, and is not intended to restrict the invention.
In general, original uncompressed digital video can be stored by RGB or yuv format, that is, included by video
Each pixel in each frame can be indicated with the brightness and color in RGB three-component or YUV.If not to original video
It is compressed, data volume is very huge.Especially in the case where user experience of the people to digital video requires higher and higher,
Video resolution from 480P (640 × 480) develop to quasi- high definition 720P (1280 × 720), full HD 1080P (1290 ×
1080), 4K etc. carries out compression processing to video with greater need for by effective means, to save the transimission and storage expense of video.
Before introducing the present invention program, simple introduction first is done to the frame type in HEVC.In general, frame type can wrap
It includes: I frame, P frame, B frame (the big B frame that can be referenced and the small B frame that can not be referenced can be subdivided into).Wherein, I frame (I frame)
For intracoded frame, also known as absolute coding frame, I frame is generated without necessarily referring to other pictures, and when coding only utilizes present frame
Information removes the spatial redundancy of image, and the information content of data shared by I frame is bigger.P frame (P frame) is forward predictive coded
Frame, P frame needs to refer to the I frame of front or P frame generates, and in addition to removing spatial redundancy when coding, also removes using forward prediction
The compression of temporal redundancy, P frame is relatively high.B frame (B frame) is bi-directional predicted interpolation coding frame, and B frame needs to refer to the I of front
Frame or P frame and subsequent P frame generate, and in addition to spatial redundancy, when coding also utilizes bi-directional predicted removal temporal redundancy, B frame
Compression ratio highest.
In practical applications, can be in such a way that QP value be arranged in hierarchical, Lai Tigao video compress quality.Citing comes
It says, hierarchical setting QP value can be presented as, in conjunction with the significance level of each type frame, the QP value of the type frame is set, in general,
The number that frame is referenced is more, and significance level is higher.That is, when carrying out video compress, it can be with appropriate adjustment I
The QP value of frame, P frame, B frame, to reach better video compress effect.
Below with reference to specific example, the video compression of the present invention program is explained.
Referring to Fig. 1, the flow chart of video-frequency compression method of the present invention is shown, may include:
S101, using Hadamard transform, determines the first offset in this adjustment period, institute when adjusting period arrival
The first offset is stated for indicating the quantization parameter gap between I frame and P frame.
QP adjustment frequency is excessively high in order to prevent, impacts to video compress quality, can preset the adjustment period, and
When adjusting period arrival, the QP value of the frame in the present invention program appropriate adjustment adjustment period is utilized.
For example, the size that the adjustment period can be set according to actual needs by user, as user is specified at interval of N number of
An adjustment period is arranged in frame, if N=20, for including the input video of 100 frames, can be divided into 5 adjustment
Period.Alternatively, the adjustment period can also be arranged according to frame group GOP (Group of Pictures), i.e. a GOP includes
Framing bit is in an adjustment period, it is contemplated that the first frame of GOP is all I frame, therefore, the adjustment period can be identified according to I frame.
Specifically, it can be determined that whether present frame is I frame, if it is, determining that an adjustment period arrived, can trigger and utilizes this hair
Bright scheme carries out the adjustment of QP value.
In the existing video compression scheme realized based on QP distribution mechanism by different level, mostly by counting optimal mode
QP value is set, does not consider the characteristic of each input video, affects video compress quality to a certain extent.Corresponding to this, originally
It is defeated to can use Hadamard (English: Hadamard, abbreviation: HAD) transformation reflection when needing to carry out the adjustment of QP value for scheme of the invention
Enter the characteristic of video, and then combine the input video characteristic, determines adjustment offset.For example, it can according to need, lead to
It crosses Hadamard transform and obtains the first offset, and utilize the first offset, at the beginning of adjusting the QP initial value of I frame or adjusting the QP of P frame
Value.The second offset can also be obtained by Hadamard transform, and utilize the second offset, at the beginning of the QP for adjusting P frame as needed
The QP initial value of value or adjustment B frame.
Specifically, the first offset in the present invention can be presented as IP, the i.e. offset of I frame and P interframe.Referring to fig. 2,
The flow chart for determining the first offset IP using Hadamard transform is shown, may include:
S201 calculates the frame self-energy HAD of present frame using the Hadamard transformIt is interiorWith interframe energy HADBetween, the frame
Between energy be the energy of the present frame and the present frame in the error image for playing the former frame in sequence.
In the present invention program, following two parameters are defined, for indicating the characteristic of input video: texture-rich degree and fortune
Fatigue resistance can embody are as follows: HAD energy HAD in frameIt is interior, interframe HAD energy HADBetween, HAD density D in frameIt is interiorIt is close with interframe HAD
Spend DBetween.In the present invention program, interframe energy is it is to be understood that present frame and present frame are playing the difference between the former frame in sequence
It is worth the energy of image.
It is to be appreciated that video B has taken a stone road, then regards if video A has taken the wall of a face white glossy
Frequency B is compared with video A, texture-rich Du Genggao.If video C has taken the people of a stroll, video D has taken a running
People, then for video D compared with video C, exercise intensity is higher.
As an example, the present invention is also simulated test to standard HEVC test fragment well known in the art, with
This indicates the accuracy of video properties to verify the present invention by texture-rich degree and exercise intensity.Referring to the following table 1, for line
Manage the higher video clip of richness, DIt is interiorAlso higher;The video clip higher for exercise intensity, DIt is interiorAlso higher.In addition,
For some exercise intensities very close to video clip for, such as " group to scene ", " basketball training ", due to texture-rich degree
Difference causes these video clips to have different DBetween, in this way, the characteristic in order to more accurately indicate input video, the present invention is also
Following parameter: relative intensity S is defined, to indicate for visual information in frame, the relative intensity of interframe movement can
By DIt is interiorAnd DBetweenIt calculates and obtains S.For example, S=D can be presented asBetween/DIt is interior, alternatively, also desirable DIt is interiorAnd DBetweenLogarithmic relationship carry out table
Show S, the embodiment of the present invention is to utilizing DIt is interiorAnd DBetweenThe mode for calculating acquisition S can be not specifically limited.
Table 1
As an example, the present invention in HAD energy can be presented as HAD transformation AC compounent absolute value it
With.Specifically, if present frame marks off the coding unit of M n × n size, the frame self-energy HAD of present frame is calculatedIt is interior, so
Afterwards again by the energy HAD of the coding unit of M n × n sizeCUThe sum of, it is determined as the frame self-energy HAD of present frameIt is interior。
By following formula, the energy HAD of the coding unit of each n × n size can be calculatedCU:
Wherein, C indicates that coding unit matrix, i and j are for indicating after doing the transformation that Hadamard transform obtains to coding unit
Coordinate after transformation in coding unit matrix.For example, the size of coding unit can be 4 × 4,8 × 8,16 × 16,32 ×
32,64 × 64 etc., the present invention can be without limitation to this.
For example, on playing sequence, present frame is the 100th frame, and former frame is the 99th frame, then combines above-mentioned formula, can
It calculates separately to obtain frame self-energy HAD100, interframe energy HAD99,100。
S202, according to the HADIt is interiorAnd HADBetween, obtain the first deviation ratio IPQ=1.4+K1*IPmax* Clip (c, d, K2(1-
S))。
It in the present invention program, fully takes into account visual information and changes with time with HAD energy, adjust it carrying out QP value
Before, following iterative calculation can be done by way of weighted moving average:
Sum <-K × Sum+HADIt is interior;
Norm <-K × norm+1;
Density × resolution ratio=Sum/norm.
In above-mentioned iterative formula, weight K is correcting value, and value range is [0,1].
Specifically, for HAD density D in frameIt is interiorFor, DIt is interior=SumIt is interior/normIt is interior/ resolution ratio.
Wherein, SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior=K3*normBefore+ 1,0 < K3<1.As a preferred embodiment, K3=
0.5.In conjunction with examples cited above, Sum100=0.5*Sum99+HAD100, norm100=0.5*norm99+ 1, wherein Sum99With
norm99It is by the 1st frame to the 98th frame in video, continuous iterative calculation obtains, and no longer illustrates herein.Show as one kind
Example, the Sum of the 1st frame of video1=0, norm1=0.
Specifically, for interframe HAD density DBetweenFor, DBetween=SumBetween/normBetween/ resolution ratio.
Wherein, SumBetween=K4*SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,0 < K4<1.As a preferred embodiment, K4
=0.9.In examples cited above, Sum99,100=0.9*Sum98,99+HAD99,100, norm99,100=0.9*norm98,99+ 1,
Sum98,99And norm98,99It is by the 1st frame to the 98th frame in video, continuous iterative calculation obtains, and no longer illustrates herein
It is bright.
D is obtained according to above-mentioned formulaIt is interiorLater, D can be utilizedIt is interiorDetermine the first maximum offset IP in the present inventionmax=
Clip (a, b, 1-DIt is interior/40).Wherein, a and b indicates 1-DIt is interior/ 40 interception range, 0 <b-a≤3.For example, a=0.0, b=
1.0, that is, ensure that the maximum offset between I frame and P frame is no more than 1, in conjunction with specific input video, if 1-DIt is interior/ 40 meter
Calculation value is located within [0.0,1.0], then calculated value can be determined as IPmaxIf calculated value is located at except [0.0,1.0], then may be used
By calculated value it is close 0.0 or 1.0 be determined as IPmax.For example, if calculated value be 1.3, be located at [0.0,1.0] except and
Close to 1.0, then it can intercept and obtain IPmax=1.0.
In conjunction with introduction made above, D is utilizedIt is interiorAnd DBetweenRelative intensity S can be determined, in addition, utilizing DIt is interiorDetermine IPmax
Later, the IPQ=1.4+K obtained in the present invention can be calculated1*IPmax* Clip (c, d, K2(1-S)).Wherein, K1Indicate adjustment
Intensity, 0 < K1<1;C and d indicates K2The interception range of (1-S), 0 < d-c≤3,1≤K2≤3.K as a preferred embodiment1=
0.6, K2=2, i.e. IPQ=1.4+0.6*IPmax* Clip (c, d, 2-2S).
For example, c=0.0, d=1.0, in conjunction with specific input video, if K2The calculated value of (1-S) is located at
Within [0.0,1.0], then IPQ is determined using calculated value, if calculated value is located at except [0.0,1.0], then using calculating
It is worth close 0.0 or 1.0 and determines IPQ.For example, if calculated value be 1.3, be located at [0.0,1.0] except and close to
1.0, then IPQ=1.4+K1*IPmax*1.0。
S203 obtains the first offset IP=(Int) (6log using the IPQ2(IPQ)+0.5)。
Formula QP=12.0+6.0*log (Q/0.85) can be used for indicating the corresponding relationship between code rate and QP offset, because
This can obtain the first offset IP in conjunction with above-mentioned formula after obtaining the first deviation ratio IPQ.
S102, using first offset, at the beginning of adjustment is located at the quantization parameter of I frame or P frame in this adjustment period
Value, and video compress is carried out using the quantization parameter that adjustment obtains.
The first offset in the present invention indicates, when carrying out video compress between the QP value of I frame and the QP value of P frame
Gap.
Specifically, the QP initial value that can control I frame is constant, adjusts the QP initial value of P frame, that is to say, that is carrying out video pressure
When contracting, the compression to I frame is completed using the QP initial value of I frame, completes the compression to P frame using QP value after the adjustment of P frame.
Alternatively, the QP initial value that also can control P frame is constant, the QP initial value of I frame is adjusted, that is to say, that carrying out video pressure
When contracting, the compression to P frame is completed using the QP initial value of P frame, completes the compression to I frame using QP value after the adjustment of I frame.
Specific Adjusted Option can determine that the present invention can without limitation, as long as ensuring to this according to practical situations
The QP gap adjusted between obtained I frame and P frame is consistent with the first offset.It as an example, can be by user's root
According to actual demand, the QP initial value which kind of type frame selection controls is constant.
To adjust the QP initial value of P frame, make I frame and P frame QP gap be consistent with the first offset for, if present frame is
100th frame after the first offset for determining this adjustment period, can determine whether the frame type of the 101st frame is P frame, if
101 frames are P frames, then can get the QP initial value of the 101st frame, and determine QP value after the adjustment of the 101st frame in conjunction with the first offset,
For being used when video compress.
Specifically, the present invention at least can obtain quantization parameter initial value by following three kinds of modes, be solved separately below
Release explanation.
Mode one obtains quantization parameter initial value by constant QP (referred to as: CQP) mode.
In which, user can preset the base value of QP, in this way, can be in conjunction between base value and the QP value of each type frame
Relationship, obtain the type frame QP value.
As an example, HEVC/H.265 reference software HM-16.0 and open source x265 encoder are supported in CQP mode
The QP value of lower determining different type frame.For example, in x265 encoder, base value=QPI+ 3=QPP=QPB- 3=QPBref-
1, wherein QPIIndicate the QP initial value of I frame, QPPIndicate the QP initial value of P frame, QPBIndicate the QP initial value of B frame, QPBrefExpression can quilt
The QP initial value of the big B frame of reference.
Mode two, through-rate control (referred to as: RC) mode, obtains quantization parameter initial value.
In which, user can with goal-selling code rate, in this way, can combining target code rate, itself of each frame is set
Then code rate recycles the model for indicating corresponding relationship between code rate and quantization parameter, true according to itself code rate of above-mentioned setting
Make the QP initial value of each frame.For example, the number that can be referenced according to each frame, determines the significance level of frame, in turn
Itself code rate of the frame is set according to significance level.
Mode three, on the basis of above two mode, using " cutree " tool in x265 encoder, adaptive
Setting quantization initial parameter values.
That is, can use cutree after pass-through mode one or mode two obtain the QP initial value of each frame and optimize
Processing, and using the QP value after optimization processing as the QP initial value being adaptively arranged in the method three.
In which, every frame is divided into multiple coding units, and using the reference frequency of each coding unit, be somebody's turn to do
The corresponding QP value of coding unit.That is, the QP initial value of a frame can be presented as each coding unit that the frame marks off
QP initial value.
Specifically, coding unit can be referred to directly, can also be by indirect reference.For example, coding unit A is compiled
Code unit B reference, coding unit B are encoded unit C reference, it can be understood as B directly refers to A, C indirect reference A.
After the prior art obtains QP initial value according to mode described above, video pressure directly just is carried out using the QP initial value
Contracting.Corresponding to this, the present invention then can utilize the offset obtained according to Hadamard transform on the basis of gained QP initial value above
Amount, is adaptively adjusted QP initial value, recycles quantization parameter adjusted to carry out video compress, helps to improve video pressure
Contracting quality.
To adjust the QP initial value of P frame, make I frame and P frame QP gap be consistent with the first offset for, if use side
Formula one or mode two obtain the QP initial value of P frame, then adjust the initial value using the first offset, obtain QP value after the adjustment of P frame;
If employing mode three obtains the QP initial value of P frame, i.e. the QP initial value of P frame is presented as the QP for each coding unit that P frame marks off
Initial value adjusts the QP initial value of each coding unit, obtains QP after the adjustment of each coding unit then using the first offset
Value.
Likewise it is possible to be based on mentality of designing of the present invention, determine to indicate that second of the QP gap between P frame and B frame is inclined
Shifting amount, and made the appropriate adjustments using QP initial value of second offset to P frame or B frame in this adjustment period, and then recycle and adjust
Whole obtained quantization parameter carries out video compress, helps to improve video compress quality.
Specifically, the second offset in the present invention can be presented as PB, the i.e. offset of P frame and B interframe.Referring to Fig. 3,
The flow chart for determining the second offset PB using Hadamard transform is shown, may include:
S301 calculates the frame self-energy HAD of present frame using the Hadamard transformIt is interiorWith interframe energy HADBetween, the frame
Between energy be the present frame and the present frame in the error image energy for playing the former frame in sequence.
The mode for calculating the HAD energy of each frame in video can be found in be introduced at figure 2 above, and details are not described herein again.
In conjunction with examples cited above, on playing sequence, present frame is the 101st frame, and former frame is the 100th frame, then can distinguish
Frame self-energy HAD is calculated101And HAD100, interframe energy HAD100,101。
S302, according to the HADIt is interiorAnd HADBetween, obtain the second deviation ratio PBQ=1.3+Clip (f, g, 1-S).
In the present invention program, the calculation about relative intensity S can be found in and introduce at figure 2 above, herein no longer
It repeats.F and g can be used for indicating the interception range of 1-S, 0 < g-f≤2.For example, g=0.0, f=0.7, in conjunction with specific defeated
Enter video, if the calculated value of 1-S is located within [0.0,0.7], then PBQ is determined using calculated value, if calculated value is located at
Except [0.0,0.7], then using calculated value it is close 0.0 or 0.7 determine PBQ.For example, if calculated value is 0.9, position
Except [0.0,0.7] and close to 0.7, then PBQ=1.3+0.7=2.0.
S303 obtains the second offset PB=(Int) (6log using the PBQ2(PBQ)+0.5)。
Formula QP=12.0+6.0*log (Q/0.85) can be used for indicating the corresponding relationship between code rate and QP offset, because
This can obtain the second offset PB in conjunction with above-mentioned formula after obtaining the second deviation ratio PBQ.
It should be noted that if under RC mode obtain QP initial value, and utilize the second offset, to the QP of P frame or B frame
Initial value carries out appropriate adjustment, and the precision that may result in rate control is lower.In view of this, the present invention also provides following preferred
Scheme: judging whether to obtain QP initial value under RC mode, if it is, maintaining the QP gap between P frame and B frame, that is, not two
Offset adjustment is carried out between person;If it is not, then adjusting the QP gap between P frame and B frame using the second offset, making two
The gap for the QP value that person uses when carrying out video compress is consistent with the second offset.
It is to be appreciated that the case where for QP initial value is obtained under RC mode, user can be in conjunction with actual demand, selection benefit
With the second offset, offset adjustment is carried out between P frame and B frame;It is carried out alternatively, also can choose not between P frame and B frame
Offset adjustment, the present invention can be not specifically limited this, can determine in conjunction with practical situations.
In order to preferably assess the video compression performance of the present invention program, the present invention, which also utilizes 11, has different texture rich
The standard HEVC test fragment of Fu Du, exercise intensity and resolution ratio, are tested.
1. carrying out the performance of the scheme of QP adjustment under CQP mode
Using test fragment, tested in x265-v1.6 and HM-16.0, compared with prior art, the present invention
The code efficiency of scheme is obviously improved, and can specifically pass through BD-rate presentation code efficiency.BD-rate is it is to be understood that for same
One video clip, the difference of two kinds of coding methods code rate under phase homogenous quantities (can be presented as Y-PSNR PSNR).This
The code rate that scheme of the invention is saved compared with the prior art can be presented as the negative in table 2.
Table 2
As shown in table 2, in the case where no code rate is lost, in x265-v1.6, can be made using the present invention program
BD-rate highest saves 10%, averagely saves 6.44%;In HM-16.0, BD-rate highest can be made using the present invention program
5% is saved, averagely saves 1.94%.
2. carrying out the performance of the scheme of QP adjustment under RC mode
Using test fragment, tested in x265-v1.6, compared with prior art, the volume of the present invention program
Code efficiency is obviously improved.
Table 3
In table 3, is indicated in " cutree " column, the QP initial value obtained in RC mode is adjusted using cutree tool, it can
With the code rate of saving;It is indicated in " present invention " column, the offset adjustment determined using Hadamard transform is obtained in RC mode
The QP initial value obtained, the code rate that can be saved;It is indicated in " the two is integrated " column, is adjusted using cutree tool and obtained in RC mode
After the QP initial value obtained, the offset further determined using Hadamard transform makes the appropriate adjustments QP value, can save
Code rate.
As shown in table 3, compared with the compression scheme that existing RC mode is realized, the present invention program can make BD-rate be averaged
Save 2.4%.In addition, as integrated cutree, it being capable of gain 20%.
In addition, in order to assess the complexity for calculating offset in the present invention using Hadamard transform, it can be from HM-16.0
It extracts xCalcHADs8x8ISlice function and uses e3-1230@3.30ghz thread using different standard HEVC test fragments
Intel's Xeon run the function 10,000,000 times, the calculating speed of offset of the present invention is verified with this.Verifying knot
Fruit is, for the test fragment of 1080p resolution ratio, processing speed is about 300 frames/second, encodes than most fast HEVC/H.265
The fast several orders of magnitude of device.That is, for the disposed of in its entirety process of video compress, although the present invention is compared with the prior art
The process that offset is calculated using Hadamard transform is increased, but the calculating speed of the process is quickly, therefore will not be to video pressure
The whole efficiency of contracting generates excessive influence, but can significantly improve video compress quality.
Corresponding with method shown in Fig. 1, the embodiment of the present invention also provides a kind of video compress device 400, shown in Figure 4
Schematic diagram, described device can include:
First shift amount determining unit 401, for using Hadamard transform, determining this adjustment when adjusting period arrival
The first offset in period, first offset are used to indicate the quantization parameter gap between I frame and P frame;
Quantization parameter adjustment unit 402, for utilizing first offset, adjustment is located at the I frame in this adjustment period
Or the quantization parameter initial value of P frame, and video compress is carried out using the quantization parameter that adjustment obtains.
Optionally, first shift amount determining unit includes:
First energy calculation unit calculates the frame self-energy HAD of present frame for utilizing the Hadamard transformIt is interiorAnd frame
Between energy HADBetween, the interframe energy is that the present frame and the present frame are playing the error image of the former frame in sequence
Energy;
First deviation ratio obtaining unit, for according to the HADIt is interiorAnd HADBetween, obtain the first deviation ratio IPQ=1.4+K1*
IPmax* Clip (c, d, K2(1-S));Wherein, K1Indicate adjustment intensity, 0 < K1<1;IPmax=Clip (a, b, 1-DIt is interior/ 40), a and b
Indicate 1-DIt is interior/ 40 interception range, 0 <b-a≤3, DIt is interior=SumIt is interior/normIt is interior/ resolution ratio, SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior
=K3*normBefore+ 1,0 < K3<1;C and d indicates K2The interception range of (1-S), 0 < d-c≤3,1≤K2≤ 3, S indicate relative intensity,
By DIt is interiorAnd DBetweenIt calculates and obtains, DBetween=SumBetween/normBetween/ resolution ratio, SumBetween=K4*SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,
0<K4<1;
First offset obtaining unit obtains the first offset IP=(Int) (6log for utilizing the IPQ2
(IPQ)+0.5)。
Optionally, the present frame marks off the coding unit of M n × n size, first energy calculation unit, tool
Body is used to be calculated by the following formula the energy HAD of the coding unit of each n × n sizeCU, and by M n × n size
The energy HAD of coding unitCUThe sum of, it is determined as the frame self-energy HAD of the present frameIt is interior:
Wherein, C indicates that coding unit matrix, i and j are for indicating after doing the transformation that Hadamard transform obtains to coding unit
Coordinate after transformation in coding unit matrix.
Optionally, the quantization parameter initial value of frame is presented as the quantization parameter initial value for each coding unit that the frame marks off,
Then
The quantization parameter adjustment unit is specifically used for utilizing first offset, adjusts the amount of each coding unit
Change initial parameter values.
Optionally, described device further include:
Second shift amount determining unit determines the second offset in this adjustment period for utilizing the Hadamard transform
Amount, second offset are for indicating the quantization parameter gap between P frame and B frame;
The quantization parameter adjustment unit is also used to using second offset, and adjustment is located at the P in this adjustment period
The quantization parameter initial value of frame or B frame, and video compress is carried out using the quantization parameter that adjustment obtains.
Optionally, second shift amount determining unit includes:
Second energy calculation unit calculates the frame self-energy HAD of present frame for utilizing the Hadamard transformIt is interiorAnd frame
Between energy HADBetween, the interframe energy is the present frame and the present frame in the error image for playing the former frame in sequence
Energy;
Second deviation ratio obtaining unit, for according to the HADIt is interiorAnd HADBetween, obtain the second deviation ratio PBQ=1.3+Clip
(f, g, 1-S);Wherein, f and g indicates the interception range of 1-S, and 0 < g-f≤2, S indicate relative intensity, by DIt is interiorAnd DBetweenIt calculates and obtains,
DIt is interior=SumIt is interior/normIt is interior/ resolution ratio, SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior=K3*normBefore+ 1,0 < K3<1;DBetween=SumBetween/
normBetween/ resolution ratio, SumBetween=K4*SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,0 < K4<1;
Second offset obtaining unit obtains the second offset PB=(Int) (6log for utilizing the PBQ2
(PBQ)+0.5)。
It is described the prefered embodiments of the present invention in detail above in conjunction with attached drawing, still, the present invention is not limited to above-mentioned realities
The detail in mode is applied, within the scope of the technical concept of the present invention, a variety of letters can be carried out to technical solution of the present invention
Monotropic type, these simple variants all belong to the scope of protection of the present invention.
It is further to note that specific technical features described in the above specific embodiments, in not lance
In the case where shield, can be combined in any appropriate way, in order to avoid unnecessary repetition, the present invention to it is various can
No further explanation will be given for the combination of energy.
In addition, various embodiments of the present invention can be combined randomly, as long as it is without prejudice to originally
The thought of invention, it should also be regarded as the disclosure of the present invention.
Claims (8)
1. a kind of video-frequency compression method, which is characterized in that the described method includes:
When adjusting period arrival, using Hadamard transform, the first offset in this adjustment period, first offset are determined
Amount is for indicating the quantization parameter gap between I frame and P frame;
Using first offset, adjustment is located at the quantization parameter initial value of I frame or P frame in this adjustment period, and utilizes
It adjusts obtained quantization parameter and carries out video compress;
Wherein, described to utilize Hadamard transform, determine the first offset in this adjustment period, comprising:
Using the Hadamard transform, the frame self-energy HAD of present frame is calculatedIt is interiorWith interframe energy HADBetween, the interframe energy is
The energy of the error image of the former frame of the present frame and the present frame in broadcasting sequence;
According to the HADIt is interiorAnd HADBetween, obtain the first deviation ratio IPQ=1.4+K1*IPmax* Clip (c, d, K2(1-S));Wherein,
K1Indicate adjustment intensity, 0 < K1<1;IPmax=Clip (a, b, 1-DIt is interior/ 40), a and b indicates 1-DIt is interior/ 40 interception range, 0 <b-a
≤ 3, DIt is interior=SumIt is interior/normIt is interior/ resolution ratio, SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior=K3*normBefore+ 1,0 < K3<1;C and d is indicated
K2The interception range of (1-S), 0 < d-c≤3,1≤K2≤ 3, S indicate relative intensity, by DIt is interiorAnd DBetweenIt calculates and obtains, DBetween=SumBetween/
normBetween/ resolution ratio, SumBetween=K4*SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,0 < K4< 1, wherein DIt is interiorIt is close for HAD in frame
Degree, DBetweenFor interframe HAD density, SumIt is interiorResulting total frame self-energy, Sum are calculated for the weighted rolling average of present frameBeforeIt is current
Frame is playing the resulting total frame self-energy of the weighted rolling average calculating of the former frame in sequence, SumBetweenFor the weighted movement of present frame
The resulting total interframe energy of average computation, SumBetween precedingThe weighted rolling average calculating of the former frame in sequence institute is being played for present frame
The total interframe energy obtained, normIt is interiorFor total weight that present frame frame self-energy calculates, normBeforeIt is present frame before playing in sequence
Total weight that the frame self-energy of one frame calculates, normBetweenFor total weight of present frame interframe energy balane, normBetween precedingExist for present frame
Play total weight of the interframe energy balane of the former frame in sequence;
Using the IPQ, the first offset IP=(Int) (6log is obtained2(IPQ)+0.5)。
2. the method according to claim 1, wherein the present frame marks off the coding list of M n × n size
Member, the frame self-energy HAD for calculating the present frameIt is interior, comprising:
It is calculated by the following formula the energy HAD of the coding unit of each n × n sizeCU:
Wherein, C indicates that coding unit matrix, i and j are for indicating transformation after doing the transformation that Hadamard transform obtains to coding unit
Coordinate in coding unit matrix afterwards;
By the energy HAD of the coding unit of M n × n sizeCUThe sum of, it is determined as the frame self-energy HAD of the present frameIt is interior。
3. the method according to claim 1, wherein the quantization parameter initial value of frame is presented as that the frame marks off each
The quantization parameter initial value of a coding unit then adjusts the quantization parameter initial value, comprising:
Using first offset, the quantization parameter initial value of each coding unit is adjusted.
4. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
Using the Hadamard transform, the second offset in this adjustment period is determined, second offset is for indicating P frame
Quantization parameter gap between B frame;
Using second offset, adjustment is located at the quantization parameter initial value of P frame or B frame in this adjustment period, and utilizes
It adjusts obtained quantization parameter and carries out video compress.
5. according to the method described in claim 4, it is characterized in that, the utilization Hadamard transform, determines this adjustment week
The second offset in phase, comprising:
Using the Hadamard transform, the frame self-energy HAD of present frame is calculatedIt is interiorWith interframe energy HADBetween, the interframe energy is
The present frame and the present frame are in the error image energy for playing the former frame in sequence;
According to the HADIt is interiorAnd HADBetween, obtain the second deviation ratio PBQ=1.3+Clip (f, g, 1-S);Wherein, f and g indicates 1-S
Interception range, 0 < g-f≤2, S indicate relative intensity, by DIt is interiorAnd DBetweenIt calculates and obtains, DIt is interior=SumIt is interior/normIt is interior/ resolution ratio, SumIt is interior
=K3*SumBefore+HADIt is interior, normIt is interior=K3*normBefore+ 1,0 < K3<1;DBetween=SumBetween/normBetween/ resolution ratio, SumBetween=K4*SumBetween preceding+
HADBetween, normBetween=K4*normBetween preceding+ 1,0 < K4< 1, wherein DIt is interiorFor HAD density, D in frameBetweenFor interframe HAD density, SumIt is interiorIt is current
The weighted rolling average of frame calculates resulting total frame self-energy, SumBeforeThe weighted movement of former frame in sequence is being played for present frame
The resulting total frame self-energy of average computation, SumBetweenResulting total interframe energy, Sum are calculated for the weighted rolling average of present frameBetween preceding
The resulting total interframe energy of the weighted rolling average calculating of the former frame in sequence, norm are being played for present frameIt is interiorFor present frame frame
Total weight that self-energy calculates, normBeforeFor present frame play sequence on former frame frame self-energy calculate total weight,
normBetweenFor total weight of present frame interframe energy balane, normBetween precedingIt is present frame in the interframe energy for playing the former frame in sequence
The total weight calculated;
Using the PBQ, the second offset PB=(Int) (6log is obtained2(PBQ)+0.5)。
6. a kind of video compress device, which is characterized in that described device includes:
First shift amount determining unit, for using Hadamard transform, determining in this adjustment period when adjusting period arrival
First offset, first offset are used to indicate the quantization parameter gap between I frame and P frame;
Quantization parameter adjustment unit, for utilizing first offset, adjustment is located at I frame or P frame in this adjustment period
Quantization parameter initial value, and carry out video compress using the obtained quantization parameter of adjustment;
Wherein, first shift amount determining unit includes:
First energy calculation unit calculates the frame self-energy HAD of present frame for utilizing the Hadamard transformIt is interiorWith interframe energy
Measure HADBetween, the interframe energy is the energy of the present frame and the present frame in the error image for playing the former frame in sequence
Amount;
First deviation ratio obtaining unit, for according to the HADIt is interiorAnd HADBetween, obtain the first deviation ratio IPQ=1.4+K1*IPmax*
Clip (c, d, K2(1-S));Wherein, K1Indicate adjustment intensity, 0 < K1<1;IPmax=Clip (a, b, 1-DIt is interior/ 40), a and b is indicated
1-DIt is interior/ 40 interception range, 0 <b-a≤3, DIt is interior=SumIt is interior/normIt is interior/ resolution ratio, SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior=K3*
normBefore+ 1,0 < K3<1;C and d indicates K2The interception range of (1-S), 0 < d-c≤3,1≤K2≤ 3, S indicate relative intensity, by DIt is interior
And DBetweenIt calculates and obtains, DBetween=SumBetween/normBetween/ resolution ratio, SumBetween=K4*SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,0 < K4
< 1, wherein DIt is interiorFor HAD density, D in frameBetweenFor interframe HAD density, SumIt is interiorIt is calculated for the weighted rolling average of present frame resulting
Total frame self-energy, SumBeforeThe resulting total frame self-energy of the weighted rolling average calculating of the former frame in sequence is being played for present frame,
SumBetweenResulting total interframe energy, Sum are calculated for the weighted rolling average of present frameBetween precedingIt is previous in broadcasting sequence for present frame
The weighted rolling average of frame calculates resulting total interframe energy, normIt is interiorFor total weight that present frame frame self-energy calculates, normBefore
For total weight that present frame is calculated in the frame self-energy for playing the former frame in sequence, normBetweenFor present frame interframe energy balane
Total weight, normBetween precedingFor total weight of the interframe energy balane of former frame of the present frame in broadcasting sequence;
First offset obtaining unit obtains the first offset IP=(Int) (6log for utilizing the IPQ2(IPQ)+
0.5)。
7. device according to claim 6, which is characterized in that described device further include:
Second shift amount determining unit determines the second offset in this adjustment period, institute for utilizing the Hadamard transform
The second offset is stated for indicating the quantization parameter gap between P frame and B frame;
The quantization parameter adjustment unit is also used to using second offset, adjustment be located at P frame in this adjustment period or
The quantization parameter initial value of person's B frame, and video compress is carried out using the quantization parameter that adjustment obtains.
8. device according to claim 7, which is characterized in that second shift amount determining unit includes:
Second energy calculation unit calculates the frame self-energy HAD of present frame for utilizing the Hadamard transformIt is interiorWith interframe energy
Measure HADBetween, the interframe energy is the present frame and the present frame in the error image energy for playing the former frame in sequence
Amount;
Second deviation ratio obtaining unit, for according to the HADIt is interiorAnd HADBetween, the second deviation ratio PBQ=1.3+Clip of acquisition (f,
G, 1-S);Wherein, f and g indicates the interception range of 1-S, and 0 < g-f≤2, S indicate relative intensity, by DIt is interiorAnd DBetweenIt calculates and obtains, DIt is interior
=SumIt is interior/normIt is interior/ resolution ratio, SumIt is interior=K3*SumBefore+HADIt is interior, normIt is interior=K3*normBefore+ 1,0 < K3<1;DBetween=SumBetween/
normBetween/ resolution ratio, SumBetween=K4*SumBetween preceding+HADBetween, normBetween=K4*normBetween preceding+ 1,0 < K4< 1, wherein DIt is interiorIt is close for HAD in frame
Degree, DBetweenFor interframe HAD density, SumIt is interiorResulting total frame self-energy, Sum are calculated for the weighted rolling average of present frameBeforeIt is current
Frame is playing the resulting total frame self-energy of the weighted rolling average calculating of the former frame in sequence, SumBetweenFor the weighted movement of present frame
The resulting total interframe energy of average computation, SumBetween precedingThe weighted rolling average calculating of the former frame in sequence institute is being played for present frame
The total interframe energy obtained, normIt is interiorFor total weight that present frame frame self-energy calculates, normBeforeIt is present frame before playing in sequence
Total weight that the frame self-energy of one frame calculates, normBetweenFor total weight of present frame interframe energy balane, normBetween precedingExist for present frame
Play total weight of the interframe energy balane of the former frame in sequence;
Second offset obtaining unit obtains the second offset PB=(Int) (6log for utilizing the PBQ2(PBQ)+
0.5)。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610076389.7A CN107040788B (en) | 2016-02-03 | 2016-02-03 | A kind of video-frequency compression method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610076389.7A CN107040788B (en) | 2016-02-03 | 2016-02-03 | A kind of video-frequency compression method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107040788A CN107040788A (en) | 2017-08-11 |
CN107040788B true CN107040788B (en) | 2019-09-17 |
Family
ID=59532947
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610076389.7A Active CN107040788B (en) | 2016-02-03 | 2016-02-03 | A kind of video-frequency compression method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107040788B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020019354A1 (en) * | 2018-07-27 | 2020-01-30 | 深圳市大疆创新科技有限公司 | Video encoding method and device, and computer readable storage medium |
CN112738516B (en) * | 2021-03-30 | 2021-07-09 | 浙江华创视讯科技有限公司 | Encoding method, encoding device, storage medium and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101184239A (en) * | 2007-12-13 | 2008-05-21 | 上海广电(集团)有限公司中央研究院 | Control method of constant code rate |
CN101466035A (en) * | 2007-12-21 | 2009-06-24 | 深圳市融合视讯科技有限公司 | Method for distributing video image set bit based on H.264 |
CN103501439A (en) * | 2012-04-23 | 2014-01-08 | 英特尔公司 | Frame level rate control using motion estimated distortions |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7512182B2 (en) * | 2004-08-30 | 2009-03-31 | General Instrument Corporation | Method and apparatus for performing motion compensated temporal filtering in video encoding |
KR100758270B1 (en) * | 2005-12-09 | 2007-09-12 | 한국전자통신연구원 | Method for Efficient PLSC Information Decoding of DVB-S2 Transmission Frame |
-
2016
- 2016-02-03 CN CN201610076389.7A patent/CN107040788B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101184239A (en) * | 2007-12-13 | 2008-05-21 | 上海广电(集团)有限公司中央研究院 | Control method of constant code rate |
CN101466035A (en) * | 2007-12-21 | 2009-06-24 | 深圳市融合视讯科技有限公司 | Method for distributing video image set bit based on H.264 |
CN103501439A (en) * | 2012-04-23 | 2014-01-08 | 英特尔公司 | Frame level rate control using motion estimated distortions |
Also Published As
Publication number | Publication date |
---|---|
CN107040788A (en) | 2017-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101888566B (en) | Estimation method of distortion performance of stereo video encoding rate | |
US9426494B2 (en) | Systems and methods with early variance measure used to optimize video encoding | |
US9313526B2 (en) | Data compression for video | |
EP2297963B1 (en) | Video compression under multiple distortion constraints | |
US20180124399A1 (en) | In-loop block-based image reshaping in high dynamic range video coding | |
CN101835056B (en) | Allocation method for optimal code rates of texture video and depth map based on models | |
EP2553935B1 (en) | Video quality measurement | |
CN110225343B (en) | Code rate control method and device for video coding | |
US9407902B1 (en) | 3D video encoding and decoding methods and apparatus | |
CN108924554B (en) | Panoramic video coding rate distortion optimization method based on spherical weighting structure similarity | |
US11006112B2 (en) | Picture quality oriented rate control for low-latency streaming applications | |
JP2008527827A (en) | Method of processing a video signal using a quantization step size dynamically based on normal flow | |
JP2005159419A5 (en) | ||
CA2949478A1 (en) | Systems and methods for motion-vector-aided video interpolation using real-time smooth video playback speed variation | |
CN101572806B (en) | Frame I code rate control method based on H264 | |
Liu et al. | Rate control schemes for panoramic video coding | |
EP3306932A1 (en) | Method for encoding and decoding reference image, encoding device, and decoding device | |
CN107040788B (en) | A kind of video-frequency compression method and device | |
Liu et al. | A novel rate control scheme for panoramic video coding | |
JP2000078575A (en) | Means for characterizing compressed bit stream | |
US11290735B1 (en) | Visual element encoding parameter tuning | |
JP2009094644A5 (en) | ||
JP4569968B2 (en) | Moving picture composition apparatus and program | |
US20230196505A1 (en) | Artificial intelligence-based image providing apparatus and method, and artificial intelligence-based display apparatus and method | |
EP3504875B1 (en) | Chroma reshaping based on just noticeable differences |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |