CN114286097B - Coding block quantization increment parameter optimization method in secondary video coding rate control - Google Patents
Coding block quantization increment parameter optimization method in secondary video coding rate control Download PDFInfo
- Publication number
- CN114286097B CN114286097B CN202111580986.0A CN202111580986A CN114286097B CN 114286097 B CN114286097 B CN 114286097B CN 202111580986 A CN202111580986 A CN 202111580986A CN 114286097 B CN114286097 B CN 114286097B
- Authority
- CN
- China
- Prior art keywords
- coding
- frame
- block
- quantization
- prediction
- 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
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention relates to the technical field of video coding compression, in particular to a quantization increment parameter optimization method in a secondary coding rate control application scene. In the rate control algorithm, a frame is equally divided into 16x16 image blocks, where the Quantization Parameter (QP) of the ith 16x16 coding unit i ) Is based on frame-level basic quantization parametersAnd its quantization parameter delta (Δ QP) i ) Specifically, QP i Is the sum of the base quantization parameter and its quantization parameter increment. The invention is applied to a secondary coding algorithm: coding the same video sequence twice, and carrying out pre-coding processing on a target video sequence according to code rate limiting conditions and interframe information correlation degrees in the first coding; the second coding adopts an enhanced related interframe information transfer estimation algorithm according to the statistical analysis of the quantization parameter of each coding block in the first coding, and further performs quantization increment parameter (delta QP) of the 16x16 coding block i ) And (6) optimizing. By adopting the quantization increment parameter optimization algorithm, the code rate cost can be reduced under the same coding image quality.
Description
Technical Field
The invention relates to the technical field of video compression, in particular to a method for optimizing a quantization increment parameter in a secondary coding rate control application scene.
Background
The rate control algorithm in video coding, in which a frame is equally divided into 16 × 16 image blocks, wherein the Quantization Parameter (QP) of the ith 16 × 16 coding unit is the core technology of encoder design i ) Is based on frame-level basic quantization parametersAnd its quantization parameter delta (Δ QP) i ) Determining, specifically, QP i By addition of a base quantization parameter to its quantization parameter increment, i.e.
Video codingThe medium code rate control algorithm is realized by adjusting QP i The minimum rate distortion cost is achieved at a given channel bandwidth. It is formally expressed as
Wherein, QP i Is the quantization parameter of the ith 16x16 image block, D i (QP i ) And R i (QP i ) Taken as QP i Distortion and code rate at λ lagrange factor, R C For the target code rate, I is the code rate controlling the number of 16 × 16 image blocks in the sliding window.
In the traditional quantization increment parameter optimization method, pre-motion prediction calculation is carried out on an undersampled image of a source image, the inter-frame block particle size information correlation degree is estimated, and then the quantization increment parameters of each 16x16 image block are adjusted quantitatively. Compared with the traditional method, the invention is a method for optimizing the quantization increment parameter of the coding unit based on the application scene of the secondary coding rate control, namely the parameter delta QP in the formula (1) i The optimization method of (1).
Disclosure of Invention
The invention uses the motion vector, quantization parameter and intra-frame prediction coding cost (C) of the coding block obtained by the first coding in the second coding intra ) And inter-frame prediction coding cost (C) inter ) And optimizing the quantization increment parameter of the coding block in the secondary coding process.
The quantitative algorithm for quantifying the parameter increment relies on an accurate estimate of the amount of inter-frame information propagation. The first point of the invention is to use the motion vector, quantization parameter and intra-frame prediction coding cost (C) obtained by the first coding intra ) And inter-frame prediction coding cost (C) inter ) The estimation accuracy of the 16x16 block granularity interframe information propagation quantity (PI) is improved. In this process, we invented the concept of the information gain factor (α).
When constructing the mapping relationship between PI and quantization parameter increment, we have invented a dynamic intensity parameter s definition method based on the current 16 × 16 block quantization step, i.e., s = min (1, max (0, τ · (QP-30))), where the variable τ ∈ [0.01,0.1]. And under the low-code-rate coding environment, the performance of the algorithm is further improved.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and not to be construed as limiting the invention in any way, and in which:
fig. 1 is a schematic flowchart of a quantization increment parameter optimization method in a secondary coding rate control application scenario according to an embodiment of the present invention.
Fig. 2 is a diagram illustrating the delivery of 16 × 16 block granularity information between related frames according to an embodiment of the present invention; in the figure, the nth frame is a predicted frame, the nth frame takes an n-1 th frame as a reference frame, each frame comprises 3x3 16x16 image blocks, and a small square represents the 16x16 image block; shaded block in nth frame is CU 11 The intra-prediction cost, the inter-prediction cost, and the amount of input information of the block of positions are represented by C intra 、C inter And PI; the output information amount isThe output information amount after gain PO' = alpha PO, whereinQ is the quantization step size of the shaded block, σ 2 Predicting a variance for the shadow block; the 16x16 shadow blocks in the n-1 th frame are reference areas corresponding to the shadow blocks in the n-1 th frame; PO' is proportionally split into the input information amount according to the overlapping area of the reference area and the adjacent 16x16 blocks; for example, if CU 01 The area overlapping the reference region is 25 luminance pixels,is subject to CU 01 The input information of (2).
Detailed Description
The technical solution of the present invention will be further explained in detail with reference to the accompanying drawings and examples.
Fig. 1 is a schematic flowchart illustrating a method for optimizing quantization increment parameters in a secondary coding rate control application scenario in this embodiment, where the method includes:
s1, dividing each frame image into 16x16 blocks, and acquiring a motion vector, a quantization parameter and an intra-frame prediction coding cost (C) of each 16x16 block in each frame image of a video according to a first coding result intra ) And inter-frame prediction coding cost (C) inter ) The aforementioned motion vector, quantization parameter, and intra prediction coding cost (C) intra ) And inter-frame prediction coding cost (C) inter ) Is used in the second encoding to readjust the quantization increment parameter of each 16 × 16 block to improve the image quality of the second encoding.
And S2, the second encoding adopts the same frame structure and reference relation as the first encoding, and the output information amount PO of the 16x16 block of the prediction frame is calculated based on the intra-frame prediction encoding cost and the inter-frame prediction encoding cost of the 16x16 block of the prediction frame obtained by the first encoding and the input information amount PI of the 16x16 block. The calculation method comprises the following steps: when C of 16x16 block of a predicted frame intra 、C inter And the amount of output information of the 16x16 block of the predicted frame when PI is knownFor a block that is not referenced, its input information quantity PI =0; .
S3, defining a propagation gain coefficient α of the output information amount PO of the 16x16 block of the prediction frame according to the output information amount PO of the 16x16 block of the prediction frame obtained in step S2, specifically including:
according to the primary coding result, we can obtain the motion vector of the 16x16 block in the predicted frame, the quantization step size Q and the variance sigma of the prediction residual error 2 Variance of prediction residual σ 2 That is, the 16x16 block in the prediction frame is subtracted from the 16x16 block in the reference frame according to the pixel point to obtain the residual value of the 16x16 prediction residual block, and the variance of the residual value is calculated; defining a gain factor ofAlpha PO is the total amount of input information from the projection of output information PO of 16x16 blocks in predicted frame to the reference frame pointed by motion vector. This process is represented by PO' = α · PO in fig. 2.
S4, according to the motion vector of the 16x16 block in the predicted frame (e.g. the motion vector of the shadow block of the nth frame in fig. 2), a 16x16 reference region (e.g. the shadow block of the n-1 th frame in fig. 2) on the reference frame can be obtained, and any 16x16 block on the reference frame is defined as a related block if there is an overlapping region with this reference region. If the overlap region contains a number of pixels of the luminance component of s o Then the amount of information is increased when calculating the PI for this reference frame 16x16 dependent blockTherefore, according to the reference relationship of the first encoding, when the output information amount and the gain coefficient of all the blocks in the predicted frame are known, the PI of all the 16 × 16 blocks in the reference frame can be derived.
S5, deriving the 16x16 block quantization increment Δ QP based on the input information amount PI of the 16x16 block in the reference frame obtained in step S4, specifically including: Δ QP = s · log 2 (1 + PI), where the strength parameter s is defined as a function of the quantization parameter QP selected for the current 16x16 block in one coding, with the expression s = min (1,max (0, τ · (QP-30))), where τ ∈ 0.01,0.1.
In summary, by adopting the above quantization increment parameter optimization algorithm, the code rate cost can be reduced under the same coded image quality
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims (1)
1. A coding unit quantization increment parameter optimization method based on a secondary coding rate control application scene is characterized by comprising the following steps:
s1, dividing each frame of image into 16x16 blocks, and acquiring a motion vector, a quantization parameter and an intra-frame prediction coding cost (C) of each 16x16 block in each frame of image of a video according to a first coding result intra ) And inter-frame prediction coding cost (C) inter ) Based on the information, the quantization increment parameters of 16x16 blocks of each frame of image are readjusted in the second coding, so that the image quality of the secondary coding is improved;
s2, the second coding adopts the same frame structure and reference relation as the first coding, and the output information amount PO of the 16x16 block of the prediction frame is calculated based on the intra-frame prediction coding cost and the inter-frame prediction coding cost of the 16x16 block of the prediction frame obtained by the first coding and the input information amount PI of the 16x16 block;
when C of 16x16 block of a predicted frame intra 、C inter And the amount of output information of the 16x16 block of the predicted frame when PI is known
For a block not to be referenced, its input information amount PI =0;
s3, according to the output information amount PO of the 16x16 block of the prediction frame, defining a propagation gain coefficient alpha of the output information amount PO of the 16x16 block of the prediction frame, and calculating the total input information amount of the output information amount PO projected to a reference frame pointed by a motion vector;
defining a propagation gain coefficient ofWhere Q is the quantization step size, σ, of a 16 × 16 block 2 For the variance of a 16x16 prediction residual block, α · PO is the total amount of input information from the projection of the output information PO of the 16x16 block of the prediction frame to the reference frame pointed to by the motion vector;
s4, calculating the input information amount PI of the relevant reference block on the reference frame based on the alpha PO, specifically:
according to the motion vector of the 16x16 block of the predicted frame, a corresponding 16x16 reference area on the reference frame can be obtained, and any 16x16 block on the reference frame which has an overlapping area with the reference area is defined as a related block; the overlapping region includes a number of pixels of a luminance component of s o Then this reference frame 16 is calculatedIncrease of information amount for PI of x16 blockAccording to the reference relation of the first coding, when the output information amount and the propagation gain coefficient of all the blocks in the prediction frame are known, deriving the PI of all the 16x16 blocks in the reference frame; when a 16x16 block is not referenced, its PI equals 0;
s5, calculating a quantization increment Δ QP of the 16x16 block according to the input information amount PI of the 16x16 block of the reference frame obtained in step S4, specifically including:
ΔQP=s·log 2 (1 + PI), where the strength parameter s is defined as a function of the quantization parameter QP selected for the current 16x16 block in one encoding pass, expressed as s = min (1,max (0, τ. Cndot. (QP-30))), where τ ∈ [0.01,0.1 ]))];
By adopting the method for optimizing the quantization increment parameters of the coding units under the application scene based on the secondary coding rate control, the rate cost is reduced under the same coding image quality.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111580986.0A CN114286097B (en) | 2021-12-22 | 2021-12-22 | Coding block quantization increment parameter optimization method in secondary video coding rate control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111580986.0A CN114286097B (en) | 2021-12-22 | 2021-12-22 | Coding block quantization increment parameter optimization method in secondary video coding rate control |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114286097A CN114286097A (en) | 2022-04-05 |
CN114286097B true CN114286097B (en) | 2023-03-17 |
Family
ID=80873766
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111580986.0A Active CN114286097B (en) | 2021-12-22 | 2021-12-22 | Coding block quantization increment parameter optimization method in secondary video coding rate control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114286097B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006004331A1 (en) * | 2004-07-07 | 2006-01-12 | Samsung Electronics Co., Ltd. | Video encoding and decoding methods and video encoder and decoder |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10097851B2 (en) * | 2014-03-10 | 2018-10-09 | Euclid Discoveries, Llc | Perceptual optimization for model-based video encoding |
CN111164972A (en) * | 2017-11-30 | 2020-05-15 | 深圳市大疆创新科技有限公司 | System and method for controlling video encoding at frame level |
AU2018204775A1 (en) * | 2018-06-29 | 2020-01-16 | Canon Kabushiki Kaisha | Method, apparatus and system for encoding and decoding a transformed block of video samples |
US20210144377A1 (en) * | 2020-11-19 | 2021-05-13 | Intel Corporation | Method and system of video coding with content adaptive quantization |
-
2021
- 2021-12-22 CN CN202111580986.0A patent/CN114286097B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006004331A1 (en) * | 2004-07-07 | 2006-01-12 | Samsung Electronics Co., Ltd. | Video encoding and decoding methods and video encoder and decoder |
Non-Patent Citations (1)
Title |
---|
Zhao Wang等.Adaptive motion vector resolution prediction in block-based video coding.2016,全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN114286097A (en) | 2022-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105379269A (en) | Region-of-interest aware video coding | |
US20220014758A1 (en) | System and method for controlling video coding within image frame | |
WO2019104635A1 (en) | System and method for controlling video coding at frame level | |
CN108012163A (en) | The bit rate control method and device of Video coding | |
KR20070093781A (en) | Video coding apparatus and recording medium | |
WO2005062625A1 (en) | Method and device for encoding moving picture | |
KR20030064162A (en) | Adaptive decision method for a range of motion vector | |
CN101523915B (en) | Two pass rate control techniques for video coding using a min-max approach | |
CN110832856A (en) | System and method for reducing video coding fluctuations | |
CN107343202B (en) | Feedback-free distributed video coding and decoding method based on additional code rate | |
CN104754337A (en) | Video encoding method | |
JP4824705B2 (en) | Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs | |
CN114286097B (en) | Coding block quantization increment parameter optimization method in secondary video coding rate control | |
WO2022021422A1 (en) | Video coding method and system, coder, and computer storage medium | |
JP2008503919A (en) | Method and apparatus for optimizing video coding | |
JP4253276B2 (en) | Image coding method | |
KR101242560B1 (en) | Device and method for adjusting search range | |
CN112243129B (en) | Video data processing method and device, computer equipment and storage medium | |
JP2001526850A (en) | Method and apparatus for optimizing a quantization value in an image encoder | |
JP2005348008A (en) | Moving picture coding method, moving picture coder, moving picture coding program and computer-readable recording medium with record of the program | |
JP2001238215A (en) | Moving picture coding apparatus and its method | |
JP5171658B2 (en) | Image encoding device | |
CN101977309A (en) | Code rate control method and device thereof | |
JP4375143B2 (en) | Video encoding device | |
JP2005303555A (en) | Moving image encoding apparatus and its method |
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 |