CN115002461B - Video coding quantization method and device, electronic equipment and storage medium - Google Patents

Video coding quantization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115002461B
CN115002461B CN202210925102.9A CN202210925102A CN115002461B CN 115002461 B CN115002461 B CN 115002461B CN 202210925102 A CN202210925102 A CN 202210925102A CN 115002461 B CN115002461 B CN 115002461B
Authority
CN
China
Prior art keywords
quantization
quantized
coefficients
coefficient
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210925102.9A
Other languages
Chinese (zh)
Other versions
CN115002461A (en
Inventor
孔令一
金星
卢小燕
丁丹丹
朱政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Microframe Information Technology Co ltd
Original Assignee
Hangzhou Microframe Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Microframe Information Technology Co ltd filed Critical Hangzhou Microframe Information Technology Co ltd
Priority to CN202210925102.9A priority Critical patent/CN115002461B/en
Publication of CN115002461A publication Critical patent/CN115002461A/en
Application granted granted Critical
Publication of CN115002461B publication Critical patent/CN115002461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a video coding quantization method, a video coding quantization device, electronic equipment and a storage medium, and relates to the field of video coding quantization. The specific implementation scheme is as follows: after hard decision quantization processing, traversing quantization CG in reverse order, discarding part of quantization coefficients, traversing quantization coefficients in low frequency region in positive order, and screening optimal quantization coefficients. The scheme provided by the invention utilizes the distribution characteristic of the quantized coefficients on the basis of hard decision quantization to screen out the optimal quantized coefficients for the low-frequency part, thereby improving the image quality without increasing the calculation load; zero clearing judgment is carried out on the non-zero quantized coefficients of the high-frequency part, and code rate saving is achieved on the premise that the image quality is not affected.

Description

Video coding quantization method and device, electronic equipment and storage medium
Technical Field
The present invention relates to image coding technology, and in particular, to a video coding quantization method, apparatus, electronic device, and storage medium.
Background
Currently, the mainstream coding standards are all based on a hybrid video coding framework. The hybrid framework mainly comprises links such as prediction (prediction), transformation (transformation), quantization (quantization), entropy coding (entropy coding) and the like. The prediction link is to generate predicted pixels of original pixels corresponding to the current coding block by using reconstructed pixels of the coded region. The prediction mode includes two major types, i.e., intra prediction (intra prediction) and inter prediction (inter prediction). The pixel difference between the original pixel and the predicted pixel is called residual. In order to improve the coding efficiency of the residual, the residual is usually transformed into a transform coefficient (transform coefficient). Then, the transform coefficients are quantized.
In the hybrid video coding framework, the prediction and transformation itself does not introduce distortion to the image data, which is caused by quantization. Quantization is one of the effective methods of data compression and one of the sources of distortion generated by image compression. Thus, the quantization method design is a constrained optimization problem, i.e. achieving as high a compression as possible under conditions that allow a certain distortion (or maintain a certain image quality).
Currently, quantization methods commonly used in video coding are hard decision quantization (Hard Decision Quantization, HDQ) and soft decision quantization (Soft Decision Quantization, SDQ). The coefficients quantized by hard decisions are independent of each other and are suitable for parallel processing, but suffer from the disadvantage of poor rate-distortion performance. In contrast, soft decision quantization algorithms can achieve more excellent rate-distortion performance considering the correlation between coefficients. The soft decision quantization algorithm traverses the transformation coefficient units, each unit calculates a plurality of candidate quantization results, and the optimal quantization candidate value with the minimum rate distortion cost is screened out as the final quantization parameter, so that the great improvement of rate distortion performance is realized. However, the calculation amount of soft decision quantization is very large, and the soft decision quantization has serious sequence processing dependence, cannot be processed in parallel, and further reduces the calculation efficiency.
Disclosure of Invention
Because the existing method has the problems, the embodiment of the invention provides a video coding quantization method, a video coding quantization device, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present invention provides a video coding quantization method, including:
a transform unit is acquired, the transform unit including transform coefficients therein.
And performing hard decision quantization on the transformation coefficient to obtain a quantization CG, wherein the quantization CG comprises quantization coefficients.
Traversing the quantized CG in a reverse order, calculating the zero clearing score of the quantized CG, and setting all non-zero quantized coefficients in the current quantized CG to be zero if the zero clearing score of the current quantized CG is smaller than a preset threshold value; otherwise, the quantization coefficients in the current quantization CG are not changed.
The positive sequence traverses the front 1/4 area of the transformation unit, calculates quantization loss and screens the best quantization coefficient.
In a second aspect, an embodiment of the present invention provides a video coding quantization apparatus, the apparatus including:
and the acquisition module is used for acquiring a transformation unit, wherein the transformation unit comprises transformation coefficients.
And the quantization module is used for performing hard decision quantization on the transformation coefficient to obtain a quantization CG, wherein the quantization CG contains quantization coefficients.
The first calculation judging module is used for traversing the quantized CG in a reverse order, calculating the zero clearing score of the quantized CG, and setting all non-zero quantized coefficients in the current quantized CG to be zero if the zero clearing score of the current quantized CG is smaller than a preset threshold value; otherwise, the quantization coefficients in the current quantization CG are not changed.
And the second calculation judging module is used for traversing the front 1/4 area of the transformation unit in a positive sequence, calculating quantization loss and screening the optimal quantization coefficient.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the preceding aspects.
In a fourth aspect, embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer instructions for performing a method as claimed in any one of the preceding aspects using a computer.
According to the technical scheme, the embodiment of the invention has the following beneficial effects: on the basis of the existing hard decision quantization, the embodiment of the invention utilizes the distribution characteristics that the video information sensitive to human eyes is mainly concentrated in a low-frequency part (upper left corner) and the video information insensitive to human eyes is mainly concentrated in a high-frequency part (lower right corner) after the image is transformed and quantized, screens the optimal quantization coefficient in the selectable quantization coefficient of the low-frequency part, improves the image quality without greatly increasing the calculated amount like an SDQ method, and the quantization loss calculation method provided by the embodiment can realize the parallel processing of calculation, overcomes the problem of sequence processing dependence existing in the SDQ method and greatly improves the calculation efficiency. Meanwhile, the embodiment of the invention carries out zero clearing judgment on the non-zero quantized coefficient of the high-frequency part, and realizes code rate saving on the premise of not affecting the image quality.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an example diagram of CTU partition CUs in an HEVC video coding standard.
Fig. 2 is an exemplary diagram of a CU divided into PUs and TUs in the HEVC video coding standard.
Fig. 3 is a schematic diagram of the distribution of quantized coefficients after hard decision quantization.
Fig. 4 is a flow chart illustrating a video coding quantization method according to an embodiment of the present disclosure.
Fig. 5 is a schematic diagram of a scanning pattern of a reverse-order traversal quantization CG.
FIG. 6 is a schematic diagram of a scan pattern of a forward sequence traversing the first 1/4 region of the transform unit.
Fig. 7 is a schematic structural diagram of a video coding quantization apparatus according to an embodiment of the present disclosure.
Fig. 8 is a schematic structural diagram of an electronic device for implementing a video coding quantization method according to an embodiment of the present disclosure.
Detailed Description
The following describes the embodiments of the present invention further with reference to the accompanying drawings. The following examples are only for more clearly illustrating the technical process of the present invention and are not intended to limit the scope of the present invention.
For a better understanding of the following examples, the basic concepts will be explained first.
As shown in fig. 1 and 2, in HEVC, the block division method does not use coded Macro Blocks (MBs) in AVC any more, but adopts a quadtree division method to divide video frames in video into Coding Tree Units (CTUs), the size of the Coding Tree is generally set to 64×64, each CTU can be further and evenly divided into 4 Coding Units (CUs), and one CU can be recursively divided into 4 small CUs according to the quadtree structure. Each CU may contain one or more Prediction Units (PUs) of different sizes, and further each PU may contain several Transform Units (TUs). In quantization of TUs, the TUs are typically divided into a plurality of coefficient sets (Coefficient Group, CG), and quantization is performed for each CG, i.e., quantization unit.
The transformation of the image is to transform the spatial domain signal to the frequency domain signal, effectively removing the correlation of the signal and concentrating most of the energy into the low frequency region. After transformation, the transform coefficient energy is concentrated mainly in the upper left region, i.e., the region forward in the forward sequence traversal. The coefficients in this region are very significant and tend to concentrate image information that is sensitive to the human eye. In particular, as shown in fig. 3, after hard decision quantization is performed on the transform coefficients, the quantized coefficients in the upper left region are significant, while the quantized coefficients in the lower right region are mostly zero. In view of this, in the actual encoding process, in order to reasonably allocate the number of bits, most of the number of bits is allocated to the upper left low frequency region, while the high frequency region or noise insensitive to human eyes is encoded with a small number of bits. In order to further achieve the coding target of high image quality and low code rate, the embodiment of the invention screens out the optimal quantization coefficient for the region with concentrated energy of the transformation coefficient to improve the image quality, and simultaneously quantizes the quantization CG of high frequency into all-zero CG as much as possible on the premise of ensuring the image quality for the region with most of the transformation coefficient close to 0 so as to save the code rate.
Specifically, the embodiment of the invention provides the following technical scheme:
in a first aspect, fig. 4 shows a flowchart of a video coding quantization method, and as shown in fig. 4, an embodiment of the present invention provides a video coding quantization method, which specifically includes the following contents:
step 1, obtaining a transformation unit, wherein the transformation unit comprises transformation coefficients.
Step 2, hard decision quantization is carried out on the transformation coefficient, and quantization CG is obtained, wherein the quantization CG comprises quantization coefficients:
where c is a transform coefficient, Q is a quantization step size, f is a quantization offset, floor () is a downward rounding function.
Step 3, traversing the quantized CG in a reverse order, calculating the zero clearing score of the quantized CG, and determining all quantized coefficients in the current quantized CG to be zero if the zero clearing score is smaller than a preset threshold value; otherwise, the quantization coefficients in the current quantization CG are not changed.
The inverse traversal quantized CG is scanned in a zig-zag scan, as shown in fig. 5.
In some embodiments, before calculating the zero-clearing score of the quantized CG, determining whether the current quantized CG is an all-zero CG (i.e., the quantized coefficients in the current quantized CG are all zero) is further included. And if the current quantized CG is not all-zero CG, calculating the zero clearing score of the current quantized CG, otherwise, skipping the current quantized CG to judge the next quantized CG.
The calculating a clear score for the quantized CG includes:
and if the quantized coefficient greater than 1 exists in the current quantized CG, determining that the zero clearing score of the current quantized CG is greater than a threshold value, and not changing the quantized coefficient in the current quantized CG.
And if the current quantization CG does not have quantization coefficients larger than 1, the zero clearing score of the current quantization CG is the sum of all quantization coefficients in the current quantization CG.
In some embodiments, to improve the computing efficiency, if the zero clearing score of the current quantized CG is not less than a preset threshold, the traversal is stopped.
And 4, traversing the front 1/4 area of the transformation unit in the positive sequence, calculating quantization loss, and screening the optimal quantization coefficient.
The scanning mode of the front 1/4 area of the forward sequence traversing transformation unit is zigzag scanning, as shown in fig. 6.
In some embodiments, taking the coding cost as the quantization loss, the calculating the quantization loss, and screening the optimal quantization coefficient may include:
traversing the front 1/4 area of the current transformation unit, pre-coding according to the optional quantization coefficients, and calculating coding cost:
where D is the quantization distortion, λ is the lagrangian coefficient, and R is the coding bit rate of the optional quantization coefficient.
The optional quantization coefficients include: i, I+1, I-1.
And selecting the quantization coefficient corresponding to the minimum coding cost as the optimal quantization coefficient.
In other embodiments, the calculation coding cost needs to actually code the selectable quantization coefficients respectively, so the calculation amount is quite large, and the calculation coding cost has sequence processing dependence and cannot be processed in parallel, thereby further affecting the calculation efficiency. To reduce the computational burden, eliminating computational relevance of quantization loss to implement parallel computational processing, the computing quantization loss, screening the best quantization coefficients may further include:
and traversing the front 1/4 area of the transformation unit in the positive sequence, and performing inverse quantization on the optional quantization coefficients to obtain estimated transformation coefficients.
The optional quantization coefficients include: i, I+1.
Calculating quantization loss from the transform coefficients and the estimated transform coefficients:
wherein C is a transform coefficient, C is an estimated transform coefficient, I is an optional quantization coefficient, Q is a quantization step size, and f is a quantization offset.
And comparing the quantization loss calculated according to the selectable quantization coefficients, and selecting the quantization coefficient corresponding to the minimum quantization loss as the optimal quantization coefficient.
In a second aspect, fig. 7 is a schematic structural diagram of a video coding quantization apparatus according to an embodiment of the present invention, and as shown in fig. 7, the embodiment of the present invention provides a video coding quantization apparatus, including:
s501, an acquisition module is used for acquiring a transformation unit, wherein the transformation unit comprises transformation coefficients.
S502, a quantization module is used for executing hard decision quantization processing on the transformation coefficient to obtain a quantization CG, wherein the quantization CG contains quantization coefficients.
S503, a first calculation judging module is used for traversing the quantized CG in a reverse order, calculating the zero clearing score of the quantized CG, and setting all non-zero quantized coefficients in the current quantized CG to be zero if the zero clearing score of the current quantized CG is smaller than a preset threshold value; otherwise, the quantization coefficients in the current quantization CG are not changed.
The inverse traversal quantized CG is scanned in a zig-zag scan, as shown in fig. 5.
In some embodiments, before calculating the zero-clearing score of the quantized CG, determining whether the current quantized CG is an all-zero CG (i.e., the quantized coefficients in the current quantized CG are all zero) is further included in reverse order. And if the current quantized CG is not all-zero CG, calculating the zero clearing score of the current quantized CG, otherwise, skipping the current quantized CG to judge the next quantized CG.
The calculating a clear score for the quantized CG includes:
and if the current quantized CG has quantized coefficients larger than 1, determining that the zero clearing score of the quantized CG is larger than a threshold value, and not changing the quantized coefficients in the current quantized CG.
And if the current quantization CG does not have quantization coefficients larger than 1, the zero clearing score of the current quantization CG is the sum of all quantization coefficients in the current quantization CG.
In some embodiments, to improve the computing efficiency, if the zero clearing score of the current quantized CG is not less than a preset threshold, the traversal is stopped.
S504, a second calculation judging module is used for traversing the front 1/4 area of the transformation unit in the positive sequence, calculating quantization loss and screening the optimal quantization coefficient.
The scanning mode of the front 1/4 area of the forward sequence traversing transformation unit is zigzag scanning, as shown in fig. 6.
In some embodiments, taking the coding cost as the quantization loss, the calculating the quantization loss, and screening the optimal quantization coefficient may include:
traversing the front 1/4 area of the current transformation unit, pre-coding according to the optional quantization coefficients, and calculating coding cost:
where D is the quantization distortion, λ is the lagrangian coefficient, and R is the coding bit rate of the optional quantization coefficient.
The optional quantization coefficients include: i, I+1, I-1.
And selecting the quantization coefficient corresponding to the minimum coding cost as the optimal quantization coefficient.
In other embodiments, the calculating quantization loss, and the screening the optimal quantization coefficients may include:
and traversing the front 1/4 area of the transformation unit in the positive sequence, and performing inverse quantization on the optional quantization coefficients to obtain estimated transformation coefficients.
The optional quantization coefficients include: i, I+1.
Calculating quantization loss from the transform coefficients and the estimated transform coefficients:
wherein C is a transform coefficient, C is an estimated transform coefficient, I is an optional quantization coefficient, Q is a quantization step size, and f is a quantization offset.
And comparing the quantization loss calculated according to the selectable quantization coefficients, and selecting the quantization coefficient corresponding to the minimum quantization loss as the optimal quantization coefficient.
Since the video coding quantization apparatus provided in this embodiment can be used to perform the video coding quantization method provided in the above embodiment, the working principle and the beneficial effects thereof are similar, and will not be described in detail here.
Based on the same inventive concept, a further embodiment of the present invention provides an electronic device, as shown in fig. 8, including: a processor 301, a memory 302, a communication interface 303, and a communication bus 304;
wherein, the processor 301, the memory 302, and the communication interface 303 complete communication with each other through the communication bus 304; the communication interface 303 is used for realizing information transmission between devices;
the processor 301 is configured to invoke a computer program in the memory 302, and when the processor executes the computer program, the processor implements all the steps of the video coding quantization method described above.
Based on the same inventive concept, a further embodiment of the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements all the steps of the video coding quantization method described above.
The logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment of the invention. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Moreover, in embodiments of the present invention, relational terms such as "first" and "second", and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. In the description of the present specification, a description of "some embodiments," "examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1. A video coding quantization method, comprising:
obtaining a transformation unit, wherein the transformation unit comprises transformation coefficients;
performing hard decision quantization on the transformation coefficient to obtain a quantized CG, wherein the quantized CG contains quantized coefficients;
traversing the quantized CG in a reverse order, calculating the zero clearing score of the quantized CG, and setting all non-zero quantized coefficients in the current quantized CG to 0 if the zero clearing score of the current quantized CG is smaller than a preset threshold value; otherwise, not changing the quantization coefficient in the current quantization CG;
the calculating a clear score for the quantized CG includes:
if the current quantization CG has a quantization coefficient larger than 1, determining that the zero clearing score of the current quantization CG is larger than a threshold value, and not changing the quantization coefficient in the current quantization CG;
if the current quantization CG does not have a quantization coefficient larger than 1, the zero clearing score of the current quantization CG is the sum of all quantization coefficients in the current quantization CG;
and calculating quantization loss by traversing the front 1/4 area of the transformation unit in the positive sequence, and selecting the quantization coefficient corresponding to the minimum quantization loss as the optimal quantization coefficient.
2. The video coding quantization method according to claim 1, wherein the scanning method of the 1/4 area before the inverse traversing quantization CG and the positive traversing transformation unit is a zig-zag scanning method.
3. The video coding quantization method of claim 1, wherein said calculating a zero-out score for quantized CG further comprises:
and stopping traversing if the clear score of the current quantized CG is not smaller than a preset threshold value.
4. The video coding quantization method according to claim 1, wherein calculating quantization loss, selecting a quantization coefficient corresponding to a minimum quantization loss as an optimal quantization coefficient, comprises:
traversing the front 1/4 area of the transformation unit in the positive sequence, and performing inverse quantization on the optional quantization coefficients to obtain estimated transformation coefficients;
calculating quantization loss from the transform coefficients and the estimated transform coefficients:
wherein C is a transformation coefficient, C is an estimated transformation coefficient, I is an optional quantization coefficient, Q is a quantization step length, and f is a quantization offset;
and comparing the quantization loss calculated according to the selectable quantization coefficients, and selecting the quantization coefficient corresponding to the minimum quantization loss as the optimal quantization coefficient.
5. The video coding quantization method of claim 4, wherein the selectable quantization coefficients comprise: i, I+1.
6. A video coding quantization apparatus, comprising:
the acquisition module is used for acquiring a transformation unit, wherein the transformation unit comprises transformation coefficients;
the quantization module is used for performing hard decision quantization processing on the transformation coefficient to obtain quantization CG, wherein the quantization CG contains quantization coefficients;
the first calculation judging module is used for traversing the quantized CG in a reverse order, calculating the zero clearing score of the quantized CG, and setting all non-zero quantized coefficients in the current quantized CG to be 0 if the zero clearing score of the current quantized CG is smaller than a preset threshold value; otherwise, not changing the quantization coefficient in the current quantization CG;
the first calculation and judgment module is used for traversing the quantized CG in a reverse order, calculating the zero clearing score of the quantized CG, and comprises the following steps:
if the current quantization CG has a quantization coefficient larger than 1, determining that the zero clearing score of the current quantization CG is larger than a threshold value, and not changing the quantization coefficient in the current quantization CG;
if the current quantization CG does not have a quantization coefficient larger than 1, the zero clearing score of the current quantization CG is the sum of all quantization coefficients in the current quantization CG;
and the second calculation judging module is used for calculating quantization loss in the front 1/4 area of the forward sequence traversal transforming unit and selecting the quantization coefficient corresponding to the minimum quantization loss as the optimal quantization coefficient.
7. The video coding quantization apparatus according to claim 6, wherein the scanning method of the 1/4 area before the inverse traversal quantization CG and the forward traversal transform unit is a zig-zag scanning method.
8. The video coding quantization device according to claim 6, wherein the first calculation judgment module is configured to traverse the quantized CG in reverse order, calculate a clear score of the quantized CG, and further comprising:
and stopping traversing if the clear score of the current quantized CG is not smaller than a preset threshold value.
9. The video coding quantization device according to claim 6, wherein the second calculation judging module is configured to calculate quantization loss by traversing 1/4 region before the transform unit in the positive sequence, and select a quantization coefficient corresponding to a minimum quantization loss as an optimal quantization coefficient, and includes:
traversing the front 1/4 area of the transformation unit in the positive sequence, and performing inverse quantization on the optional quantization coefficients to obtain estimated transformation coefficients;
calculating quantization loss from the transform coefficients and the estimated transform coefficients:
wherein C is a transformation coefficient, C is an estimated transformation coefficient, I is an optional quantization coefficient, Q is a quantization step length, and f is a quantization offset;
and comparing the quantization loss calculated according to the selectable quantization coefficients, and selecting the quantization coefficient corresponding to the minimum quantization loss as the optimal quantization coefficient.
10. The video coding quantization device of claim 9, wherein the selectable quantization coefficients comprise: i, I+1.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the video coding quantization method of any one of claims 1 to 5 when the computer program is executed by the processor.
12. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the video coding quantization method according to any of claims 1 to 5.
CN202210925102.9A 2022-08-03 2022-08-03 Video coding quantization method and device, electronic equipment and storage medium Active CN115002461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210925102.9A CN115002461B (en) 2022-08-03 2022-08-03 Video coding quantization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210925102.9A CN115002461B (en) 2022-08-03 2022-08-03 Video coding quantization method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115002461A CN115002461A (en) 2022-09-02
CN115002461B true CN115002461B (en) 2023-08-11

Family

ID=83022533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210925102.9A Active CN115002461B (en) 2022-08-03 2022-08-03 Video coding quantization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115002461B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106162184A (en) * 2016-07-28 2016-11-23 华为技术有限公司 A kind of data block coding method and device
CN111787324A (en) * 2020-06-29 2020-10-16 北京大学 Method for rate distortion optimization quantization, encoding method and device
CN112422991A (en) * 2019-08-23 2021-02-26 杭州海康威视数字技术股份有限公司 Encoding method, decoding method and device
CN113259667A (en) * 2021-05-17 2021-08-13 北京百度网讯科技有限公司 Video quantization method, video quantization device, electronic equipment and computer-readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8005140B2 (en) * 2006-03-17 2011-08-23 Research In Motion Limited Soft decision and iterative video coding for MPEG and H.264
US8675726B2 (en) * 2010-02-18 2014-03-18 Blackberry Limited Method and encoder for constrained soft-decision quantization in data compression
GB2513111A (en) * 2013-04-08 2014-10-22 Sony Corp Data encoding and decoding
JP6244864B2 (en) * 2013-12-06 2017-12-13 富士通株式会社 Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program
CN115379218A (en) * 2022-07-06 2022-11-22 百果园技术(新加坡)有限公司 Vector quantization method and system for video coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106162184A (en) * 2016-07-28 2016-11-23 华为技术有限公司 A kind of data block coding method and device
CN112422991A (en) * 2019-08-23 2021-02-26 杭州海康威视数字技术股份有限公司 Encoding method, decoding method and device
CN111787324A (en) * 2020-06-29 2020-10-16 北京大学 Method for rate distortion optimization quantization, encoding method and device
CN113259667A (en) * 2021-05-17 2021-08-13 北京百度网讯科技有限公司 Video quantization method, video quantization device, electronic equipment and computer-readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
视频编码率失真优化技术研究综述;郭红伟等;《电子学报》;20200515(第05期);全文 *

Also Published As

Publication number Publication date
CN115002461A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US11350135B2 (en) Method and apparatus for sample adaptive offset without sign coding
US9432670B2 (en) Apparatus and method of efficient sample adaptive offset
JP5792305B2 (en) Method and apparatus for adaptive loop filtering
CN108886621B (en) Non-local self-adaptive loop filtering method
KR100627329B1 (en) Apparatus and method for adaptive motion estimation and mode decision in h.264 video codec
CN115802034A (en) Image encoding/decoding method and apparatus using in-loop filtering
US10469876B2 (en) Non-local adaptive loop filter combining multiple denoising technologies and grouping image patches in parallel
CN108713320A (en) The video data handling procedure and device of block size are limited in Video coding
WO2014190468A1 (en) Video encoder for images
KR20180083389A (en) Video coding method and apparatus
TW201909640A (en) A method of deblocking filtering
US9369703B2 (en) Method and apparatus for SSIM-based bit allocation
CN112738511B (en) Fast mode decision method and device combined with video analysis
US20170134732A1 (en) Systems and methods for digital media communication using syntax planes in hierarchical trees
Zhang et al. Adaptive loop filter with temporal prediction
CN105306957A (en) Adaptive loop filtering method and device
CN116569546A (en) Intra-frame prediction method, encoder, decoder, and storage medium
WO2020252745A1 (en) Loop filter design for adaptive resolution video coding
CN104219520A (en) Method and device for determining image compensation modes
CN114827629A (en) Encoding method, decoding method, device and machine readable storage medium
CN115002461B (en) Video coding quantization method and device, electronic equipment and storage medium
KR20210000689A (en) Method and Apparatus for Image Encoding and Decoding Thereof
JP2022186730A (en) Method and apparatus for adaptive filtering of sample for video encoding
EP3499886A1 (en) Method and device for encoding video data
WO2021146933A1 (en) Next-generation loop filter implementations for adaptive resolution video coding

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