Video coding method and system

By adaptively adjusting the quantization parameters of the encoding unit according to the video type and timing parameters, the problem of poor encoding performance in different video scenarios is solved, and more efficient video encoding is achieved.

CN120475152APending Publication Date: 2025-08-12ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510608229.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The prior art has the same method of regulating the quantization parameters of the encoding unit in different video scenarios, resulting in poor encoding performance.

Method used

The intensity parameters of the encoding unit are determined according to the video type and timing parameters, and the quantization parameters are calculated through the frame prediction cost and overlap ratio to realize the adaptive adjustment of the quantization parameters.

Benefits of technology

Improve the video encoding performance in different video scenarios, maintain encoding compatibility and improve encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120475152A_ABST
    Figure CN120475152A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video coding method and system. According to the method, a to-be-coded video can be acquired, and a video type corresponding to the to-be-coded video is determined. The video coding system determines the strength parameter of each coding unit in the video frame based on the video type and the time sequence parameter of the video frame, and determines the quantization parameter of each coding unit based on the frame prediction cost and the strength parameter of each coding unit in the video frame; and then, on the basis of the quantization parameter of each coding unit in each video frame, coding each coding unit to obtain coding data corresponding to the video to be coded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of image processing technology, and in particular to a video encoding method and system. Background Art

[0002] With the rapid development of video streaming and on-demand platforms, cloud transcoding systems are widely using video encoding technology to compress multimedia content. While ensuring video quality on the user side, effectively reducing transmission bandwidth consumption and ensuring decoding compatibility across different terminals have become key requirements in the current video processing field.

[0003] In related technologies, the Cutree algorithm is generally used to predict the number of times a current coding unit is referenced by subsequent frames based on the dependencies between reference frames in a video. Based on this, the quantization parameter (QP) value corresponding to the coding unit is calculated. Each coding unit is encoded based on its corresponding quantization parameter, thereby obtaining the encoded data corresponding to the entire video.

[0004] However, in the above technology, when determining the quantization parameter values of different coding units, since the parameter adjustment method for different video scenes is the same, there is a problem of insufficient encoding performance when encoding videos in different video scenes.

[0005] The content of the background technology section is merely information known to the inventor personally, and does not mean that the above information has entered the public domain before the application date of this disclosure, nor does it mean that it can become the prior art of the present disclosure. Summary of the Invention

[0006] This specification provides a video encoding method and system, which can adopt parameter control methods adapted to different video scenes for different video scenes, thereby improving video encoding performance in different video scenes.

[0007] In a first aspect, the present specification provides a video encoding method, comprising: obtaining a video to be encoded, determining a video type corresponding to the video to be encoded, the video to be encoded comprising multiple video frames, each of the multiple video frames comprising a preset number of encoding units; determining an intensity parameter of each of the encoding units in the video frame based on the video type and a timing parameter of the video frame, the intensity parameter being used to control an adjustment amplitude of a quantization parameter offset of each of the encoding units in the video frame; determining a quantization parameter of each of the encoding units in the video frame based on a frame prediction cost and the intensity parameter; and encoding each of the encoding units based on the quantization parameter of each of the encoding units in each of the video frames to obtain encoding data corresponding to the video to be encoded.

[0008] In some embodiments, determining the video type corresponding to the video to be encoded includes: determining the video type of the video to be encoded based on an inter-frame prediction cost corresponding to each coding unit in each of the video frames and a preset threshold.

[0009] In some embodiments, determining the video type of the video to be encoded based on the inter-frame prediction cost corresponding to each coding unit in each of the video frames and a preset threshold includes: averaging the inter-frame prediction costs corresponding to each coding unit in each of the video frames to determine the inter-frame prediction cost corresponding to each of the video frames; averaging the inter-frame prediction costs corresponding to each of the multiple video frames to determine the average inter-frame prediction cost; and determining the video type of the video to be encoded based on the average inter-frame prediction cost and a preset threshold.

[0010] In some embodiments, the preset threshold includes a first threshold and a second threshold, wherein the first threshold is less than the second threshold; determining the video type of the video to be encoded based on the average inter-frame prediction cost and the preset threshold includes: when the average inter-frame prediction cost is less than the first threshold, determining that the video type of the video to be encoded is the first type; when the average inter-frame prediction cost is greater than or equal to the first threshold and less than or equal to the second threshold, determining that the video type of the video to be encoded is the second type; when the average inter-frame prediction cost is greater than the second threshold, determining that the video type of the video to be encoded is the third type.

[0011] In some embodiments, the method further includes: determining the first threshold based on the attribute data of the video to be encoded and a first variable; and determining the second threshold based on the attribute data of the video to be encoded and a second variable; the second variable is greater than the first variable, and the first variable and the second variable are variables that control the video type.

[0012] In some embodiments, the attribute data includes: the width of the video, the height of the video, and the bit depth of the video.

[0013] In some embodiments, determining the intensity parameters of each encoding unit of the video frame based on the video type of the video to be encoded and the timing parameters of the video frame includes: determining the intensity parameters corresponding to the video type of the video to be encoded and the timing parameters of the video frame based on a preset correspondence; the preset correspondence includes the correspondence between the intensity parameters, the video type and the timing parameters.

[0014] In some embodiments, the calculation of the inter-frame prediction cost and intra-frame prediction cost corresponding to each coding unit contained in each video frame in the video to be encoded includes: for any current video frame in the video to be encoded: determining at least one reference frame corresponding to the current video frame; for any current coding unit in the current video frame: in the at least one reference frame, determining at least one reference coding unit corresponding to the current coding unit, so as to calculate the frame prediction cost corresponding to the current coding unit based on the at least one reference coding unit; the frame prediction cost includes: inter-frame prediction cost and intra-frame prediction cost.

[0015] In some embodiments, determining at least one reference frame corresponding to the current video frame includes: determining at least one reference frame corresponding to the current video frame based on the reference type of the current video frame: if the current video frame is of a first reference type, determining a reference frame before the current video frame and determining a reference frame after the current video frame; or, if the current video frame is of a second reference type, determining a reference frame before the current video frame.

[0016] In some embodiments, the quantization parameter of each coding unit is determined based on the frame prediction cost of each coding unit in the video frame and the strength parameter, including: determining the cumulative propagation cost corresponding to the current coding unit based on the overlap ratio between the current coding unit and the reference coding unit and the frame prediction cost corresponding to the current coding unit; determining the quantization parameter corresponding to the current coding unit based on the strength parameter of the video frame corresponding to the current coding unit, the cumulative propagation cost corresponding to the current coding unit and the inter-frame prediction cost.

[0017] In some embodiments, the cumulative propagation cost corresponding to the current coding unit is determined based on the overlap ratio between the current coding unit and the reference coding unit, and the inter-frame prediction cost and intra-frame prediction cost corresponding to the current coding unit, including: determining the proportion of inheritance information transmitted by the current coding unit to the reference coding unit based on the inter-frame prediction cost and intra-frame prediction cost corresponding to the current coding unit; calculating the total amount of dependency information of the current coding unit on the reference coding unit based on the inheritance information ratio, the cumulative propagation cost of the previous coding unit of the current coding unit and the intra-frame prediction cost; and determining the cumulative propagation cost corresponding to the current coding unit based on the total amount of dependency information and the overlap ratio between the current coding unit and the reference coding unit.

[0018] In some embodiments, the method further includes: when the intra-frame prediction cost of the current coding unit is greater than the inter-frame prediction cost, setting the inheritance information ratio of the current coding unit to zero.

[0019] In some embodiments, for any current video frame in the video to be encoded: a timing parameter corresponding to the current video frame is determined according to the number of times the current video frame is referenced by other video frames.

[0020] In a second aspect, the present specification also provides a video encoding system, comprising at least one storage medium and at least one processor, wherein the at least one storage medium stores at least one instruction set for performing video encoding; the at least one processor is communicatively connected to the at least one storage medium, wherein the at least one processor reads the at least one instruction set during operation and executes any one of the methods described in the first aspect above according to the instructions of the at least one instruction set.

[0021] As can be seen from the above technical solutions, the video encoding method and system provided in this specification can, after determining the video type of the video to be encoded, determine the intensity parameters of each encoding unit in each video frame based on the video type of the video to be encoded and the timing parameters of each video frame, so as to determine the quantization parameters of each encoding unit in each video frame based on the intensity parameters. Furthermore, the video encoding system encodes each encoding unit based on the quantization parameters to obtain the encoded data corresponding to the video to be encoded. The above method enables the intensity parameters of each video frame to be adaptively determined based on the video type and the timing parameters of the video frame, solving the problem of reduced encoding performance caused by the fixed intensity parameters of each video frame in different video scenes in the related art. It can adopt a parameter control method adapted to each video scene for different video scenes, thereby improving the video encoding performance in different video scenes.

[0022] In addition, when determining the quantization parameter of each coding unit, the video coding system comprehensively considers the frame prediction cost and strength parameter of each coding unit, thereby achieving fine-grained adjustment of the quantization parameter offset. In other words, the video coding method provided in this specification is different from the prior art method of uniformly regulating all coding units. The video coding system in this application analyzes the characteristics of three dimensions: the video type of the processed video, the timing parameters of each video frame, and the frame prediction cost of each coding unit, determines the quantization parameter corresponding to each coding unit, and encodes each coding unit based on the quantization parameter corresponding to each coding unit. This improves the rationality of the bit rate allocation of the coding unit while maintaining coding compatibility, thereby improving coding efficiency.

[0023] Other functions of the video encoding method and system provided in this specification will be partially listed in the following description. The creative aspects of the video encoding method and system provided in this specification can be fully explained by practicing or using the methods, devices and combinations described in the following detailed examples. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0025] Figure 1 A schematic diagram of an application scenario of a video encoding system provided according to an embodiment of this specification is shown;

[0026] Figure 2 A schematic diagram of the hardware structure of a computing device provided according to some embodiments of this specification is shown;

[0027] Figure 3 A schematic diagram of a video encoding method according to an embodiment of the present disclosure is shown;

[0028] Figure 4 shows a time domain hierarchy diagram of a network abstraction layer unit provided according to another embodiment of the present specification; and

[0029] Figure 5 FIG2 is a flow chart of a video encoding method according to another embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] The following description provides specific application scenarios and requirements for this specification, with the goal of enabling those skilled in the art to make and use the contents of this specification. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of this specification. Therefore, this specification is not limited to the embodiments shown, but is intended to be accorded the broadest scope consistent with the claims.

[0031] The terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. For example, as used herein, the singular forms "a," "an," and "the" may also include the plural forms unless the context clearly indicates otherwise. When used in this specification, the terms "comprise," "include," and / or "contain" are intended to refer to the presence of the associated integers, steps, operations, elements, and / or components, but do not preclude the presence of one or more other features, integers, steps, operations, elements, components, and / or groups or the addition of other features, integers, steps, operations, elements, components, and / or groups in the system / method.

[0032] These and other features of this specification, as well as the operation and function of the associated elements of the structure, and the economical assembly and manufacture of the components, can be significantly improved with consideration of the following description. Reference is made to the accompanying drawings, all of which form a part of this specification. However, it should be expressly understood that the drawings are for illustration and description purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.

[0033] The flowcharts used in this specification illustrate operations implemented by systems according to some embodiments of the present specification. It should be clearly understood that the operations of the flowcharts may not be implemented in sequence. Rather, the operations may be implemented in reverse order or simultaneously. Furthermore, one or more additional operations may be added to the flowcharts. One or more operations may be removed from the flowcharts.

[0034] In this specification, "X includes at least one of A, B, or C" means that X includes at least A, or X includes at least B, or X includes at least C. In other words, X may include only any one of A, B, and C, or any combination of A, B, and C, as well as other possible contents / elements. Any combination of A, B, and C may be A, B, C, AB, AC, BC, or ABC.

[0035] In this specification, unless otherwise specified, the association relationship between structures can be a direct association relationship or an indirect association relationship. For example, when describing "A is connected to B", unless it is clearly stated that A is directly connected to B, it should be understood that A can be directly connected to B or indirectly connected to B; for another example, when describing "A is above B", unless it is clearly stated that A is directly above B (AB are adjacent and A is above B), it should be understood that A can be directly above B or indirectly above B (AB is separated by other elements and A is above B). And so on.

[0036] It should be noted that the user data obtained in this manual is authorized by the user and does not involve user privacy.

[0037] For the convenience of description, the terms that will appear in the following text of this specification are first explained.

[0038] Video to be encoded: the original video before encoding, which is a video sequence composed of multiple original video frame images.

[0039] Coding area: also known as coding unit (CU, CodingUnit), is a fixed-size image block (such as 8×8) divided in advance in the video frame, and is also a processing object in the encoding process.

[0040] Quantization Parameter (QP): Used to control the quantization step size in video encoding. A larger QP value results in a larger quantization step size and a higher compression ratio, but also more severe distortion. Conversely, a smaller QP value results in finer quantization and better image quality, but also a higher bitrate.

[0041] Coding Unit Tree-Referenced Energy Estimation (Cutree): A video coding algorithm that adjusts the QP of a current block by estimating how much information the current block contributes to future frames during inter-frame prediction. If a current block contributes more information to subsequent frames, its importance is higher, and the coding quality of that region should be improved, resulting in a lower QP. Conversely, if the current block contributes less information to subsequent frames, the QP should be increased.

[0042] Temporal Identifier (TID): This parameter is used in video coding to mark the temporal hierarchy of Network Abstraction Layer (NAL) units. A smaller TID value indicates a frame's greater temporal importance, being referenced by more subsequent frames and forming the basis for temporal prediction. A larger TID value indicates a frame's lower importance, being referenced by fewer or no subsequent frames. By using TID hierarchy rules, encoders can optimize bitrate allocation and support scalable transmission, balancing compression efficiency with error propagation control.

[0043] Strength parameter: CUTreeStrength, used to control the adjustment range of the quantization parameter offset of the current coding area. The quantization parameter offset is added to the initial quantization parameter to obtain the adjusted quantization parameter. The larger the strength parameter, the smaller the adjusted quantization parameter.

[0044] Intra prediction cost (intra_cost): reflects the total amount of information of a video frame in intra prediction mode.

[0045] Inter prediction cost (inter_cost): reflects the total amount of information of the video frame in the inter prediction mode. The difference between the intra prediction cost and the inter prediction cost represents the amount of information transferred from the current frame to its reference frame.

[0046] Key frame (I frame): I frame is an independently encoded frame that does not depend on other frames, but is usually referenced by multiple subsequent P frames / B frames.

[0047] Forward predicted frame (P frame): A P frame is predicted based on the previous frame (I frame or P frame) and may be referenced by multiple subsequent B frames or P frames.

[0048] Bidirectionally predicted frames (B frames): B frames rely on previous and next frames for prediction, but are usually not referenced by other frames (they may only be referenced in low-latency encoding).

[0049] The method provided in this specification can be applied to scenarios such as short videos, video conferencing, live video, and online video on demand. The specific application method can be that when the target video needs to be output in the above scenarios, the video encoding system can encode the video to be encoded according to the video encoding method to obtain the encoded data corresponding to the video to be encoded, and then encapsulate the encoded data according to a preset format to obtain the target video in the preset format and output it.

[0050] In the above process, video encoding bears the heavy responsibility of video compression. It can reduce the volume of video encoding data as much as possible while ensuring that the video quality viewed by the human eye is not significantly reduced, thereby saving bandwidth costs and improving the user's viewing visual experience.

[0051] The video encoding method provided in this specification is that after determining the video type of the video to be encoded, the video encoding system can determine the intensity parameters of each encoding unit in each video frame based on the video type of the video to be encoded and the timing parameters of each video frame, so as to determine the quantization parameters of each encoding unit in each video frame based on the intensity parameters. Furthermore, the video encoding system encodes each encoding unit based on the quantization parameters corresponding to each encoding unit to obtain the encoded data corresponding to the video to be encoded. The above method enables the intensity parameters of each video frame to be adaptively determined based on the video type of the video to be encoded and the timing parameters of the current video frame, and can adopt a parameter control method adapted to each video scene for different video scenes, solving the problem of reduced encoding performance caused by the fixed intensity parameters of each video frame in different video scenes in the related art, thereby improving the video encoding performance in different video scenes.

[0052] It should be noted that the above description of the application scenario is only one of the multiple usage scenarios provided in this specification. Those skilled in the art should understand that when the video encoding method and system provided in this specification are applied to other usage scenarios, their implementation methods and technical effects are similar.

[0053] Figure 1 A schematic diagram of an application scenario 100 of a video encoding system 130 provided according to an embodiment of this specification is shown.

[0054] like Figure 1 As shown, after the video encoding system 130 obtains the video to be encoded, it can use the video encoding method provided in this specification to encode the video to be encoded to obtain encoded data corresponding to the video to be encoded.

[0055] Specifically, after obtaining the video to be encoded, the video encoding system can decode the video to be encoded to obtain multiple video frames. The video encoding system uses the above-mentioned video encoding method to encode the multiple video frames frame by frame and encoding unit by encoding unit in chronological order until the last encoding unit in the last video frame is encoded. In the above-mentioned encoding method, since the quantization parameters of each encoding unit are determined based on the frame prediction cost and strength parameter of the encoding unit, the quantization parameters of different encoding units are different. The above-mentioned encoding method converts the spatiotemporal characteristics of each video frame in the video to be encoded into a differentiated quantization strategy, ultimately achieving global bit rate control and improving local image quality.

[0056] The video coding system 130 can be a computing system with certain computing capabilities. The video coding system 130 can execute the image processing method or video processing method provided in this specification. The video coding system 130 can store data or instructions for executing the image processing method or video processing method described in this specification, and can execute or be used to execute the data or instructions. The video coding system 130 can include hardware devices with data information processing capabilities and the necessary programs required to drive the operation of the hardware devices. The video coding system 130 can be a single computing device or a cluster system composed of multiple computing devices, which is not limited in this specification.

[0057] The video encoding system 130 may be a single computing device or a cluster system composed of multiple computing devices, which is not limited in this specification.

[0058] It should be noted that the user data obtained in this manual has been authorized by the user and does not involve user privacy.

[0059] Figure 2 The hardware structure diagram of a computing device 200 provided according to some embodiments of this specification is shown. The computing device 200 can be used as Figure 1 In some embodiments, when the video encoding system 130 adopts a device cluster, the computing device 200 can serve as any device in the video encoding system 130.

[0060] like Figure 2 As shown, computing device 200 includes at least one storage medium 230 and at least one processor 220. In some embodiments, computing device 200 may further include an internal communication bus 210. In some embodiments, computing device 200 may further include a communication port 250. In some embodiments, computing device 200 may further include an I / O component 260.

[0061] Internal communication bus 210 may connect various system components, including storage media 230 and processor 220. I / O components 260 support input / output between computing device 200 and other components.

[0062] The communication port 250 is used for data communication between the computing device 200 and the outside world. For example, the computing device 200 can be connected to a network through the communication port 250.

[0063] Storage medium 230 may include a data storage device. The data storage device may be a non-transitory storage medium or a temporary storage medium. For example, the data storage device may include one or more of a disk 232, a read-only storage medium (ROM) 234, or a random access storage medium (RAM) 236. Storage medium 230 also includes at least one instruction set stored in the data storage device. The instruction set is computer program code, which may include programs, routines, objects, components, data structures, processes, modules, etc. that execute the video encoding method provided in this specification.

[0064] At least one processor 220 is communicatively coupled to at least one storage medium 230 via an internal communication bus 210. The at least one processor 220 is configured to execute the at least one instruction set described above. When the system 130 is running, the at least one processor 220 reads the at least one instruction set and, in accordance with the instructions of the at least one instruction set, executes the video encoding method provided herein.

[0065] The processor 220 may execute all steps included in the video encoding method. The processor 220 may be in the form of one or more processors. The processor 220 may issue execution instructions. The processor 220 may include one or more hardware processors, such as a microcontroller, a microprocessor, a reduced instruction set computer (RISC), an application-specific integrated circuit (ASIC), an application-specific instruction set processor (ASIP), a central processing unit (CPU), a graphics processing unit (GPU), a physical processing unit (PPU), a microcontroller unit, a digital signal processor (DSP), a field programmable gate array (FPGA), an advanced RISC machine (ARM), a programmable logic device (PLD), any circuit or processor capable of performing one or more functions, or any combination thereof.

[0066] For illustrative purposes only, only one processor 220 is shown in the computing device 200 in the drawings in this specification. However, it should be noted that the computing device 200 in this specification may also include multiple processors. Therefore, the operations and / or method steps disclosed in this specification may be performed by a single processor as described herein, or may be performed jointly by multiple processors. For example, if the processor 220 of the computing device 200 in this specification performs steps A and B, it should be understood that steps A and B may also be performed jointly or separately by two different processors 220 (e.g., the first processor performs step A, the second processor performs step B, or the first and second processors perform steps A and B together).

[0067] Figure 3 FIG3 shows a flow chart of a video encoding method according to an embodiment of the present specification; the video encoding method P300 can be executed by the system 130. Figure 3 As shown, the method P300 provided in this specification may include S310-S370, wherein:

[0068] S310: Obtain a video to be encoded, and determine a video type corresponding to the video to be encoded, wherein the video to be encoded includes multiple video frames, and each of the multiple video frames includes a preset number of encoding units.

[0069] In some embodiments, the video to be encoded may be a short video, live video, on-demand video, or video conference, etc. The specific video content of the video to be encoded is not limited to that given in the above embodiments and can be flexibly adjusted according to the current application scenario.

[0070] When dividing a video frame into coding units, the video coding system may divide each video frame into coding units based on a preset coding unit size. For example, for a video frame of size 24×24, when the size of a coding unit is 8×8, the video frame may be divided into 9 coding units; for a video frame of size 64×64, when the size of a coding unit is 16×16, the video frame may be divided into 16 coding units. It should be understood that the above embodiment is merely an example, and the size of the specific coding unit may be pre-set according to actual conditions. For example, the size of the coding unit may be set to any value such as 16×16 or 32×32, and this specification does not impose any limitation thereto.

[0071] It should be noted that when the size of the video frame cannot be divided evenly into the size of the coding unit, directly dividing the video frame based on the size of the coding unit may result in incomplete coding units at the edge areas of the video frame, which may affect the encoding efficiency or processing flow. The video encoding system can supplement the edges of the video frame with pixels by supplementing a preset number of pixels so that the supplemented video frame can be divided evenly into the size of the coding unit.

[0072] In some embodiments, the video type of a video can be determined by a video encoding system based on the motion attributes (amount of motion or complexity) of the video. For example, the video type of a video may include: high-motion video (complex video) and low-motion video (static video). Alternatively, the video type of a video may also include: high-motion video (complex video), medium-motion video or low-motion video, etc. The number of types included in the classification of a specific video and the specific type classification can be flexibly set according to the current application scenario and are not limited to those given in the above embodiment. Taking the video types of a video including high-motion video, medium-motion video and low-motion video as an example, for example, action movies, sports competition videos, live electronic games, etc. may belong to high-motion videos; life videos, cooking videos, etc. may belong to medium-motion videos; landscape videos, interview videos, etc. may belong to low-motion videos.

[0073] The video encoding system may determine the video type of the video to be encoded based on the inter-frame prediction cost corresponding to each coding unit in each video frame and a preset threshold.

[0074] The inter-frame prediction cost of a coding unit reflects the degree of variation between frames within that coding unit. The inter-frame prediction cost is related to the amount of motion or complexity in the video being encoded. A low inter-frame prediction cost indicates minimal variation between video frames, potentially representing a static scene. Conversely, a high inter-frame prediction cost indicates significant variation between video frames, potentially representing a dynamic scene. In other words, based on the inter-frame prediction cost corresponding to each coding unit in each video frame and a preset threshold, the video coding system can quantify the dynamic complexity of the video content, thereby classifying the video type based on the quantified result.

[0075] In some embodiments, the video encoding system may average the inter-frame prediction costs corresponding to each coding unit in each video frame to determine the inter-frame prediction cost corresponding to each video frame. Subsequently, the video encoding system averages the inter-frame prediction costs corresponding to each video frame in a plurality of video frames to determine an average inter-frame prediction cost. Furthermore, the video encoding system determines the video type of the video to be encoded based on the average inter-frame prediction cost and a preset threshold.

[0076] In other words, in the above embodiment, the video coding system constructs a quantitative assessment system for the dynamic complexity of video content through two averaging processes: the averaging of the inter-frame prediction costs of the intra-frame coding unit and the averaging of the inter-frame prediction costs of the entire video being processed. By statistically analyzing the distribution characteristics of the inter-frame prediction costs, the video coding system can accurately distinguish the video type of the video being encoded, laying the foundation for differentiated coding of each subsequent coding unit.

[0077] In some embodiments, when the video type includes two categories, the video encoding system may determine the video type of the video to be encoded by: determining the video type of the video to be encoded whose average inter-frame prediction cost is greater than a preset threshold as the first type, and determining the video type of the video to be encoded whose average inter-frame prediction cost is less than or equal to the preset threshold as the second type. When the video type includes three categories, the preset threshold may include a first threshold and a second threshold, where the first threshold is less than the second threshold. The video encoding system may determine the video type of the video to be encoded by: determining the video type of the video to be encoded as the first type when the average inter-frame prediction cost is less than the first threshold; determining the video type of the video to be encoded as the second type when the average inter-frame prediction cost is greater than or equal to the first threshold and less than or equal to the second threshold; and determining the video type of the video to be encoded as the third type when the average inter-frame prediction cost is greater than the second threshold. It should be understood that the specific number of video types included and the setting of the preset thresholds can be flexibly adjusted based on the current application scenario or user needs, and are not limited to the above embodiments.

[0078] In the above embodiment, the video encoding system subdivides the video type into three different types by setting the first threshold and the second threshold. Compared with a single threshold or coarse classification method, the above classification method can more accurately reflect the complexity differences of the video content to be encoded, and avoid the risk of misjudgment of the type near a single threshold: for example, frequent type switching when the average inter-frame prediction cost is close to the threshold. The buffer design of the intermediate interval (second type) improves the stability and reliability of video type judgment, providing a more accurate classification basis for subsequent quantization parameter adjustment.

[0079] In some embodiments, the video encoding system can determine a first threshold based on the attribute data of the video to be encoded and a first variable, and determine a second threshold based on the attribute data of the video to be encoded and a second variable, wherein the second variable is greater than the first variable, and the first variable and the second variable are variables for controlling the video type.

[0080] In the above approach, the video encoding system determines the first and second thresholds by combining the attribute information of the video to be encoded, the first variable, and the second variable, respectively. This allows for dynamic hierarchical control and scene-adaptive encoding. Different videos to be encoded may correspond to different preset thresholds. The video encoding system can flexibly adjust the first and second thresholds based on the attribute information of the video to be encoded, thus avoiding the adaptation bias of fixed thresholds for different videos to be encoded.

[0081] The attribute data T of the video to be encoded includes: the width of the video to be encoded, the height of the video to be encoded, and the bit depth of the video to be encoded. The attribute data T of the video to be encoded can be determined based on the following formula: T = Width × Height × (2 BitDepth -1).

[0082] The video type Class can be determined in the following ways:

[0083]

[0084] in, is the average inter-frame prediction cost of the video to be encoded, f A is the first variable, f B is the second variable, T·f A is the first threshold, T·f B is the second threshold, A is the first type, B is the second type, and C is the third type. In some possible embodiments, f A Set to 0.01, f B Set to 0.1, specific f A and f B The numerical setting of can be flexibly adjusted according to user needs and is not limited to the above embodiment. It only needs to ensure that the second variable is greater than the first variable.

[0085] In some embodiments, the video encoding system, for any current video frame in the video to be encoded, determines at least one reference frame corresponding to the current video frame. Furthermore, for any current coding unit in the current video frame, the video encoding system determines, in at least one reference frame, at least one reference coding unit corresponding to the current coding unit, and calculates a frame prediction cost corresponding to the current coding unit based on the at least one reference coding unit. The frame prediction cost includes an inter-frame prediction cost (inter_cost) and an intra-frame prediction cost (intra_cost). By simultaneously considering both the inter-frame prediction cost and the intra-frame prediction cost, the above approach can more comprehensively evaluate the characteristics of the current coding unit.

[0086] Among them, the video coding system can more accurately reflect the actual frame prediction cost of the current coding unit by dynamically determining the corresponding reference frame and reference coding unit for the current coding unit, thereby improving the reliability of the decision basis for adjusting the quantization parameter.

[0087] In some embodiments, when determining a reference frame corresponding to a current video frame, the video encoding system determines the corresponding reference frame based on the reference type of the current video frame. For example, based on the reference type of the current video frame, the video encoding system determines at least one reference frame corresponding to the current video frame: if the current video frame is of the first reference type (B-frame: bidirectionally predicted frame), a reference frame is determined before the current video frame, and a reference frame is determined after the current video frame. Alternatively, if the current video frame is of the second reference type (P-frame: forward predicted frame), a reference frame is determined before the current video frame.

[0088] S330: Determine a strength parameter of each coding unit in the video frame based on the video type and a timing parameter of the video frame, where the strength parameter is used to control an adjustment range of a quantization parameter offset of each coding unit in the video frame.

[0089] In an embodiment of the present specification, a video encoding system can determine the intensity parameters of each encoding unit based on different video types and timing parameters of different video frames. When the timing parameters of the video frames are the same, different types of videos can trigger differentiated intensity parameter adjustment methods. For example, for high-motion videos, the intensity parameters can be set higher to balance the bit rate and image quality. For low-motion videos, the intensity parameters can be set lower, thereby reducing unnecessary adjustments to improve encoding efficiency. The above-mentioned differentiated intensity parameter determination method can avoid the problem of over-compression or under-compression caused by all encoding units using the same parameters for video compression in the prior art, and achieves a better balance between encoding efficiency and image quality even in different video scenarios, thereby improving the encoding performance of the video encoding system as a whole.

[0090] In some embodiments, the video encoding system may determine the intensity parameter corresponding to the video type of the video to be encoded and the timing parameters of the video frame based on a preset correspondence. The preset correspondence includes a correspondence between the intensity parameter, the video type, and the timing parameters. When determining the video type and timing parameters of the current video frame, the corresponding intensity parameter may be uniquely determined based on the preset correspondence.

[0091] Among them, for any current video frame in the video to be encoded: the video encoding system can determine the timing parameters corresponding to the current video frame based on the number of times the current video frame is referenced by other video frames. The timing parameters reflect the dependency weight of the current video frame in the time prediction chain. If the current video frame is directly or indirectly referenced by more subsequent frames (for example, as a reference frame for a P frame or a B frame), its encoding quality has a greater impact on the error propagation of subsequent frames, and it needs to be assigned a higher encoding priority (which may correspond to a higher timing parameter). Conversely, if the current video frame is referenced by subsequent frames less times, its importance is reduced, and the encoding accuracy requirements can be appropriately relaxed (corresponding to lower timing parameters).

[0092] In some embodiments, the video encoding system may use a direct counting method to determine the timing parameters of the current video frame: directly counting the number of times the current video frame is referenced by subsequent frames to determine the timing parameters of the current video frame. Alternatively, the video encoding system may assign different weights based on the distance between the current frame and the reference frame, and then count the number of times the current frame is referenced by subsequent frames based on the weights to determine the timing parameters of the current video frame.

[0093] For example, let's use the direct counting method to determine timing parameters in a video coding system. Assume that the structure between video frames in a video to be encoded is: IBBBPBBBPBBBI, where I frames represent key frames, P frames represent forward predicted frames, and B frames represent bidirectionally predicted frames. The first I frame in the video to be encoded is referenced by the following two P frames and nine B frames, so the timing parameter for the first I frame is 11. The first P frame in the video to be encoded is referenced by the following six B frames, so the timing parameter for the first P frame is 6. B frames in the video to be encoded are generally not referenced, so the timing parameter for each B frame in the video to be encoded is 0. The second P frame in the video to be encoded is referenced by the following three B frames, so the timing parameter for the second P frame is 3. The second I frame in the video to be encoded, as the last frame in the video to be encoded, is not referenced by any other video frames, so the timing parameter for the second I frame is 0. It should be understood that the above embodiments are merely exemplary, and the specific method of determining the timing parameters of each video frame can be flexibly adjusted according to user needs and is not limited to the above embodiments.

[0094] In other example embodiments, the timing parameter is TID, which is a parameter used in video coding to mark the temporal level of a network abstraction layer (NAL) unit. A smaller TID value indicates a higher temporal importance of the frame and is referenced by more subsequent frames. A larger TID value indicates a lower temporal importance of the frame and is referenced by only a few or no subsequent frames. In some embodiments, during the encoding process, the video encoding system may, based on the temporal order of each video frame, first sequentially encode multiple video frames corresponding to TID=0, then sequentially encode multiple video frames corresponding to TID=1, and then sequentially encode multiple video frames corresponding to TID=3, until all video frames are encoded.

[0095] Figure 4 A time domain hierarchy diagram of a network abstraction layer unit according to another embodiment of the present specification is shown. Figure 4 As shown, Figure 4 Each small circle in represents a video frame in the video to be encoded. Figure 4 All video frames at the bottom have TID 0 and are referenced by more subsequent frames. Figure 4 The TID of all the intermediate video frames is 1, and they are referenced by some subsequent frames. Figure 4 The TID of all the top video frames is 2 and is not referenced by subsequent frames.

[0096] It should be noted that a video frame with a smaller TID cannot refer to a video frame with a larger TID, that is, a video frame with a TID of 0 cannot refer to a video frame with a TID of 1 or 2; a video frame with a TID of 1 cannot refer to a video frame with a TID of 2. It should be understood that the above embodiment is only an example, and the number of TID levels contained in the specific video to be encoded can also be set to 4, 5 or more layers. The correspondence between different frames and TID levels is pre-set based on the properties of the encoder and is not fixed. Figure 4 The given limit.

[0097] The preset correspondence relationship may be stored in a preset array, or a preset table, a preset document, etc. The specific storage method of the preset correspondence relationship may be flexibly adjusted according to user needs and is not limited to that given in the above embodiment.

[0098] In some embodiments, a preset relationship is stored in a preset table, the number of preset video types is 3, and the number of preset timing parameters is 5. For illustration, the preset relationship may include the content shown in Table 1. It should be understood that the preset correspondence shown in Table 1 is only an example, and the setting of the specific preset correspondence can be flexibly adjusted according to user needs and is not limited to the above embodiment.

[0099]

[0100]

[0101] Table 1

[0102] As can be seen from Table 1, when the video type is the same, generally for video frames with higher timing parameters TID, because the error of this video frame has a greater impact on subsequent frames, the video encoding system will assign lower intensity parameters to retain more details of the video frame to reduce the propagation error. For video frames with lower timing parameters, because the error of this video frame has a smaller impact on subsequent frames, the video encoding system will assign higher intensity parameters to reduce the bit rate through moderate compression. By dynamically adjusting the intensity parameters as described above, the video encoding system can prioritize image quality in areas with complex motion (such as I / P frames referenced by high frequencies) and efficiently compress non-critical areas (such as B frames), thereby ultimately achieving a balance between global bit rate and image quality.

[0103] S350: Determine a quantization parameter for each coding unit based on the frame prediction cost and the strength parameter of each coding unit in the video frame.

[0104] In some embodiments, the video coding system may determine the cumulative propagation cost corresponding to the current coding unit based on the overlap ratio between the current coding unit and the reference coding unit and the frame prediction cost corresponding to the current coding unit. Furthermore, the video coding system determines the quantization parameter offset delta_qp corresponding to the current coding unit based on the strength parameter strength of the video frame corresponding to the current coding unit, the cumulative propagation cost propagate_cost corresponding to the current coding unit, and the inter-frame prediction cost intra_cost. That is, The basic quantization parameter is corrected by the quantization parameter offset to obtain the quantization parameter of the current coding unit.

[0105] In this example embodiment, different coding rules have different base quantization parameters. When a coding rule (encoder) is selected, the base quantization parameter corresponding to that coding rule is also selected. The video coding system uses the difference between the base quantization parameter and the absolute value of the quantization parameter offset as the quantization parameter for the coding unit. For example, the quantization parameter qp for the coding unit is calculated as: base quantization parameter + delta_qp.

[0106] When determining the cumulative propagation cost corresponding to the current coding unit, the video coding system may determine the propagate_fraction of the inherited information transferred from the current coding unit to the reference coding unit based on the inter-frame prediction cost and intra-frame prediction cost corresponding to the current coding unit.

[0107] In some embodiments, when the intra prediction cost of the current coding unit is greater than the inter prediction cost, the video coding system sets the inheritance information ratio of the current coding unit to zero. That is, when inter_cost>intra_cost, it indicates that the residual of inter prediction is larger, and intra prediction is more efficient, which means that the current intra prediction is significantly better than inter prediction. Therefore, in order to prevent the residual of inter prediction from propagating to subsequent frames through the reference frame, the video coding system can force propagate_fraction=0, thereby cutting off the parameter inheritance chain, preventing the long-term impact of inefficient inter prediction on subsequent coding units, avoiding error accumulation due to residuals, and reducing coding complexity.

[0108] Subsequently, the video coding system calculates the propagation cost of the previous coding unit based on the inherited information ratio propagate_fraction and the cumulative propagation cost propagate_cost of the previous coding unit of the current coding unit. pre and the intra prediction cost intra_cost, calculate the total amount of dependency information propagate_amount of the current coding unit on the reference coding unit. That is, propagate_amount = propagate_fraction × (intra_cost + propagate_cost pre ).

[0109] Furthermore, the video coding system determines the cumulative propagation cost propagate_cost corresponding to the current coding unit based on the total amount of dependency information propagate_amount and the overlap ratio between the current coding unit and the reference coding unit. ref The overlap ratio between the current coding unit and the reference coding unit is determined based on the ratio of the overlap area overlap_area between the current coding unit and the reference coding unit to the area CU_area corresponding to the current coding unit: That is,

[0110] S370: Encode each coding unit based on the quantization parameter of each coding unit in each video frame to obtain encoded data corresponding to the video to be encoded.

[0111] Among them, since the quantization parameter is determined based on the intensity parameter and the frame prediction cost of each coding unit, different types of videos to be encoded, or different video frames in the same video to be encoded, or different coding units in the same video frame may correspond to different quantization parameters, thereby achieving the adjustment of the quantization parameter at the coding unit level instead of using the same quantization parameter for the entire video frame. The video coding system can differentiate the quantization parameters according to the content complexity (such as texture details and / or motion intensity) of different coding units, which can bring about the beneficial effect of local optimization (such as using low quantization parameters in complex areas to retain more details, and using high quantization parameters in simple areas to save bit rate). In addition, by dynamically adjusting the quantization parameters, the video coding system can achieve more refined bit rate allocation and reduce error propagation in the process of encoding each coding unit.

[0112] The video encoding method and system provided in this specification can, after determining the video type of the video to be encoded, determine the intensity parameters of each encoding unit in each video frame based on the video type of the video to be encoded and the timing parameters of each video frame, so as to determine the quantization parameters of each encoding unit in each video frame based on the intensity parameters. Furthermore, the video encoding system encodes each encoding unit based on the quantization parameters to obtain the encoded data corresponding to the video to be encoded. The above method enables the intensity parameters of each video frame to be adaptively determined based on the video type and the timing parameters of the video frame, solving the problem of insufficient encoding flexibility caused by the fixed value of the intensity parameters of each video frame in the prior art, and enhancing the encoding stability in complex scenarios. In addition, when determining the quantization parameters of each encoding unit, the video encoding system comprehensively considers the frame prediction cost and intensity parameters of each encoding unit, thereby realizing fine adjustment of the quantization parameter offset. That is to say, the video encoding method provided in this specification is different from the prior art that adopts a unified control method for all coding units. The video encoding system in this application analyzes the characteristics of three dimensions: the video type of the processed video, the timing parameters of each video frame, and the frame prediction cost of each coding unit, determines the quantization parameters corresponding to each coding unit, and encodes each coding unit based on the quantization parameters corresponding to each coding unit, so that while maintaining the coding compatibility, the rationality of the bit rate allocation of the coding unit is improved, thereby improving the coding efficiency.

[0113] Figure 5 A flowchart of a video encoding method according to another embodiment of the present specification is shown. Figure 5As shown, after the video coding system obtains the video to be encoded, it can determine the video type corresponding to the video to be encoded. The video coding system then processes the video to be encoded frame by frame in chronological order until it reaches the last frame of the video to be encoded. During the frame-by-frame processing, the video coding system can dynamically determine the timing parameters corresponding to each video frame based on the number of times the current frame is referenced by subsequent frames. Based on this frame-by-frame processing, the video coding system processes each video frame on a coding unit basis: the current video frame is divided into preset coding unit sizes to obtain multiple coding units corresponding to the current video frame. The video coding system calculates the inter-frame prediction cost and intra-frame prediction cost for each coding unit and dynamically determines the quantization parameter corresponding to each coding unit based on the strength parameter and the prediction cost. Furthermore, the video coding system encodes each coding unit based on the corresponding quantization parameter until every coding unit in the video to be encoded is encoded. The video coding system then encapsulates the encoded data according to a preset format to obtain the encoded data corresponding to the video to be encoded.

[0114] Another aspect of this specification provides a computer-readable, non-transitory storage medium storing at least one instruction set for performing video encoding. When executed by a processor, the at least one instruction set directs the processor to implement the steps of the video encoding method P300 described herein. In some possible implementations, various aspects of this specification may also be implemented as a program product comprising program code. When the program product is executed on system 130, the program code causes system 130 to perform the steps of method P300 described herein. The program product for implementing the aforementioned method may comprise a portable compact disc read-only memory (CD-ROM) comprising the program code and may be executed on system 130. However, program products herein are not limited to this. In this specification, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system. A program product may utilize any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of computer-readable storage media include: an electrical connection having one or more conductors, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable storage medium may also be any readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing. Program code for performing the operations of this specification may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages.

[0115] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0116] In summary, after reading this detailed disclosure, those skilled in the art will appreciate that the foregoing detailed disclosure may be presented by way of example only and may not be limiting. Although not expressly stated herein, those skilled in the art will understand that this specification encompasses various reasonable changes, improvements, and modifications to the embodiments. Such changes, improvements, and modifications are intended to be suggested by this specification and are within the spirit and scope of the exemplary embodiments of this specification.

[0117] Furthermore, certain terms in this specification have been used to describe embodiments of this specification. For example, “one embodiment,” “an embodiment,” and / or “some embodiments” mean that a particular feature, structure, or characteristic described in connection with that embodiment may be included in at least one embodiment of this specification. Therefore, it is emphasized and should be understood that two or more references to “an embodiment,” “one embodiment,” or “an alternative embodiment” in various parts of this specification do not necessarily refer to the same embodiment. Furthermore, particular features, structures, or characteristics may be appropriately combined in one or more embodiments of this specification.

[0118] It should be understood that in the foregoing descriptions of the embodiments of this specification, to facilitate understanding of a feature and to simplify this specification, various features are combined in a single embodiment, figure, or description thereof. However, this does not necessarily mean that these features are combined. When reading this specification, a person skilled in the art may label some of the devices as separate embodiments. In other words, the embodiments of this specification can also be understood as the integration of multiple sub-embodiments. The content of each sub-embodiment is also valid even when it includes fewer than all the features of a single previously disclosed embodiment.

[0119] Each patent, patent application, publication of a patent application, and other materials, such as articles, books, specifications, publications, documents, and the like, cited in this disclosure (excluding any historical review documents related thereto) is hereby incorporated by reference for all purposes relevant to this disclosure, such as within the specification and claims of this disclosure. However, if there is any inconsistency or conflict between the descriptions, definitions, and / or terminology of such materials and the descriptions, definitions, and / or terminology used in this disclosure, the descriptions, definitions, and / or terminology used in this disclosure shall control.

[0120] Finally, it should be understood that the embodiments of the application disclosed herein are illustrative of the principles of the embodiments of this specification. Other modified embodiments are also within the scope of this specification. Therefore, the embodiments disclosed in this specification are merely examples and not limitations. Those skilled in the art can adopt alternative configurations based on the embodiments in this specification to implement the application in this specification. Therefore, the embodiments of this specification are not limited to the embodiments precisely described in the application.

Claims

1. A video encoding method, comprising: Acquire a video to be encoded, and determine a video type corresponding to the video to be encoded, wherein the video to be encoded includes a plurality of video frames, and each of the plurality of video frames includes a preset number of encoding units; Determining, based on the video type and a timing parameter of the video frame, a strength parameter of each coding unit in the video frame, wherein the strength parameter is used to control an adjustment amplitude of a quantization parameter offset of each coding unit in the video frame; determining a quantization parameter for each of the coding units based on a frame prediction cost of each of the coding units in the video frame and the strength parameter; as well as Based on the quantization parameters of the coding units in each of the video frames, the coding units are encoded to obtain coding data corresponding to the video to be encoded.

2. The method according to claim 1, wherein The determining the video type corresponding to the video to be encoded includes: The video type of the video to be encoded is determined based on the inter-frame prediction cost corresponding to each coding unit in each of the video frames and a preset threshold.

3. The method according to claim 2, wherein: The determining the video type of the to-be-encoded video based on the inter-frame prediction cost corresponding to each coding unit in each of the video frames and a preset threshold comprises: averaging the inter-frame prediction costs corresponding to the coding units in each of the video frames to determine the inter-frame prediction cost corresponding to each of the video frames; averaging the inter-frame prediction costs corresponding to the respective video frames in the plurality of video frames to determine an average inter-frame prediction cost; and The video type of the to-be-encoded video is determined based on the average inter-frame prediction cost and a preset threshold.

4. The method according to claim 3, wherein: The preset threshold includes a first threshold and a second threshold, wherein the first threshold is less than the second threshold; and determining the video type of the to-be-encoded video based on the average inter-frame prediction cost and the preset threshold includes: When the average inter-frame prediction cost is less than the first threshold, determining that the video type of the to-be-encoded video is a first type; When the average inter-frame prediction cost is greater than or equal to the first threshold and less than or equal to the second threshold, determining that the video type of the to-be-encoded video is the second type; When the average inter-frame prediction cost is greater than the second threshold, it is determined that the video type of the to-be-encoded video is a third type.

5. The method according to claim 4, wherein: The method further comprises: Determining the first threshold based on the attribute data of the video to be encoded and the first variable; and The second threshold is determined based on the attribute data of the video to be encoded and a second variable; the second variable is greater than the first variable, and the first variable and the second variable are variables for controlling the video type.

6. The method according to claim 5, wherein: The attribute data includes: video width, video height and video bit depth.

7. The method of claim 1, wherein: The determining, based on the video type of the to-be-encoded video and the timing parameters of the video frame, the strength parameters of each coding unit of the video frame includes: Based on a preset correspondence, the intensity parameter corresponding to the video type of the video to be encoded and the timing parameter of the video frame is determined; the preset correspondence includes a correspondence between the intensity parameter, the video type and the timing parameter.

8. The method of claim 1, wherein: The method further comprises: For any current video frame in the video to be encoded: determining at least one reference frame corresponding to the current video frame; For any current coding unit in the current video frame: in the at least one reference frame, determine at least one reference coding unit corresponding to the current coding unit, so as to calculate the frame prediction cost corresponding to the current coding unit based on the at least one reference coding unit; the frame prediction cost includes: inter-frame prediction cost and intra-frame prediction cost.

9. The method of claim 8, wherein: The determining of at least one reference frame corresponding to the current video frame includes: Based on the reference type of the current video frame, at least one reference frame corresponding to the current video frame is determined: if the current video frame is of the first reference type, a reference frame is determined before the current video frame, and a reference frame is determined after the current video frame; or, if the current video frame is of the second reference type, a reference frame is determined before the current video frame.

10. The method of claim 8, wherein: The determining, based on the frame prediction cost of each coding unit in the video frame and the strength parameter, a quantization parameter of each coding unit includes: Determining a cumulative propagation cost corresponding to the current coding unit based on an overlap ratio between the current coding unit and the reference coding unit and a frame prediction cost corresponding to the current coding unit; A quantization parameter corresponding to the current coding unit is determined based on the strength parameter of the video frame corresponding to the current coding unit, the accumulated propagation cost corresponding to the current coding unit, and the inter-frame prediction cost.

11. The method according to claim 10, wherein: The determining, based on an overlap ratio between the current coding unit and the reference coding unit, an inter-frame prediction cost and an intra-frame prediction cost corresponding to the current coding unit, of a cumulative propagation cost corresponding to the current coding unit includes: Determining, based on an inter-frame prediction cost and an intra-frame prediction cost corresponding to the current coding unit, a proportion of inherited information that the current coding unit transmits to a reference coding unit; Calculating the total amount of dependency information of the current coding unit on the reference coding unit based on the inherited information ratio, the accumulated propagation cost of the previous coding unit of the current coding unit, and the intra prediction cost; and Based on the total amount of dependency information and the overlap ratio between the current coding unit and the reference coding unit, a cumulative propagation cost corresponding to the current coding unit is determined.

12. The method of claim 10, wherein: The method further comprises: When the intra prediction cost of the current coding unit is greater than the inter prediction cost, setting the inheritance information ratio of the current coding unit to zero.

13. The method of claim 1, wherein: For any current video frame in the video to be encoded: determining a timing parameter corresponding to the current video frame according to the number of times the current video frame is referenced by other video frames.

14. A video encoding system comprising: at least one storage medium storing at least one instruction set for performing video encoding; as well as At least one processor is communicatively connected to the at least one storage medium, wherein the at least one processor reads the at least one instruction set when running and executes the method according to any one of claims 1 to 13 according to the instructions of the at least one instruction set.