A video encoding method and device
By analyzing and adjusting the coding information of the video frame and dynamically adjusting the quantization parameters, the problem of low adaptability of the quantization parameters in the existing technology is solved and the video coding effect is improved.
Patent Information
- Application Number
- CN202010900339.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2040-08-31
AI Technical Summary
In the existing video encoding technology, the adaptability of the quantization parameters is low, resulting in poor encoding effect.
By precoding the picture group to be encoded, the encoding information of each video frame is obtained, and the quantization parameters are dynamically adjusted according to the encoding information of each layer of video frames and the encoding information of the reference layer to improve adaptability.
Dynamically adjusting the quantization parameters through two encodings improves the adaptability of the quantization parameters in the video encoding process, thus improving the encoding effect.
Smart Images

Figure CN114125458B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a video encoding method and device. Background Art
[0002] In current video coding technology, the entire video sequence is usually encoded in units of GOP (Group of Pictures). In each GOP, video frames are divided into different levels according to reference relationships. Each level is assigned a different frame-level QP (Quantizier Parameter) based on empirical values. The more references in a GOP, the lower the level, and the lower the assigned QP. The existing technical solutions ignore the impact of each layer on other layers, resulting in low adaptability of the assigned quantization parameters.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The present application provides a video encoding method and device to at least solve the technical problem of low adaptability of quantization parameters used in the video encoding process in the related art.
[0005] According to one aspect of an embodiment of the present application, a video encoding method is provided, including:
[0006] Pre-encoding the current group of pictures to be encoded to obtain encoding information of each video frame in the group of pictures;
[0007] Determining a target quantization parameter of each layer of video frames in the picture group according to encoding information of each layer of video frames in the picture group and encoding information of a reference layer video frame of each layer of video frames in the picture group, wherein the reference layer video frame of each layer of video frames in the picture group is a video frame referenced when encoding each layer of video frames in the picture group;
[0008] Each layer of video frames in the group of pictures is encoded using the target quantization parameter of each layer of video frames in the group of pictures.
[0009] Optionally, determining, according to encoding information of each layer of video frames in the picture group and encoding information of reference layer video frames of each layer of video frames in the picture group, a target quantization parameter of each layer of video frames in the picture group includes:
[0010] Calculate, according to the coding information of each layer of video frames in the picture group and the coding information of the reference layer video frames of each layer of video frames in the picture group, the influence factor of each layer of video frames in the picture group, wherein the influence factor is used to indicate the influence degree of each layer of video frames in the picture group as a reference layer on the coding layer that refers to each layer of video frames in the picture group;
[0011] The target quantization parameter of each layer of video frames in the picture group is determined according to the influencing factor of each layer of video frames in the picture group.
[0012] Optionally, calculating the influence factor of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group includes:
[0013] Calculating, according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, an average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frames, wherein the average dependency coefficient is used to indicate the dependency of each layer of video frames in the picture group on the reference layer video frames, and the reference layer video frames are video frames referenced by each layer of video frames in the picture group during encoding;
[0014] An influence factor of each layer of video frames in the picture group is determined according to an average dependency coefficient corresponding to each layer of video frames in the picture group as a reference layer video frame.
[0015] Optionally, calculating the average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frame according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frame of each layer of video frames in the picture group includes:
[0016] Calculating a dependency coefficient corresponding to each reference relationship included in the picture group according to the variance of the prediction residual signal of each video frame, the coding distortion of each video frame, and the coding distortion of the reference frame referenced by each video frame, wherein the dependency coefficient is used to indicate the dependency of the coding frame on the reference frame in each reference relationship, and the coding information includes the variance and coding distortion of the prediction residual signal;
[0017] According to the dependency coefficient of the reference relationship between each layer of video frames in the picture group and the reference layer video frames and the number of reference relationships, the average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frames is calculated.
[0018] Optionally, determining the influence factor of each layer of video frames in the picture group according to the average dependency coefficient corresponding to each layer of video frames in the picture group as the reference layer video frames includes:
[0019] For a target layer that is not referenced in the picture group, determining an impact factor corresponding to the target layer as a preset impact factor;
[0020] For a target layer referenced in the picture group, an influence factor of the target layer is determined according to an average dependency coefficient and an influence factor corresponding to a coding layer that references the target layer.
[0021] Optionally, determining the target quantization parameter of each layer of video frames in the picture group according to the influencing factor of each layer of video frames in the picture group includes:
[0022] Finding a preset Lambda parameter corresponding to the preset quantization parameter from Lambda parameters and quantization parameters having a corresponding relationship;
[0023] For a target layer that is not referenced in the picture group, determining that a target quantization parameter corresponding to the target layer is the preset quantization parameter;
[0024] For the target layer referenced in the picture group, the ratio between the preset Lambda parameter and the influencing factor of the target layer is determined as the target Lambda parameter corresponding to the target layer; and the quantization parameter corresponding to the target Lambda parameter is searched from the Lambda parameters and quantization parameters with corresponding relationships as the target quantization parameter of the target layer.
[0025] Optionally, pre-encoding the current group of pictures to be encoded to obtain encoding information of each video frame in the group of pictures includes:
[0026] Get the preset encoding parameters;
[0027] Determining a preset quantization parameter for each video frame in the picture group according to the preset encoding parameter;
[0028] Pre-encoding each video frame in the group of pictures using the preset quantization parameter;
[0029] The coding information of each video frame in the picture group during the pre-coding process is saved.
[0030] According to another aspect of the embodiment of the present application, there is also provided a video encoding device, including:
[0031] A pre-coding module, used for pre-coding the current group of pictures to be coded to obtain coding information of each video frame in the group of pictures;
[0032] a determination module, configured to determine a target quantization parameter of each layer of video frames in the picture group according to encoding information of each layer of video frames in the picture group and encoding information of a reference layer video frame of each layer of video frames in the picture group, wherein the reference layer video frame of each layer of video frames in the picture group is a video frame referenced when encoding each layer of video frames in the picture group;
[0033] The encoding module is used to encode each layer of video frames in the picture group using the target quantization parameter of each layer of video frames in the picture group.
[0034] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above method is executed when the program is run.
[0035] According to another aspect of an embodiment of the present application, an electronic device is further provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above method through the computer program.
[0036] In an embodiment of the present application, a picture group to be encoded is pre-encoded to obtain encoding information of each video frame in the picture group; a target quantization parameter of each layer of video frames in the picture group is determined according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frame of each layer of video frames in the picture group, wherein the reference layer video frame of each layer of video frames in the picture group is a video frame referenced when encoding each layer of video frames in the picture group; a method of encoding each layer of video frames in the picture group using the target quantization parameter of each layer of video frames in the picture group dynamically adjusts the quantization parameter used in the video encoding process through two encodings, obtains encoding information from the pre-encoding of the picture group, determines the target quantization parameter of each layer of video frames according to the encoding information and the reference relationship between the layers, and performs secondary encoding on the picture group using the adjusted target quantization parameter, thereby achieving the purpose of dynamically adjusting the quantization parameter of the picture group by obtaining the encoding information through the pre-encoding picture group, thereby achieving the technical effect of improving the adaptability of the quantization parameter used in the video encoding process, thereby solving the technical problem of low adaptability of the quantization parameter used in the video encoding process in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 is a schematic diagram of a hardware environment of a video encoding method according to an embodiment of the present application;
[0040] Figure 2 is a flowchart of an optional video encoding method according to an embodiment of the present application;
[0041] Figure 3 is a schematic diagram of a hierarchical structure of a picture group according to an embodiment of the present application;
[0042] Figure 4 is a schematic diagram of an optional video encoding device according to an embodiment of the present application;
[0043] Figure 5 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0046] According to one aspect of the embodiments of the present application, a method embodiment of video encoding is provided.
[0047] Optionally, in this embodiment, the above video encoding method can be applied to Figure 1 In the hardware environment composed of the terminal 101 and the server 103 shown in FIG. Figure 1As shown, the server 103 is connected to the terminal 101 through a network, and can be used to provide services (such as game services, application services, etc.) for the terminal or the client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 103. The above network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, etc. The encoding method of the video of the embodiment of the present application can be executed by the server 103, or by the terminal 101, or by the server 103 and the terminal 101. Among them, the terminal 101 executes the encoding method of the video of the embodiment of the present application, which can also be executed by the client installed thereon.
[0048] Figure 2 is a flowchart of an optional video encoding method according to an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps:
[0049] Step S202, pre-encoding the current picture group to be encoded to obtain encoding information of each video frame in the picture group;
[0050] Step S204, determining a target quantization parameter of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, wherein the reference layer video frames of each layer of video frames in the picture group are video frames referenced when encoding each layer of video frames in the picture group;
[0051] Step S206: Encode each layer of video frames in the group of pictures using the target quantization parameter of each layer of video frames in the group of pictures.
[0052] Through the above steps S202 to S206, the quantization parameters used in the video encoding process are dynamically adjusted through two encodings, the encoding information is obtained from the pre-encoding of the picture group, the target quantization parameters of each layer of the video frame are determined according to the encoding information and the reference relationship between the levels, and the picture group is re-encoded using the adjusted target quantization parameters, thereby achieving the purpose of dynamically adjusting the quantization parameters of the picture group by obtaining the encoding information through the pre-encoded picture group, thereby realizing the technical effect of improving the adaptability of the quantization parameters used in the video encoding process, and further solving the technical problem of low adaptability of the quantization parameters used in the video encoding process in the related technology.
[0053] Optionally, in this embodiment, the video encoding method may be, but is not limited to, applied to various encoding methods that use quantization parameters to encode picture groups in a video, such as AV1 encoding.
[0054] In the technical solution provided in step S202, a group of pictures (Group of Pictures, GOP) refers to a set of continuous pictures in a video. Usually, the first picture in a GOP is an I frame, which is intra-coded and does not need to refer to other frames. Other frames in a GOP can be B frames or P frames, where P frames are coded with forward reference and B frames are coded with bidirectional reference.
[0055] Optionally, in this embodiment, the GOP can be layered, and the pictures in the upper layer are usually encoded with reference to the pictures in the lower layer, and the pictures in the highest layer will not be referenced by other pictures. For example: Figure 3 is a schematic diagram of a hierarchical structure of a picture group according to an embodiment of the present application, such as Figure 3 As shown in the figure, the video frames in the picture group are divided into 5 layers. The 0th frame is an I frame, which can be encoded without referring to other frames. It can be used as a reference frame for other frames and is located in the 0th layer. The 1st, 2nd, 4th, 8th, and 16th frames all require the 0th frame as a reference frame for encoding. In addition, the high-level (4th layer) pictures are not referenced by other frames, while the low-level (1st, 2nd, 3rd, and 0th layers) pictures are all referenced by other frames.
[0056] Optionally, in this embodiment, the frame to be encoded can be called an encoded frame, and the frame referenced when the encoded frame is encoded can be called a reference frame. Similarly, the layer to be encoded in the picture group can be called an encoded layer, and the layer referenced when the encoded layer is encoded can be called a reference layer. Figure 3 In the hierarchical structure shown, when the second frame needs to be encoded, the second frame can be called a coded frame, and the reference frames of the second frame are the 0th frame and the 4th frame. When the first frame needs to be encoded, the first frame can be called a coded frame, and the reference frames of the first frame are the 0th frame and the 2nd frame. When the video frame of the second layer needs to be encoded, the second layer can be called a coding layer, and the reference layers of the second layer are the 0th layer and the 1st layer.
[0057] Optionally, in this embodiment, when the coded frame refers to other frames (reference frames), the reference frame has already been coded. And in actual coding, the coded frame refers to the reconstructed frame of the reference frame, rather than the reference frame itself (original frame). Therefore, the quality of the reconstructed frame of the reference frame directly affects the quality of the coded frame, and further affects the coding quality of the entire video. For example, Figure 3 As shown in the figure, frame 7 needs to refer to frame 6, frame 6 needs to refer to frame 4, and frame 4 needs to refer to frame 0. If the encoding quality of frame 0 is not good, it will directly affect the encoding quality of frame 4, and the encoding quality of frame 7 will be affected layer by layer. Since these frames are also referenced by other frames, the quality of other frames will also be affected.
[0058] Optionally, in this embodiment, when updating the QP value, since the QP adjustment is performed in units of GOP, the QP value can be updated after the pre-coding is completed (referring to the pre-coding process of all GOPs), (the QP value update includes the calculation of the inter-frame dependency coefficient, the calculation of the layer impact factor, the calculation of Lambda and the target QP), or it can be implemented during the pre-coding process, that is, after each GOP is encoded, the QP value of the currently encoded GOP is updated. The purpose and result of these two schemes are the same, except that one implements the QP adjustment during the video encoding process, and the other implements the QP adjustment after the video encoding is completed.
[0059] Optionally, in this embodiment, the quantization parameter used in the pre-encoding process may be, but is not limited to, set according to the set encoding parameter.
[0060] In the above step S202, the encoding information of each video frame in the picture group can be obtained in the following manner but is not limited to:
[0061] S11, obtaining preset encoding parameters;
[0062] S12, determining a preset quantization parameter of each video frame in the picture group according to the preset encoding parameter;
[0063] S13, pre-encoding each video frame in the picture group using the preset quantization parameter;
[0064] S14, saving the coding information of each video frame in the picture group during the pre-coding process.
[0065] Optionally, in this embodiment, the coding information of each video frame in the pre-coding process may include, but is not limited to: the current frame number POC (POC refers to the frame playback order number), the current frame type, the layer subscript of the current frame in the GOP, the variance of the prediction residual signal of the current frame, and the coding distortion of the current frame. If the frame is a B frame or a P frame, the reference frame POC of the frame is saved.
[0066] In the technical solution provided in step S204, the quantization parameter (QP) has a QP range of [0,51] in AV1, which affects the relationship between the actual encoding process distortion and the file size. Simply put, the larger the value, the larger the quantization step size in the quantization process, the smaller the bit rate (bit value) required for encoding (corresponding to the smaller the encoded file size), but the distortion caused by the encoding process will also be greater.
[0067] In the above step S204, the target quantization parameter of each layer of the video frame in the picture group may be determined in the following manner, but is not limited to:
[0068] S21, calculating an influence factor of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, wherein the influence factor is used to indicate the influence degree of each layer of video frames in the picture group as a reference layer on the encoding layer that refers to each layer of video frames in the picture group;
[0069] S22, determining the target quantization parameter of each layer of video frames in the picture group according to the influencing factor of each layer of video frames in the picture group.
[0070] Optionally, in this embodiment, the influence factor is used to indicate the influence of each layer of video frames in the picture group as a reference layer on the coding layer that refers to each layer of video frames in the picture group, that is, the influence factor reflects the degree to which each layer in the picture group is relied on by other layers. It can also be said that the influence factor represents the influence of the current layer on its upper layer.
[0071] Optionally, in this embodiment, the target quantization parameter corresponding to each layer is determined according to the influence factor of the layer, that is, the determination of the target quantization parameter fully considers the reference dependency relationship between layers.
[0072] In the above step S21, the influence factor of each layer of video frames in the picture group may be calculated in the following manner, but is not limited to:
[0073] S31, calculating an average dependency coefficient of each layer of video frames in the picture group relative to a reference layer video frame according to the encoding information of each layer of video frames in the picture group and the encoding information of a reference layer video frame of each layer of video frames in the picture group, wherein the average dependency coefficient is used to indicate the dependency of each layer of video frames in the picture group on the reference layer video frame, and the reference layer video frame is a video frame referenced by each layer of video frames in the picture group during encoding;
[0074] S32, determining an influence factor of each layer of video frames in the picture group according to an average dependency coefficient corresponding to each layer of video frames in the picture group when the video frames are used as reference layer video frames.
[0075] Optionally, in this embodiment, firstly, an average dependency coefficient of each layer relative to its reference layer is calculated based on the distortion information of each layer in the picture group and the distortion information of its reference layer, and the average dependency coefficient is used to indicate the dependency of each layer video frame in the picture group on its reference layer video frame. Then, the influence factor is determined based on the average dependency coefficient.
[0076] In the above step S31, the average dependency coefficient of each layer of video frames in the picture group may be calculated in the following manner, but is not limited to:
[0077] S41, calculating a dependency coefficient corresponding to each reference relationship included in the picture group according to the variance of the prediction residual signal of each video frame, the coding distortion of each video frame, and the coding distortion of the reference frame referenced by each video frame, wherein the dependency coefficient is used to indicate the dependency of the coding frame on the reference frame in each reference relationship, and the coding information includes the variance and coding distortion of the prediction residual signal;
[0078] S42, calculating an average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frames according to the dependency coefficient of the reference relationship between each layer of video frames in the picture group and the reference layer video frames and the number of reference relationships.
[0079] Optionally, in this embodiment, according to the variance (variance_ori) of the prediction residual signal of each video frame, the coding distortion (Dpre_i) of each video frame, and the coding distortion (Dref_j) of the reference frame referenced by each video frame, the dependency coefficient dep[Li,Lj] corresponding to each reference relationship included in the picture group can be calculated by, but not limited to, the following formula: dep[Li,Lj]=Dpre_i / (Dref_j+variance_ori). That is, Figure 3 In the GOP hierarchy structure shown, each connection line represents a reference relationship, and a dependency coefficient can be calculated for each connection line.
[0080] Optionally, in this embodiment, since the I frame is an intra-frame coding mode frame and does not need to rely on other frames, and the B frame and P frame are inter-frame coding mode frames and need to refer to other frames for encoding, the dependency coefficients of the B frame and the P frame can be calculated here.
[0081] Optionally, in this embodiment, the average dependency coefficient may be calculated by, but is not limited to, dividing the sum of all dep[Li,Lj] by<Li,Lj> The total number of reference relationships. For example, Figure 3 In the GOP hierarchy structure shown in , the average dependency coefficient between the two layers can be calculated by dividing the dependency coefficient between each two layers by the total number of reference relationships between the two layers.
[0082] In the above step S32, the influence factor of each layer of video frames in the picture group may be determined in the following manner, but is not limited to:
[0083] S51, for a target layer that is not referenced in the picture group, determining that an impact factor corresponding to the target layer is a preset impact factor;
[0084] S52: For a target layer referenced in the picture group, determine an influence factor of the target layer according to an average dependency coefficient and an influence factor corresponding to a coding layer that references the target layer.
[0085] Optionally, in this embodiment, the target layer that is not referenced may be, but is not limited to, the topmost layer, and an influence factor may be preset for it, for example, the preset influence factor may be, but is not limited to, 1.
[0086] Optionally, in this embodiment, for the target layer referenced in the second picture group, its corresponding influence factor may be determined according to, but not limited to, the average dependency coefficient and influence factor corresponding to the coding layer of the reference target layer.
[0087] For example: Figure 3 Taking the GOP hierarchical structure shown in FIG. 1 as an example, the top layer (referred to as layer 4) will not be referenced by other layers, and its influence on other layers is 0, and its influence factor is recorded as: D4=1;
[0088] Layer 3 is referenced by the top layer 4, and the impact factor is calculated as: D3 = 1 + ave_dep[L4,L3];
[0089] Layer 2 is referenced by layers 4 and 3, and the impact factor is calculated as: D2 = 1 + ave_dep[L4,L2]*D4 + ave_dep[L3,L3]*D3;
[0090] Layer 1 is referenced by layers 4, 3, and 2, and the impact factor is calculated as: D1 = 1 + ave_dep[L4,L1]*D4 + ave_dep[L3,L1]*D3 + ave_dep[L2,L1]*D2;
[0091] The bottom layer, layer 0, is referenced by all the layers above it, and the impact factor is calculated as: D0=1+ave_dep[L4,L0]*D4+ave_dep[L3,L0]*D3+ave_dep[L2,L0]*D2+ave_dep[L1,L0]*D1.
[0092] In the above step S22, the target quantization parameter may be determined in the following manner, but is not limited to:
[0093] S61, searching for a preset Lambda parameter corresponding to a preset quantization parameter from Lambda parameters and quantization parameters having a corresponding relationship;
[0094] S62, for a target layer that is not referenced in the picture group, determining that a target quantization parameter corresponding to the target layer is the preset quantization parameter;
[0095] S63, for the target layer referenced in the picture group, determine the ratio between the preset Lambda parameter and the influencing factor of the target layer as the target Lambda parameter corresponding to the target layer; and search for the quantization parameter corresponding to the target Lambda parameter from the Lambda parameters and quantization parameters having a corresponding relationship as the target quantization parameter of the target layer.
[0096] Optionally, in this embodiment, the Lambda parameter and the quantization parameter required in the encoding process have a corresponding relationship. For a target layer (such as the top layer) that is not referenced in the picture group, since other layers will be referenced by it, its corresponding target quantization parameter can be determined as an initial value, that is, a preset quantization parameter. The target quantization parameters of other layers are then determined based on the preset quantization parameter.
[0097] For example: Taking the above GOP hierarchy structure as an example, because all the bottom layers will be referenced by the top 4th layer, the Lambda of the top frame is the preset Lambda parameter, and QP is the initial QP value. The preset Lambda parameter can be found in the table based on the initial QP value (AV1 already has a Hash Table of the correspondence between Lambda and QP). The Lambda calculation method of the lower layer is: Lambda_i = Lambda / Di. According to the updated Lambda_i, the table is looked up to obtain the updated QP value corresponding to each layer. This QP value is the QP value required for encoding all frames of the corresponding layer.
[0098] The present application also provides an optional embodiment, which provides a video encoding process using secondary encoding to calculate the GOP level impact factor. Figure 3 Taking the GOP hierarchical structure shown in FIG. 1 as an example, the process may include but is not limited to the following steps:
[0099] Step 1: The first encoding (i.e. pre-encoding).
[0100] Step 1.1: Input the video sequence and set the encoding parameters for the first encoding.
[0101] Step 1.2: The encoder sets the quantization parameter QP of each frame according to the encoding parameters and performs pre-encoding.
[0102] Step 1.3: After encoding the current frame, save the encoding information of the frame, including: the current frame number POC (POC refers to the frame playback order number), the current frame type, the layer subscript of the current frame in the GOP, the variance of the prediction residual signal of the current frame, and the encoding distortion of the current frame. If the frame is a B frame or a P frame, save the reference frame POC of the frame.
[0103] Step 1.4: Loop through steps 1.2 and 1.3 until all frames in the video sequence are encoded.
[0104] Step 2: Adjust the QP value of the level according to the coding information saved from the first encoding.
[0105] Step 2.1: The encoder divides the video sequence into several GOPs by default.
[0106] Step 2.2: Perform the following calculations for each GOP: Initialize sum_dep[Li,Lj], num_dep[Li,Lj], the default values are both 0. Among them, sum_dep[Li,Lj] represents the reference relationship<Li,Lj> The corresponding sum of dependency coefficients, num_dep[Li,Lj] indicates that there is a reference relationship in the current GOP<Li,Lj> The number of GOPs, Li represents the i-th layer of GOP, and Lj represents the j-th layer of GOP. At the same time, for each frame in the GOP, the following operations are performed in sequence:
[0107] Step 2.2.1: Calculate the dependency coefficient dep[Li,Lj] of the current frame on the reference frame, where Li represents the layer subscript of the current frame in the GOP, and Lj represents the layer subscript of the reference frame in the GOP. The calculation formula is:
[0108] dep[Li,Lj]=Dpre_i / (Dref_j+variance_ori)
[0109] Where Dpre_i is the coding distortion of the current frame, Dref_j is the coding distortion of the reference frame, and variance_ori is the variance of the prediction residual signal of the current frame.
[0110] Step 2.2.2: Add the dependency coefficient of the current frame to sum_dep[Li,Lj] and increase the value of num_dep[Li,Lj] by 1.
[0111] Step 2.3: Calculate the average dependency coefficient ave_dep[Li,Lj] of each layer in the GOP relative to other layers, which is calculated by dividing the sum of all dep[Li,Lj] by<Li,Lj> The total number of reference relationships. That is:
[0112] ave_dep[Li,Lj]=sum_dep[Li,Lj] / num_dep[Li,Lj]
[0113] Step 2.4: Calculate the impact factor of each layer of GOP, which represents the impact of the current layer on its upper layer. Therefore, taking the 5-layer GOP structure as an example:
[0114] The top layer (referred to as the 4th layer) will not be referenced by other layers, and its influence on other layers is 0, and its influence factor is recorded as: D4 = 1;
[0115] Layer 3 is referenced by the top layer 4, and the impact factor is calculated as: D3 = 1 + ave_dep[L4,L3];
[0116] Layer 2 is referenced by the top layers 4 and 3, and the impact factor is calculated as: D2 = 1 + ave_dep[L4,L2]*D4 + ave_dep[L3,L3]*D3;
[0117] Layer 1 is referenced by the top layers 4, 3, and 2, and the impact factor is calculated as: D1 = 1 + ave_dep[L4,L1]*D4 + ave_dep[L3,L1]*D3 + ave_dep[L2,L1]*D2;
[0118] The bottom layer, layer 0, is referenced by all the layers above it, and the impact factor is calculated as: D0=1+ave_dep[L4,L0]*D4+ave_dep[L3,L0]*D3+ave_dep[L2,L0]*D2+ave_dep[L1,L0]*D1.
[0119] Step 2.5: Calculate the Lambda of each layer in the GOP. Because all the bottom layers will be referenced by the top 4 layers, the Lambda of the top frame is the preset Lambda parameter, and QP is the initial QP value. The preset Lambda parameter can be obtained by looking up the table based on the initial QP value (AV1 already has a Hash Table of the corresponding relationship between Lambda and QP). The Lambda calculation method for the i-th layer is:
[0120] Lambda_i=Lambda / Di;
[0121] Among them, Di is the impact factor of the i-th layer.
[0122] Step 2.6: According to the updated Lambda_i, obtain the updated QP value and save it. This QP value is the QP value required for encoding all frames of the corresponding layer.
[0123] Step 2.7: Repeat steps 2.2 to 2.6 until all GOPs are calculated.
[0124] Step 3: Second encoding.
[0125] Step 3.1: Get the video frame and encode the current frame according to the QP value calculated in step 2.
[0126] Step 3.2: Repeat step 3.1 until all frames of the video sequence are encoded.
[0127] For frames that need to refer to other frames for encoding (B frames and P frames), their encoding quality will be affected by the quality of the reference frame. If the encoding quality of the reference frame is difficult to guarantee, then the quality of the current frame referring to it will also be difficult to guarantee.
[0128] Through the above steps, the inter-frame dependency coefficient is used to represent the reference relationship between frames. When the reference frame is more dependent on the coded frame, the greater the distortion of the reference frame, the greater the distortion impact on the current frame. Therefore, the influence factor between the layers in the GOP obtained by the inter-frame dependency coefficient, the greater the influence factor, the greater the influence of the layer as a reference frame on other layers, and more bits are required when encoding the layer to reduce the coding distortion. Since the top layer will not be referenced by other layers, the present invention takes the top layer Lambda as the benchmark, and dynamically adjusts the Lambda values of other layers according to the size of the influence factor, thereby achieving the purpose of adjusting the QP value of each layer.
[0129] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0130] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for an electronic device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0131] According to another aspect of an embodiment of the present application, a video encoding device for implementing the above-mentioned video encoding method is also provided. Figure 4 is a schematic diagram of an optional video encoding device according to an embodiment of the present application, such as Figure 4 As shown, the device may include:
[0132] A pre-coding module 42, configured to pre-code a current group of pictures to be encoded, and obtain encoding information of each video frame in the group of pictures;
[0133] A determination module 44 is used to determine a target quantization parameter of each layer of video frames in the picture group according to encoding information of each layer of video frames in the picture group and encoding information of a reference layer video frame of each layer of video frames in the picture group, wherein the reference layer video frame of each layer of video frames in the picture group is a video frame referenced when encoding each layer of video frames in the picture group;
[0134] The encoding module 46 is configured to encode each layer of the video frames in the group of pictures using the target quantization parameter of each layer of the video frames in the group of pictures.
[0135] It should be noted that the precoding module 42 in this embodiment can be used to execute step S202 in the embodiment of the present application, the determination module 44 in this embodiment can be used to execute step S204 in the embodiment of the present application, and the encoding module 46 in this embodiment can be used to execute step S206 in the embodiment of the present application.
[0136] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware.
[0137] Through the above module, the quantization parameters used in the video encoding process are dynamically adjusted through two encodings, the encoding information is obtained from the pre-encoding of the picture group, the target quantization parameters of each layer of the video frame are determined according to the encoding information and the reference relationship between the levels, and the picture group is re-encoded using the adjusted target quantization parameters, thereby achieving the purpose of dynamically adjusting the quantization parameters of the picture group by obtaining the encoding information through the pre-encoded picture group, thereby realizing the technical effect of improving the adaptability of the quantization parameters used in the video encoding process, and further solving the technical problem of low adaptability of the quantization parameters used in the video encoding process in the related technology.
[0138] As an optional embodiment, the determining module includes:
[0139] a calculation unit, configured to calculate an influence factor of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, wherein the influence factor is used to indicate the influence degree of each layer of video frames in the picture group as a reference layer on the encoding layer that refers to each layer of video frames in the picture group;
[0140] The first determination unit is used to determine the target quantization parameter of each layer of video frames in the picture group according to the influencing factor of each layer of video frames in the picture group.
[0141] As an optional embodiment, the computing unit is used for:
[0142] Calculating, according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, an average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frames, wherein the average dependency coefficient is used to indicate the dependency of each layer of video frames in the picture group on the reference layer video frames, and the reference layer video frames are video frames referenced by each layer of video frames in the picture group during encoding;
[0143] An influence factor of each layer of video frames in the picture group is determined according to an average dependency coefficient corresponding to each layer of video frames in the picture group as a reference layer video frame.
[0144] As an optional embodiment, the computing unit is used for:
[0145] Calculating a dependency coefficient corresponding to each reference relationship included in the picture group according to the variance of the prediction residual signal of each video frame, the coding distortion of each video frame, and the coding distortion of the reference frame referenced by each video frame, wherein the dependency coefficient is used to indicate the dependency of the coding frame on the reference frame in each reference relationship, and the coding information includes the variance and coding distortion of the prediction residual signal;
[0146] According to the dependency coefficient of the reference relationship between each layer of video frames in the picture group and the reference layer video frames and the number of reference relationships, the average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frames is calculated.
[0147] As an optional embodiment, the computing unit is used for:
[0148] For a target layer that is not referenced in the picture group, determining an impact factor corresponding to the target layer as a preset impact factor;
[0149] For a target layer referenced in the picture group, an influence factor of the target layer is determined according to an average dependency coefficient and an influence factor corresponding to a coding layer that references the target layer.
[0150] As an optional embodiment, the first determining unit is configured to:
[0151] Finding a preset Lambda parameter corresponding to the preset quantization parameter from Lambda parameters and quantization parameters having a corresponding relationship;
[0152] For a target layer that is not referenced in the picture group, determining that a target quantization parameter corresponding to the target layer is the preset quantization parameter;
[0153] For the target layer referenced in the picture group, the ratio between the preset Lambda parameter and the influencing factor of the target layer is determined as the target Lambda parameter corresponding to the target layer; and the quantization parameter corresponding to the target Lambda parameter is searched from the Lambda parameters and quantization parameters with corresponding relationships as the target quantization parameter of the target layer.
[0154] As an optional embodiment, the precoding module includes:
[0155] An acquisition unit, used to acquire preset encoding parameters;
[0156] A second determining unit, configured to determine a preset quantization parameter of each video frame in the picture group according to the preset encoding parameter;
[0157] A pre-coding unit, configured to pre-code each video frame in the group of pictures using the preset quantization parameter;
[0158] The storage unit is used to store the coding information of each video frame in the picture group during the pre-coding process.
[0159] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0160] According to another aspect of the embodiments of the present invention, an electronic device for implementing the above-mentioned video encoding method is also provided. Figure 5 As shown, the electronic device includes a memory 502 and a processor 504. The memory 502 stores a computer program, and the processor 504 is configured to execute the steps in any of the above method embodiments through the computer program.
[0161] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0162] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0163] Pre-encoding the current group of pictures to be encoded to obtain encoding information of each video frame in the group of pictures;
[0164] Determining a target quantization parameter of each layer of video frames in the picture group according to encoding information of each layer of video frames in the picture group and encoding information of a reference layer video frame of each layer of video frames in the picture group, wherein the reference layer video frame of each layer of video frames in the picture group is a video frame referenced when encoding each layer of video frames in the picture group;
[0165] Each layer of video frames in the group of pictures is encoded using the target quantization parameter of each layer of video frames in the group of pictures.
[0166] Alternatively, a person skilled in the art may understand that: Figure 5 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 5 The structure of the electronic device is not limited. Figure 5 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 5 Different configurations are shown.
[0167] Among them, the memory 502 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for displaying data forms in the embodiments of the present invention. The processor 504 executes various functional applications and data processing by running the software programs and modules stored in the memory 502, that is, realizing the above-mentioned method for displaying data forms. The memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 502 may further include a memory remotely located relative to the processor 504, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 502 may specifically be used, but is not limited to, to store information such as feature information and probability results of the account to be processed. As an example, if Figure 5 As shown, the memory 502 may include but is not limited to the pre-coding module 5022, the determination module 5024 and the encoding module 5026 in the video image processing device. In addition, it may also include but is not limited to other module units in the video encoding device, which will not be repeated in this example.
[0168] Optionally, the transmission device 506 is used to receive or send data via a network. Specific examples of the network may include wired networks and wireless networks. In one example, the transmission device 506 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 506 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0169] In addition, the electronic device further comprises: a display 508 for displaying the characteristic information and probability result of the account to be processed; and a connection bus 510 for connecting the various module components in the electronic device.
[0170] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to execute the program code of the video encoding method.
[0171] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0172] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0173] Pre-encoding the current group of pictures to be encoded to obtain encoding information of each video frame in the group of pictures;
[0174] Determining a target quantization parameter of each layer of video frames in the picture group according to encoding information of each layer of video frames in the picture group and encoding information of a reference layer video frame of each layer of video frames in the picture group, wherein the reference layer video frame of each layer of video frames in the picture group is a video frame referenced when encoding each layer of video frames in the picture group;
[0175] Each layer of video frames in the group of pictures is encoded using the target quantization parameter of each layer of video frames in the group of pictures.
[0176] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0177] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0178] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0179] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0180] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0181] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0182] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0183] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0184] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A video encoding method, characterized in that: include: Pre-encoding the current group of pictures to be encoded to obtain encoding information of each video frame in the group of pictures; Determining a target quantization parameter of each layer of video frames in the picture group according to encoding information of each layer of video frames in the picture group and encoding information of a reference layer video frame of each layer of video frames in the picture group, wherein the reference layer video frame of each layer of video frames in the picture group is a video frame referenced when encoding each layer of video frames in the picture group; Encoding each layer of video frames in the group of pictures using a target quantization parameter of each layer of video frames in the group of pictures; Determining the target quantization parameter of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group includes: calculating the influence factor of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, wherein the influence factor is used to indicate the influence degree of each layer of video frames in the picture group as a reference layer on the encoding layer that refers to each layer of video frames in the picture group; determining the target quantization parameter of each layer of video frames in the picture group according to the influence factor of each layer of video frames in the picture group; Calculating the influence factor of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group includes: calculating the average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frame according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frame of each layer of video frames in the picture group, wherein the average dependency coefficient is used to indicate the dependency of each layer of video frames in the picture group on the reference layer video frame, and the reference layer video frame is the video frame to which each layer of video frames in the picture group refers when encoding; determining the influence factor of each layer of video frames in the picture group according to the average dependency coefficient corresponding to when each layer of video frames in the picture group is used as the reference layer video frame; According to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, calculating the average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frames includes: calculating the dependency coefficient corresponding to each reference relationship included in the picture group according to the variance of the prediction residual signal of each video frame, the encoding distortion of each video frame and the encoding distortion of the reference frame referenced by each video frame, wherein the dependency coefficient is used to indicate the dependence of the encoded frame on the reference frame in each reference relationship, and the encoding information includes the variance and the encoding distortion of the prediction residual signal; calculating the average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frames according to the dependency coefficient of the reference relationship included between each layer of video frames in the picture group and the reference layer video frames and the number of reference relationships.
2. The method according to claim 1, characterized in that Determining the influencing factor of each layer of video frames in the picture group according to the average dependency coefficient corresponding to each layer of video frames in the picture group as the reference layer video frames includes: For a target layer that is not referenced in the picture group, determining an impact factor corresponding to the target layer as a preset impact factor; For a target layer referenced in the picture group, an influence factor of the target layer is determined according to an average dependency coefficient corresponding to a coding layer that references the target layer and a preset influence factor.
3. The method according to claim 1, characterized in that: Determining the target quantization parameter of each layer of video frames in the picture group according to the influencing factor of each layer of video frames in the picture group includes: Finding a preset Lambda parameter corresponding to the preset quantization parameter from Lambda parameters and quantization parameters having a corresponding relationship; For a target layer that is not referenced in the picture group, determining that a target quantization parameter corresponding to the target layer is the preset quantization parameter; For the target layer referenced in the picture group, the ratio between the preset Lambda parameter and the influencing factor of the target layer is determined as the target Lambda parameter corresponding to the target layer; and the quantization parameter corresponding to the target Lambda parameter is searched from the Lambda parameters and quantization parameters with corresponding relationships as the target quantization parameter of the target layer.
4. The method according to claim 1, characterized in that: Pre-encoding the current group of pictures to be encoded to obtain encoding information of each video frame in the group of pictures includes: Get the preset encoding parameters; Determining a preset quantization parameter for each video frame in the picture group according to the preset encoding parameter; Pre-encoding each video frame in the group of pictures using the preset quantization parameter; The coding information of each video frame in the picture group during the pre-coding process is saved.
5. A video encoding device, characterized in that: include: A pre-coding module, used for pre-coding the current group of pictures to be coded to obtain coding information of each video frame in the group of pictures; a determination module, configured to determine a target quantization parameter of each layer of video frames in the picture group according to encoding information of each layer of video frames in the picture group and encoding information of a reference layer video frame of each layer of video frames in the picture group, wherein the reference layer video frame of each layer of video frames in the picture group is a video frame referenced when encoding each layer of video frames in the picture group; An encoding module, configured to encode each layer of video frames in the group of pictures using a target quantization parameter of each layer of video frames in the group of pictures; The determination module is specifically used to: determine the target quantization parameter of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, including: calculating the influence factor of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, wherein the influence factor is used to indicate the influence degree of each layer of video frames in the picture group as a reference layer on the encoding layer that refers to each layer of video frames in the picture group; determine the target quantization parameter of each layer of video frames in the picture group according to the influence factor of each layer of video frames in the picture group; The determination module is further used to: calculate the influence factor of each layer of video frames in the picture group according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frames of each layer of video frames in the picture group, including: calculate the average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frame according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frame of each layer of video frames in the picture group, wherein the average dependency coefficient is used to indicate the dependency of each layer of video frames in the picture group on the reference layer video frame, and the reference layer video frame is the video frame to which each layer of video frames in the picture group refers when encoding; determine the influence factor of each layer of video frames in the picture group according to the average dependency coefficient corresponding to when each layer of video frames in the picture group is used as the reference layer video frame; The determination module is also used to: calculate the average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frame according to the encoding information of each layer of video frames in the picture group and the encoding information of the reference layer video frame of each layer of video frames in the picture group, including: calculating the dependency coefficient corresponding to each reference relationship included in the picture group according to the variance of the prediction residual signal of each video frame, the encoding distortion of each video frame and the encoding distortion of the reference frame referenced by each video frame, wherein the dependency coefficient is used to indicate the dependence of the encoded frame on the reference frame in each reference relationship, and the encoding information includes the variance and encoding distortion of the prediction residual signal; calculate the average dependency coefficient of each layer of video frames in the picture group relative to the reference layer video frame according to the dependency coefficient of the reference relationship included between each layer of video frames in the picture group and the reference layer video frame and the number of reference relationships.
6. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 4 when executed.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the method described in any one of claims 1 to 4 through the computer program.
Citation Information
Patent Citations
Method for layering time domain rate-distortion optimization in random access video coding
CN105872545A
Method for allocating efficient video encoding standard quantization parameter
CN107197267A