Video encoding method and apparatus
By generating a state transition path map and selecting the least cost encoding path, the problem of insufficient parameter optimization in video encoding is solved, and more efficient video encoding performance and bit rate savings are achieved.
Patent Information
- Application Number
- CN202210404046.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-18
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-04-18
AI Technical Summary
In the prior art, the RDOQ algorithm in video encoding has defects in parameter optimization, resulting in the inability to obtain coefficients with better performance than the traditional rate distortion quantization algorithm.
By obtaining the target coefficient group in the target video frame, determining the encoding node sequence, and generating a state transition path diagram based on the encoding state node and child node path, selecting the encoding path with the lowest overall encoding cost as the final state transition path, thereby obtaining coefficients with better algorithm performance.
It realizes saving more code rate and improving coding performance without affecting the video quality.
Smart Images

Figure CN114760474B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image compression technology, and particularly to a video encoding method. This application also relates to a video encoding device, a computing device, and a computer-readable storage medium. Background Art
[0002] With the development of multimedia technology, users have higher and higher requirements for videos. Therefore, the trend of high-definition and high-frame-rate videos also poses higher requirements for the compression performance of videos. The International Organization for Standardization VCEG and MPEG jointly launched a new generation of high-performance video coding standard - H.265 / HEVC. In HEVC, the rate-distortion quantization algorithm is used to calculate the quantized coefficients, so as to save the bit rate without affecting the video quality.
[0003] Currently, the encoding process of the rate-distortion quantization algorithm in HEVC is based on selecting elements with the minimum cost at each step, which is a greedy algorithm. Due to the fact that the encoding between elements affects each other, after adjusting the previous element, the performance of subsequent elements may deteriorate. Therefore, how to obtain coefficients with better performance than the traditional rate-distortion quantization algorithm is an urgent problem to be solved currently. Summary of the Invention
[0004] In view of this, embodiments of this application provide a video encoding method. This application also relates to a video encoding device, a computing device, and a computer-readable storage medium to solve the defect of parameter optimization in the RDOQ algorithm in video encoding in the prior art.
[0005] According to the first aspect of the embodiments of this application, a video encoding method is provided, including:
[0006] Obtain a target coefficient group in a target video frame, and determine an encoding node sequence according to the target coefficient group, where the encoding node sequence includes the encoding coefficients of each encoding node in the target coefficient group;
[0007] Determine the encoding state node corresponding to each encoding coefficient and the sub-node path between the encoding state nodes corresponding to two adjacent encoding coefficients, where each sub-node path includes an encoding cost;
[0008] Generate a state transition path graph according to the encoding state nodes and the sub-node paths between the encoding state nodes, where the state transition path graph includes multiple encoding paths;
[0009] Determine a target encoding path in the state transition path graph according to the path encoding cost of each encoding path.
[0010] According to the second aspect of the embodiments of this application, a video encoding device is provided, including:
[0011] An acquisition module, configured to acquire a target coefficient group in a target video frame, and determine an encoding node sequence according to the target coefficient group, where the encoding node sequence includes encoding coefficients of each encoding node in the target coefficient group;
[0012] A first determination module, configured to determine an encoding status node corresponding to each encoding coefficient and a sub-node path between encoding status nodes corresponding to two adjacent encoding coefficients, where each sub-node path includes an encoding cost;
[0013] A generation module, configured to generate a state transition path graph according to the encoding status nodes and the sub-node paths between the encoding status nodes, where the state transition path graph includes multiple encoding paths;
[0014] A second determination module, configured to determine a target encoding path in the state transition path graph according to the path encoding cost of each encoding path.
[0015] According to a third aspect of the embodiments of the present application, a computing device is provided, including a memory, a processor, and computer instructions stored on the memory and executable on the processor. When the processor executes the computer instructions, the steps of the video encoding method are implemented.
[0016] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer instructions. When the computer instructions are executed by a processor, the steps of the video encoding method are implemented.
[0017] The video encoding method provided by the present application includes: acquiring a target coefficient group in a target video frame, and determining an encoding node sequence according to the target coefficient group, where the encoding node sequence includes encoding coefficients of each encoding node in the target coefficient group; determining an encoding status node corresponding to each encoding coefficient and a sub-node path between encoding status nodes corresponding to two adjacent encoding coefficients, where each sub-node path includes an encoding cost; generating a state transition path graph according to the encoding status nodes and the sub-node paths between the encoding status nodes, where the state transition path graph includes multiple encoding paths; determining a target encoding path in the state transition path graph according to the path encoding cost of each encoding path.
[0018] An embodiment of the present application realizes determining each possible state transition path, calculating the path encoding cost of each state transition path, and selecting the encoding path with the smallest overall encoding cost as the final state transition path, so as to obtain coefficients with better algorithm performance and save more bitrates in actual encoding. Description of the Drawings
[0019] Figure 1It is a flowchart of a traditional RDOQ algorithm provided by an embodiment of the present application;
[0020] Figure 2 It is a flowchart of a video coding method provided by an embodiment of the present application;
[0021] Figure 3 It is a state transition diagram of a video coding method provided by an embodiment of the present application;
[0022] Figure 4 It is a flowchart of the change of standard algorithm variables provided by an embodiment of the present application;
[0023] Figure 5 It is a state transition diagram of a video coding method provided by another embodiment of the present application;
[0024] Figure 6 It is a processing flowchart of a video coding method applied to video compression provided by an embodiment of the present application;
[0025] Figure 7 It is an implementation flowchart of a video coding method provided by an embodiment of the present application;
[0026] Figure 8 It is a schematic structural diagram of a video coding device provided by an embodiment of the present application;
[0027] Figure 9 It is a structural block diagram of a computing device provided by an embodiment of the present application. Detailed implementation manners
[0028] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the spirit of the present application. Therefore, the present application is not limited by the specific implementations disclosed below.
[0029] The terms used in one or more embodiments of the present application are for the purpose of describing particular embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the", and "said" used in one or more embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0030] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of the present application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to a determination".
[0031] First, the noun terms related to one or more embodiments of the present application are explained.
[0032] HEVC: (High Efficiency Video Coding), high-definition video coding, a new video compression standard used to replace the H.264 / AVC coding standard. On January 26, 2013, HEVC officially became an international standard.
[0033] RDOQ: (Rate Distortion Optimized Quantization), rate-distortion quantization technology, a coefficient optimization algorithm. The goal of rate-distortion optimization is: under a certain bitrate limit, reduce the distortion of the video; under a certain allowable distortion, compress the video to the minimum.
[0034] WFSA: (Weighted Finite state Acceptor), weighted finite state acceptor, a dynamic optimization technology based on state machines.
[0035] CG: (Coeffcient), coefficient group, a 4 by 4 rectangular area.
[0036] Cost: is a 64-bit integer value. The larger the number, the more bits are required to encode the current coefficient or the greater the distortion.
[0037] In HEVC, RDOQ calculation is used for the quantized coefficients, and the coefficients within the CG are finely adjusted to save bitrate without affecting the video quality. According to the HEVC standard, its calculation method is as follows:
[0038] Scan the coefficients within the CG in sequence according to the scan order (mainly divided into Z scan, horizontal scan, and vertical scan). Assume that the current scan position is scanPosinCG, and the position of the last non-zero coefficient in the coding direction is lastScanPos;
[0039] If the current scan position scanPosinCG > lastScanPos, calculate the cost of the current position;
[0040] If the current scan position scanPosinCG == lastScanPos, then the current coefficient amplitude maxAbsLevel must be greater than 0. Then calculate the costs when the amplitude at the current position is maxAbsLevel and maxAbsLevel - 1, and select the one with the minimum cost as the final amplitude;
[0041] If the current scan position scanPosinCG < lastScanPos and the amplitude of the current coefficient is 0, calculate the cost at the current position;
[0042] If the current position scanPosinCG < lastScanPos and the amplitude of the current coefficient maxAbsLevel is less than 3, calculate the costs of maxAbsLevel, maxAbsLevel - 1, and 0, and select the one with the minimum cost as the final amplitude;
[0043] If the current position scanPosinCG < lastScanPos and the amplitude of the current coefficient maxAbsLevel is greater than or equal to 3, calculate the costs of maxAbsLevel and maxAbsLevel - 1, and select the one with the minimum cost as the final amplitude.
[0044] For example, assume there is a set of coefficients as shown in Table 1, and reverse encoding is performed column by column, that is, encoding is carried out in the way of "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 2".
[0045] Table 1
[0046] 2 2 0 0 1 0 0 0 0 0 0 0 1 0 0 0
[0047] The specific encoding process can refer to Figure 1 , Figure 1It is a flowchart of a traditional RDOQ algorithm provided by an embodiment of the present application. According to the encoding process in HEVC, it is necessary to first encode 11 consecutive 0s in the front, which costs 10057696; encoding "2" as 1 costs 10271386, and encoding it as 2 costs 14180512. According to the logic in HEVC, the smallest cost of 10271386 is selected here, that is, encoding it as 1; then encode the "1" in the fourth row of the first column. Encoding it as 1 costs 10879973, and encoding it as 0 costs 11223460. The smallest cost of 10879973 is selected here, that is, encoding it as 1; then encode the "0" in the third row of the first column, which costs 7655158; encode the "1" in the second row of the first column. Encoding it as 1 costs 5698792, and encoding it as 0 costs 15763286. The smallest cost of 5698792 is selected here, that is, encoding it as 1. Encoding the "2" in the first row of the first column, since this element is greater than 1, so this element can be encoded as "2", and can be encoded as "2 - 1 = 1". Also, since this element is not the last non-zero element (the last non-zero element is the 2 in the first row of the second column) and is less than 3, so it can also be encoded as "0". Encoding it as 2 costs 12396794, encoding it as 1 costs 48316079, and encoding it as 0 costs 131368282. Finally, the smallest cost of 12396794 is selected, so it is encoded as 2. After the previous steps, the RDOQ algorithm adjusts the sequence of "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 2" to the sequence of "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 2", that is, adjusts the first-occurring 2 in the encoding order to 1, and the final cost is 10057696 + 10271386 + 10879973 + … + 12396794 = 56959799.
[0048] From the above encoding process, we can see that the encoding process of the RDOQ algorithm in HEVC is to select the encoding method with the best performance for the current element. It can be understood as a way of greedy algorithm. However, this way may have a problem: the adjustment of a certain element may be the best for itself, but it may cause the performance of subsequent elements to deteriorate because the encodings between elements affect each other.
[0049] Based on this, a video encoding method is provided in the present application. The present application also relates to a video encoding device, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.
[0050] Figure 2It is a flowchart of a video encoding method provided according to an embodiment of the present application, specifically including the following steps:
[0051] Step 202: Obtain a target coefficient group in the target video frame, and determine an encoding node sequence according to the target coefficient group, where the encoding node sequence includes the encoding coefficients of each encoding node in the target coefficient group.
[0052] Among them, the target video frame can be understood as a target video frame determined from all video frames of a video, and subsequent encoding processing is performed on this target video frame. The target coefficient group can be understood as a pixel matrix in the target video frame, and this pixel matrix is 4 by 4. The coefficient of each unit in the target coefficient group can be understood as a pixel element. By fine-tuning the encoding coefficients in the target coefficient group, the video frame can be compressed without affecting the video quality, which can save the bit rate. The encoding node sequence can be understood as a sequence generated by sequentially scanning the target coefficient group in the scanning order, and the encoding node sequence includes the encoding coefficients of each encoding node in the target coefficient group. Therefore, the encoding node can be understood as the encoding order, and the encoding coefficients are encoded according to the order of the encoding nodes.
[0053] In practical applications, first, after determining the target video frame from multiple video frames of a video, a target coefficient group is selected from the target video frame, and an encoding node sequence can be determined according to the target coefficient group. Subsequently, encoding processing is performed according to the encoding node sequence to complete the optimization of the coefficients.
[0054] In a specific embodiment of the present application, a target coefficient group in the target video frame is obtained. The target coefficient group can be seen in Table 1. An encoding node sequence is determined according to the target coefficient group, and the encoding node sequence is "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 2", where the numbers in the encoding node sequence are the coefficients in the target coefficient group.
[0055] Specifically, determining the encoding node sequence according to the target coefficient group includes:
[0056] Obtain each encoding coefficient in the target coefficient group according to a preset acquisition rule;
[0057] Determine the encoding node sequence according to the acquisition result.
[0058] Among them, the preset acquisition rule can be understood as the above scanning order. The preset acquisition rule can be Z-scan acquisition, horizontal scan acquisition, vertical scan acquisition, and different-order encoding node sequences can be obtained according to the preset acquisition rule.
[0059] In practical applications, each encoded coefficient in the target coefficient group can be obtained by vertical forward scanning according to the HEVC standard, and subsequent reverse encoding is performed column by column.
[0060] In a specific embodiment of the present application, following the above example, according to a preset acquisition rule, each encoded coefficient in the target coefficient is sequentially obtained from left to right by vertical scanning, and the encoding node sequence is determined to be "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 2" according to the acquisition result.
[0061] Step 204: Determine the encoding state node corresponding to each encoded coefficient and the sub-node path between the encoding state nodes corresponding to two adjacent encoded coefficients, where each sub-node path includes an encoding cost.
[0062] Among them, the encoding state node can be understood as the node of the encoding state of the encoded coefficient, and the order of the encoding state nodes is arranged according to the encoding node order. Each encoding state node has an input and an output. For example, see Figure 3 , Figure 3 FIG. shows a state transition diagram of a video encoding method provided by an embodiment of the present application. Among them, state 12 has two outputs, namely "0 / 11223460" and "1 / 1264720", and has one input "2 / 14180512". The encoding state nodes corresponding to two adjacent encoded coefficients can be understood as two encoding state nodes that perform state transition according to the encoding node order. For example, Figure 3 the encoding state node 11 and the encoding state node 12 in
[0063] In practical applications, each encoded coefficient can be encoded to the corresponding coefficient. For example, the encoding state node 12 inputs "2 / 14180512", indicating that the coefficient 2 is input from state 11 and will reach state 12 at a cost of 14180512. According to the state transition diagram of the RDOQ algorithm provided by the present application, the cost incurred between each two adjacent encoding state nodes can be clearly observed.
[0064] In a specific embodiment of the present application, following the above example, in the encoding node sequence "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 2", the encoding state node corresponding to each encoded coefficient is determined, and it is determined that there are 38 encoding state nodes in total. The sub-node path between the encoding state nodes corresponding to two adjacent encoded coefficients is determined, where each sub-node path includes its own encoding cost.
[0065] Specifically, the encoding state node corresponding to any encoded coefficient can be determined by the following method, including:
[0066] Determine the target coding coefficient and the previous coding node of the target coding node;
[0067] Determine at least one coding amplitude corresponding to the target coding node according to the target coding node, the reference node, and the target coding coefficient;
[0068] Determine the attribute information of the coding state node corresponding to the target coding node according to each coding amplitude and the attribute information of the coding state node corresponding to the previous coding node;
[0069] Determine the coding state node corresponding to the target coding node according to the attribute information of each coding state node.
[0070] Among them, the target coding node can be understood as the position of the target coding coefficient in the target coefficient group, that is, the arrangement order of the target coding coefficient in the coding node sequence. For example, in Table 1, the "0" in the 4th row and 4th column is the first one, and its scanPosinCG is equal to 0. The previous coding node can be understood as a coding node before the target coding node. For example, in Table 1, the coding node of the coding coefficient "2" in the 1st row and 2nd column has a scanPosinCG equal to 12, and its previous coding node is the coding node of the coding coefficient "0" in the 2nd row and 2nd column, and its scanPosinCG is equal to 11.
[0071] The reference node can be understood as the position of the last non-zero coefficient in the coding node sequence according to the scanning order. For example, in Table 1, when scanning in the order of "2, 1, 0, 1, 2, 0, 0...0", its last non-zero coefficient is the "2" in the 5th position, then the reference node is the position of "2" in the coding node sequence, denoted as lastScanPos, and lastScanPos = 12.
[0072] The coding amplitude can be understood as the value of maxAbsLevl that the current coding coefficient can be encoded into. Generally, when the current coding coefficient is n, its coding amplitudes are n and n - 1. At this time, the cost of encoding n into n and the cost of encoding n into n - 1 need to be calculated.
[0073] The attribute information of the state node can be understood as the information determined to generate the state node. The attribute information of the state node is mainly 6 variables during the operation of the algorithm, namely c1, c2, c1Idx, c2Idx, goRiceParam, and scanPosinCG. Among them, goRiceParam is the Rice parameter, and scanPosinCG is the position of the current pixel element, that is, the position of the current coefficient in the coding node sequence. Specifically, these variables will change according to the variables of the previous coding state node and the coding amplitude, so as to update the variables until the attribute information of the next coding state node is obtained.
[0074] In practical applications, according to the reference node, it can be determined from the encoded node sequence where to start being not equal to 0, and encoding starts from the reference node. As the algorithm progresses, the values of variables such as c1, c2, c1Idx, c2Idx, goRiceParam, and scanPosinCG will change.
[0075] Initially, c1 = 1, c2 = 0, goRiceParam = 0, c1Idx = 0, c2Idx = 0, and scanPosinCG = 0. These numbers are related to the cost of calculating each encoding coefficient. When the values of the variables change, the calculated costs are all different. See Figure 4 , Figure 4 is a flowchart of the variable change of a standard algorithm provided by an embodiment of the present application. Among them, c1, c2, c1Idx, and c2Idx change according to the Figure 4 flowchart shown. Among them, the variable parameters in the current encoded state node attribute information are calculated based on the variable parameters in the previous encoded state node attribute information and the encoding amplitude. For example, when c1 = 1 in the previous encoded state node, if the encoding amplitude is 1, then c1 in the current encoded state node becomes 2; when c1 = 1 in the previous encoded state node, if the encoding amplitude is greater than 1, then c1 in the current encoded state node becomes 0; when c1 = 2 in the previous encoded state node, if the encoding amplitude is 1, then c1 in the current encoded state node becomes 3; when c1 = 3 in the previous encoded state node, if the encoding amplitude is 1, then c1 in the current encoded state node remains 3; when c1 = 0 in the previous encoded state node, regardless of the encoding amplitude, c1 in the current encoded state node is always 0; when c1 = 3 in the previous encoded state node, if the encoding amplitude is greater than 1, then c1 in the current encoded state node becomes 0. When c2 = 0 in the previous encoded state node, if the encoding amplitude is greater than 1, then c2 = 1 in the current encoded state node; when c2 = 1 in the previous encoded state node, if the encoding amplitude is greater than 1, then c2 = 2 in the current encoded state node; when c2 = 2 in the previous encoded state node, if the encoding amplitude is greater than 1, then c2 in the current encoded state node remains 2. The change rule of c1Idx is that when the encoding amplitude is greater than or equal to 1, c1Idx in the previous encoded state node is incremented by 1. The change rule of c2Idx is that when the encoding amplitude is greater than or equal to 2, c2Idx in the previous encoded state node is incremented by 1. Initially, goRiceParam = 0, and this value is also related to the calculation cost. Different values of goRiceParam result in different calculated costs. The HEVC standard also stipulates the change method of goRiceParam, and the present application does not make specific restrictions here.
[0076] See Figure 5 , Figure 5 is the state transition diagram of a video encoding method provided by another embodiment of the present application. Among them, there are encoding state nodes from 0 to 38. Each encoding state node is marked with variable parameters in its respective attribute information, and the scanPosinCG values in each column are the same. In Figure 5 the scanPosinCG values of each column of encoding state nodes are the same. Since the number of encoding coefficients processed this time is 16 and the processing is carried out in reverse order, the scanPosinCG changes from 15 to 0. For example, Figure 5 in the variable parameters of encoding state node 11 are c1 = 1, c2 = 0, goRiceParam (abbreviated as R in the figure) = 0, c1Idx = 0, c2Idx = 0, scanPosinCG = 11. According to the variable parameters in the attribute information of encoding state node 11 and the encoding amplitude of encoding state node 12, the variable parameters of encoding state node 12 are calculated as c1 = 0, c2 = 2, goRiceParam = 0, c1Idx = 2, c2Idx = 2, scanPosinCG = 12.
[0077] In a specific embodiment of the present application, following the above example, it is determined that the target encoding node is scanPosinCG = 4, its target encoding coefficient is 2, and the previous encoding node is scanPosinCG = 5. According to the target encoding node, the reference node, and the target encoding coefficient, the encoding amplitudes corresponding to the target encoding node are determined to be 2 and 1. According to the encoding amplitudes and the attribute information of the encoding state node corresponding to the previous encoding node, the attribute information of the encoding state node corresponding to the target encoding node is determined. When the encoding amplitude is 2, c1 = 0, c2 = 1, goRiceParam = 0, c1Idx = 1, c2Idx = 1, generating Figure 5 the encoding state node 12 in; when the encoding amplitude is 1, c1 = 2, c2 = 0, goRiceParam = 0, c1Idx = 1, c2Idx = 0, generating Figure 5 the encoding state node 13 in.
[0078] Specifically, determining the encoding state node corresponding to the target encoding node according to the attribute information of each encoding state node includes:
[0079] Determine the target attribute information and the target encoding amplitude corresponding to the target attribute information;
[0080] Judge whether there is a target encoding state node corresponding to the target attribute information in the target encoding node;
[0081] If so, determine that the target encoding state node is the encoding state node corresponding to the target attribute information;
[0082] Otherwise, create a coding status node corresponding to the target attribute information in the target coding node.
[0083] Among them, the target attribute information can be understood as an attribute information determined from multiple attribute information, and the target coding amplitude can be understood as the coding amplitude corresponding to the target attribute information.
[0084] In practical applications, there may be coding status nodes with the same attribute information in a column of the same coding node. In the case where there are already coding status nodes with the same attribute information, a new coding status node is not created, but the existing coding status node is used as the target coding status node of the target attribute information.
[0085] In a specific embodiment of the present application, following the above example, in Figure 5 when the coding status node 25 outputs a coding amplitude of "2", the target attribute information is c1 = 0, c2 = 1, goRiceParam = 0, c1Idx = 2, c2Idx = 1, scanPosinCG = 0. Then, check whether there is a coding status node with the same attribute information in the column of scanPosinCG = 0. It is found that the attribute information of the existing coding status node 30 is the same as the target attribute information, so the coding status node 30 is used as the target coding status node.
[0086] In another specific embodiment of the present application, following the above example, in Figure 5 when the coding status node 12 outputs a coding amplitude of "0", the target attribute information is c1 = 0, c2 = 1, goRiceParam = 0, c1Idx = 1, c2Idx = 1, scanPosinCG = 4. Then, check whether there is a coding status node with the same attribute information in the column of scanPosinCG = 4. It is found that there is no coding status node with the same attribute, so a coding status node is created, and this coding status node is the Figure 5 coding status node 12 in
[0087] Specifically, determining the sub - node path between coding status nodes corresponding to two adjacent coding coefficients further includes:
[0088] Calculating the coding cost between the two adjacent coding status nodes according to the coding amplitudes between the two adjacent coding status nodes;
[0089] Binding the coding amplitude and the coding cost to the sub - node path between the two adjacent coding status nodes.
[0090] In practical applications, after determining two adjacent coding state nodes, the coding cost between the two adjacent coding state nodes can be calculated according to the coding amplitudes of the two coding state nodes, and the coding amplitude and the coding cost are bound to the sub-node path between the two adjacent coding state nodes, thereby generating a state transition path diagram.
[0091] In a specific embodiment of the present application, following the above example, it is determined that the two adjacent coding state nodes are coding state node 11 and coding state node 12 respectively. According to the coding amplitude "2" between the two coding state nodes, the coding cost is calculated to be 14180512, and the coding amplitude and the coding cost are bound to the sub-node path between coding state node 11 and coding state node 12.
[0092] Step 206: Generate a state transition path diagram according to the coding state nodes and the sub-node paths between the coding state nodes, where the state transition path diagram includes multiple coding paths.
[0093] Among them, the state transition path diagram can be understood as a path diagram generated according to the coding node sequence, which includes the paths between each coding state node and its adjacent coding state node, that is, the coding paths.
[0094] In practical applications, a coding node sequence has multiple coding paths with different costs. According to the traditional RDOQ algorithm, the coding amplitude with a smaller cost is selected for coding at each step during coding, while in the present application, all possible coding paths are calculated, and the coding path with the smallest total cost is determined.
[0095] In a specific embodiment of the present application, following the above example, a state transition path diagram is generated according to 38 coding state nodes and the sub-node paths between the coding state nodes. Among them, the state transition path diagram can be seen in Figure 5 , Figure 5 which includes multiple coding paths.
[0096] It should be noted that coding state node 26 has two inputs, namely the input "1 / 4967584" from coding state node 20 and the input "0 / 15763286" from coding state node 21. Since these two inputs reach the same coding state node, only the "path" with the smallest overall cost needs to be retained, that is, the path with the smallest cost is retained from the two paths "0->11->13->16->20->26" and "0->11->13->17->21->26", and the other path is an invalid and redundant path. Due to the display effect, the redundant paths are not deleted in this figure, and there are similar redundant paths in other states, such as states 30, 32, 34, 36, and 37, etc.
[0097] Specifically, a state transition path graph is generated according to the coding state nodes and the sub-node paths between the coding state nodes, including:
[0098] Determine multiple coding paths according to each coding state node and the sub-node paths between two adjacent coding state nodes;
[0099] Generate a state transition path graph according to the multiple coding paths.
[0100] In practical applications, multiple coding paths can be determined according to each coding state node and the sub-node paths between two adjacent coding state nodes. Coding can be completed according to the coding paths, but the cost of each coding path is different. In order to save the code rate, the coding path with the smallest cost should be selected.
[0101] In a specific embodiment of the present application, multiple coding paths are determined according to 38 coding state nodes and the sub-node paths between two adjacent coding state nodes, and a state transition path graph is generated according to the multiple coding paths. The state transition path graph can be referred to Figure 5 .
[0102] Specifically, any coding path can be determined by the following method, including:
[0103] Determine the starting coding state node as the target coding state node;
[0104] Determine the next coding state node according to the target coding state node and the sub-node path corresponding to the target coding state node, and use the next coding state node as the current coding state node and continue to execute the operation of determining the next coding state node according to the target coding state node and the sub-node path corresponding to the target current coding state node until the target coding state node is the final coding state node.
[0105] In practical applications, determining the coding path can be understood as determining each target coding state node and the sub-node path corresponding to each target coding state node on a path, so as to form a coding path. Specifically, it can be to determine the next coding state node according to the current coding state node and the sub-node path of the current coding state node, and continue to determine according to the next coding state node, and so on, until the last coding state node is determined.
[0106] In a specific embodiment of the present application, following the above example, determine the starting coding state node 0 as the target coding state node, determine the next coding state node 1 according to the target coding state node and the sub-node path corresponding to the target coding state node, and use the coding state node 1 as the target coding state node, and then determine the next coding state node 2, and so on, until the last coding state node 28 is determined.
[0107] Step 208: Determine a target coding path in the state transition path graph according to the path coding cost of each coding path.
[0108] Among them, the target coding path can be understood as the determined coding path with the smallest cost, that is, the optimal coding path obtained according to the video coding method provided in this application.
[0109] In practical applications, according to the state transition path graph, the path coding cost of each coding path can be determined, and the coding path with the smallest path coding cost is selected as the target coding path.
[0110] In a specific embodiment of this application, continuing from the previous example, refer to Figure 5 , select the path with the smallest cost as the optimal path from the state transition path graph, and through the method of path backtracking, select the final coefficients. For example, the path where state 32 is located is the path with the smallest overall cost. Through the method of path backtracking, it can be known that a path like "32->26->20->16->13->11->…->0" is the path with the smallest cost.
[0111] Specifically, determining a target coding path in the state transition path graph according to the coding cost of each coding path includes:
[0112] Calculate the path coding cost corresponding to each coding path according to the coding cost of each sub-node path on each coding path;
[0113] Determine the coding path with the smallest path coding cost as the target coding path.
[0114] Among them, the path coding cost can be understood as the cost of the entire coding path. In this application, the selection is based on the result of summing the costs of each possible path to obtain the overall minimum. Therefore, it is necessary to calculate the cost of the entire coding path.
[0115] In practical applications, compared with the coding path determined by the traditional algorithm, the target coding path determined according to the cost of the entire coding path can obtain coefficients with better performance, and can save up to 0.62% of the bit rate in actual coding.
[0116] In a specific embodiment of this application, continuing from the previous example, calculate the path coding cost of each coding path respectively, select the coding path with the smallest path coding cost as the target coding path, and calculate that the path with the smallest cost is "0->11->13->16->20->26->32", and the cost of this path can be calculated as 56572078, which is smaller than the cost of the original RDOQ algorithm, which is 56959799. Corresponding coding coefficients can be obtained according to the target coding path, which are "0...0, 1, 0, 0, 0, 2".
[0117] A video encoding method provided by the present application includes: obtaining a target coefficient group in a target video frame, and determining an encoding node sequence according to the target coefficient group, where the encoding node sequence includes encoding coefficients of each encoding node in the target coefficient group; determining an encoding state node corresponding to each encoding coefficient and a sub-node path between encoding state nodes corresponding to two adjacent encoding coefficients, where each sub-node path includes an encoding cost; generating a state transition path graph according to the encoding state nodes and the sub-node paths between the encoding state nodes, where the state transition path graph includes multiple encoding paths; and determining a target encoding path in the state transition path graph according to the path encoding cost of each encoding path. By determining each encoding path according to the encoding node sequence, calculating the total cost of each encoding path, and selecting the final encoding path as the target encoding path according to the total cost, the cost of the target encoding path is smaller than that of the encoding path selected by the traditional algorithm, so that the code rate during encoding can be saved and the distortion can be reduced.
[0118] The following Figure 6 , taking the application of the video encoding method provided by the present application in video compression as an example, further illustrates the video encoding method. Among them, Figure 6 shows a processing flow chart of a video encoding method applied to video compression provided by an embodiment of the present application, which specifically includes the following steps:
[0119] Step 602: Obtain a target coefficient group in a target video frame, obtain each encoding coefficient in the target coefficient group according to a preset obtaining rule, and determine an encoding node sequence according to the obtaining result.
[0120] In a specific embodiment of the present application, obtain the target coefficient group in Table 1, obtain each encoding coefficient in the target coefficient group according to a preset obtaining rule, and determine an encoding node sequence according to the obtaining result. The encoding node sequence is "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 2".
[0121] In practical applications, after determining the encoding node sequence, the scanPosinCG of the initial encoding state node can be determined. Refer to Figure 7 , Figure 7The flowchart of an embodiment of a video encoding method provided by the present application is shown. First, according to the encoding node sequence, the scanPosinCG of the initial encoding state node is determined to be 15. Whether to perform a state transition is judged according to the value of scanPosinCG of each encoding state node. If scanPosinCG is greater than or equal to 0, then c1, c2, c1Idx, c2Idx, and goRiceParam of the current encoding state node are updated according to the encoding amplitude (maxAbsLevel) and the attribute information of the previous encoding state node, and a state transition is performed. When scanPosinCG is less than 0, no state transition is required, indicating that the encoding state node is already the last encoding state node at this time. At this moment, the state with the smallest overall cost can be selected, and the path with the smallest cost can be traced back to obtain the optimal coefficient.
[0122] Step 604: Determine the encoding state node corresponding to each encoding coefficient and the sub-node path between the encoding state nodes corresponding to two adjacent encoding coefficients.
[0123] In a specific embodiment of the present application, determining the encoding state node corresponding to each encoding coefficient needs to be determined according to the current encoding node, the reference node, and the previous encoding node. Specifically, assume that the current position is scanPosinCG. After processing the current position, scanPosinCG = scanPosinCG - 1 until it reaches 0. Initially, scanPosinCG = 15;
[0124] If the current scanning position scanPosinCG > lastScanPos, calculate the cost of the current position, update the values of c1, c2, c1Idx, c2Idx, and goRiceParam, and generate a new state according to these values. For example Figure 5 for the encoding state nodes 0 to 11 in, although the values of c1, c2, c1Idx, c2Idx, and goRiceParam of the encoding state nodes 0 to 11 are the same, their scanPosinCG values are different. Therefore, different state numbers are assigned to them;
[0125] If the current scanning position scanPosinCG == lastScanPos, then the current coefficient amplitude maxAbsLevel must be greater than 0. Calculate the costs when the amplitude of the current position is maxAbsLevel and maxAbsLevel - 1, update the five values of c1, c2, c1Idx, c2Idx, and goRiceParam, and perform a state transition; Figure 5 The transition from state 11 to state 12 and state 13 in belongs to this situation;
[0126] If the current scanning position scanPosinCG < lastScanPos and the amplitude of the current coefficient is 0, calculate the corresponding cost value and make a transition, but the values of c1, c2, c1Idx, c2Idx, and goRiceParam inside the state remain unchanged; Figure 5 For states 14 to 18, 15 to 19, 16 to 20, and 17 to 21, this is the case;
[0127] If the current position scanPosinCG < lastScanPos and the amplitude of the current coefficient maxAbsLevel < 3, calculate the costs of maxAbsLevel, maxAbsLevel - 1, and 0, and update the states of the five values of c1, c2, c1Idx, c2Idx, and goRiceParam to make a transition; Figure 5 The transition between state 22 and state 38 is this case.
[0128] If the current position scanPosinCG < lastScanPos and the amplitude of the current coefficient maxAbsLevel >= 3, calculate the costs of maxAbsLevel and maxAbsLevel - 1, and make a transition.
[0129] Step 606: Generate a state transition path diagram according to the coding state nodes and the sub - node paths between the coding state nodes.
[0130] In a specific embodiment of the present application, following the above example, after determining the coding state nodes and the sub - node paths between the coding state nodes according to the above method, a state transition path diagram can be generated.
[0131] Step 608: Determine the target coding path in the state transition path diagram according to the path coding cost of each coding path.
[0132] In a specific embodiment of the present application, following the above example, among the coding state nodes transferred from the last coefficient, select the coefficient corresponding to the path with the smallest overall cost as the final coefficient. From the 11 coding state nodes 28 - 38 in the last column, select the coding state node 32 with the smallest overall cost, and perform coding state node backtracking to obtain the path "0->11->13->16->20->26->32", and use the coefficient values corresponding to these states as the final coefficient values. It can be calculated that the cost of this path is 56572078, which is smaller than the cost of the original RDOQ algorithm, which is 56959799.
[0133] A video coding method applied to video compression proposed by this application includes: obtaining a target coefficient group in a target video frame, obtaining each coding coefficient in the target coefficient group according to a preset obtaining rule, and determining a coding node sequence according to the obtaining result; determining a coding state node corresponding to each coding coefficient and a sub-node path between coding state nodes corresponding to two adjacent coding coefficients, where each sub-node path includes a coding cost; generating a state transition path graph according to the coding state nodes and the sub-node paths between the coding state nodes; and determining a target coding path in the state transition path graph according to the path coding cost of each coding path. By determining each coding path according to the coding node sequence, calculating the total cost of each coding path, and selecting the final coding path as the target coding path according to the total cost, compared with the coding path selected by the traditional algorithm, the cost of the target coding path is smaller, so that the code rate during coding can be saved and the distortion can be reduced.
[0134] Corresponding to the above method embodiment, this application also provides an embodiment of a video coding device. Figure 8 The structural schematic diagram of a video coding device provided by an embodiment of this application is shown. As Figure 8 shown, the device includes:
[0135] An obtaining module 802, configured to obtain a target coefficient group in a target video frame and determine a coding node sequence according to the target coefficient group, where the coding node sequence includes the coding coefficients of each coding node in the target coefficient group;
[0136] A first determining module 804, configured to determine a coding state node corresponding to each coding coefficient and a sub-node path between coding state nodes corresponding to two adjacent coding coefficients, where each sub-node path includes a coding cost;
[0137] A generating module 806, configured to generate a state transition path graph according to the coding state nodes and the sub-node paths between the coding state nodes, where the state transition path graph includes multiple coding paths;
[0138] A second determining module 808, configured to determine a target coding path in the state transition path graph according to the path coding cost of each coding path.
[0139] The obtaining module 802 is further configured to:
[0140] Obtain each coding coefficient in the target coefficient group according to a preset obtaining rule;
[0141] Determine a coding node sequence according to the obtaining result.
[0142] The first determining module 804 is further configured to:
[0143] Determine the target encoding coefficient and the previous encoding node of the target encoding node;
[0144] Determine at least one encoding amplitude corresponding to the target encoding node according to the target encoding node, the reference node, and the target encoding coefficient;
[0145] Determine the attribute information of the encoding status node corresponding to the target encoding node according to each encoding amplitude and the attribute information of the encoding status node corresponding to the previous encoding node;
[0146] Determine the encoding status node corresponding to the target encoding node according to the attribute information of each encoding status node.
[0147] The first determination module 804 is further configured to:
[0148] Determine the target attribute information and the target encoding amplitude corresponding to the target attribute information;
[0149] Determine whether there is a target encoding status node corresponding to the target attribute information in the target encoding node;
[0150] If so, determine the target encoding status node as the encoding status node corresponding to the target attribute information;
[0151] If not, create an encoding status node corresponding to the target attribute information in the target encoding node.
[0152] The first determination module 804 is further configured to:
[0153] Calculate the encoding cost between two adjacent encoding status nodes according to the encoding amplitude between the two adjacent encoding status nodes;
[0154] Bind the encoding amplitude and the encoding cost to the sub-node path between the two adjacent encoding status nodes.
[0155] The generation module 806 is further configured to:
[0156] Determine multiple encoding paths according to each encoding status node and the sub-node path between two adjacent encoding status nodes;
[0157] Generate a state transition path diagram according to the multiple encoding paths.
[0158] The generation module 806 is further configured to:
[0159] Determine the starting encoding status node as the target encoding status node;
[0160] Determine the next encoding status node based on the target encoding status node and the sub-node path corresponding to the target encoding status node, use the next encoding status node as the current encoding status node, and continue to perform the operation of determining the next encoding status node according to the target encoding status node and the sub-node path corresponding to the target current encoding status node until the target encoding status node is the final encoding status node.
[0161] The second determination module 808 is further configured to:
[0162] Calculate the path encoding cost corresponding to each encoding path according to the encoding cost of each sub-node path on each encoding path;
[0163] Determine the encoding path with the minimum path encoding cost as the target encoding path.
[0164] A video encoding device provided by the present application includes: an acquisition module configured to acquire a target coefficient group in a target video frame and determine an encoding node sequence according to the target coefficient group, where the encoding node sequence includes the encoding coefficients of each encoding node in the target coefficient group; a first determination module configured to determine the encoding status node corresponding to each encoding coefficient and the sub-node path between the encoding status nodes corresponding to two adjacent encoding coefficients, where each sub-node path includes an encoding cost; a generation module configured to generate a state transition path diagram according to the encoding status nodes and the sub-node paths between the encoding status nodes, where the state transition path diagram includes multiple encoding paths; a second determination module configured to determine a target encoding path in the state transition path diagram according to the path encoding cost of each encoding path. By determining each encoding path according to the encoding node sequence, calculating the total cost of each encoding path, and selecting the final encoding path as the target encoding path according to the total cost, compared with the encoding path selected by the traditional algorithm, the cost of the target encoding path is smaller, so that the bit rate during encoding can be saved and the distortion can be reduced.
[0165] The above is a schematic solution of a video encoding device according to an embodiment of the present application. It should be noted that the technical solution of the video encoding device and the technical solution of the above video encoding method belong to the same concept. For the details not described in detail in the technical solution of the video encoding device, reference can be made to the description of the technical solution of the above video encoding method.
[0166] Figure 9 A structural block diagram of a computing device 900 provided according to an embodiment of the present application is shown. The components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 through a bus 930, and a database 950 is used to store data.
[0167] The computing device 900 further includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. Examples of such networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of wired or wireless network interface (e.g., Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0168] In one embodiment of the present application, the above components of the computing device 900, as well as Figure 9 other components not shown in the figure, may also be connected to each other, for example, via a bus. It should be understood that Figure 9 the block diagram of the computing device shown is only for illustrative purposes and is not a limitation on the scope of the present application. Those skilled in the art can add or replace other components as needed.
[0169] The computing device 900 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 900 can also be a mobile or stationary server.
[0170] Wherein, when the processor 920 executes the computer instructions, the steps of the video encoding method described above are implemented.
[0171] The above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above video encoding method belong to the same concept. For the details not described in the technical solution of the computing device, reference can be made to the description of the technical solution of the above video encoding method.
[0172] One embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the steps of the video encoding method as described above are implemented.
[0173] The above is a schematic solution of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above video encoding method belong to the same concept. For the details not described in the technical solution of the storage medium, reference can be made to the description of the technical solution of the above video encoding method.
[0174] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0175] The computer instructions include computer program code, which may be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0176] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described order of actions, because according to the present application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0177] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0178] The preferred embodiments of the present application disclosed above are only used to help illustrate the present application. The alternative embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A video encoding method, characterized in that, it includes: Obtain a target coefficient group in a target video frame, and determine an encoding node sequence according to the target coefficient group, where the encoding node sequence includes encoding coefficients of each encoding node in the target coefficient group; Determine an encoding state node corresponding to each encoding coefficient and a sub-node path between encoding state nodes corresponding to two adjacent encoding coefficients, where each sub-node path includes an encoding cost; Generate a state transition path graph according to the encoding state nodes and the sub-node paths between the encoding state nodes, where the state transition path graph includes multiple encoding paths; Determine a target encoding path in the state transition path graph according to the path encoding cost of each encoding path; Among them, an encoding state node corresponding to any encoding coefficient can be determined by the following method, including: Determine a target encoding coefficient and a previous encoding node of a target encoding node; Determine at least one encoding amplitude corresponding to the target encoding node according to the target encoding node, a reference node, and the target encoding coefficient; Determine the attribute information of the encoding state node corresponding to the target encoding node according to each encoding amplitude and the attribute information of the encoding state node corresponding to the previous encoding node; where the attribute information includes a current scanning position; Determine the encoding state node corresponding to the target encoding node according to the attribute information of each encoding state node.
2. The video encoding method according to claim 1, characterized in that, Determining an encoding node sequence according to the target coefficient group includes: Obtain each encoding coefficient in the target coefficient group according to a preset obtaining rule; Determine an encoding node sequence according to the obtaining result.
3. The video encoding method according to claim 1, characterized in that, Determining the encoding state node corresponding to the target encoding node according to the attribute information of each encoding state node includes: Determine target attribute information and a target encoding amplitude corresponding to the target attribute information; Judge whether there is a target encoding state node corresponding to the target attribute information in the target encoding node; If so, determine the target encoding state node as the encoding state node corresponding to the target attribute information; If not, create an encoding state node corresponding to the target attribute information in the target encoding node.
4. The video encoding method according to claim 1, characterized in that, Determining the sub-node path between encoding state nodes corresponding to two adjacent encoding coefficients further includes: Calculate the encoding cost between two adjacent encoding state nodes according to the encoding amplitudes between the two adjacent encoding state nodes; Bind the encoding amplitude and the encoding cost to the sub-node path between the two adjacent encoding state nodes.
5. The video encoding method according to claim 1, characterized in that, Generating a state transition path graph according to the encoding state nodes and the sub-node paths between the encoding state nodes includes: Determine multiple encoding paths according to each encoding state node and the sub-node paths between two adjacent encoding state nodes; Generate a state transition path graph according to the multiple encoding paths.
6. The video encoding method according to claim 5, characterized in that, Any encoding path can be determined by the following method, including: Determine the starting encoding state node as the target encoding state node; Determine the next encoding state node according to the target encoding state node and the child node path corresponding to the target encoding state node, take the next encoding state node as the current encoding state node and continue to perform the operation of determining the next encoding state node according to the target encoding state node and the child node path corresponding to the current encoding state node until the target encoding state node is the final encoding state node.
7. The video encoding method according to claim 1, characterized in that determining a target encoding path in the state transition path graph according to the encoding cost of each encoding path, including: Calculating the path encoding cost corresponding to each encoding path according to the encoding cost of each child node path on each encoding path; Determine the encoding path with the minimum path encoding cost as the target encoding path.
8. A video encoding device, characterized in that comprising: An acquisition module, configured to acquire a target coefficient group in a target video frame, and determine an encoding node sequence according to the target coefficient group, wherein the encoding node sequence includes the encoding coefficients of each encoding node in the target coefficient group; A first determination module, configured to determine the encoding state node corresponding to each encoding coefficient and the child node path between the encoding state nodes corresponding to two adjacent encoding coefficients, wherein each child node path includes an encoding cost; A generation module, configured to generate a state transition path graph according to the encoding state nodes and the child node paths between the encoding state nodes, wherein the state transition path graph includes multiple encoding paths; A second determination module, configured to determine a target encoding path in the state transition path graph according to the path encoding cost of each encoding path; wherein, the encoding state node corresponding to any encoding coefficient can be determined by the following method, including: Determine the target encoding coefficient and the previous encoding node of the target encoding node; Determine at least one encoding amplitude corresponding to the target encoding node according to the target encoding node, the reference node and the target encoding coefficient; Determine the attribute information of the encoding state node corresponding to the target encoding node according to each encoding amplitude and the attribute information of the encoding state node corresponding to the previous encoding node; wherein, the attribute information includes the current scanning position; Determine the encoding state node corresponding to the target encoding node according to the attribute information of each encoding state node.
9. A computing device, including a memory, a processor, and computer instructions stored on the memory and executable on the processor, characterized in that When the processor executes the computer instructions, the steps of the method according to any one of claims 1-7 are implemented.
10. A computer-readable storage medium, which stores computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1-7 are implemented.
11. A computer program product, which includes computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Efficient video coding rate distortion optimization and quantization method
CN108429911A