[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113225556A - Video coding method - Google Patents

Video coding method Download PDF

Info

Publication number
CN113225556A
CN113225556A CN202110598168.7A CN202110598168A CN113225556A CN 113225556 A CN113225556 A CN 113225556A CN 202110598168 A CN202110598168 A CN 202110598168A CN 113225556 A CN113225556 A CN 113225556A
Authority
CN
China
Prior art keywords
current
threshold
judging
divided
quantization
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.)
Granted
Application number
CN202110598168.7A
Other languages
Chinese (zh)
Other versions
CN113225556B (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 Arcvideo Technology Co ltd
Original Assignee
Hangzhou Arcvideo 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 Arcvideo Technology Co ltd filed Critical Hangzhou Arcvideo Technology Co ltd
Priority to CN202110598168.7A priority Critical patent/CN113225556B/en
Publication of CN113225556A publication Critical patent/CN113225556A/en
Application granted granted Critical
Publication of CN113225556B publication Critical patent/CN113225556B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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/186Methods 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 a colour or a chrominance component
    • 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/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/19Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding using optimisation based on Lagrange multipliers

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a video coding method, which comprises the following steps: step 1, starting CU division judgment of a certain CU depth; step 2, solving the brightness variance value var1 of the CU, if var1 is larger than a first threshold TH1, executing step 3, otherwise executing step 4; step 3, performing DCT and quantization on the coding residual error of the current CU, counting the number of quantization coefficients in the current CU, which are more than 0, and marking the number as N1, if N1 is more than a second threshold TH2, judging that the current CU should be divided, otherwise, executing step 4; step 4, judging whether the current CU is divided according to a CU size selection method of Lagrange rate distortion, and if so, judging that the current CU is divided; and if not, judging that the current CU is not divided. The method provided by the embodiment of the invention ensures that the CU size of the local flat block is more reasonable, can reduce the noise of the local flat block and improve the subjective quality of the video.

Description

Video coding method
Technical Field
The invention belongs to the technical field of video coding, and particularly relates to a video coding method.
Background
Video technology has been widely applied to the fields of mobile terminals, live webcasting, home theater, remote monitoring and the like, Video resolution has also gradually changed from Standard Definition (SD) to High Definition (HD), Ultra High-Definition (UHD), and currently, international and commonly used Video encoding and decoding standards include h.264, h.265/HEVC (High Efficiency Video Coding), and domestic AVS (Audio Video Coding Standard), AVS +, AVS2 and the like.
The HEVC encoder divides each frame of image into several CTUs (Coding Tree units) of the same size, each CTU is further divided into CUs (Coding units) of different sizes, such as 64x64, 32x32, 16x16 and 8x8, according to information, such as texture and motion of each region, and the CU depths corresponding to these CUs of different sizes are 0, 1, 2 and 3, respectively. A larger CU size typically saves more code rate but has more coding distortion, while a smaller CU size typically consumes more code rate but has less coding distortion.
In order to achieve both bitrate and Distortion, an HEVC encoder recursively processes a CU in a quadtree form, and as shown in fig. 1, determines a CU size by comparing RDCost (Rate Distortion Cost) of CUs of each size, and selects a CU size with a minimum RDCost as an optimal CU size, where the RDCost is calculated as:
RDcost=λ·R+SSD
the method is called a CU size selection method based on lagrangian rate distortion, and can select a CU size with less code rate consumption and less coding distortion, for example, as shown in fig. 2, a CU size division result of the method is adopted for a certain video, wherein a black flat area usually selects a large-size CU, and a texture complex area usually selects a smaller-size CU.
HEVC (high efficiency video coding) adopts high-efficiency predictive coding and transform coding technology, and the predictive coding is to predict the pixels of the current CU by using the pixels of the CU which are correlated in time and space domains, so that data information required to be carried by the current CU is reduced; transform coding subtracts CU prediction pixels and CU original pixels to form a coded residual, and performs DCT (Discrete Cosine Transform) and quantization on the coded residual to further compress residual information.
DCT concentrates most of the energy of the encoded residual information in a small range of the frequency domain, so that only a few bits are needed to describe the insignificant components, and in addition, the frequency domain decomposition maps the processing of the human visual system and allows the subsequent quantization process to meet its sensitivity requirement, the DCT transform formula is:
Figure BDA0003091593910000021
wherein X is a coding residual coefficient matrix, Y represents a DCT coefficient matrix, C is a transformation matrix, and E is a correction matrix.
Although the conventional CU size selection method based on Lagrange rate distortion selects the CU size with a smaller code rate and smaller objective coding distortion, the CU size which best meets the subjective feeling of human eyes cannot be selected. For a CU containing both flat regions and texture regions, the distribution of high-frequency information is not concentrated enough in the DCT process of the HEVC encoder, which makes it difficult for the quantization process to eliminate the high-frequency information.
Disclosure of Invention
In view of the above problems, the present invention provides a video encoding method.
In order to solve the technical problems, the invention adopts the following technical scheme:
a video encoding method, comprising:
step 1, starting CU division judgment of a certain CU depth;
step 2, solving the brightness variance value var1 of the CU, if var1 is larger than a first threshold TH1, executing step 3, otherwise executing step 4;
step 3, performing DCT and quantization on the coding residual error of the current CU, counting the number of quantization coefficients in the current CU, which are more than 0, and marking the number as N1, if N1 is more than a second threshold TH2, judging that the current CU should be divided, otherwise, executing step 4;
step 4, judging whether the current CU is divided according to a CU size selection method of Lagrange rate distortion, and if so, judging that the current CU is divided; and if not, judging that the current CU is not divided.
Preferably, the first threshold TH1 is in the range of [1, 1000 ].
Preferably, the first threshold TH1 has a value of 600.
Preferably, the second threshold TH2 is in the range of [1, 20 ].
Preferably, the second threshold TH2 has a value of 8.
Preferably, the luminance variance value var1 is specifically:
Figure BDA0003091593910000031
where N denotes the number of pixels in the current CU, ytDenotes the luminance value of the t-th pixel in the current CU, and μ denotes the average value of the luminance values of all pixels in the current CU.
Preferably, in step 3, the quantization coefficients are:
Figure BDA0003091593910000032
where Y (i, j) represents a DCT coefficient having a position (i, j) in the DCT coefficient matrix Y, L (i, j) is a quantization coefficient having a position (i, j), and QstepRepresenting the quantization step size, floor () is a rounding down function and f is the rounding offset.
The invention has the following beneficial effects: utilizing the brightness variance value of the local flat block, judging that the brightness variance value is easy to generate noise if the brightness variance value is larger, and enabling the CU to tend to select a smaller size; and judging that the coding distortion is larger if the number is larger according to the number of the quantized non-zero coefficients, and enabling the CU to select a smaller CU size at the moment. The method provided by the embodiment of the invention ensures that the CU size of the local flat block is more reasonable, can reduce the noise of the local flat block and improve the subjective quality of the video.
Drawings
FIG. 1 is a diagram illustrating a quad-tree partitioning structure of a CTU in the prior art;
FIG. 2 is a schematic diagram of the prior art partitioning of CU sizes based on Lagrangian rate distortion;
FIG. 3 is a flowchart illustrating steps of a video encoding method according to an embodiment of the present invention;
FIG. 4 is a diagram of an experiment platform and a comparison platform using an open source x265 video encoder;
fig. 5 is a schematic diagram of a picture after video encoding and transcoding is performed by the method according to the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 3, a flow chart of the steps of a video encoding method according to an embodiment of the present invention is shown, including:
step 1, starting CU division judgment of a certain CU depth;
step 2, solving the brightness variance value var1 of the CU, if var1 is larger than a first threshold TH1, executing step 3, otherwise executing step 4; the threshold TH1 is in the range of [1, 1000], and is typically 600.
Step 3, performing DCT and quantization on the coding residual error of the current CU, counting the number of quantization coefficients in the current CU, which are more than 0, and marking the number as N1, if N1 is more than a second threshold TH2, judging that the current CU should be divided, otherwise, executing step 4; the threshold TH2 is in the range of [1, 20], and is typically 8.
Step 4, judging whether the current CU is divided according to a CU size selection method of Lagrange rate distortion, and if so, judging that the current CU is divided; and if not, judging that the current CU is not divided.
In a specific application example, the luminance variance value var1 is specifically:
Figure BDA0003091593910000051
where N denotes the number of pixels in the current CU, ytDenotes the luminance value of the t-th pixel in the current CU, and μ denotes the average value of the luminance values of all pixels in the current CU.
The quantization process is actually an optimization process of the DCT coefficients, which uses the property of the human eye that is insensitive to high frequencies to achieve a large simplification of the data, and is actually a simple division of each component in the frequency domain by a constant for that component, and then rounding to the nearest integer. In a specific application example, in step 3, the quantization coefficients are:
Figure BDA0003091593910000052
where Y (i, j) represents a DCT coefficient having a position (i, j) in the DCT coefficient matrix Y, L (i, j) is a quantization coefficient having a position (i, j), and QstepRepresenting the quantization step size, floor () is a rounding down function and f is the rounding offset.
An open source x265 video encoder is used as an experiment platform and a comparison platform, and the brightness variance value of a local flat block and the number of nonzero coefficients of a CU after quantization are utilized, so that the size of the CU in an area which is easy to generate noise is selected to be smaller, the noise of the local flat block is reduced, and the subjective quality is improved. As shown in fig. 4 and fig. 5, which are encoded output diagrams of the x265 method and the method of the present invention, respectively, it can be seen that noise is very significant in the boundary region between flat and texture in the x265 method, such as the black box portion in fig. 4, where there is much noise in the shape of stripes beside the light ray, while noise is very small in the boundary region between flat and texture in the method of the present invention, which indicates that the method of the present invention has a significant effect on improving local flat block noise, such as the black box portion in fig. 5. The method optimizes the subjective quality of the video by efficiently removing the local flat block noise, and can be applied to video compression standards such as H265/HEVC, AVS2 and the like.
It is to be understood that the exemplary embodiments described herein are illustrative and not restrictive. Although one or more embodiments of the present invention have been described with reference to the accompanying drawings, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims.

Claims (7)

1. A video encoding method, comprising:
step 1, starting CU division judgment of a certain CU depth;
step 2, solving the brightness variance value var1 of the CU, if var1 is larger than a first threshold TH1, executing step 3, otherwise executing step 4;
step 3, performing DCT and quantization on the coding residual error of the current CU, counting the number of quantization coefficients in the current CU, which are more than 0, and marking the number as N1, if N1 is more than a second threshold TH2, judging that the current CU should be divided, otherwise, executing step 4;
step 4, judging whether the current CU is divided according to a CU size selection method of Lagrange rate distortion, and if so, judging that the current CU is divided; and if not, judging that the current CU is not divided.
2. The video encoding method of claim 1, wherein the first threshold THl is between [1, 1000 ].
3. The video encoding method of claim 1, wherein the first threshold THl is 600.
4. The video coding method of claim 1, wherein the second threshold TH2 ranges between [1, 20 ].
5. The video encoding method of claim 1, wherein the second threshold TH2 has a value of 8.
6. The video coding method of any of claims 1 to 5, wherein the luminance variance value var1 is specifically:
Figure FDA0003091593900000011
where N denotes the number of pixels in the current CU, ytDenotes the luminance value of the t-th pixel in the current CU, and μ denotes the average value of the luminance values of all pixels in the current CU.
7. The video coding method of any of claims 1 to 5, wherein in step 3, the quantized coefficients are:
Figure FDA0003091593900000021
where Y (i, j) represents a DCT coefficient having a position (i, j) in the DCT coefficient matrix Y, L (i, j) is a quantization coefficient having a position (i, j), and QstepRepresenting the quantization step size, floor () is a rounding down function and f is the rounding offset.
CN202110598168.7A 2021-05-31 2021-05-31 Video coding method Active CN113225556B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110598168.7A CN113225556B (en) 2021-05-31 2021-05-31 Video coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110598168.7A CN113225556B (en) 2021-05-31 2021-05-31 Video coding method

Publications (2)

Publication Number Publication Date
CN113225556A true CN113225556A (en) 2021-08-06
CN113225556B CN113225556B (en) 2024-06-21

Family

ID=77099741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110598168.7A Active CN113225556B (en) 2021-05-31 2021-05-31 Video coding method

Country Status (1)

Country Link
CN (1) CN113225556B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113747153A (en) * 2021-08-09 2021-12-03 杭州当虹科技股份有限公司 HEVC TILE coding boundary quality optimization method and system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015123806A1 (en) * 2014-02-18 2015-08-27 Mediatek Singapore Pte. Ltd. Methods for depth based block partitioning
CN105430396A (en) * 2015-12-15 2016-03-23 浙江大学 Video coding method capable of deciding sizes of coding blocks by means of classification
CN105491385A (en) * 2015-12-02 2016-04-13 同济大学 Quick deciding method for division of HEVC intraframe coding units
CN107623859A (en) * 2017-11-27 2018-01-23 珠海亿智电子科技有限公司 A kind of deblocking effect method that JPEG is encoded under low bit- rate
WO2018014301A1 (en) * 2016-07-21 2018-01-25 华为技术有限公司 Video coding method and device
CN108712647A (en) * 2018-05-17 2018-10-26 哈尔滨工业大学 A kind of CU division methods for HEVC
WO2019059676A1 (en) * 2017-09-20 2019-03-28 한국전자통신연구원 Method and device for encoding/decoding image, and recording medium having stored bitstream
CN109688414A (en) * 2018-12-19 2019-04-26 同济大学 A kind of reduction of VVC intraframe coding unit candidate modes and block, which divide, shifts to an earlier date terminating method
WO2019141012A1 (en) * 2018-01-18 2019-07-25 Mediatek Inc. Video processing methods and apparatuses for processing video data coded in large size coding units
WO2019210760A1 (en) * 2018-05-03 2019-11-07 腾讯科技(深圳)有限公司 Video encoding method, video encoding apparatus, electronic device, and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015123806A1 (en) * 2014-02-18 2015-08-27 Mediatek Singapore Pte. Ltd. Methods for depth based block partitioning
CN105491385A (en) * 2015-12-02 2016-04-13 同济大学 Quick deciding method for division of HEVC intraframe coding units
CN105430396A (en) * 2015-12-15 2016-03-23 浙江大学 Video coding method capable of deciding sizes of coding blocks by means of classification
WO2018014301A1 (en) * 2016-07-21 2018-01-25 华为技术有限公司 Video coding method and device
WO2019059676A1 (en) * 2017-09-20 2019-03-28 한국전자통신연구원 Method and device for encoding/decoding image, and recording medium having stored bitstream
CN107623859A (en) * 2017-11-27 2018-01-23 珠海亿智电子科技有限公司 A kind of deblocking effect method that JPEG is encoded under low bit- rate
WO2019141012A1 (en) * 2018-01-18 2019-07-25 Mediatek Inc. Video processing methods and apparatuses for processing video data coded in large size coding units
WO2019210760A1 (en) * 2018-05-03 2019-11-07 腾讯科技(深圳)有限公司 Video encoding method, video encoding apparatus, electronic device, and storage medium
CN108712647A (en) * 2018-05-17 2018-10-26 哈尔滨工业大学 A kind of CU division methods for HEVC
CN109688414A (en) * 2018-12-19 2019-04-26 同济大学 A kind of reduction of VVC intraframe coding unit candidate modes and block, which divide, shifts to an earlier date terminating method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ADAM WIECKOWSKI等: "Generalized binary splits: A versatile partitioning scheme for block-based hybrid video coding", 《HEIKO SCHWARZ; DETLEV MARPE; THOMAS WIEGAND 2019 PICTURE CODING SYMPOSIUM (PCS)》 *
兰天等: "一种新的H.264自适应帧层码率控制算法", 《华南理工大学学报(自然科学版)》, no. 9 *
柴小燕: "H.266/VVC帧内预测优化算法研究", 《中国优秀硕士学位论文全文数据库》, no. 2 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113747153A (en) * 2021-08-09 2021-12-03 杭州当虹科技股份有限公司 HEVC TILE coding boundary quality optimization method and system

Also Published As

Publication number Publication date
CN113225556B (en) 2024-06-21

Similar Documents

Publication Publication Date Title
JP7085009B2 (en) Methods and devices for merging multi-sign bit concealment and residual sign prediction
US10257514B2 (en) Adaptive dequantization method and apparatus in video coding
CN101715135B (en) Template matching based method for encoding self-adaption intra-frame prediction filtering
US20150063461A1 (en) Methods and apparatuses for adjusting macroblock quantization parameters to improve visual quality for lossy video encoding
KR20090087471A (en) Method of encoding an image and device implementing said method
CN112995671B (en) Video encoding and decoding method and device, computer readable medium and electronic equipment
CN105791868B (en) The method and apparatus of Video coding
CN113225556B (en) Video coding method
CN107343199B (en) Rapid adaptive compensation method for sampling points in HEVC (high efficiency video coding)
US10015484B2 (en) Adaptive scan device and method for scanning thereof
Han et al. Quadtree-based non-local Kuan’s filtering in video compression
Zhao et al. Fast CU partition decision strategy based on human visual system perceptual quality
CN117750020A (en) Method, system, equipment and storage medium for learning video coding
CN113242430B (en) Video coding method
WO2023173255A1 (en) Image encoding and decoding methods and apparatuses, device, system, and storage medium
CN117528079A (en) Image processing apparatus and method for performing quality-optimized deblocking
US20240291982A1 (en) Inter-frame prediction method, coder, decoder, and storage medium
WO2023037977A1 (en) Systems and methods for reducing noise in reconstructed feature data in coding of multi-dimensional data
WO2023044919A1 (en) Video encoding and decoding method, device and system, and storage medium
CN116781904A (en) Video coding method
WO2023149367A1 (en) Systems and methods for improving object detection in compressed feature data in coding of multi-dimensional data
EP3598759B1 (en) Systems and methods for deblocking filtering
WO2024016775A1 (en) Data processing method and apparatus, and device
CN118175311A (en) Video data processing method, device, storage medium and equipment
CN118827980A (en) Reference quality self-adaption based leachable video coding method and system

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