A low-delay layered video coding method, computer device and medium

Through the low-latency layered video coding method, key frames and non-key frames are divided, distortion influence factors and weight factors are calculated, and the Lagrange multipliers and quantization parameters of the coding tree units are adjusted. This solves the shortcomings of existing video encoders in time domain rate-distortion optimization and significantly improves video compression performance.

CN116055726BActive Publication Date: 2025-09-16HONGHE UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310052884.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-03
Publication Date
2025-09-16
Estimated Expiration
2043-02-03

AI Technical Summary

Technical Problem

Existing video encoders have not made significant improvements in temporal rate-distortion optimization and have failed to effectively improve video compression performance, especially failing to fully consider the impact of key frames on subsequent frames.

Method used

A low-latency layered video coding method is adopted. By dividing the video into key frames and non-key frames, the influence of key frames on subsequent frames is set to be greater than that of non-key frames. The distortion influence factor and weight factor are calculated, and the Lagrange multiplier and quantization parameter of the coding tree unit are adjusted to reduce the time domain propagation of distortion.

Benefits of technology

It improves the video coding rate-distortion performance, reduces the distortion time-domain propagation during the video encoding process, and significantly improves the video compression performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116055726B_ABST
    Figure CN116055726B_ABST
Patent Text Reader

Abstract

The present invention discloses a low-latency layered video coding method, computer equipment and medium, relating to the field of video coding. The method includes calculating the reconstruction distortion and motion compensation prediction error of each pixel block based on the initial quantization parameter of the current frame to be coded and the Lagrange multiplier determined based on the influence degree of the current frame to be coded on subsequent frames, determining the distortion influence factor of each pixel block in the current frame to be coded based on the influence degree of the current frame to be coded on subsequent frames, the reconstruction distortion and motion compensation prediction error of each pixel block in the current frame to be coded, determining the weight factor of the pixel block according to the distortion influence factor, and encoding the current frame to be coded based on the Lagrange multiplier and quantization parameter of the coding tree unit calculated above. The present invention takes into account key frames and non-key frames, sets the influence degree of key frames on subsequent frames to be greater than the influence degree of non-key frames on subsequent frames, and uses the distortion influence factor to calculate the distortion influence factor, thereby improving the distortion rate performance of video coding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video coding technology, and in particular to a low-delay layered video coding method, computer equipment, and medium. Background Art

[0002] With the advancement of digital video coding and decoding technologies, digital video applications have expanded into various fields, including television broadcasting, digital cinema, distance education, telemedicine, video surveillance, video conferencing, and streaming media transmission. Many well-known video application platforms have emerged, including YouTube, Youku, TikTok, Kuaishou, Zoom, and Tencent Meeting. Current video coding standards all utilize a hybrid video coding framework based on prediction, transform, quantization, and entropy coding. The introduction of new technologies has typically doubled the compression efficiency between previous and subsequent generations of coding standards. Rate-distortion optimization (RDO) is a critical technology in video encoders, operating throughout the entire video coding system and contributing significantly to compression performance improvements in each generation of video coding standards. However, the widely used independent RDO methods in video encoders are far from achieving optimal compression performance. Existing research has shown that temporal RDO dependence in video coding is much stronger than spatial RDO dependence. Specifically, temporal RDO dependence manifests itself in the fact that the coding quality of a reference reconstructed pixel affects the achievable RDO bounds of subsequent referenced frames or coding units. Currently, there are several time-dependent rate-distortion optimization methods based on AVC (Advanced Video Coding) and HEVC (High Efficiency Video Coding) encoders. Examples include frame-level adaptive quantization parameter concatenation and adaptive Lagrange multiplier selection at the coding tree unit level. However, these methods offer only limited improvement in rate-distortion performance, and thus fail to effectively enhance video compression performance. Summary of the Invention

[0003] The purpose of the present invention is to provide a low-latency layered video coding method, computer equipment and medium, which take into account key frames and non-key frames, and set the influence of key frames on subsequent frames to be greater than the influence of non-key frames on subsequent frames, and use them to calculate the distortion influence factor, thereby improving the distortion rate performance of video coding.

[0004] To achieve the above object, the present invention provides the following solutions:

[0005] The present invention provides a low-delay layered video coding method, the method comprising:

[0006] S1: determining an initial quantization parameter and a Lagrange multiplier of a current frame to be coded based on the degree of influence of the current frame to be coded on subsequent frames; the layered video is divided into a plurality of image groups to be coded, each of the image groups to be coded including a plurality of frames to be coded; wherein the degree of influence of a key frame in the image group to be coded on subsequent frames is greater than the degree of influence of a non-key frame on subsequent frames, the key frame being the last frame in each image group to be coded; and the subsequent frames being frames to be coded following the current frame to be coded in the current image group to be coded;

[0007] S2: predicting the reconstruction distortion and motion compensation prediction error of each pixel block in the current frame to be encoded according to the initial quantization parameter and Lagrange multiplier of the current frame to be encoded; each of the frames to be encoded is divided into a plurality of the pixel blocks;

[0008] S3: Determining a distortion impact factor for each pixel block in the current frame to be encoded based on the degree of influence of the current frame to be encoded on subsequent frames, as well as reconstruction distortion and motion compensation prediction error of each pixel block in the current frame to be encoded; the distortion impact factor represents the degree of influence of the coding distortion of the corresponding pixel block on the coding distortion of the subsequent frame;

[0009] S4: Calculating a weight factor of a corresponding pixel block according to the distortion impact factor; the weight factor represents the relative unimportance of the encoding quality of the pixel block in the current frame to be encoded;

[0010] S5: Calculating a weight coefficient of each coding tree unit according to a weight factor of a pixel block corresponding to each coding tree unit in the current frame to be coded;

[0011] S6: Determine the Lagrangian multiplier and quantization parameter of the coding tree unit according to the Lagrangian multiplier of the current frame to be coded and the weight coefficient of the coding tree unit;

[0012] S7: Encode the current frame to be encoded according to the Lagrange multiplier and quantization parameter of each coding tree unit;

[0013] S8: Determine whether the current frame to be encoded is the last frame of the layered video; if so, end the encoding; if not, take the next frame to be encoded as the current frame to be encoded, and return to step S1.

[0014] Optionally, S1 specifically includes:

[0015] The compensation value ΔQP of the current frame to be encoded is determined according to the influence degree of the current frame to be encoded on the subsequent frames. L ;

[0016] According to QP=QP input +ΔQP L , calculate the initial quantization parameter QP of the current frame to be encoded; wherein, QPinput is the input quantization parameter value of the encoder;

[0017] According to λ=W L 2 (QP-12) / 3 , calculate the Lagrange multiplier λ of the current frame to be encoded; where W L is the set weight of the encoder.

[0018] Optionally, step S2 specifically includes:

[0019] The current frame to be coded is coded by performing integer pixel inter-frame prediction coding according to the initial quantization parameter and Lagrange multiplier of the current frame to be coded, and the reconstruction distortion and motion compensation prediction error of each pixel block are obtained during the coding process.

[0020] Optionally, step S3 specifically includes:

[0021] Determine whether the current frame to be encoded is a key frame in the current image group to be encoded; if not, Calculate the distortion impact factor of each pixel block in the current frame to be encoded; if so, then according to Calculate the distortion impact factor of each pixel block in the current frame to be encoded;

[0022] Among them, φ i is the distortion factor of the i-th pixel block in the current frame to be encoded, N GOP is the number of frames in the current group of pictures to be coded; rPOC represents the relative image sequence number of the current frame to be coded, that is, the position number of the current frame to be coded in the current group of pictures to be coded. When n=1, it represents the first frame after the current frame to be coded. i and E i are the reconstruction distortion and motion compensation prediction error of the i-th pixel block, The frame number of the next group of pictures to be encoded.

[0023] Optionally, before step S1, the following steps are further included:

[0024] Dividing the video to be encoded into a plurality of frames to be encoded;

[0025] Several consecutive frames to be encoded are grouped into a group of pictures to be encoded.

[0026] Optionally, the pixel block is a 32×32 pixel block.

[0027] Optionally, the weight factor is calculated as follows:

[0028]

[0029] Among them, M is the total number of pixel blocks in the current frame to be encoded, φ i is the distortion factor of the i-th pixel block, is 1 / φ of the M pixel block i The average value, ω i is the weight factor of the i-th pixel block.

[0030] Optionally, the calculation formula of the weight coefficient is:

[0031]

[0032] Among them, ψ j is the weight coefficient of the jth coding tree unit in the frame to be coded, L j is the number of pixel blocks contained in the j-th coding tree unit, ω i is the weight factor of the i-th pixel block.

[0033] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned low-delay layered video coding method.

[0034] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the above-mentioned low-delay layered video encoding method.

[0035] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects: the low-latency layered video coding method provided by the present invention first calculates the reconstruction distortion and motion compensation prediction error of each pixel block based on the initial quantization parameter and Lagrange multiplier of the current frame to be coded, which are determined based on the degree of influence of the current frame to be coded on subsequent frames, and determines the distortion influence factor of each pixel block in the current frame to be coded based on the degree of influence of the current frame to be coded on subsequent frames, and the reconstruction distortion and motion compensation prediction error of each pixel block in the current frame to be coded, determines the weight factor of the pixel block according to the distortion influence factor, and finally calculates the Lagrange multiplier and quantization parameter of the coding tree unit based on the above weight factor to encode the current frame to be coded. The present invention takes into account key frames (the last frame in each group of images to be encoded) and non-key frames, and sets the influence of key frames on subsequent frames to be greater than the influence of non-key frames on subsequent frames, and uses this factor to calculate the distortion influence factor. In this way, the Lagrange multiplier and quantization parameter of the coding tree unit in the current frame to be encoded are determined based on the distortion influence factor, thereby reducing the time domain propagation of distortion in the video encoding process and improving the video coding rate-distortion performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 Flowchart of the low-latency layered video coding method provided by this application;

[0038] Figure 2 The QP is input to the encoder under the LDB configuration provided by this application. input Schematic diagram of initial quantization parameter values ​​of 8 frames to be encoded in a GOP when =32;

[0039] Figure 3 The QP input to the encoder under the LDP configuration provided by this application is input Schematic diagram of initial quantization parameter values ​​of 8 frames to be encoded in a GOP when =32;

[0040] Figure 4 A schematic diagram of the bit rate savings achieved by the method of the present invention compared to the VVC benchmark encoder;

[0041] Figure 5 This is a schematic diagram comparing the rate-distortion curves of the present application and the VVC benchmark encoder for the test video Basketball Drill under the LDB encoder configuration;

[0042] Figure 6 This is a schematic diagram comparing the rate-distortion curves of the test video ArenaOfValor using the present application and the VVC benchmark encoder under the LDP encoder configuration;

[0043] Figure 7 This is a structural diagram of a computer device provided by this application. DETAILED DESCRIPTION

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0045] The purpose of the present invention is to provide a method, computer equipment and medium for low-delay layered video coding, which takes into account key frames and non-key frames, sets the influence of key frames on subsequent frames to be greater than the influence of non-key frames on subsequent frames, and uses it to calculate the distortion influence factor, thereby reducing the time domain propagation of distortion in the video coding process and improving video compression performance.

[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0047] like Figure 1 As shown, the present invention provides a low-delay layered video coding method, the method comprising:

[0048] S1: Determine the initial quantization parameter and Lagrange multiplier of the current frame to be encoded based on the degree of influence of the current frame to be encoded on subsequent frames; the layered video is divided into a plurality of image groups to be encoded, and the image groups to be encoded include a plurality of frames to be encoded; wherein the degree of influence of the key frames in the image groups to be encoded on subsequent frames is greater than the degree of influence of the non-key frames on subsequent frames, and the key frame is the last frame in each image group to be encoded; the subsequent frame is the frame to be encoded following the current frame to be encoded in the current image group to be encoded.

[0049] S2: predicting the reconstruction distortion and motion compensation prediction error of each pixel block in the current frame to be encoded according to the initial quantization parameter and Lagrange multiplier of the current frame to be encoded; each of the frames to be encoded is divided into a plurality of the pixel blocks.

[0050] S3: Determine a distortion impact factor for each pixel block in the current frame to be encoded based on the degree of influence of the current frame to be encoded on subsequent frames, as well as the reconstruction distortion and motion compensation prediction error of each pixel block in the current frame to be encoded; the distortion impact factor represents the degree of influence of the coding distortion of the corresponding pixel block on the coding distortion of subsequent frames.

[0051] S4: Calculating a weight factor of a corresponding pixel block according to the distortion impact factor; the weight factor represents the relative unimportance of the encoding quality of the pixel block in the current frame to be encoded.

[0052] S5: Calculating a weight coefficient of each coding tree unit according to a weight factor of a pixel block corresponding to each coding tree unit in a current frame to be coded.

[0053] S6: Determine the Lagrangian multiplier and quantization parameter of the coding tree unit according to the Lagrangian multiplier of the current frame to be coded and the weight coefficient of the coding tree unit.

[0054] S7: Encode the current frame to be encoded according to the Lagrange multipliers and quantization parameters of each coding tree unit.

[0055] S8: Determine whether the current frame to be encoded is the last frame of the layered video; if so, end the encoding; if not, take the next frame to be encoded as the current frame to be encoded, and return to step S1.

[0056] In this embodiment, before step S1, the following steps are also included:

[0057] Dividing the video to be encoded into a plurality of frames to be encoded;

[0058] Several consecutive frames to be encoded are grouped into a group of pictures to be encoded.

[0059] S1 specifically includes:

[0060] The compensation value ΔQP of the current frame to be encoded is determined according to the influence degree of the current frame to be encoded on the subsequent frames. L ;

[0061] According to QP=QP input +ΔQP L , calculate the initial quantization parameter QP of the current frame to be encoded; wherein, QP input is the input quantization parameter value of the encoder;

[0062] According to λ=W L 2 (QP-12)3 , calculate the Lagrange multiplier λ of the current frame to be encoded; where W L is the set weight of the encoder.

[0063] Specifically, the frame to be encoded is read in, and its position number in the current group of pictures to be encoded (Group of Picture, GOP) is recorded as the relative picture order number (rPOC), and the value of rPOC ranges from 1 to N. GOP , N GOP The number of frames contained in a group of pictures to be coded GOP, rPOC = N GOP The corresponding frame to be encoded is a key frame, that is, the current frame to be encoded is the last frame of the image group to be encoded. According to the default setting of the video encoder in the low-latency layered coding configuration and the above formula, the initial quantization parameter (Quantization Parameter, QP) and the Lagrange multiplier λ of the current frame to be encoded are determined. It should be noted that the default setting of the video encoder in the low-latency layered coding configuration in this embodiment refers to the input quantization parameter value QP of the encoder. input And the encoder's set weight W L .

[0064] After obtaining the initial quantization parameters and Lagrange multipliers of the frame to be encoded, step S2 needs to be performed according to the parameters, where S2 specifically includes:

[0065] The current frame to be coded is coded using integer pixel inter-frame prediction according to the initial quantization parameters and Lagrange multipliers of the current frame to be coded, and the reconstruction distortion and motion compensation prediction error of each pixel block are obtained during the coding process. Specifically:

[0066] Based on the initial quantization parameters and Lagrange multipliers of the current frame to be encoded obtained in S1, the pixel block is subjected to integer pixel inter-frame prediction encoding. During the encoding process, the pixel-level motion compensation prediction (MCP) error E and reconstruction distortion D are recorded, that is, the reconstruction distortion and motion compensation prediction error of each pixel block. The size of the pixel block in this embodiment is set to 32×32. The size of the pixel block of 32×32 does not have any limiting effect. For each pixel block, its reconstruction distortion and motion compensation prediction error are both measured using the mean square error (MSE). For example, the MCP error E of each pixel block is the mean square error of the MCP errors of all 32×32 pixels corresponding to it.

[0067] In this embodiment, step S3 specifically includes:

[0068] Determine whether the current frame to be encoded is a key frame in the current image group to be encoded; if not, Calculate the distortion impact factor of each pixel block in the current frame to be encoded; if so, then according to Calculate the distortion impact factor of each pixel block in the current frame to be encoded.

[0069] Among them, φ i is the distortion factor of the i-th pixel block, N GOP is the number of frames in the current group of pictures to be coded; rPOC represents the relative image sequence number of the current frame to be coded, that is, the position number of the current frame to be coded in the current group of pictures to be coded. When n=1, it represents the first frame after the current frame to be coded. i and E i are the reconstruction distortion and motion compensation prediction error of the i-th pixel block, is the frame number of the next group of pictures to be coded. When the current frame to be coded is a key frame in the current group of pictures to be coded, if the next GOP is not the last GOP of the video sequence, then If the next GOP is the last GOP of the video sequence, then Equal to the number of frames remaining.

[0070] It should be noted that the distortion impact factor calculated by the above formula reflects the impact strength of the coding distortion of each 32×32 pixel block in the to-be-coded frame on the coding distortion of subsequent frames.

[0071] In step S3, the distortion influence factor φ of each pixel block in the current frame to be encoded is determined. i Then, based on the distortion influence factor, the weight factor of each pixel block is determined, wherein the calculation formula of the weight factor in step S4 is:

[0072]

[0073] Among them, M is the total number of pixel blocks in the current frame to be encoded, φ i is the distortion factor of the i-th pixel block, is 1 / φ of the M pixel block i The average value, ω i is the weight factor of the i-th pixel block.

[0074] In this embodiment, the weight factor represents the relative unimportance of the encoding quality of the i-th 32×32 pixel block in the frame to be encoded. That is, when the weight factor ω of the pixel block is calculated i When it is greater than 1, the coding quality of the i-th 32×32 pixel block may be lower than the average coding quality of the current frame (the average coding quality refers to the mean square error of the distortion of the pixel block in each frame before and after coding); when ω i When it is less than 1, the encoding quality of the i-th 32×32 pixel block should be higher than the average encoding quality of the current frame.

[0075] After obtaining the weight factors of the above-mentioned pixel blocks, the weight coefficient of each coding tree unit (CTU) is calculated according to the weight factors of the pixel blocks corresponding to each coding tree unit (CTU) in the current frame to be encoded. The calculation formula of the weight coefficient in S5 is:

[0076]

[0077] Among them, ψ j is the weight coefficient of the jth coding tree unit in the frame to be coded, L j is the number of pixel blocks contained in the j-th coding tree unit, ω i is the weight factor of the i-th pixel block.

[0078] Then, according to the Lagrange multiplier of the current frame to be coded in S1 and the weight coefficient of the coding tree unit in S5, the Lagrange multiplier and quantization parameter of the coding tree unit are determined, and the calculation formula is as follows:

[0079] λ j =ψ j ·λ

[0080] QP j =F(λ j )

[0081] Among them, λ j is the Lagrange multiplier of the jth CTU in the current frame to be encoded, QP j is the quantization parameter of the jth CTU in the current frame to be encoded, and F(·) represents a function operator. For different video encoders, the expression and parameter selection of the function F(·) are different. In this embodiment, for the VVC encoder adopted above, the function F(·) is:

[0082] QP j =F(λ j )=4.3281×log(λ j )+2.1829

[0083] Adopt the quantization parameter QP of the coding tree unit in step S6 j and the Lagrange multiplier λ j Encode the current frame to be encoded and determine whether the current frame to be encoded is the last frame of the layered video encoding; if so, end the encoding; if not, use the next frame to be encoded as the current frame to be encoded and return to step S1 until the current frame to be encoded is the last frame of the layered video encoding.

[0084] This embodiment uses the computer development environment Visual Studio 2019 and the reference software VTM17.0 based on the Versatile Video Coding (VVC) standard to implement the above steps. The encoder uses two configurations: Low Delay B-frame (LDB) and Low Delay P-frame (LDP). The encoder input QP input Set to 32, Figure 2 is the input QP input =32, LDB configures the initial quantization parameters of the 8 frames to be encoded in the next GOP. Figure 3 Configure the initial quantization parameters of the eight frames to be encoded in the next GOP for LDP.

[0085] The algorithm of the present invention is integrated into the VVC reference software VTM17.0. The experimental test adopts all 20 standard dynamic range (SDR) videos of Class B, Class C, Class D, Class E and Class F recommended by VVC Common Test Conditions (CTC). Each video is tested according to the CTC test input quantization parameter QP. input The four code rate points are 22, 27, 32 and 37. The experimental results show that the code rate of the present invention is saved by ( Delta bit-rate (BD-rate) is a metric that measures bit rate savings relative to the benchmark encoder at the same objective quality. A positive value indicates compression performance loss, while a negative value indicates compression performance improvement. Figure 4 This is a schematic diagram of the bit rate savings of the method of the present invention relative to the VVC benchmark encoder, in which BasketballDrill and other names are the names of the test videos. Figure 4 It can be seen that the present invention achieves an average bit rate savings of 3.71% compared to the VVC benchmark encoder under the LDB encoder configuration; and an average bit rate savings of 3.46% compared to the VVC benchmark encoder under the LDP encoder configuration. In addition, the experimental data also shows that the encoding time of the present invention does not increase compared to the VVC benchmark encoder, and at the same input quantization parameter QP input Under the same conditions, the time taken by the algorithm of the present invention to encode the video ArenaOfValor is even less than that taken by the VVC benchmark encoder, which is mainly due to the same input quantization parameter QP input Under this condition, the output bit rate after encoding using the method of the present invention is lower than the output bit rate of the VVC benchmark encoder.

[0086] Figure 5 This is a schematic diagram comparing the rate-distortion curves of the present invention and the VVC benchmark encoder for the test video Basketball Drill under the LDB encoder configuration. Figure 6 3 is a schematic diagram comparing rate-distortion curves of the test video ArenaOfValor under the LDP encoder configuration of the present invention and the VVC benchmark encoder in the embodiment. Figure 5 and Figure 6 In the figure, the horizontal axis bitrate is the output bit rate, in kbps; the vertical axis Y-PSNR is the peak signal-to-noise ratio of the video brightness component, in dB. Figure 5 and Figure 6 It shows that at the same output bit rate, the video encoding quality of the method of the present invention is significantly better than that of the VVC benchmark encoder. The four rate-distortion points in the figure show the same input quantization parameter QPinput Under this condition, the output bit rate of the present invention is slightly lower than the output bit rate of the VVC benchmark encoder.

[0087] The existing time-domain dependent rate-distortion optimization method based on AVC and HEVC encoders mentioned in the background technology is developed for AVC and HEVC encoders, so it cannot achieve effective compression performance improvement for the latest video coding standard VVC encoder. Based on the above content, it can be seen that the method of the present invention is also applicable to the VVC encoder. The present invention proposes a low-delay layered video coding method based on the low-delay layered video coding structure characteristics adopted by the current video coding standard. The method does not require caching subsequent coded frames for pre-analysis. Without increasing the coding time, the present invention can significantly improve the compression performance of video encoders such as existing HEVC and VVC standards. The present invention takes into account the direct and indirect propagation of distortion in inter-frame prediction coding, sets the degree of influence of key frames and non-key frames on subsequent frames according to the position of the current frame to be coded in the image group, and uses it to calculate the distortion influence factor. In this way, the Lagrange multiplier and quantization parameter of the coding tree unit in the current frame to be coded are determined based on the distortion influence factor, thereby reducing the distortion time-domain propagation in the video coding process and improving the video coding rate-distortion performance.

[0088] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned low-delay layered video coding method.

[0089] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device provided by this application. Figure 7 As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 7As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0090] exist Figure 7 In the computer device 1000 shown, the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to implement the low-latency layered video encoding method described in the above embodiment, which will not be repeated here.

[0091] The present invention also provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded by a processor and executing the low-delay layered video encoding method described in the above embodiment, which will not be described in detail here.

[0092] The above program can be deployed and executed on a single computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected through a communication network. Multiple computer devices distributed at multiple locations and interconnected through a communication network can form a blockchain network.

[0093] The computer-readable storage medium may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Furthermore, the computer-readable storage medium may include both an internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0094] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0095] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only intended to help understand the method and core concept of the present invention. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concept of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.

Claims

1. A low-delay layered video coding method, characterized in that: The method comprises: S1: Determine the initial quantization parameter and Lagrange multiplier of the current frame to be coded based on the degree of influence of the current frame to be coded on subsequent frames; the layered video is divided into a plurality of image groups to be coded, and the image groups to be coded include a plurality of frames to be coded; wherein the degree of influence of key frames in the image groups to be coded on subsequent frames is greater than the degree of influence of non-key frames on subsequent frames, and the key frame is the last frame in each image group to be coded; the subsequent frame is the image group to be coded following the current frame to be coded in the current image group to be coded; S1 specifically includes: determining the compensation value ΔQP of the current frame to be coded based on the degree of influence of the current frame to be coded on subsequent frames L ; According to QP = QP input +ΔQP L , calculate the initial quantization parameter QP of the current frame to be encoded; wherein, QP input is the input quantization parameter value of the encoder; according to λ=W L 2 (QP-12) / 3 , calculate the Lagrange multiplier λ of the current frame to be encoded; where W L is the set weight of the encoder; S2: predicting the reconstruction distortion and motion compensation prediction error of each pixel block in the current frame to be encoded according to the initial quantization parameter and Lagrange multiplier of the current frame to be encoded; each of the frames to be encoded is divided into a plurality of the pixel blocks; S3: Determine a distortion impact factor for each pixel block in the current frame to be encoded based on the degree of influence of the current frame to be encoded on subsequent frames, as well as reconstruction distortion and motion compensation prediction error of each pixel block in the current frame to be encoded; the distortion impact factor represents the degree of influence of the coding distortion of the corresponding pixel block on the coding distortion of the subsequent frame; S3 specifically includes: Determine whether the current frame to be encoded is a key frame in the current image group to be encoded; if not, Calculate the distortion impact factor of each pixel block in the current frame to be encoded; if so, then according to Calculate the distortion impact factor of each pixel block in the current frame to be encoded; Among them, φ i is the distortion factor of the i-th pixel block, N GOP is the number of frames in the current group of pictures to be coded; rPOC represents the relative image sequence number of the current frame to be coded, that is, the position number of the current frame to be coded in the current group of pictures to be coded. When n=1, it represents the first frame after the current frame to be coded. i and E i are the reconstruction distortion and motion compensation prediction error of the i-th pixel block, is the frame number of the next group of pictures to be encoded; S4: Calculating a weight factor of a corresponding pixel block according to the distortion impact factor; the weight factor represents the relative unimportance of the encoding quality of the pixel block in the current frame to be encoded; S5: Calculating a weight coefficient of each coding tree unit according to a weight factor of a pixel block corresponding to each coding tree unit in the current frame to be coded; S6: Determine the Lagrangian multiplier and quantization parameter of the coding tree unit according to the Lagrangian multiplier of the current frame to be coded and the weight coefficient of the coding tree unit; S7: Encode the current frame to be encoded according to the Lagrange multiplier and quantization parameter of each coding tree unit; S8: Determine whether the current frame to be encoded is the last frame of the layered video; if so, end the encoding; if not, take the next frame to be encoded as the current frame to be encoded, and return to step S1.

2. The encoding method according to claim 1, wherein Step S2 specifically includes: The current frame to be coded is coded by performing integer pixel inter-frame prediction coding according to the initial quantization parameter and Lagrange multiplier of the current frame to be coded, and the reconstruction distortion and motion compensation prediction error of each pixel block are obtained during the coding process.

3. The encoding method according to claim 1, wherein: Before step S1, the method further includes: Divide the video to be encoded into several frames to be encoded; Several consecutive frames to be encoded are grouped into a group of pictures to be encoded.

4. The encoding method according to claim 1, wherein The pixel block is a 32×32 pixel block.

5. The encoding method according to claim 1, wherein: The calculation formula of the weight factor is: Among them, M is the total number of pixel blocks in the current frame to be encoded, φ i is the distortion factor of the i-th pixel block, is 1 / φ of the M pixel block i The average value, ω i is the weight factor of the i-th pixel block.

6. The encoding method according to claim 5, characterized in that The calculation formula of the weight coefficient is: Among them, ψ j is the weight coefficient of the jth coding tree unit in the frame to be coded, L j is the number of pixel blocks contained in the j-th coding tree unit, ω i is the weight factor of the i-th pixel block.

7. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Video coding bit resource redistribution method

    CN112887714A

  • Method and system for determining parameters of coding tree unit

    CN113596483A