CN109495745B - Lossless compression decoding method based on inverse quantization/inverse transformation - Google Patents
Lossless compression decoding method based on inverse quantization/inverse transformation Download PDFInfo
- Publication number
- CN109495745B CN109495745B CN201811381007.7A CN201811381007A CN109495745B CN 109495745 B CN109495745 B CN 109495745B CN 201811381007 A CN201811381007 A CN 201811381007A CN 109495745 B CN109495745 B CN 109495745B
- Authority
- CN
- China
- Prior art keywords
- current frame
- image block
- residual
- information
- frame image
- 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
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/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/169—Methods 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/17—Methods 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/176—Methods 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
-
- 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/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive 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/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Abstract
The invention relates to a lossless compression decoding method based on inverse quantization/inverse transformation, firstly, when decoding each frame header information, obtaining quantization parameter used by current frame; decoding the prediction information to obtain a prediction image block of the current frame; judging whether the residual error of the current frame image block needs to be subjected to inverse quantization and inverse transformation according to the residual error bit sign information of the current frame image block in the code stream, if so, decoding a residual error coefficient C of the current frame image block, and performing inverse quantization on C to obtain a matrix Y; carrying out inverse transformation on the Y to obtain first residual error information R of the current frame image block; continuously decoding secondary residual information of the current frame image block, and adding the two residual information to obtain final residual information of the current frame image block; if not, directly decoding the residual error coefficient of the current frame image block as the final residual error information of the current frame image block; and the predicted image block of the current frame image block and the final residual information are added to obtain a current frame reconstructed image block, so that the lossless compression performance is greatly improved.
Description
Technical Field
The invention is suitable for a lossless compression video decoding method, in particular to an optimization method suitable for HEVC lossless compression decoding.
Background
Since the H.264/AVC video compression standard is proposed, the H.264/AVC video compression standard is widely applied due to higher compression efficiency and stronger network adaptability, and also makes great contribution to video transmission and popularization. However, with the development of network and information technology, people need more and more high-quality video multimedia information. With the popularization of 1080p high-definition video, people are pursuing higher quality video experience, such as 4K (with a resolution of 3840x2160) or even 8K (with a resolution of 7680x 4320); meanwhile, the requirements of people on the frame rate of digital video are gradually increased from 30fps to 60fps or even 120 fps; with the wide application of smart phones, tablet computers, VR helmets and high definition cameras, a large amount of high definition videos are generated.
The traditional Video compression Coding technology H.264/AVC can not meet the requirements of compression storage and transmission of high definition videos, therefore, a new generation Video Coding standard HEVC (high Efficiency Video Coding) is introduced in 2013 by the joint organization of MPEG (moving Pictures Experts group) and VCEG (Video Coding Experts group). The experiment result shows that the HEVC can save 50% of code rate under the condition of equal quality compared with H.264/AVC, and the method has the advantages of simple structure, convenient operation, low cost and high Efficiency.
In the modern lossy video coding framework, four main parts, namely prediction, transformation/quantization, loop filtering and entropy coding, are mainly included, wherein the prediction is a key part in the whole coding framework, and the precision of the prediction directly influences the level of the whole coding efficiency. Research shows that the I-frame coding efficiency in HEVC is improved by more than 20% compared with JPEG2000 under the condition of equivalent objective quality, and the key reason is that HEVC has a more accurate prediction technology.
The HEVC-based lossless video compression coding framework mainly includes prediction and entropy coding, so the prediction and entropy coding directly determine the video compression performance.
Disclosure of Invention
In the currently widely used lossless video coding framework, the residual after prediction is directly entropy coded. The efficiency of entropy coding is seriously affected because the energy of the residual is not concentrated. In order to further improve the lossless coding compression efficiency, a lossless compression decoding method based on inverse quantization/inverse transformation is proposed for HEVC lossless compression decoding, and for the residual: the residual coefficients after transform quantization are first decoded, and then the secondary residual coefficients without transform quantization are decoded.
The specific technical scheme is as follows:
1. firstly, when decoding each frame header information, obtaining a quantization parameter QP used by a current frame, and entering step 2; wherein the quantization parameter QP is used for representing the parameter when the current frame is dequantized;
2. decoding the prediction information to obtain a prediction image block of the current frame, and entering the step 3;
3. judging whether the residual error of the current frame image block needs to be subjected to inverse quantization and inverse transformation according to the residual error bit sign information of the current frame image block in the code stream, if so, entering the step 4, and if not, entering the step 5; the residual bit sign information is obtained from the code stream and is used for representing whether the residual needs to be subjected to inverse quantization and inverse transformation;
for each image block, a sign bit (Flag), i.e. residual bit sign information, is transmitted to indicate whether the residual of the current frame image block is inverse quantized and inverse transformed, and the content of this sign Flag bit is determined by rate-distortion optimization at the encoding end.
4. Decoding a residual coefficient C of an image block of a current frame, and carrying out inverse quantization on the residual coefficient C to obtain a matrix Y after inverse quantization; carrying out inverse transformation on the Y to obtain first residual error information R of the current frame image block; continuing to decode the secondary residual information of the current frame image block, adding the secondary residual information to obtain the final residual information of the current frame image block, and entering the step 6;
wherein, the element Y in the ith row and the jth column in Yi,jThe calculation formula of (a) is as follows:
wherein, ci,jRepresenting the elements of the ith row and the jth column in the residual coefficient C of the image block of the current frame, i is more than or equal to 1 and less than or equal to N, j is more than or equal to 1 and less than or equal to N, and g is [ g ]0,...,g5]=[40,45,51,57,64,72]QP is the quantization parameter used by the current frame obtained in step 1,% is the remainder operation, > and < are the right shift and left shift operations, respectively, floor is the rounding down,
offsetIQ=(M-10+B),M=log2(N), B denotes the pixel value bit depth, shift1 ═ (M-9+ B);
the first residual information R is calculated as follows:
R=2B-20R3, (2)
R3=R2TNxN, (3)
R2=2-7R1, (4)
R1=T′NY, (5)
wherein, TNxNRepresents a transform matrix, T'NRepresenting a transformation matrix TNxNThe transposed matrix of (2).
The same transform approach as HEVC lossy compression is used for the transform, with transform sizes supporting 4x4, 8x8, and 16x 16. For a 4 × 4 coding unit, an integer sinusoidal variation (IDST) is used, transforming the matrix T4x4As follows below, the following description will be given,
for coding units of 8x8 and 16x16, an integer cosine transform (IDCT) is used, and an 8x8 transform matrix T is used8x8As follows below, the following description will be given,
for a transformation matrix T of 16x1616x16Reference [5]。
The second residual error coefficient is the secondary residual error information corresponding to the current frame image block directly analyzed from the code stream;
5, directly decoding the residual error coefficient of the current frame image block to serve as the final residual error information of the current frame image block, and entering the step 6;
and 6, adding the predicted image block of the current frame image block and the final residual information obtained in the step 4 or the step 5 to obtain a current frame reconstruction image block.
In the modern video coding and decoding framework based on HEVC, it mainly consists of prediction and entropy coding. The overall decoding end frame of the lossless compression decoding method based on inverse quantization/inverse transformation provided by the invention is shown in figure 2. The idea is as follows: firstly, analyzing the code stream, and predicting each image block to obtain a predicted image block of the current frame. According to the common knowledge in the field, there are two prediction methods: the method comprises the following steps of intra-frame prediction and inter-frame prediction, wherein the intra-frame prediction and the inter-frame prediction both adopt the original HEVC prediction mode. And secondly, residual error reconstruction is carried out, the residual error reconstruction has two modes in total, the first mode is based on inverse quantization/inverse transformation, and the second mode is used for directly decoding the residual error to obtain final residual error information. And judging which residual error reconstruction mode is selected according to the residual error bit sign information of the current frame image block in the code stream. In the first inverse transformation/inverse quantization-based residual reconstruction, a first decoded residual coefficient needs to be subjected to inverse quantization and inverse transformation to obtain a first residual, then a second residual coefficient is directly decoded to obtain a second residual, and the residual obtained by the two decoding processes are added to obtain an integral residual, namely final residual information. And finally, adding the predicted image block and the final residual information obtained by residual reconstruction to obtain the reconstructed image block of the current frame.
Advantageous effects
The method optimizes the residual decoding of lossless compression in HEVC, and solves the problem that the entropy coding efficiency is seriously influenced because the residual energy is not concentrated. According to the specification of the decoding end of the scheme, the video lossless compression optimization is carried out at the encoding end, and particularly, the lossless compression performance of the encoding end is greatly improved for images with complex textures.
Drawings
FIG. 1: a method flow diagram of the invention;
figure 2-lossless compression-decoding framework based on transform quantization.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
The decoding process is as follows
(1) Firstly, when decoding the information of each frame header, obtaining the quantization parameter QP used by the current frame, wherein the quantization parameter QP
The QP is directly obtained from the code stream, and the step 2 is entered; the quantization parameter QP is used to represent the parameter and amount of inverse quantization of the current frame
And the coding end determines the transformation parameters and writes the transformation parameters into the code stream.
For quantization, the scheme adopts the same quantization scheme as HEVC, and the quantization parameter QP range is [0-51 ]]Quantization step size Qstep≈(21/6)QP-4。
(2) Decoding the prediction information according to an original HEVC decoding mode to obtain a prediction image block of the current frame, and entering the step 3;
(3) judging whether the residual error of the current frame image block needs to be subjected to inverse quantization and inverse transformation according to the residual error bit sign information of the current frame image block in the code stream, if so, entering the step 4, and if not, entering the step 5; the residual bit sign information is obtained from the code stream and is used for representing whether the residual needs to be subjected to inverse quantization and inverse transformation; in this embodiment, a value of 1 indicates that inverse quantization and inverse transformation need to be performed on the residual of the current frame image block, and a value of 0 indicates that inverse quantization and inverse transformation do not need to be performed on the residual of the current frame image block.
(4) Decoding the first residual according to the original HEVC decoding mode to obtain a first residual coefficient matrix C of the current frame image block, wherein the size of the coefficient matrix is NxN, Ci,jRepresents the elements in the ith row and the jth column in C, wherein i is more than or equal to 1 and less than or equal to N, and j is more than or equal to 1 and less than or equal to N. The coefficient matrix C is first inverse quantized, and the matrix after inverse quantization is Y, Yi,jRepresents the element in row i and column j in Y, where 1 ≦ i ≦ N, 1 ≦ j ≦ N, then Yi,jCan be obtained from equation 1.
Wherein, ci,jRepresenting the elements of the ith row and the jth column in the residual coefficient C of the image block of the current frame, i is more than or equal to 1 and less than or equal to N, j is more than or equal to 1 and less than or equal to N, and g is [ g ]0,...,g5]=[40,45,51,57,64,72]QP is the quantization parameter used by the current frame obtained in step 1,% represents the remainder operation, > and < represent the right and left shift operations, respectively, floor represents the rounding down and offsetIQ=(M-10+B),M=log2(N), B denotes the pixel bit depth, shift1 ═ (M-9+ B);
inverse transformation is carried out on Y, and a matrix of Y after one forward inverse transformation is R1Then R1=TN′Y,TN' represents TNxNThe transposed matrix of (2). To R1Carrying out one-time scale transformation to obtain R2,R2=2-7R1. To R2Performing backward inverse transformation to obtain R3,R3=R2TNxN. To R3Performing a scale transformation to obtain R, R is 2B-20R3And R is the first residual information R of the current frame image block. The transform sizes of the present invention support 4x4, 8x8, and 16x 16.
Continuing decoding, decoding secondary residual information of the current frame image block according to an original HEVC decoding mode, adding the secondary residual information to obtain final residual information of the current frame image block, and entering step 6;
(5) directly decoding a residual coefficient of a current frame image block according to an original HEVC decoding mode to serve as final residual information of the current frame image block, and entering step 6;
(6) and (4) adding the predicted image block of the current frame image block and the final residual information obtained in the step (4) or the step (5) to obtain a current frame reconstruction image block.
To verify the effectiveness of the proposed scheme, the coding scheme corresponding to the resulting decoder is compared to HEVC reference code HM12.1, and the proposed method is applied only to the luma component.
In order to verify the effectiveness of the proposed method, the coding efficiency of the proposed method and an HEVC test model HM12.1 under the lossless coding condition of three configuration files, namely All Intra, Low Delay P and Low Delay B, is respectively tested, the result is shown in table 1, a quantization parameter QP is set to be 16, and numbers in the table are used for representing the code rate saving of the lossless compression method and the HEVC lossless compression method, namely the difference between the lossless compression code rate and the HEVC lossless compression code rate is divided by the HEVC lossless compression code rate.
Table 1: the proposed lossless compression method compares with HEVC lossless compression method in terms of code rate savings (negative values indicate savings)
From table 1, it can be observed that the proposed lossless compression method can averagely save the code rate by 2.92%, 0.85% and 0.54% under All Intra, Low Delay P and Low Delay B configuration files, and can save the code rate by 5.49% at the highest by bqterace under All Intra configuration files, compared with HEVC.
It should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the invention without departing from the spirit and scope of the invention.
References (e.g. patents/papers/standards)
[1]ITU-T RECOMMENDATION H.264“Advanced Video Coding for Generic Audiovisual Services”[J].ISO/IEC,2003,14496
[2]Wiegand T,Sullivan G J,G,et al.Overview of the H.264/AVC video coding standard[J].Circuits and Systems for Video Technology,IEEE Transactions on,2003,13(7):560-576..
[3]Ohm J R,Sullivan G J,Schwarz H,et al.Comparison of the coding efficiency of video coding standards—including high efficiency video coding(HEVC)[J].Circuits and Systems for Video Technology,IEEE Transactions on,2012,22(12):1669-1684.
[4]Nguyen T,Marpe D.Performance analysis of HEVC-based intra coding for still image compression[C]//Picture Coding Symposium(PCS),2012.IEEE,2012:233-236.
[5]Budagavi M,Fuldseth A,Bjontegaard G,et al.Core transform design in the high efficiency video coding(HEVC)standard[J].IEEE Journal of Selected Topics in Signal Processing,2013,7(6):1029-1041.
Claims (1)
1. A lossless compression decoding method based on inverse quantization/inverse transformation, characterized by comprising the steps of:
(1) firstly, when decoding each frame header information, obtaining a quantization parameter QP used by a current frame, wherein the quantization parameter QP is directly obtained from a code stream, and entering the step 2; wherein the quantization parameter QP is used for representing the parameter when the current frame is dequantized;
(2) decoding the prediction information to obtain a prediction image block of the current frame, and entering the step 3;
(3) judging whether the residual error of the current frame image block needs to be subjected to inverse quantization and inverse transformation according to the residual error bit sign information of the current frame image block in the code stream, if so, entering step 4, and if not, entering step 5; the residual bit sign information is obtained from the code stream and is used for representing whether the residual needs to be subjected to inverse quantization and inverse transformation;
(4) decoding a residual coefficient C of an image block of a current frame, and carrying out inverse quantization on the residual coefficient C to obtain a matrix Y after inverse quantization; carrying out inverse transformation on the Y to obtain first residual error information R of the current frame image block; continuing to decode the secondary residual information of the current frame image block, adding the secondary residual information to obtain the final residual information of the current frame image block, and entering the step 6;
wherein, the element Y in the ith row and the jth column in Yi,jThe calculation formula of (a) is as follows:
wherein, ci,jRepresenting the elements of the ith row and the jth column in the residual coefficient C of the image block of the current frame, i is more than or equal to 1 and less than or equal to N, j is more than or equal to 1 and less than or equal to N, and g is [ g ]0,...,g5]=[40,45,51,57,64,72]QP is the quantization parameter used by the current frame obtained in step 1,% is the remainder operation, > and < are the right and left shift operations, respectively, floor is the rounding down and offsetIQ=(M-10+B),M=log2(N), B denotes the pixel bit depth, shift1 ═ (M-9+ B);
the first residual information R is calculated as follows:
R=2B-20R3, (2)
R3=R2TNxN, (3)
R2=2-7R1, (4)
R1=T′NY, (5)
wherein, TNxNRepresents a transform matrix, T'NRepresenting a transformation matrix TNxNThe transpose matrix of (a) is,
the second residual error information is the secondary residual error information corresponding to the current frame image block directly analyzed from the code stream;
(5) directly decoding the residual error coefficient of the current frame image block to be used as the final residual error information of the current frame image block, and entering the step 6;
(6) and (4) adding the predicted image block of the current frame image block and the final residual information obtained in the step (4) or the step (5) to obtain a current frame reconstruction image block.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811381007.7A CN109495745B (en) | 2018-11-20 | 2018-11-20 | Lossless compression decoding method based on inverse quantization/inverse transformation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811381007.7A CN109495745B (en) | 2018-11-20 | 2018-11-20 | Lossless compression decoding method based on inverse quantization/inverse transformation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109495745A CN109495745A (en) | 2019-03-19 |
CN109495745B true CN109495745B (en) | 2021-03-30 |
Family
ID=65696321
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811381007.7A Active CN109495745B (en) | 2018-11-20 | 2018-11-20 | Lossless compression decoding method based on inverse quantization/inverse transformation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109495745B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111556319B (en) * | 2020-05-14 | 2021-12-17 | 电子科技大学 | Video coding method based on matrix decomposition |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8054882B2 (en) * | 2005-05-13 | 2011-11-08 | Streaming Networks (Pvt.) Ltd. | Method and system for providing bi-directionally predicted video coding |
CN101137065A (en) * | 2006-09-01 | 2008-03-05 | 华为技术有限公司 | Image coding method, decoding method, encoder, decoder, coding/decoding method and encoder/decoder |
KR20110090781A (en) * | 2010-02-02 | 2011-08-10 | (주)휴맥스 | Method for encoding/decoding video for rate-distortion optimization and apparatus for performing the same |
CN102447907A (en) * | 2012-01-31 | 2012-05-09 | 北京工业大学 | Video sequence coding method aiming at HEVC (High Efficiency Video Coding) |
CN104702962B (en) * | 2015-03-03 | 2019-04-16 | 华为技术有限公司 | Decoding method, encoder and decoder in frame |
-
2018
- 2018-11-20 CN CN201811381007.7A patent/CN109495745B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109495745A (en) | 2019-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230247229A1 (en) | Video encoding method for encoding division block, video decoding method for decoding division block, and recording medium for implementing the same | |
WO2022022297A1 (en) | Video decoding method and apparatus, video encoding method and apparatus, device, and storage medium | |
JP4927207B2 (en) | Encoding method, decoding method and apparatus | |
TWI542219B (en) | Frequency domain sample adaptive offset (sao) | |
KR101356207B1 (en) | / Method and apparatus for encoding /decoding data | |
CN103460700A (en) | Method for decoding image in intra prediction mode | |
CN112533000B (en) | Video decoding method and device, computer readable medium and electronic equipment | |
CN111741299B (en) | Method, device and equipment for selecting intra-frame prediction mode and storage medium | |
TW202218428A (en) | Image encoding method, image decoding method, and related apparatuses | |
KR101462637B1 (en) | Method and apparatus for image encoding/decoding | |
WO2022063033A1 (en) | Video decoding method and apparatus, video coding method and apparatus, computer-readable medium, and electronic device | |
KR20080064008A (en) | Method of deciding on coding for coefficients of residual block, apparatus, encoder and decoder | |
CN113965763A (en) | Cross-codec coding optimization for video transcoding | |
WO2021135856A1 (en) | Video coding method and apparatus, video decoding method and apparatus, device, and storage medium | |
KR101781300B1 (en) | Fast video encoding method based on temporal correlation | |
CN109495745B (en) | Lossless compression decoding method based on inverse quantization/inverse transformation | |
CN116095329A (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment | |
US20110110435A1 (en) | Multi-standard video decoding system | |
KR20130085088A (en) | Method for fast mode decision in scalable video coding and apparatus thereof | |
CN105791868A (en) | Video coding method and equipment | |
WO2022022299A1 (en) | Method, apparatus, and device for constructing motion information list in video coding and decoding | |
CN116982262A (en) | State transition for dependent quantization in video coding | |
KR100718468B1 (en) | Method and device for video down-sampling transcoding | |
KR102020953B1 (en) | Image Reencoding Method based on Decoding Data of Image of Camera and System thereof | |
WO2022174701A1 (en) | Video coding method and apparatus, video decoding method and apparatus, and computer-readable medium and electronic device |
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 |