Coding unit division scheme determination method and device, computer equipment, storage medium and computer program product
By obtaining multiple encoding unit division schemes in HEVC video encoding, the initial division scheme is first performed to reduce fine-grained search, which solves the problems of inaccurate CU division and large calculations in traditional methods, and improves coding efficiency and accuracy Spend.
Patent Information
- Application Number
- CN202411080402.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-29
AI Technical Summary
In traditional HEVC video encoding, a large number of motion searches are required during the CU division process, resulting in slow hardware encoding speed and low efficiency. Especially between frames, motion search requires searching of whole pixels and sub-pixel motion vectors, with large calculation amounts and high resource consumption. .
When the encoding unit performs pre-division, at least two division schemes are obtained, first perform motion search on the initial division scheme, obtain the motion search results of the remaining division scheme based on the search results, calculate the loss, and then determine the target division scheme to reduce fine-grained motion Search to improve efficiency.
By reducing unnecessary motion search steps, reducing the calculation amount, and improving the efficiency and accuracy of coding unit division, the problems of inaccurate CU division and large calculation amount in traditional methods are avoided, and the hardware encoding speed is improved.
Smart Images

Figure CN119052507A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of encoder technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for determining a coding unit division scheme. Background Art
[0002] CU is the abbreviation of coding unit. The HEVC (High Efficiency Video Coding) standard stipulates that when compressing a video, each frame image is first divided into CTU (coding tree unit) size, and then CU is divided in the form of a quadtree with each CTU as the root node, and finally encoded in units of CU.
[0003] In traditional technology, since CU is recursively divided downward based on CTU, in order to obtain the best compression effect, it is theoretically necessary to perform a pattern search on each layer of division. The search here includes motion search between frames and prediction mode search at different angles within the frame, and the coding loss of each layer is calculated based on the best coding mode obtained by the search. The loss size between layers is compared to obtain the best CU division. The loss cost here can be understood as the coding cost, and its calculation formula is:
[0004]
[0005] Where D represents the coding distortion, R is the number of coding bits, Is a constant.
[0006] For hardware encoding, if we use the above theoretical method to decide how to divide the CU in a CTU, it will be very time-consuming and have a great impact on the hardware encoding speed. Especially for the motion search between frames, in theory, it is necessary to search for a series of integer pixel motion vectors, and then based on the best integer pixel motion vector obtained by the search, a series of sub-pixel motion vector searches are performed. The sub-pixel motion vector search requires interpolation operations, so it consumes more hardware resources and hardware execution time than the integer pixel motion vector search, which results in a large amount of calculations required when determining the CU division scheme, which reduces efficiency. Summary of the invention
[0007] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for determining a coding unit division scheme that can improve efficiency in response to the above technical problems.
[0008] In a first aspect, the present application provides a method for determining a coding unit division scheme, the method comprising:
[0009] In the case where the coding unit is pre-divided, obtaining at least two division schemes of the coding unit, the division schemes including an initial division scheme and a remaining division scheme;
[0010] Performing motion search on the initial partitioning scheme to obtain motion search results of the initial partitioning scheme;
[0011] Based on the motion search results of the initial partitioning scheme, obtaining motion search results of the remaining partitioning schemes;
[0012] Determine the loss of each of the partitioning schemes based on the motion search results of each of the partitioning schemes;
[0013] A target partitioning scheme is determined from among the partitioning schemes based on the loss.
[0014] In one embodiment, the initial partitioning scheme includes a first prediction unit, and each of the remaining partitioning schemes includes a second prediction unit; and obtaining the motion search results of the remaining partitioning schemes based on the motion search results of the initial partitioning scheme includes:
[0015] The motion search results of the first prediction units are linearly superimposed to obtain the motion search results of the second prediction units, wherein each of the second prediction units includes at least one of the first prediction units.
[0016] In one of the embodiments, before performing motion search on the initial partitioning scheme, the method further includes:
[0017] Determine the resource situation of the encoder motion search engine;
[0018] When the resource of the encoder motion search engine is greater than or equal to a resource threshold, motion search is performed on the partitioning schemes in parallel.
[0019] In one embodiment, the method further comprises:
[0020] When the resource of the encoder motion search engine is less than the resource threshold, the step of performing motion search on the initial partitioning scheme continues to be executed.
[0021] In one of the embodiments, when the coding unit is pre-divided, before obtaining at least two division schemes of the coding unit, the method includes:
[0022] Performing a first-granularity integer-pixel motion search;
[0023] The coding units are pre-divided to obtain at least two coding unit division schemes.
[0024] In one of the embodiments, when the coding unit is pre-divided, before obtaining at least two division schemes of the coding unit, the method includes:
[0025] Performing a first-granularity integer-pixel motion search;
[0026] Performing a second granularity integer pixel motion search, the second granularity being smaller than the first granularity;
[0027] The coding units are pre-divided to obtain at least two coding unit division schemes.
[0028] In a second aspect, the present application further provides a device for determining a coding unit division scheme, the device comprising:
[0029] A partitioning scheme determining module, configured to obtain at least two partitioning schemes of the coding unit when the coding unit is pre-partitioned, wherein the partitioning schemes include an initial partitioning scheme and a remaining partitioning scheme;
[0030] A first motion search module, configured to perform a motion search on the initial partitioning scheme to obtain a motion search result of the initial partitioning scheme;
[0031] A second motion search module, configured to obtain motion search results of remaining partitioning schemes based on the motion search results of the initial partitioning scheme;
[0032] A loss determination module, used to determine the loss of each of the division schemes based on the motion search results of each of the division schemes;
[0033] A target partitioning scheme determining module is used to determine a target partitioning scheme from the partitioning schemes based on the loss.
[0034] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above-mentioned embodiments when executing the computer program.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method in any one of the above-mentioned embodiments.
[0036] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the method in any one of the above-mentioned embodiments when executed by a processor.
[0037] The above-mentioned method, apparatus, computer device, storage medium and computer program product for determining the coding unit division scheme obtain at least two division schemes of the coding units when the coding units are pre-divided, and first perform motion search on the initial division scheme to obtain motion search results, thereby obtaining motion search results of the remaining division schemes based on the motion search results of the initial division scheme, and then calculating the loss, and determining the target division scheme based on the loss, so that the motion search results of the remaining division schemes do not need to perform fine-grained whole-pixel motion search and sub-pixel motion search or sub-pixel motion search for each prediction unit in the traditional way, thereby reducing the amount of calculation and improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 FIG. 1 is a schematic diagram of CTU and CU division in one embodiment;
[0040] Figure 2 is a schematic diagram of PU division in one embodiment;
[0041] Figure 3 Searching for a flow chart for a motion in a related art;
[0042] Figure 4 A motion search flow chart for another related art;
[0043] Figure 5 A schematic diagram of a flow chart of a method for determining a coding unit division scheme in one embodiment;
[0044] Figure 6 A schematic diagram of an SPU combination in which the LPU is 64x64 in one embodiment;
[0045] Figure 7 A schematic diagram of an SPU combination in which the LPU is 32x64 in one embodiment;
[0046] Figure 8 A schematic diagram of a motion search for a residual partitioning scheme in one embodiment;
[0047] Fig. 9 is a flowchart of a multi-coding unit division scheme in one embodiment;
[0048] Fig.10A flowchart of a multi-coding unit division scheme in another embodiment;
[0049] Fig.11 A schematic diagram of a flow chart of a method for determining a coding unit division scheme in another embodiment;
[0050] Fig.12 A schematic diagram of a flow chart of a method for determining a coding unit division scheme in yet another embodiment;
[0051] Fig.13 is a motion search flow chart in one embodiment;
[0052] Fig.14 It is a schematic diagram of a 32x32 CU partitioning process in one embodiment;
[0053] Fig.15 Schematic diagram of two CU partitioning schemes in one embodiment;
[0054] Fig.16 A schematic diagram of performing motion search in parallel in one embodiment;
[0055] Fig.17 A structural block diagram of a device for determining a coding unit division scheme in an embodiment;
[0056] Fig.18 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] Among them, for the convenience of understanding, combined Figure 1 As shown, CU is the abbreviation of coding unit. The HEVC standard stipulates that when compressing a video, each frame image is first divided into CTU (coding tree unit) size, and then CU is divided in the form of a quadtree with each CTU as the root node, and finally encoded in units of CU.
[0059] The minimum CU size is 8x8, and the maximum CU size is 64x64. After the CU size is determined, it will be further divided to determine the PU (prediction unit) division method, such as Figure 2 There are 8 ways to divide the PU in the CU shown. Since CU is the basic unit of coding, the division of CU has a great influence on the compression efficiency.
[0060] For P frames (P frames are predicted by the previous P frames or I frames. They compare the same information or data with the previous P frames or I frames, that is, they perform inter-frame compression considering the characteristics of motion. P frames belong to inter-frame coding of forward prediction. They only refer to the previous I frame or P frame closest to them. P frames use motion compensation to transmit the difference and motion vector between them and the previous I or P frame.) or B frames (B frame method (B frame) is a bidirectional prediction inter-frame compression algorithm. When compressing a frame into a B frame, it compresses the current frame according to the difference between the adjacent previous frame, current frame and next frame data, that is, it only records the difference between the current frame and the previous and next frames), the hardware encoder will perform motion search for all prediction units PU in a CTU. Assuming that the CTU size is 64x64, all the prediction units PU it contains are as follows:
[0061]
[0062] There are a total of 113 prediction units PU in CTU64x64. The encoder needs to perform motion search on these 113 PUs to obtain the best motion vector for each PU, and then calculate the coding cost based on this best motion vector to perform CU division.
[0063] Motion search includes coarse-grained integer pixel search, fine-grained integer pixel search and sub-pixel search. Figure 3 As shown, the number of PUs in a CTU is up to 113. Figure 3 If the CU division is performed after the sub-pixel motion search is completed in the process shown in the figure, the amount of calculation is huge and it will affect the encoding speed. For this reason, the hardware encoder often performs CU division in advance. Generally speaking, CU division can be performed after the coarse-grained integer pixel motion search or the fine-grained integer pixel search is completed. Figure 4 As shown, Figure 4 The 3 existing optional schemes for encoders to perform CU division are given in the , among which scheme 3 first performs all the whole pixel motion search and sub-pixel motion search on 113 PUs before division. Although the CU division is highly accurate, the amount of calculation is huge. Generally speaking, hardware encoders often do not choose this scheme. Scheme 1 is to perform CU division after all PUs have completed the coarse-grained search. Assume that the result of the division is that a 64x64 CTU is divided into four 32x32 CUs, such as Figure 2As shown in the figure, each CU contains at most 17 PUs, so there are a total of 68 PUs in the four 32x32 CUs that perform fine-grained integer pixel motion search and sub-pixel motion search. The amount of calculation is much smaller than that of 113 PUs performing fine-grained integer pixel motion search and sub-pixel motion search. However, this will also bring another problem. Each PU has not completed fine-grained integer pixel motion search and sub-pixel motion search, and the motion vector obtained is not the most accurate, so the CU division result at this time is also inaccurate. Solution 2 is to perform CU division after all PUs have completed fine-grained search. Although the accuracy of division will be improved compared to Solution 1, since 113 PUs in Solution 2 perform fine-grained search, the amount of calculation is greater than that of Solution 1.
[0064] In summary, the existing methods have two main shortcomings: first, CU division is performed in advance, which can save some calculation amount, but the CU division is inaccurate; second, CU division is performed after all PUs have completed pixel-by-pixel motion search. Although the CU division is accurate, the calculation amount is large.
[0065] In view of the shortcomings of the above methods, the present application provides a method for determining a coding unit division scheme, which mainly includes: first, when the resources of the encoder search engine are less than the resource threshold, a preset algorithm is used to perform motion search on at least two coding unit division schemes, so as to improve the accuracy of CU division without increasing the amount of calculation and the chip area. Second, when the resources of the encoder motion search engine are greater than or equal to the resource threshold, when the CU is divided in advance, several coding unit division schemes are retained to improve the accuracy of coding unit division, and motion search is performed on the retained coding unit division schemes in parallel, so as to improve the CU division accuracy without increasing the encoding time.
[0066] In one embodiment, Figure 5 As shown, a method for determining a coding unit division scheme is provided. This embodiment takes the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0067] S502: When the coding unit is pre-divided, obtain at least two division schemes of the coding unit, where the division schemes include an initial division scheme and a remaining division scheme.
[0068] The pre-division of coding units refers to the division of coding units after the coarse-grained integer-pixel motion search or the fine-grained integer-pixel search, rather than the division of coding units after the sub-pixel motion search.
[0069] In one of the optional embodiments, when the coding units are pre-divided, before obtaining at least two coding unit division schemes, it includes: performing a first granularity integer pixel motion search; and pre-dividing the coding units.
[0070] In one of the optional embodiments, when the coding units are pre-divided, before obtaining the division schemes of at least two coding units, it includes: performing a first granularity integer pixel motion search; performing a second granularity integer pixel motion search, the second granularity is smaller than the first granularity; and pre-dividing the coding units.
[0071] The first granularity integer pixel motion search mentioned above is a coarse granularity integer pixel motion search, and the second granularity integer pixel motion search is a fine granularity integer pixel motion search.
[0072] The coding unit division scheme may include multiple schemes, specifically combined with Figure 2 As shown, there are a total of 8 ways to divide PUs in a CU. In other embodiments, there may be other schemes, which are not specifically limited here.
[0073] For the purpose of distinction, any of the division schemes is taken as the initial division scheme, and the other division schemes are the remaining division schemes. It should be noted that the initial division scheme and the remaining division scheme are only for the convenience of description and do not have specific limitations on the present application. It should also be noted that the division schemes for coding units may include multiple types, such as Figure 2 There are at most 8 types of division schemes, and the division scheme of the coding unit in this application is a subset of all these division schemes, that is, at least two division schemes of the coding units are obtained, so that multiple division schemes are retained, thereby improving the accuracy of the division of the coding units. In this application, the remaining division schemes represent the division schemes other than the initial division scheme, and the number of the remaining division schemes is at least one, but at most cannot exceed the maximum division scheme minus one. The number of the remaining division schemes is not listed here, but those skilled in the art can know that the number of the remaining division schemes meets the requirements.
[0074] S504: Perform motion search on the initial partitioning scheme to obtain motion search results of the initial partitioning scheme.
[0075] The motion search is similar to the above, that is, it includes a first-granularity integer-pixel motion search, a second-granularity integer-pixel motion search and a sub-pixel motion search. Based on the pre-division time of the division scheme, the specific steps included in the motion search are determined. For example, if the time of the division scheme of the coding unit is after the first-granularity integer-pixel motion search, the motion search here is the second-granularity integer-pixel motion search and the sub-pixel motion search; if the time of the division scheme of the coding unit is after the second-granularity integer-pixel motion search, the motion search here is the sub-pixel motion search.
[0076] S506: Based on the motion search results of the initial partitioning scheme, obtain the motion search results of the remaining partitioning schemes.
[0077] For ease of understanding, two elements are introduced: LPU, i.e., large prediction unit, and SPU, i.e., small prediction unit. LPU can be composed of several SPUs, and for the same motion vector, the search results of LPU can be linearly superimposed by the search results of several SPUs contained in it on this motion vector. Among them, the search results on the motion vector can be understood as the search error of the motion vector, and the optimal motion vector can be selected based on the search error.
[0078] like Figure 6 The LPU shown is 64x64, which includes 18 SPUs. Each SPU has searched for motion vector mv0. The search result of LPU 64x64 on mv0 can be directly linearly superimposed by the search results of the 18 SPUs on motion vector mv0. That is, LPU 64x64 does not need to perform other more complicated calculations such as interpolation, and its search result on motion vector mv0 can be obtained only by addition operation.
[0079] like Figure 7 As shown, Figure 7 There are two LPUs of size 32x64, which are composed of 10 SPUs and 8 SPUs respectively. Figure 6 Similarly, the motion search results of the two 32x64 LPUs on mv0 and mv1 can be directly obtained by linearly superimposing the search results of the included SPUs on these two motion vectors.
[0080] In one of the optional embodiments, an initial partitioning scheme includes a first prediction unit, and each remaining partitioning scheme includes a second prediction unit; based on the motion search results of the initial partitioning scheme, the motion search results of the remaining partitioning schemes are obtained, including: linearly superimposing the motion search results of the first prediction unit to obtain the motion search results of the second prediction unit, wherein each second prediction unit includes at least one first prediction unit.
[0081] That is to say, multiple coding unit division schemes will be retained in this application, but subsequent fine-grained whole-pixel motion search and sub-pixel motion search will not be performed in parallel with the existing CU division scheme pattern0. Instead, a fast search algorithm will be used to obtain the search results of the LPUs in the retained CU division schemes on the overlapping motion vectors after the CU division scheme pattern0 has completed all motion vector searches. Figure 8As shown, the function CheckOverlapMv is to find a SPU combination that meets the requirements for each LPU. Here, meeting the requirements means that these SPUs will search for the same motion vector.
[0082] S508: Determine the loss of each partitioning scheme based on the motion search results of each partitioning scheme.
[0083] The loss cost can be understood as the encoding cost, and its calculation formula is:
[0084]
[0085] Where D represents the coding distortion, R is the number of coding bits, Is a constant.
[0086] S510: Determine a target partitioning scheme from among the partitioning schemes based on the loss.
[0087] In the present application, the partitioning scheme with the smallest loss is the target partitioning scheme. In other embodiments, other partitioning schemes may be obtained, such as the second smallest loss, or other strategies may determine the target partitioning scheme based on the loss. No specific limitation is made here.
[0088] In the above-mentioned method for determining the coding unit division scheme, when the coding units are pre-divided, at least two division schemes of the coding units are obtained, and a motion search is first performed on the initial division scheme to obtain a motion search result, thereby obtaining the motion search result of the remaining division schemes based on the motion search result of the initial division scheme, and then the loss is calculated, and the target division scheme is determined based on the loss, so that the motion search results of the remaining division schemes do not need to perform fine-grained whole-pixel motion search and sub-pixel motion search or sub-pixel motion search for each prediction unit in a traditional way, thereby reducing the amount of calculation and improving efficiency.
[0089] In one of the optional embodiments, before performing motion search on the initial partitioning scheme, the method further includes: determining the resource status of the encoder motion search engine; and performing motion search on the partitioning scheme in parallel when the resources of the encoder motion search engine are greater than or equal to a resource threshold.
[0090] In one of the optional embodiments, the method further includes: when the resources of the encoder motion search engine are less than the resource threshold, continuing to perform the step of performing motion search on the initial partitioning scheme.
[0091] Generally speaking, an encoder generally has multiple sets of motion search engines. In order to solve the problem of low accuracy of CU pre-division in existing methods, the present application proposes to make full use of the redundant motion search engines of the encoder to retain one or more CU division schemes when CU is divided in advance. The present application takes retaining one more CU division scheme as an example for explanation. In other embodiments, 2, 3, etc. may be retained, and no specific limitation is made here.
[0092] Among them, in the present application, when the resources of the encoder motion search engine are greater than or equal to the resource threshold, for example, when the number of idle motion search engines is greater than a certain number, the idle motion search engines are used to perform motion searches for other schemes, and each motion search engine performs motion searches on the division schemes in parallel, thereby improving the CU division accuracy without increasing the encoding time.
[0093] For ease of understanding, assuming that the CTU size is 64x64, after the coarse-grained motion search is completed, Figure 4 On the basis of , one more CU partitioning scheme is retained. This mode is a non-partitioning scheme, that is, a 64x64 CTU contains only one 64x64 CU. Fig. 9 The encoder shown in FIG. 9 determines two CU partitioning schemes after the coarse-grained integer pixel motion search is completed. They are called pattern0 and pattern1. Pattern0 and pattern1 respectively perform subsequent fine-grained integer pixel motion search and sub-pixel motion search in parallel, and then obtain their respective encoding costs. Finally, the two CU partitioning schemes are compared in encoding cost, and the CU partitioning scheme corresponding to the minimum encoding cost is taken as the final CU partitioning scheme. It can be seen Fig. 9 The encoder only searches for 8 more PUs based on the original scheme. Since pattern1 and pattern0 perform subsequent motion searches in parallel, the CU division accuracy is improved without increasing the encoding time.
[0094] Fig.10 Another scheme is given for the encoder to pre-partition the multi-CU partitioning scheme after completing the fine-grained integer pixel search. Fig. 9 The difference between the two schemes is that the timing of CU pre-division is different. Fig. 9 It is the CU pre-division performed after the coarse-grained search is completed. Fig.10 CU pre-division is performed after the fine-grained search is completed.
[0095] For the motion search results of calculating the remaining partitioning schemes through the initial partitioning scheme, see Fig.11 and Fig.12As shown, multiple CU partitioning schemes are retained. The difference is that the multiple CU partitioning schemes will not perform subsequent fine-grained whole-pixel motion search and sub-pixel motion search in parallel with the existing CU partitioning scheme pattern0, but will wait until the CU partitioning scheme pattern0 completes all motion searches, and then use the motion search results based on pattern0 to obtain the search results of the LPU in the multiple CU partitioning schemes on the overlapping motion vector.
[0096] Fig.12 A scheme is given for the encoder to pre-partition multiple CUs after performing fine-grained integer pixel search, where Fig.12 and Fig.11 The main difference between the schemes is the timing of CU pre-division. Fig.11 The CU pre-division is performed after the coarse-grained integer pixel search. Fig.12 CU pre-division is performed after fine-grained integer pixel search.
[0097] For ease of understanding, combined Figures 13 to 16 As shown, motion search includes whole pixel motion search and sub-pixel motion search. The calculation of sub-pixel motion requires interpolation calculation. Compared with whole pixel motion search, it requires more computing resources. In order to reduce the complexity of hardware implementation, the encoder performs CU division after completing whole pixel motion search with a step size of N. Therefore, its CU division accuracy is relatively low, which will greatly affect the encoding effect of the encoder. As mentioned above, the hardware encoder will limit the maximum CU. For example, the maximum CU allowed by the encoder is 32x32, that is, a 64x64 CTU will be divided into at least 4 32x32 CUs, and then the encoder needs to determine whether each 32x32 CU should continue to perform CU division. The process of each 32x32 CU division is as follows: Fig.14 As shown in Figure 2, after completing a coarse-grained search with a step size of N, two CU partitioning schemes are obtained: Fig.15 As shown, the prediction units in these two CU division schemes perform subsequent motion searches independently according to the method of the present application, and after the search is completed, the final CU division judgment is performed.
[0098] In the above embodiment, the search engine of the encoder is fully utilized to optimize the CU pre-division, and the CU division accuracy is improved without significantly increasing the amount of calculation and the encoding time. In the case of a limited number of encoder search engines, the CU pre-division can still be optimized using a fast algorithm, and the CU division accuracy is improved without increasing the amount of calculation and the chip area, and the encoding time is less affected.
[0099] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0100] Based on the same inventive concept, the embodiment of the present application also provides a coding unit division scheme determination device for implementing the above-mentioned coding unit division scheme determination method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the one or more coding unit division scheme determination device embodiments provided below can refer to the above-mentioned limitations on the coding unit division scheme determination method, which will not be repeated here.
[0101] In an exemplary embodiment, Fig.17 As shown, a device for determining a coding unit division scheme is provided, comprising:
[0102] A partitioning scheme determining module 1701 is used to obtain at least two partitioning schemes of the coding units when the coding units are pre-partitioned, where the partitioning schemes include an initial partitioning scheme and a remaining partitioning scheme;
[0103] A first motion search module 1702 is used to perform a motion search on the initial partitioning scheme to obtain a motion search result of the initial partitioning scheme;
[0104] A second motion search module 1703, configured to obtain motion search results of remaining partitioning schemes based on the motion search results of the initial partitioning scheme;
[0105] A loss determination module 1704, configured to determine the loss of each partitioning scheme based on the motion search results of each partitioning scheme;
[0106] The target partitioning scheme determining module 1705 is used to determine the target partitioning scheme from various partitioning schemes based on the loss.
[0107] In one of the optional embodiments, the initial partitioning scheme includes a first prediction unit, and each remaining partitioning scheme includes a second prediction unit; the second motion search module 1703 is used to linearly superimpose the motion search results of the first prediction unit to obtain the motion search results of the second prediction unit, wherein each second prediction unit includes at least one first prediction unit.
[0108] In one of the optional embodiments, the above-mentioned device also includes a third motion search module, which is used to determine the resource status of the encoder motion search engine; when the resources of the encoder motion search engine are greater than or equal to the resource threshold, the partitioning scheme is motion searched in parallel.
[0109] In one of the optional embodiments, the third motion search module is further configured to continue executing the step of performing motion search on the initial partitioning scheme when the resources of the encoder motion search engine are less than a resource threshold.
[0110] In one of the optional embodiments, the apparatus further includes a pre-division module, configured to perform a first granularity integer pixel motion search; and pre-divide the coding unit to obtain at least two coding unit division schemes.
[0111] In one of the optional embodiments, the above-mentioned device also includes a pre-division module, which is used to perform a first granularity integer pixel motion search; perform a second granularity integer pixel motion search, the second granularity is smaller than the first granularity; and pre-divide the coding unit to obtain at least two coding unit division schemes.
[0112] Each module in the above-mentioned device for determining the coding unit division scheme can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0113] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.18As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for determining a coding unit division scheme is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0114] Those skilled in the art will understand that Fig.18 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0115] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0116] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0117] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0119] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0120] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining a coding unit division scheme, characterized in that: The method comprises: In the case where the coding unit is pre-divided, obtaining at least two division schemes of the coding unit, the division schemes including an initial division scheme and a remaining division scheme; Performing motion search on the initial partitioning scheme to obtain motion search results of the initial partitioning scheme; Based on the motion search results of the initial partitioning scheme, obtaining motion search results of the remaining partitioning schemes; Determine the loss of each of the partitioning schemes based on the motion search results of each of the partitioning schemes; A target partitioning scheme is determined from among the partitioning schemes based on the loss.
2. The method according to claim 1, characterized in that The initial partitioning scheme includes a first prediction unit, and each of the remaining partitioning schemes includes a second prediction unit; and obtaining the motion search results of the remaining partitioning schemes based on the motion search results of the initial partitioning scheme includes: The motion search results of the first prediction units are linearly superimposed to obtain the motion search results of the second prediction units, wherein each of the second prediction units includes at least one of the first prediction units.
3. The method according to claim 1, characterized in that Before performing motion search on the initial partitioning scheme, the method further includes: Determine the resource situation of the encoder motion search engine; When the resource of the encoder motion search engine is greater than or equal to a resource threshold, motion search is performed on the partitioning schemes in parallel.
4. The method according to claim 3, characterized in that The method further comprises: When the resource of the encoder motion search engine is less than the resource threshold, the step of performing motion search on the initial partitioning scheme continues to be executed.
5. The method according to any one of claims 1 to 4, characterized in that: In the case where the coding unit is pre-divided, before obtaining at least two division schemes of the coding unit, the method includes: Performing a first-granularity integer-pixel motion search; The coding units are pre-divided to obtain at least two coding unit division schemes.
6. The method according to any one of claims 1 to 4, characterized in that: In the case where the coding unit is pre-divided, before obtaining at least two division schemes of the coding unit, the method includes: Performing a first-granularity integer-pixel motion search; Performing a second granularity integer pixel motion search, the second granularity being smaller than the first granularity; The coding units are pre-divided to obtain at least two coding unit division schemes.
7. A device for determining a coding unit division scheme, characterized in that: The device comprises: A partitioning scheme determining module, configured to obtain at least two partitioning schemes of the coding unit when the coding unit is pre-partitioned, wherein the partitioning schemes include an initial partitioning scheme and a remaining partitioning scheme; A first motion search module, configured to perform a motion search on the initial partitioning scheme to obtain a motion search result of the initial partitioning scheme; A second motion search module, configured to obtain motion search results of remaining partitioning schemes based on the motion search results of the initial partitioning scheme; A loss determination module, used for determining the loss of each of the division schemes based on the motion search results of each of the division schemes; A target partitioning scheme determining module is used to determine a target partitioning scheme from the partitioning schemes based on the loss.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
