Video data processing method and apparatus, device, and storage medium

By using a recursive target partitioning strategy and judging the relationship between encoding parameters, the problem of high complexity in the video data encoding process is solved, and a more efficient encoding process is achieved.

CN115883844BActive Publication Date: 2026-06-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-11-18
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Video data encoding is complex and inefficient.

Method used

A target recursive partitioning strategy is adopted to initially partition the units to be encoded. The relationship between the encoding parameters is used to determine whether the conditions for continuing partitioning are met. If they are consistent, the partitioning is paused and the final partitioning result is determined directly.

🎯Benefits of technology

It reduces the complexity of the video data encoding process, improves encoding efficiency, and reduces encoding time and computing resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883844B_ABST
    Figure CN115883844B_ABST
Patent Text Reader

Abstract

This application discloses a video data processing method, apparatus, device, and storage medium, applicable to scenarios such as cloud gaming in cloud technology. The method includes: obtaining a target recursive partitioning strategy for a unit to be encoded in a target video frame, and encoding parameters for the unit to be encoded; partitioning the unit to be encoded according to the target recursive partitioning strategy to obtain N first sub-units to be encoded; obtaining the encoding parameters corresponding to each of the N first sub-units to be encoded, and determining the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters corresponding to the N first sub-units to be encoded; if the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, then pausing the further partitioning of the unit to be encoded, and determining the target partitioning result of the unit to be encoded based on the first sub-units to be encoded and the unit to be encoded. This application reduces the complexity of the video data encoding process and improves the encoding efficiency of video data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud technology, and in particular to a video data processing method, apparatus, device and storage medium. Background Technology

[0002] In video data encoding, the units to be encoded in a video frame need to be divided into at least two sub-units. These sub-units are then encoded to achieve fine-grained encoding of the video data and improve its accuracy. Practice has shown that there are typically multiple strategies for dividing the units to be encoded, such as no division, horizontal recursive division, and vertical recursive division. Encoders often try all these strategies and ultimately select the one that best suits the unit being encoded. Because there are numerous combinations of different division strategies, the video data encoding process is quite complex. Summary of the Invention

[0003] The technical problem to be solved by the embodiments of this application is to provide a video data processing method, apparatus, device and storage medium to reduce the complexity of the video data encoding process and improve the encoding efficiency of video data.

[0004] One embodiment of this application provides a video data processing method, including:

[0005] Obtain the target recursive partitioning strategy for the unit to be encoded in the target video frame, and the encoding parameters of the unit to be encoded;

[0006] According to the target recursive partitioning strategy, the unit to be encoded is divided into N first sub-units to be encoded; N is a positive integer greater than 1.

[0007] Obtain the encoding parameters corresponding to the N first sub-units to be encoded respectively, and determine the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters corresponding to the N first sub-units to be encoded respectively;

[0008] If the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, then the partitioning of the unit to be encoded is paused, and the target partitioning result of the unit to be encoded is determined based on the N first sub-units to be encoded and the unit to be encoded.

[0009] One embodiment of this application provides a video data processing apparatus, including:

[0010] The acquisition unit is used to acquire the target recursive partitioning strategy for the unit to be encoded in the target video frame, as well as the encoding parameters of the unit to be encoded.

[0011] A partitioning unit is used to partition the unit to be encoded according to the target recursive partitioning strategy to obtain N first sub-units to be encoded; N is a positive integer greater than 1.

[0012] The determining unit is used to obtain the encoding parameters corresponding to the N first sub-units to be encoded, and to determine the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters corresponding to the N first sub-units to be encoded.

[0013] The pause module is used to pause the re-division of the unit to be encoded if the parameter relationship indicates that the unit to be encoded does not meet the conditions for continuing to divide it, and to determine the target division result of the unit to be encoded based on the N first sub-units to be encoded and the unit to be encoded.

[0014] This application provides a computer device, including: a processor and a memory;

[0015] The aforementioned memory is used to store computer programs, and the aforementioned processor is used to invoke the aforementioned computer programs to execute the steps in the aforementioned method.

[0016] One embodiment of this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, perform the steps in the method described above.

[0017] One embodiment of this application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described method.

[0018] In this application, during the encoding of the unit to be encoded in the target video frame, a target recursive partitioning strategy is first attempted. This involves partitioning the unit to be encoded according to the target recursive partitioning strategy to obtain N first sub-units to be encoded. The parameter relationship between the encoding parameters of the N first sub-units to be encoded and the encoding parameters of the unit to be encoded is then determined. Here, the target recursive partitioning strategy can refer to any of the K candidate recursive partitioning strategies for the unit to be encoded, or it can refer to the candidate recursive partitioning strategy with the highest partitioning precision among the K candidate recursive partitioning strategies. The parameter relationship is used to reflect whether there is consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded. When the parameter relationship reflects consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded, it indicates that the texture information of each sub-unit to be encoded is similar, and the unit to be encoded is more suitable for encoding with a larger-sized encoding unit. In this case, it is determined that the unit to be encoded does not meet the conditions for further partitioning. Therefore, the parameter relationship can indicate whether the unit to be encoded meets the conditions for further partitioning. When the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, the partitioning of the unit to be encoded is paused. This means that there is no need to partition the first sub-unit to be encoded, nor is it necessary to try other recursive partitioning strategies. It can stop trying other recursive partitioning strategies in advance and can directly determine the final partitioning result (i.e., the target partitioning result) of the unit to be encoded based on the partitioning result of the target recursive partitioning strategy (i.e., the first sub-unit to be encoded) and the unit to be encoded. This accelerates the partitioning decision process of the encoder, thereby reducing encoding time and computational resource overhead. Simultaneously, the encoding parameters of the first sub-unit to be encoded and the parameters of the unit to be encoded are already available information during the encoding process, eliminating the need for additional highly complex analysis operations, reducing the complexity of the video data encoding process, and improving the encoding efficiency of video data. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a video data processing method provided in this application;

[0021] Figure 2a This is a schematic diagram illustrating the relationship between a video frame containing a unit to be encoded and a reference video frame, as provided in this application.

[0022] Figure 2bThis is a schematic diagram of an image segmentation method provided in this application;

[0023] Figure 3 This is a schematic diagram of a video data processing method provided in this application.

[0024] Figure 4 This is a flowchart illustrating a video data processing method provided in this application;

[0025] Figure 5 This is a flowchart illustrating a video data processing method provided in this application;

[0026] Figure 6 This is a flowchart illustrating a video data processing method provided in this application;

[0027] Figure 7 This is a schematic diagram of the final segmentation form of a target video frame provided in this application;

[0028] Figure 8 This is a schematic diagram of the final segmentation form of a target video frame provided in this application;

[0029] Figure 9 This is a schematic diagram of the structure of a video data processing device provided in this application;

[0030] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0032] This application primarily relates to cloud gaming scenarios within cloud technology. For instance, in this application, the cloud server renders a game scene as an initial video and audio stream. Following a target recursive partitioning strategy, it partitions the video frames in the initial video and audio stream into units to be encoded, obtaining the first sub-unit to be encoded. The encoding parameters of the first sub-unit and the unit to be encoded are determined. When the parameter relationship between the first sub-unit and the unit to be encoded is consistent, it indicates that the texture information of each sub-unit to be encoded is similar. For example, each sub-unit to be encoded may be an area containing the same game content, such as game items, game objects, the sky, forest, ground, etc., within the game scene. At this point, the cloud server can determine that the unit to be encoded is more suitable for encoding with a larger-sized unit, i.e., it determines that the unit to be encoded does not meet the conditions for further partitioning, pausing the partitioning process. Based on the partitioning result of the target recursive partitioning strategy (i.e., the first sub-unit to be encoded) and the unit to be encoded, the final partitioning result (i.e., the target partitioning result) of the unit to be encoded is determined. Furthermore, the cloud server can encode the video frames to be encoded in the initial video and audio stream based on the final partitioning result, obtaining the final video and audio stream. This video and audio stream is then transmitted to the player's game terminal, which can load the game screen based on the video and audio stream. By accelerating the partitioning decision-making process through the cloud server, the encoding time and computing resource overhead are reduced, thereby improving the efficiency of loading the game screen on the player's game terminal, reducing latency, and enhancing the user experience.

[0033] Understandably, cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied to cloud computing business models. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.

[0034] Understandably, cloud technology is widely used in scenarios such as healthcare, security, and cloud gaming. Cloud gaming, also known as gaming on demand, is an online gaming technology based on cloud computing. Cloud gaming technology enables thin clients with relatively limited graphics processing and data processing capabilities to run high-quality games. In cloud gaming, the game does not reside on the player's terminal but runs on a cloud server. The cloud server renders the game scene as a video and audio stream, which is then transmitted to the player's terminal via the network. The player's terminal does not need powerful graphics processing and data processing capabilities; it only needs basic streaming media playback capabilities and the ability to receive player input commands and send them to the cloud server.

[0035] To facilitate a clearer understanding of this application, we will first introduce a video data processing system that implements the video data processing method of this application, such as... Figure 1 As shown, the video data processing system includes, for example, Figure 1 As shown, this video data processing system includes a server 10 and a terminal cluster. The terminal cluster can include one or more terminals; the number of terminals is not limited here. Figure 1 As shown, the terminal cluster may specifically include terminal 1, terminal 2, ..., terminal n; it can be understood that terminal 1, terminal 2, terminal 3, ..., terminal n can all connect to server 10 via the network so that each terminal can interact with server 10 via the network connection.

[0036] Understandably, server 10 can refer to a device that provides backend services for video data; for example, the server can refer to a backend device that performs encoding and decoding processing on video data. Each terminal can refer to a user-facing device, or a device that provides frontend services for video data; for example, a terminal can refer to a device that renders and plays video data. The terminal can have clients, such as audio / video playback clients, short video clients, live streaming clients, game clients, etc., that can be used to play video data.

[0037] Understandably, a server can be a single physical server, a server cluster or distributed system consisting of at least two physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. A terminal can specifically refer to smartphones, computers, smart speakers, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc., but is not limited to these. Various terminals and servers can be directly or indirectly connected via wired or wireless communication. Furthermore, the number of terminals and servers can be one or at least two; this application does not impose any restrictions.

[0038] Understandably, a target video frame can refer to a video frame in the video data with a frame type of P-frame or B-frame. A P-frame can be a forward prediction frame, which can be composed of I macroblocks and P macroblocks; a B-frame is a bidirectional prediction frame, which can be composed of I macroblocks and B macroblocks. The prediction mode of I macroblocks is intra-prediction mode, the prediction mode of P macroblocks can be forward prediction mode, and the prediction mode of B macroblocks can be bidirectional prediction mode. A target video frame may include one or at least two units to be encoded. When a target video frame includes one unit to be encoded, that unit refers to the target video frame itself; when the target video frame includes at least two units to be encoded, those at least two units can refer to the target video frame divided according to a target recursive partitioning strategy. In particular, video frames with frame types of P-frame or B-frame are usually video frames in the video data other than the first video frame, which can refer to the video frame with the earliest playback time in the video data. The bidirectional prediction mode here includes forward prediction mode and backward prediction mode. Forward prediction mode means that the encoding order of the reference video frame corresponding to the unit to be encoded is before the encoding order of the target video frame, and the playback order of the reference video frame corresponding to the unit to be encoded is before the playback order of the target video frame. Backward prediction mode means that the encoding order of the reference video frame corresponding to the unit to be encoded is before the encoding order of the target video frame, and the playback order of the reference video frame corresponding to the unit to be encoded is after the playback order of the target video frame.

[0039] For example, such as Figure 2aAs shown, when the encoding unit 14b performs inter-frame prediction in the target video frame 11a, the encoder (i.e., the server) constructs a reference frame list for the target video frame. This reference frame list consists of two parts: a forward reference frame list and a backward reference frame list. The forward reference frame list contains several video frames whose encoding order precedes the target video frame's encoding order and whose playback order also precedes the target video frame's playback order. The backward reference frame list contains video frames whose encoding order precedes the target video frame's encoding order but whose playback order precedes the target video frame's playback order. The encoder can select one frame from either the forward or backward reference frame list as a reference frame (unidirectional prediction mode), or it can select one frame from each of the two reference frame lists, for a total of two frames, as reference frames (bidirectional prediction mode). Figure 2a When the encoder selects the bidirectional prediction mode as the prediction mode for the unit to be encoded 14b, the reference frame selected by the encoder from the forward reference sequence is video frame 13a, and the coded block 16b in video frame 13a is the reference block for the unit to be encoded 14b. The reference frame selected from the backward reference sequence is video frame 12a, and the coded block 15b in video frame 12a is the reference block for the unit to be encoded 14b.

[0040] Understandably, the partitioning strategy for any unit to be encoded in the target video frame can include a no-partitioning strategy and K candidate recursive partitioning strategies. A no-partitioning strategy refers to not partitioning the unit to be encoded, while a candidate recursive partitioning strategy refers to partitioning the unit to be encoded. K can be a positive integer greater than 1. For example, candidate recursive partitioning strategies can include, but are not limited to: horizontal binary partitioning, vertical binary partitioning, quad partitioning, horizontal tripartitioning, and vertical tripartitioning. Horizontal binary partitioning means dividing the unit to be encoded into two sub-units along the horizontal direction; vertical binary partitioning means dividing the unit to be encoded into two sub-units along the vertical direction. Horizontal tripartitioning means dividing the unit to be encoded into three sub-units along the horizontal direction; vertical tripartitioning means dividing the unit to be encoded into three sub-units along the vertical direction. Quad partitioning means dividing the unit to be encoded into four sub-units. When the above candidate recursive partitioning strategy partitions the units to be encoded, it can be either equal-size partitioning or non-equal-size partitioning. The size of each sub-unit to be encoded is the same when the partitioning is equal-size, while the size of each sub-unit to be encoded can be different when the partitioning is non-equal-size.

[0041] For example, such as Figure 2bAs shown, assuming the target video frame contains a unit 20a to be encoded, dividing it without partitioning yields a subunit 21a, whose size is the same as that of unit 20a. Dividing it horizontally by two partitions yields two subunits 22a, whose horizontal dimensions are identical to those of unit 20a, and whose combined vertical dimensions are identical to those of unit 20a. Dividing it vertically by two partitions yields two subunits 23a, whose horizontal dimensions are identical to those of unit 20a, and whose combined vertical dimensions are identical to those of unit 20a. Dividing the unit to be encoded 20a into four sub-units 24a yields four sub-units 24a. The sum of the horizontal dimensions of the four sub-units 24a is the same as the horizontal dimension of the unit to be encoded 20a, and the sum of their vertical dimensions is also the same as the vertical dimension of the unit to be encoded 20a. Dividing the unit to be encoded 20a into three sub-units 25a yields three sub-units 25a. The sum of the horizontal dimensions of the three sub-units 25a is the same as the horizontal dimension of the unit to be encoded 20a, and the sum of their vertical dimensions is also the same as the vertical dimension of the unit to be encoded 20a. Dividing the unit to be encoded 20a into three sub-units 26a yields three sub-units 26a. The sum of the horizontal dimensions of the three sub-units 26a is the same as the horizontal dimension of the unit to be encoded 20a, and the sum of their vertical dimensions is also the same as the vertical dimension of the unit to be encoded 20a. Furthermore, the sub-units to be encoded obtained from the above division can be used as the units to be encoded, and the units to be encoded can be divided according to the above division strategy to obtain more fine-grained encoding sub-units. For example... Figure 2b In this context, any subunit 24a to be encoded can be used as the encoding unit 24a. * The coding unit 24a is treated according to the no-division strategy. * The code is divided to obtain a sub-unit 21b to be encoded; the sub-unit 24a to be encoded is then divided according to level two. * The code is divided into two sub-units 22b to be encoded; the sub-unit 24a is then divided vertically into two sub-units. * The code is divided into two sub-units 23b to be encoded; the sub-unit 24a is divided into four sub-units. * The code is divided into four sub-units 24b to be encoded; the sub-unit 24a is divided into three vertical sub-units.* The code is divided into three sub-units 25b to be encoded; sub-unit 24a is further divided according to level three. * The data is divided into three subunits 26b to be encoded.

[0042] like Figure 2b As shown, currently, for any unit to be encoded in the target video frame, it is necessary to try the above six partitioning strategies to obtain the partitioning results corresponding to the six partitioning strategies. The partitioning results corresponding to the six partitioning strategies include the sub-units to be encoded obtained based on the corresponding partitioning strategy. Based on the partitioning results corresponding to the six partitioning strategies, the optimal partitioning strategy is selected from the six partitioning strategies, and the partitioning result corresponding to the optimal partitioning strategy is taken as the final partitioning result of the unit to be encoded. Furthermore, the above steps need to be repeated for any sub-unit to be encoded until the size of the encoded sub-unit no longer meets the partitioning conditions, at which point the partitioning of the unit to be encoded stops. It can be seen that this method of partitioning the unit to be encoded is relatively complex, which in turn leads to a relatively complex encoding process. Based on this, this application proposes a video data processing method, which can adopt the following... Figure 1 The video data processing system shown is used to achieve this, such as Figure 3 and Figure 4 As shown, the video data processing method of this application is explained using a vehicle-to-everything (V2X) scenario as an example. Figure 3 Terminal 30a in the text can refer to Figure 1 Any terminal in the terminal cluster, Figure 3 Server 31a in the text can refer to Figure 1 Server 10. Server 31a can obtain video data sent by the vehicle terminal. This video data may refer to the video data captured by the vehicle driving on the road. The server encodes the video frames in the video data in sequence to obtain the video data bitstream and transmits the video data bitstream to terminal 30a.

[0043] like Figure 4 As shown, the video data processing method may include the following steps s11 to s15:

[0044] s11. The unit to be encoded is divided into four sub-units according to the four-part division method, resulting in four sub-units to be encoded. Server 31a can traverse the frame types of the video frames in the video data. When a video frame of type P or B is encountered, it is taken as the target video frame. This target video frame includes the unit to be encoded 32a, which refers to the target video frame that has not yet been divided. Please refer to [further details omitted]. Figure 3As shown, assuming the target recursive partitioning strategy is four-part partitioning, server 31a can first attempt four-part partitioning for the unit to be encoded, that is, partition the unit to be encoded 32a according to four-part partitioning, resulting in four sub-units to be encoded, namely sub-units to be encoded 33a, 34a, 35a, and 36a. Further, the server can obtain the encoding parameters of each sub-unit to be encoded and the encoding parameters of the unit to be encoded. The encoding parameter of the unit to be encoded is encoding parameter 1, and the encoding parameters corresponding to sub-units to be encoded 33a, 34a, 35a, and 36a are encoding parameter 2, encoding parameter 3, encoding parameter 4, and encoding parameter 5, respectively. Encoding parameter 1 may include the motion information of the unit to be encoded 32a, and the encoding parameters of each sub-unit to be encoded may include the corresponding motion information of the sub-unit to be encoded. The motion information of the unit to be encoded and the sub-unit to be encoded may include at least one of prediction mode, reference frame mode, and reference frame index. The prediction modes here include intra-frame prediction mode and inter-frame prediction mode. Intra-frame prediction mode means that the unit to be encoded (or sub-unit to be encoded) is encoded with reference to the already encoded units in the video frame in which it is located. Inter-frame prediction mode means that the unit to be encoded (or sub-unit to be encoded) is encoded with reference to the already encoded units in other video frames in the video data. Inter-frame prediction modes include translational inter-frame prediction mode and affine inter-frame prediction mode. Translational inter-frame prediction mode means that the motion vectors of all pixels in the unit to be encoded (or sub-unit to be encoded) are the same. Affine inter-frame prediction mode means that the motion vectors of some pixels in the unit to be encoded (or sub-unit to be encoded) are different. The reference index is used to reflect the playback order of the reference video frames of the unit to be encoded (or sub-unit to be encoded) or the number of the reference video frames.

[0045] s12. Determine the parameter relationship between the encoding parameters of the four sub-units to be encoded and the encoding parameters of the unit to be encoded.

[0046] s13. Check if the parameter relationship is consistent. If the parameter relationship is consistent, proceed to step s15; if the parameter relationship is not consistent, proceed to step s14.

[0047] s14. Try other recursive partitioning strategies for the coding unit.

[0048] s15. Pause the division of the unit to be encoded.

[0049] In steps s12 to s15, server 31a can compare encoding parameters 2, 3, and 5 with encoding parameter 1 in sequence. If there is a parameter relationship between encoding parameters 2, 3, and 5 that is inconsistent with encoding parameter 1, it indicates that the texture information in the sub-units 33a, 34a, 35a, and 36a to be encoded is not similar, and the sub-unit 32a to be encoded is more suitable for encoding with a smaller size encoding unit. Therefore, server 31a can divide the unit to be encoded 32a according to recursive partitioning strategies other than four-part partitioning, obtaining the partitioning results corresponding to other recursive partitioning strategies. Based on the partitioning results of the unit to be encoded 32a under other recursive partitioning strategies, the partitioning results of the unit to be encoded 32a under four-part partitioning (i.e., encoded subunit 33a, un-encoded subunit 34a, un-encoded subunit 35a, and un-encoded subunit 36a), and the partitioning results of the unit to be encoded 32a under no partitioning strategy (i.e., un-encoded unit 32a), the target partitioning result of the unit to be encoded 32a is determined. If encoding parameters 2, 3, and 5 all have consistent parameter relationships with encoding parameter 1, this indicates that the texture information within the un-encoded subunits 33a, 34a, 35a, and 36a is similar, and the unit to be encoded 32a is more suitable for encoding with a larger-sized encoding unit. Therefore, if encoding parameters 2, 3, and 5 all have a consistent parameter relationship with encoding parameter 1, then server 31a can pause the partitioning of the unit to be encoded 32a and determine the final partitioning result (i.e., the target partitioning result) of the unit to be encoded 32a based on the partitioning result of the unit to be encoded 32a under the no-partitioning strategy and the partitioning result of the unit to be encoded 32a under the four-partitioning strategy.

[0050] like Figure 3 In the process, when server 31a obtains the target segmentation result of the unit to be encoded 32a, it can encode the unit to be encoded 32a according to the target segmentation result to obtain the video data bitstream, and send the video data bitstream to terminal 30a. When terminal 30a receives the video data bitstream, it can decode the video data bitstream to obtain the video data, and plan the driving route for the vehicle according to the video data, or control the autonomous driving of the vehicle according to the video data.

[0051] As can be seen, this application can accelerate the decision-making process for dividing coding units, thereby reducing coding time and computational resource consumption. Furthermore, the coding parameters of each sub-unit to be coded and the parameters of the unit to be coded are already available information during the coding process, eliminating the need for additional highly complex analysis operations, thus reducing the complexity of the video data coding process and improving the coding efficiency of video data.

[0052] Further, please see Figure 5 This is a flowchart illustrating a video data processing method provided in an embodiment of this application. The method can be performed by... Figure 1 It can be executed by the terminal in the middle, or by Figure 1 The server in the middle can be used to execute it, or it can be executed by... Figure 1 The method is executed jointly by the terminal and the server. In this application, the device used to execute the method can be collectively referred to as a computer device. For example... Figure 5 As shown, the method may include the following steps:

[0053] S101. Obtain the target recursive partitioning strategy for the unit to be encoded in the target video frame, and the encoding parameters of the unit to be encoded.

[0054] In this application, a computer device can use video frames of type P-frame or B-frame in video data as target video frames, determine uncoded units in the target video frame as units to be encoded, and obtain the encoding parameters of the units to be encoded based on texture information, pixel information, etc. in the units to be encoded. The encoding parameters of the units to be encoded may include motion information of the units to be encoded, which may include at least one of prediction mode, reference frame mode, and reference frame index. The encoding parameters of the units to be encoded may also include a coded block flag (CBF): a syntax element related to the residual encoding of the units to be encoded. When the coded block flag is 0, it means that all coefficients of the residual of the units to be encoded are 0 after transformation and quantization, and there is no need to encode the quantized coefficients, that is, there is no need to send the residual coefficients of the units to be encoded to the decoding end.

[0055] It is understood that this application can be applied to vehicle networking scenarios, gaming scenarios, live video streaming scenarios, short video scenarios, and film and television playback scenarios, etc., and this application does not limit it in this regard.

[0056] Understandably, a computer device can obtain the target recursive partitioning strategy for the unit to be encoded using either of the following two methods: Method 1: The computer device can select any one of the K candidate recursive partitioning strategies for the unit to be encoded in the target video frame as the target recursive partitioning strategy. Method 2: Determine the partitioning precision corresponding to each of the K candidate recursive partitioning strategies. The partitioning precision reflects the precision of the corresponding candidate recursive partitioning strategy in partitioning the unit to be encoded. The partitioning precision can be determined based on the number or size of the resulting sub-units to be encoded. Further, the candidate recursive partitioning strategy with the highest partitioning precision is selected from the K candidate recursive partitioning strategies, and this selected candidate partitioning strategy is determined as the target recursive partitioning strategy for the unit to be encoded in the target video frame. This avoids trying all candidate recursive partitioning strategies sequentially for the unit to be encoded, accelerating the partitioning decision process for the unit to be encoded, thereby reducing encoding time and computational resource overhead.

[0057] Understandably, determining the partitioning precision corresponding to the K candidate recursive partitioning strategies involves the following: the computer device can obtain the number of units in the sub-units to be encoded when partitioning the unit to be encoded according to candidate recursive partitioning strategy 1, the number of units in the sub-units to be encoded when partitioning the unit to be encoded according to candidate recursive partitioning strategy 2, and so on, until the number of units corresponding to each of the K candidate recursive partitioning strategies is obtained. Here, the number of units corresponding to each candidate recursive partitioning strategy is predetermined within the corresponding candidate recursive partitioning strategy. For example, a four-part partition corresponds to four units, a horizontal two-part partition and a vertical two-part partition both correspond to two units, and a vertical three-part partition and a horizontal three-part partition both correspond to three units. The computer device can determine the partitioning precision corresponding to each of the K candidate recursive partitioning strategies based on the number of units corresponding to each of the K candidate recursive partitioning strategies. There is a positive correlation between the number of units corresponding to candidate recursive partitioning strategy Pi and the partitioning precision corresponding to candidate recursive partitioning strategy Pi; i is a positive integer less than or equal to K. Since the size of the unit to be encoded is fixed, the more units corresponding to the candidate recursive partitioning strategy Pi, the smaller the size of each subunit to be encoded obtained by partitioning according to the candidate recursive partitioning strategy Pi and the same size, indicating a higher partitioning precision corresponding to the candidate recursive partitioning strategy Pi. Conversely, the fewer units corresponding to the candidate recursive partitioning strategy Pi, the larger the size of each subunit to be encoded obtained by partitioning according to the candidate recursive partitioning strategy Pi and the same size, indicating a lower partitioning precision corresponding to the candidate recursive partitioning strategy Pi. Generally, when the encoding parameters of the subunit to be encoded with the first size (i.e., the smaller size) are consistent with the encoding parameters of the unit to be encoded, the encoding parameters of the subunit to be encoded with the second size (the larger size) are also consistent with the unit to be encoded, with the first size being smaller than the second size. Similarly, generally, if the encoding parameters of the subunit to be encoded with the first size are not consistent with the encoding parameters of the unit to be encoded, the encoding parameters of the subunit to be encoded with the second size are also not consistent with the unit to be encoded. Therefore, when the encoding parameters of the subunit to be encoded under the candidate recursive partitioning strategy with the maximum partitioning precision are consistent with those of the unit to be encoded, the unit to be encoded does not need to try other candidate recursive partitioning strategies. By determining the candidate recursive partitioning strategy with the maximum partitioning precision as the target recursive partitioning strategy for the unit to be encoded, the number of partitions for the unit to be encoded is reduced, the partitioning decision process for the unit to be encoded is accelerated, thereby reducing the overhead of encoding time and computing resources.

[0058] S102. According to the recursive partitioning strategy of the target, the unit to be encoded is partitioned to obtain N first sub-units to be encoded; N is a positive integer greater than 1.

[0059] In this application, the computer device can attempt a target recursive partitioning strategy for the unit to be encoded, that is, according to the target recursive partitioning strategy, the unit to be encoded is divided into N first sub-units to be encoded; N is a positive integer greater than 1, and N is predetermined by the target recursive partitioning strategy. The size of the N sub-units to be encoded can be the same or different. This application uses the example of N sub-units to be encoded having the same size for illustration.

[0060] S103. Obtain the encoding parameters corresponding to the N first sub-units to be encoded, and determine the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters corresponding to the N first sub-units to be encoded.

[0061] In this application, a computer device can obtain encoding parameters corresponding to N first sub-units to be encoded based on texture information, pixel information, etc., respectively within the N first sub-units to be encoded. Here, the encoding parameters of the first sub-units to be encoded include the motion information of the unit to be encoded. Further, the encoding parameters corresponding to the N first sub-units to be encoded are compared with the encoding parameters of the unit to be encoded to obtain the parameter relationship between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded. This parameter relationship reflects whether there is consistency between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded. Consistency between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded can mean that the encoding parameters corresponding to the N first sub-units to be encoded are all the same as the encoding parameters of the unit to be encoded; for example, the motion information of the N first sub-units to be encoded is all the same as the motion information of the unit to be encoded. Alternatively, consistency between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded can mean that the similarity between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded is greater than a similarity threshold. This similarity can be determined by the difference between the encoding parameters, and the similarity threshold can be determined based on the application scenario of the video data, or it can be manually set. For example, the motion information of the N first sub-units to be encoded is the same as the motion information of the unit to be encoded, and the value of the encoding block flag of the unit to be encoded is less than a threshold. The threshold can be a value greater than 0 and close to 0. The encoding block flag of the unit to be encoded can refer to the encoding block flag of the unit to be encoded on at least one of the Y, U, and V components. The Y component refers to the luminance of the unit to be encoded, and the U and V components refer to the chrominance of the unit to be encoded.

[0062] Understandably, when the parameter relationship reflects consistency between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded, this parameter relationship indicates that the unit to be encoded does not meet the condition for further partitioning; when the parameter relationship reflects consistency between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded, this parameter relationship indicates that the unit to be encoded meets the condition for further partitioning. Here, the unit to be encoded meeting the condition for further partitioning means that a residual recursive partitioning strategy needs to be tried for the unit to be encoded.

[0063] Understandably, the basic idea of ​​inter-frame prediction is to utilize the temporal correlation of video data to select the most similar region (i.e., a reference block) in one or two previously encoded frames, based on pixel distribution and texture information, to predict the unit to be encoded. Then, only the location information of this similar region and the pixel difference between the unit to be encoded and the similar region need to be encoded. Generally, the smaller the pixel difference, the smaller the residual coefficient, the fewer bytes need to be transmitted, and the higher the coding efficiency, meaning the prediction effect of the unit to be encoded is better. Even if the encoder ultimately selects a less-than-ideal region for prediction, it can still generate a standard-compliant bitstream, but the coding efficiency will be compromised. Finding this most suitable region is a computationally very complex process, often achieved by pixel-by-pixel comparison, a process also known as motion search.

[0064] Therefore, if the texture and pixel information in the unit to be encoded varies significantly, the unit needs to be recursively divided multiple times. The higher the fineness of the division, the smaller the size of the resulting sub-units, making the pixel and texture information within each sub-unit similar. This facilitates searching for reference blocks in the reference video frame that are more similar (i.e., similar in texture or pixel information), thus improving the prediction performance (coding accuracy) of the unit. Conversely, if the texture and pixel information in the unit to be encoded varies little, indicating similarity, multiple recursive divisions are unnecessary. This allows for searching for more similar reference blocks in the reference frame, improving the coding efficiency of the unit.

[0065] Therefore, when the texture and pixel information in the unit to be encoded changes relatively little, a larger encoding unit is more suitable; conversely, when the texture and pixel information in the unit to be encoded changes significantly, a smaller encoding unit is more suitable. Since the encoding parameters of the unit to be encoded are determined based on its texture and pixel information, and the encoding parameters of the unit to be encoded and its sub-units are also determined based on the texture and pixel information of the sub-units, the encoding parameters of the unit to be encoded can reflect its pixel and texture information to a certain extent, and the encoding parameters of the sub-units can reflect their pixel and texture information to a certain extent. Therefore, the parameter relationship between the encoding parameters of the sub-units can be used to detect whether the unit to be encoded meets the conditions for further partitioning.

[0066] Understandably, there's a pattern in block partitioning: image regions with good prediction results tend to be encoded using larger units. "Good prediction results" here means the residual coefficients within the image region are close to zero. Using smaller units offers limited improvement to the accuracy of the residual values ​​after decoding and reconstruction. Furthermore, using larger units avoids the bit consumption of encoding more partitioning and prediction mode information. Since the motion search results (i.e., the motion information of the units to be encoded and the motion information of the sub-units to be encoded) are obtained through very precise calculations, they can reflect the prediction results to a certain extent. This provides feasibility for making rapid partitioning decisions for the units to be encoded based on the motion information from the motion search.

[0067] Understandably, when the translational motion search result (i.e., motion information) of the unit to be encoded can accurately reflect the translational motion trajectory of the image patch it covers, the prediction effect of the unit to be encoded is often good enough, and the residual is also small enough. Therefore, when the translational motion search result of the unit to be encoded can already reflect the real-time motion trajectory of the image patch it covers, the further division of the unit to be encoded should be stopped early. How to determine whether the translational motion search result of the unit to be encoded can reflect the real-time motion trajectory of the image patch it covers? Generally, if the translational motion search result of the unit to be encoded is indeed the actual motion trajectory of the image patch it covers, then the translational motion search results of each first sub-unit to be encoded should be the same as the translational motion search result of the unit to be encoded. The image patch covered by the unit to be encoded refers to the image region of the unit to be encoded in the target video frame.

[0068] Specifically, when the encoding parameters of the first sub-unit to be encoded include the motion information of the first sub-unit to be encoded, the encoding parameters of the unit to be encoded include the motion information of the unit to be encoded and the encoding block flag; the above-mentioned determination of the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters corresponding to the N first sub-units to be encoded respectively includes: if the value of the encoding block flag is less than a threshold, it indicates that the residual coefficient of the unit to be encoded is closer to 0, then verify the consistency between the motion information of the N first sub-units to be encoded and the motion information of the unit to be encoded; if the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded, it indicates that the motion information of the unit to be encoded can reflect the motion information of the sub-units to be encoded it covers, and it is determined that the unit to be encoded is more suitable for encoding with a large-size encoding unit, then generate a parameter relationship to indicate that the unit to be encoded does not meet the conditions for further partitioning. By pausing the further division of the unit to be encoded when the value of the encoding block flag of the unit to be encoded is less than the threshold and the motion information of the unit to be encoded is consistent with the motion information of each first sub-unit to be encoded, the division of the unit to be encoded is accelerated while ensuring the encoding accuracy of the unit to be encoded, thereby reducing the encoding time and computing resource overhead.

[0069] For example, assuming the target recursive partitioning strategy is four-part partitioning, and the number of first-to-be-coded subunits is four, when the prediction mode of the subunit to be encoded is inter-shift prediction mode, and the value of the coding block flag of the Y component of the subunit to be encoded is 0, if the prediction modes of all four first-to-be-coded subunits are inter-shift prediction mode, it is determined that the coding parameters of the subunit to be encoded are consistent with the coding parameters of the four subunits to be encoded. The subunit to be encoded will no longer try other recursive partitioning methods, and the four first-to-be-coded subunits will no longer be partitioned. The restriction that the value of the coding block flag on the Y component of the subunit to be encoded is 0 is to mitigate the loss of coding efficiency caused by misjudgments. That is, when the value of the coding block flag on the Y component of the subunit to be encoded is 0, the probability that the prediction effect of the subunit to be encoded is good enough is further increased.

[0070] It is understood that the motion information of the unit to be encoded and the motion information of the first sub-unit to be encoded include at least one of prediction mode, reference frame mode, and reference frame index; the consistency between the motion information of the N first sub-units to be encoded and the motion information of the unit to be encoded can mean that at least one parameter in the motion information of the unit to be encoded is the same as the corresponding parameter in the motion information of the N first sub-units to be encoded. For example, if the prediction mode of the N first sub-units to be encoded and the prediction mode of the unit to be encoded are both translation inter-frame prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded. Or, if the reference frame mode of the N first sub-units to be encoded is the same as the reference frame mode of the unit to be encoded, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded. Or, if the reference frame index of the N first sub-units to be encoded is the same as the reference frame index of the unit to be encoded, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded.

[0071] For example, if the prediction modes of the N first sub-units to be encoded and the prediction mode of the unit to be encoded are both translational inter-frame prediction modes, and the reference frame modes of the N first sub-units to be encoded are all the same as the reference frame mode of the unit to be encoded, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded. Alternatively, if the prediction modes of the N first sub-units to be encoded and the prediction mode of the unit to be encoded are both translational inter-frame prediction modes, and the reference frame indices of the N first sub-units to be encoded are all the same as the reference frame index of the unit to be encoded, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded. If the reference frame modes of the N first sub-units to be encoded are all the same as the reference frame mode of the unit to be encoded, and the reference frame indices of the N first sub-units to be encoded are all the same as the reference frame index of the unit to be encoded, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded. By using the consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the subunit to be encoded as a condition for pausing the partitioning of the unit to be encoded, the partitioning decision process of the unit to be encoded can be accelerated, thereby reducing encoding time and computational resource overhead. At the same time, the encoding parameters of the first subunit to be encoded and the parameters of the unit to be encoded are information already present in the encoding process, eliminating the need to introduce additional highly complex analysis operations, reducing the complexity of the video data encoding process, and improving the encoding efficiency of video data.

[0072] For example, if the prediction modes of the N first sub-units to be encoded and the prediction mode of the unit to be encoded are both translational inter-frame prediction modes, and the reference frame modes of the N first sub-units to be encoded are all the same as the reference frame mode of the unit to be encoded, and the reference frame indices of the N first sub-units to be encoded are all the same as the reference frame index of the unit to be encoded, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded. By determining whether the motion information of the N sub-units to be encoded is consistent with the motion information of the unit to be encoded from multiple dimensions, the accuracy of determining the pause division of the unit to be encoded is improved.

[0073] It is understood that the above determination that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded includes: if the reference frame modes of the N first sub-units to be encoded are both forward prediction modes, then the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or, if the reference frame modes of the N first sub-units to be encoded are both backward prediction modes, then the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or, if the reference frame modes of the N first sub-units to be encoded are both backward prediction modes, then the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or, if the reference frame modes of the N first sub-units to be encoded are both bidirectional prediction modes, then the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded.

[0074] S104. If the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, then the partitioning of the unit to be encoded is paused, and the target partitioning result of the unit to be encoded is determined based on the first sub-unit to be encoded and the unit to be encoded.

[0075] In this application, if the parameter relationship reflects consistency between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded, it indicates that the pixel and texture information of each first sub-unit to be encoded is similar, meaning the variation in pixel and texture information within the unit to be encoded is relatively small, and the unit to be encoded is more suitable for encoding based on a large-size encoding unit. Therefore, if the parameter relationship reflects consistency between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded, it is determined that the unit to be encoded does not meet the conditions for further partitioning, and the target partitioning result of the unit to be encoded is determined based on the first sub-unit to be encoded and the unit to be encoded. If the parameter relationship reflects inconsistency between the encoding parameters corresponding to the N first sub-units to be encoded and the encoding parameters of the unit to be encoded, it indicates that the texture and pixel information of each sub-unit to be encoded is not similar, meaning the variation in pixel and texture information within the unit to be encoded is relatively large, and the unit to be encoded is more suitable for encoding based on a small-size encoding unit. Therefore, if the parameter relationship reflects that the encoding parameters corresponding to the N first sub-units to be encoded are not consistent with the encoding parameters of the unit to be encoded, then a residual recursive partitioning strategy can be tried for the unit to be encoded. The residual recursive partitioning strategy can refer to the candidate recursive partitioning strategies other than the target recursive partitioning strategy among the K candidate recursive partitioning strategies.

[0076] In this application, during the encoding of the unit to be encoded in the target video frame, a target recursive partitioning strategy is first attempted. This involves partitioning the unit to be encoded according to the target recursive partitioning strategy to obtain N first sub-units to be encoded. The parameter relationship between the encoding parameters of the N first sub-units to be encoded and the encoding parameters of the unit to be encoded is then determined. Here, the target recursive partitioning strategy can refer to any of the K candidate recursive partitioning strategies for the unit to be encoded, or it can refer to the candidate recursive partitioning strategy with the highest partitioning precision among the K candidate recursive partitioning strategies. The parameter relationship is used to reflect whether there is consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded. When the parameter relationship reflects consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded, it indicates that the texture information of each sub-unit to be encoded is similar, and the unit to be encoded is more suitable for encoding with a larger-sized encoding unit. In this case, it is determined that the unit to be encoded does not meet the conditions for further partitioning. Therefore, the parameter relationship can indicate whether the unit to be encoded meets the conditions for further partitioning. When the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, the partitioning of the unit to be encoded is paused. This means that there is no need to partition the first sub-unit to be encoded, nor is it necessary to try other recursive partitioning strategies. It can stop trying other recursive partitioning strategies in advance and can directly determine the final partitioning result (i.e., the target partitioning result) of the unit to be encoded based on the partitioning result of the target recursive partitioning strategy (i.e., the first sub-unit to be encoded) and the unit to be encoded. This accelerates the partitioning decision process of the encoder, thereby reducing encoding time and computational resource overhead. Simultaneously, the encoding parameters of the first sub-unit to be encoded and the parameters of the unit to be encoded are already available information during the encoding process, eliminating the need for additional highly complex analysis operations, reducing the complexity of the video data encoding process, and improving the encoding efficiency of video data.

[0077] Further, please see Figure 6 This is a flowchart illustrating a video data processing method provided in an embodiment of this application. The method can be performed by... Figure 1 It can be executed by the terminal in the middle, or by Figure 1 The server in the middle can be used to execute it, or it can be executed by... Figure 1 The method is executed jointly by the terminal and the server. In this application, the device used to execute the method can be collectively referred to as a computer device. For example... Figure 6 As shown, the method may include the following steps:

[0078] S201. Obtain the target recursive partitioning strategy for the unit to be encoded in the target video frame, and the encoding parameters of the unit to be encoded.

[0079] S202. According to the recursive partitioning strategy of the target, the unit to be encoded is partitioned to obtain N first sub-units to be encoded; N is a positive integer greater than 1.

[0080] S203. Obtain the encoding parameters corresponding to the N first sub-units to be encoded, and determine the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters corresponding to the N first sub-units to be encoded.

[0081] It is understood that the explanation of step S201 in the embodiments of this application can be found above. Figure 5 For an explanation of step S10, and for an explanation of step S201, please refer to the above. Figure 5 For an explanation of step S10, and for an explanation of step S201, please refer to the above. Figure 5 The explanation of step S10 will not be repeated here.

[0082] S204. If the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, then the partitioning of the unit to be encoded is paused, and the first rate distortion cost of the unit to be encoded when partitioning is performed using the no-partitioning strategy is determined based on the unit to be encoded.

[0083] S205. Based on N of the first sub-units to be encoded, determine the second rate-distortion cost of the sub-units to be encoded when using the target recursive partitioning strategy for partitioning.

[0084] S206. If the first rate distortion cost is less than the second rate distortion cost, then the target partitioning result of the unit to be encoded is determined.

[0085] S207. If the first rate distortion cost is greater than or equal to the second rate distortion cost, then N of the first sub-units to be encoded are determined as the target partitioning result of the unit to be encoded.

[0086] In steps S204-S207, if the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, the partitioning of the unit to be encoded is paused, that is, other recursive partitioning strategies are paused for the unit to be encoded, and the partitioning of the first sub-unit to be encoded is also paused. At this time, the computer device can determine the optimal partitioning strategy for the unit to be encoded from the no-partitioning strategy and the target recursive partitioning strategy, and determine the partitioning result corresponding to the optimal partitioning strategy as the target partitioning result for the unit to be encoded. Specifically, the computer device can take the unit to be encoded as the partitioning result of the unit to be encoded under the no-partitioning strategy, and determine the first rate-distortion cost of the unit to be encoded when partitioning it using the no-partitioning strategy. The first rate-distortion cost can refer to the first resource overhead required to transmit the encoded data corresponding to the unit to be encoded to the decoding end when the no-partitioning strategy is used as the partitioning strategy for the unit to be encoded. The larger the first rate-distortion cost, the larger the first resource overhead; conversely, the smaller the first rate-distortion cost, the smaller the first resource overhead.

[0087] Furthermore, N of the first sub-units to be encoded are determined as the partitioning result of the unit to be encoded under the target recursive partitioning strategy. The computer device can determine the second rate-distortion cost of the unit to be encoded when partitioning it using the target recursive partitioning strategy, based on these N sub-units. The first rate-distortion cost can refer to the second resource overhead required to transmit the encoded data corresponding to the unit to be encoded to the decoding end when using the target recursive partitioning strategy as the partitioning strategy for the unit to be encoded. The larger the second rate-distortion cost, the larger the second resource overhead; conversely, the smaller the second rate-distortion cost, the smaller the second resource overhead. Therefore, if the first rate-distortion cost is less than the second rate-distortion cost, it indicates that the first resource overhead is less than the second resource overhead, meaning that the unit to be encoded is more suitable for partitioning using the no-partitioning strategy. The computer device can then determine the no-partitioning strategy as the optimal partitioning strategy for the unit to be encoded and determine the target partitioning result for that unit. If the first rate-distortion cost is greater than or equal to the second rate-distortion cost, it indicates that the first resource overhead is greater than or equal to the second resource overhead. This means the unit to be encoded is more suitable for partitioning using a target recursive partitioning strategy. The computer device can determine the target recursive partitioning strategy as the optimal partitioning strategy for the unit to be encoded, and determine N of these first sub-units to be encoded as the target partitioning result for the unit to be encoded. When the unit to be encoded does not meet the conditions for continued partitioning, by applying the rate-distortion costs based on the no-partitioning strategy and the target recursive partitioning strategy respectively, it is beneficial to improve the partitioning accuracy of the unit to be encoded, thereby improving the encoding accuracy of the unit to be encoded.

[0088] Understandably, if the value of the coding block flag of the unit to be encoded is greater than or equal to the threshold, or if there is inconsistency between the motion information of the first sub-unit to be encoded and the motion information of the unit to be encoded among the N first sub-units to be encoded, it indicates that the unit to be encoded is suitable for other recursive partitioning methods, or that the unit to be encoded is suitable for encoding with a smaller coding unit. Therefore, the computer device can partition the unit to be encoded according to the residual recursive partitioning strategy to obtain M second sub-units to be encoded; the residual recursive partitioning strategy is the candidate recursive partitioning strategy other than the target recursive partitioning strategy among the K candidate recursive partitioning strategies for the unit to be encoded, where M and K are both positive integers greater than 1. Further, based on the N first sub-units to be encoded (i.e., the partitioning result of the target recursive partitioning strategy), the M second sub-units to be encoded (i.e., the partitioning result of the residual recursive partitioning strategy), and the unit to be encoded (i.e., the partitioning result of the no-partitioning strategy), the target partitioning result of the unit to be encoded is determined.

[0089] Understandably, the above-mentioned determination of the target partitioning result of the unit to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded includes: the computer device can determine the optimal partitioning strategy for the unit to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded. The optimal partitioning strategy refers to the partitioning strategy with the lowest rate-distortion cost. If the optimal partitioning strategy for the unit to be encoded is no partitioning strategy, then the partitioning of the first sub-unit to be encoded is paused, and the unit to be encoded is determined as the target partitioning result for the unit to be encoded. If the optimal partitioning strategy for the unit to be encoded is the target recursive partitioning strategy, then the unit to be encoded is determined to meet the conditions for continued partitioning, and the N first sub-units to be encoded are partitioned according to the target recursive partitioning strategy to obtain L third sub-units to be encoded for the unit to be encoded. The target partitioning result for the unit to be encoded is determined based on the L third sub-units to be encoded; L is a positive integer greater than 1. In other words, if the optimal partitioning strategy for the unit to be encoded is the target recursive partitioning strategy, then the N first sub-units to be encoded are each taken as units to be encoded, and the units to be encoded are further partitioned according to the target recursive partitioning strategy. Steps S203 to S207 in this application are repeated to obtain the target partitioning result for the unit to be encoded. If the optimal partitioning strategy for the unit to be encoded is the residual recursive partitioning strategy, then the unit to be encoded is determined to meet the conditions for continued partitioning. The M second sub-units to be encoded are partitioned according to the target recursive partitioning strategy to obtain S fourth sub-units to be encoded. The target partitioning result for the unit to be encoded is determined based on the S fourth sub-units to be encoded. In other words, if the optimal partitioning strategy for the unit to be encoded is the residual recursive partitioning strategy, the M second sub-units to be encoded are each taken as units to be encoded, and the units to be encoded are further partitioned according to the target recursive partitioning strategy. Steps S203 to S207 in this application are repeated to obtain the target partitioning result for the unit to be encoded. When the value of the coding block flag of the unit to be encoded is greater than or equal to the threshold, or when there is no consistency between the motion information of the first sub-unit to be encoded and the motion information of the unit to be encoded among the N first sub-units to be encoded, and the optimal partitioning strategy of the unit to be encoded is the target recursive partitioning strategy or the residual recursive partitioning strategy, it is beneficial to improve the coding accuracy of the unit to be encoded by continuing to partition the unit to be encoded with finer granularity.

[0090] For example, such as Figure 7As shown, taking the above-mentioned recursive partitioning strategy of four partitions as an example, the target video frame 70 includes four units to be encoded, namely unit 71a, unit 72a, unit 73a, and unit 74a. The computer device can obtain the encoding parameters corresponding to unit 71a, unit 72a, unit 73a, and unit 74a respectively. According to the four partitions, unit 71a is partitioned to obtain four sub-units to be encoded. The encoding parameters of the four sub-units to be encoded are obtained respectively, and the parameter relationship between the encoding parameters of unit 71a and the encoding parameters of the four sub-units to be encoded is determined. If the parameter relationship indicates that the encoding parameters of the unit to be encoded 71a are consistent with the encoding parameters of the four sub-units to be encoded of the unit to be encoded 71a, it means that the changes in pixel information and texture information within the unit to be encoded 71a are relatively small and the complexity is relatively low. Therefore, the unit to be encoded 71a is more suitable for encoding with a large-size encoding unit. In this case, the unit to be encoded 71a does not meet the conditions for further partitioning, and the partitioning of the unit to be encoded 71a is paused. The optimal partitioning strategy for the unit to be encoded 71a is selected from the four-part partitioning and no-partitioning strategies. If the optimal partitioning strategy for the unit to be encoded 71a is no-partitioning, then the unit to be encoded 71a is taken as the final partitioning result. Further, the unit to be encoded 72a is partitioned according to the four-part partitioning method, resulting in four sub-units to be encoded: sub-units 721b, 722b, 723b, and 724b. The encoding parameters of the four sub-units to be encoded of the unit 72a are obtained respectively. The encoding parameters of the four sub-units to be encoded of the unit 72a are compared with the encoding parameters of the unit 72a to determine the parameter relationship between the encoding parameters of the unit 72a and the encoding parameters of the four sub-units to be encoded of the unit 72a. If the parameter relationship indicates that the encoding parameters of the unit to be encoded 72a are consistent with the encoding parameters of the four sub-units to be encoded of the unit to be encoded 72a, it means that the changes in pixel information and texture information in the unit to be encoded 72a are relatively small and the complexity is relatively low. The unit to be encoded 72a is more suitable for encoding with a large-size encoding unit. Then it is determined that the unit to be encoded 72a does not meet the conditions for further division. The division of the unit to be encoded 72a is paused. The optimal division strategy of the unit to be encoded 72a is selected from the four-part division strategy and the no-partition strategy. If the optimal division strategy of the unit to be encoded 72a is the four-part division strategy, then the sub-units to be encoded 721b, 722b, 723b and 724b are taken as the final division result of the unit to be encoded 72a.Following the method described above, sequentially traverse the units to be encoded 73a and 74a. If neither unit 73a nor 74a meets the conditions for further partitioning, and the optimal partitioning strategy for both units 73a and 74a is no partitioning, then unit 73a and 74a can be determined as the final partitioning result. Therefore, the final partitioning form of the target video frame 70 can be as follows. Figure 7 As shown.

[0091] For example, such as Figure 8As shown, taking the above-mentioned recursive partitioning strategy of horizontal binary partitioning as an example, the target video frame 80 includes two units to be encoded, namely unit 81a and unit 82a. The computer device can obtain the encoding parameters corresponding to unit 81a and unit 82a respectively. According to the horizontal binary partitioning, unit 81a is divided into two sub-units to be encoded. The encoding parameters of the two sub-units to be encoded are obtained respectively. The encoding parameters of unit 81a are compared with the encoding parameters of the two sub-units to be encoded to determine the parameter relationship between the encoding parameters of unit 81a and the encoding parameters of the two sub-units to be encoded. If the parameter relationship indicates that the encoding parameters of the unit to be encoded 81a are consistent with the encoding parameters of the two sub-units to be encoded of the unit to be encoded 81a, it means that the changes in pixel information and texture information in the unit to be encoded 81a are relatively small and the complexity is relatively low. The unit to be encoded 81a is more suitable for encoding with a large-size encoding unit. Then it is determined that the unit to be encoded 81a does not meet the conditions for further division. The division of the unit to be encoded 81a is paused. The optimal division strategy of the unit to be encoded 81a is selected from the horizontal two-partition and no-partition strategies. If the optimal division strategy of the unit to be encoded 81a is no-partition strategy, then the unit to be encoded 81a is taken as the final division result of the unit to be encoded 81a. Furthermore, according to the horizontal two-part partitioning, the unit to be encoded 82a is divided into two sub-units to be encoded. The encoding parameters of the two sub-units to be encoded are obtained for each sub-unit. The encoding parameters of the two sub-units to be encoded are compared with the encoding parameters of the unit to be encoded to determine the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters of the two sub-units to be encoded. If the parameter relationship indicates that the encoding parameters of the unit to be encoded and the encoding parameters of the two sub-units to be encoded are not consistent, four-part partitioning, vertical two-part partitioning, vertical three-part partitioning, and horizontal three-part partitioning are tried for the unit to be encoded in turn. The partitioning results of the unit to be encoded 82a under four-part partitioning, vertical two-part partitioning, vertical three-part partitioning, and horizontal three-part partitioning are obtained respectively. Based on these partitioning results, the unit to be encoded 82a, and the partitioning results of horizontal two-part partitioning, the optimal partitioning result of the unit to be encoded 82a is determined from four-part partitioning, vertical two-part partitioning, vertical three-part partitioning, horizontal three-part partitioning, no partitioning strategy, and horizontal two-part partitioning. If the optimal partitioning result of the unit to be encoded 82a is a four-part partitioning, and the four sub-units to be encoded obtained by the four-part partitioning are sub-units to be encoded 822b, sub-units to be encoded 823b, sub-units to be encoded 824b and sub-units to be encoded 825b respectively.Repeat the above steps, that is, try the above level two partitioning for sub-units 822b, 823b, 824b and 825b respectively. If sub-units 822b, 823b, 824b and 825b do not meet the conditions for further partitioning, and the optimal partitioning strategy for sub-units 822b, 823b, 824b and 825b is the no-partitioning strategy, then the final partitioning form of the target video frame 80 can be as follows. Figure 8 As shown.

[0092] Understandably, determining the optimal partitioning strategy for the unit to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded includes: the computer device determining the first rate-distortion cost of the unit to be encoded when partitioning it using no partitioning strategy; determining the second rate-distortion cost of the unit to be encoded when partitioning it using the target recursive partitioning strategy based on the N first sub-units to be encoded; and determining the third rate-distortion cost of the unit to be encoded when partitioning it using the remaining recursive partitioning strategy based on the M second sub-units to be encoded. Here, the third rate-distortion cost refers to the third resource overhead required to transmit the encoded data corresponding to the unit to be encoded to the decoding end when using the remaining recursive partitioning strategy as the partitioning strategy for the unit to be encoded. The larger the third rate-distortion cost, the larger the third resource overhead; conversely, the smaller the third rate-distortion cost, the smaller the third resource overhead. If the lowest rate-distortion cost among the first, second, and third rate-distortion costs is the first rate-distortion cost, it indicates that the first resource cost is the lowest among the first, second, and third resource costs. Therefore, the no-partition strategy is used to determine the optimal partitioning strategy for the unit to be encoded. If the lowest rate-distortion cost among the first, second, and third rate-distortion costs is the second rate-distortion cost, it indicates that the second resource cost is the lowest among the first, second, and third resource costs. Therefore, the target recursive partitioning strategy is used to determine the optimal partitioning strategy for the unit to be encoded. If the lowest rate-distortion cost among the first, second, and third rate-distortion costs is the third rate-distortion cost, it indicates that the third resource cost is the lowest among the first, second, and third resource costs. Therefore, the remaining recursive partitioning strategy is used to determine the optimal partitioning strategy for the unit to be encoded.

[0093] In this application, during the encoding of the unit to be encoded in the target video frame, a target recursive partitioning strategy is first attempted. This involves partitioning the unit to be encoded according to the target recursive partitioning strategy to obtain N first sub-units to be encoded. The parameter relationship between the encoding parameters of the N first sub-units to be encoded and the encoding parameters of the unit to be encoded is then determined. Here, the target recursive partitioning strategy can refer to any of the K candidate recursive partitioning strategies for the unit to be encoded, or it can refer to the candidate recursive partitioning strategy with the highest partitioning precision among the K candidate recursive partitioning strategies. The parameter relationship is used to reflect whether there is consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded. When the parameter relationship reflects consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded, it indicates that the texture information of each sub-unit to be encoded is similar, and the unit to be encoded is more suitable for encoding with a larger-sized encoding unit. In this case, it is determined that the unit to be encoded does not meet the conditions for further partitioning. Therefore, the parameter relationship can indicate whether the unit to be encoded meets the conditions for further partitioning.

[0094] Furthermore, when the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, the partitioning of the unit to be encoded is paused. That is, there is no need to partition the first sub-unit to be encoded, nor is there a need to try other recursive partitioning strategies. This early cessation of trying other recursive partitioning strategies accelerates the encoder's partitioning decision process, thereby reducing encoding time and computational resource overhead. Simultaneously, the encoding parameters of the first sub-unit to be encoded and the parameters of the unit to be encoded are already available information during the encoding process, eliminating the need for additional highly complex analysis operations, reducing the complexity of the video data encoding process, and improving the encoding efficiency of the video data. Additionally, if the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, the partitioning of the unit to be encoded is paused. Based on the rate-distortion costs corresponding to the no-partitioning strategy and the target recursive partitioning strategy, the optimal partitioning strategy for the unit to be encoded is determined. The final partitioning result of the unit to be encoded is determined based on the optimal partitioning strategy, which helps improve the partitioning accuracy of the unit to be encoded, thereby improving the encoding accuracy of the unit to be encoded.

[0095] Please see Figure 9 This is a schematic diagram of the structure of a video data processing apparatus provided in an embodiment of this application. The aforementioned video data processing apparatus can be a computer program (including program code) running on a computer device; for example, the video data processing apparatus is an application software. This apparatus can be used to execute the corresponding steps in the method provided in the embodiments of this application. Figure 9 As shown, the video data processing device may include: an acquisition module 911, a division module 912, a determination module 913, and a pause module 914.

[0096] The acquisition unit 911 is used to acquire the target recursive partitioning strategy for the unit to be encoded in the target video frame, and the encoding parameters of the unit to be encoded.

[0097] The partitioning unit 912 is used to partition the unit to be encoded according to the target recursive partitioning strategy to obtain N first sub-units to be encoded; N is a positive integer greater than 1.

[0098] The determining unit 913 is used to obtain the encoding parameters corresponding to the N first sub-units to be encoded, and to determine the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters corresponding to the N first sub-units to be encoded.

[0099] The pause module 914 is used to pause the re-division of the unit to be encoded if the parameter relationship indicates that the unit to be encoded does not meet the conditions for continuing to divide. Based on the N first sub-units to be encoded and the unit to be encoded, the target division result of the unit to be encoded is determined.

[0100] It is understood that the encoding parameters of the first subunit to be encoded include the motion information of the first subunit to be encoded, and the encoding parameters of the unit to be encoded include the motion information of the unit to be encoded and the encoding block flag; the determination module 913 includes a verification unit 91a and a first determination unit 92a;

[0101] Verification unit 91a is used to verify the consistency between the motion information of the N first sub-units to be encoded and the motion information of the unit to be encoded if the value of the encoding block flag is less than the threshold.

[0102] The first determining unit 92a is used to generate a parameter relationship to indicate that the unit to be encoded does not meet the conditions for further division if the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded.

[0103] It is understood that the motion information of the unit to be encoded and the motion information of the first sub-unit to be encoded include at least one of the prediction mode, reference frame mode, and reference frame index;

[0104] If the value of the coded block flag is less than a threshold, the verification unit 91a verifies the consistency between the motion information of the N first sub-units to be encoded and the motion information of the unit to be encoded, including:

[0105] If the prediction modes of the N first sub-units to be encoded and the prediction mode of the unit to be encoded are both translational inter-frame prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded, and a parameter relationship is generated to indicate that the unit to be encoded does not meet the conditions for further partitioning; or,

[0106] If the reference frame patterns of all N first sub-units to be encoded are the same as the reference frame pattern of the unit to be encoded, then it is determined that the motion information of all N first sub-units to be encoded is consistent with the motion information of the unit to be encoded, and a parameter relationship is generated to indicate that the unit to be encoded does not meet the conditions for further partitioning; or,

[0107] If the reference frame indices of the N first sub-units to be encoded are all the same as the reference frame index of the unit to be encoded, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded, and a parameter relationship is generated to indicate that the unit to be encoded does not meet the conditions for further division.

[0108] Understandably, if the reference frame patterns of the N first sub-units to be encoded are all the same as the reference frame pattern of the unit to be encoded, then the verification unit 91a determines that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded, including:

[0109] If the reference frame modes of the N first sub-units to be encoded and the reference frame mode of the unit to be encoded are both forward prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or,

[0110] If the reference frame modes of the N first sub-units to be encoded and the reference frame mode of the unit to be encoded are both backward prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or,

[0111] If the reference frame modes of the N first sub-units to be encoded and the reference frame mode of the unit to be encoded are both bidirectional prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded.

[0112] Understandably, the partitioning module 912 is also used to partition the unit to be encoded according to the residual recursive partitioning strategy if the value of the encoding block flag is greater than or equal to a threshold, or if the motion information of the first subunit to be encoded among the N first subunits to be encoded is inconsistent with the motion information of the unit to be encoded, thereby obtaining M second subunits to be encoded of the unit to be encoded; the residual recursive partitioning strategy is the candidate recursive partitioning strategy other than the target recursive partitioning strategy among the K candidate recursive partitioning strategies of the unit to be encoded, where M and K are both positive integers greater than 1;

[0113] Understandably, the determining module 913 is also used to determine the target partitioning result of the unit to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded.

[0114] Understandably, the determining module 913 determines the target partitioning result of the unit to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded, including:

[0115] Based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded, determine the optimal partitioning strategy for the unit to be encoded;

[0116] If the optimal partitioning strategy for the unit to be encoded is no partitioning strategy, then the unit to be encoded is determined as the target partitioning result of the unit to be encoded.

[0117] If the optimal partitioning strategy of the unit to be encoded is the target recursive partitioning strategy, then it is determined that the unit to be encoded satisfies the condition for continued partitioning. The N first sub-units to be encoded are partitioned according to the target recursive partitioning strategy to obtain L third sub-units to be encoded of the unit to be encoded. The target partitioning result of the unit to be encoded is determined based on the L third sub-units to be encoded; L is a positive integer greater than 1.

[0118] If the optimal partitioning strategy for the unit to be encoded is the remaining recursive partitioning strategy, then the unit to be encoded is determined to meet the conditions for continued partitioning. The M second sub-units to be encoded are partitioned according to the target recursive partitioning strategy to obtain S fourth sub-units to be encoded of the unit to be encoded. The target partitioning result of the unit to be encoded is determined based on the S fourth sub-units to be encoded.

[0119] Understandably, the determining module 913 determines the optimal partitioning strategy for the unit to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded, including:

[0120] Based on the unit to be encoded, determine the first rate-distortion cost of the unit to be encoded when using a no-partitioning strategy for partitioning;

[0121] Based on N first sub-units to be encoded, determine the second rate-distortion cost of the sub-units to be encoded when using the target recursive partitioning strategy for partitioning.

[0122] Based on the M second sub-units to be encoded, determine the third rate-distortion cost of the sub-units to be encoded when using the remaining recursive partitioning strategy for partitioning.

[0123] If the lowest rate distortion cost among the first rate distortion cost, the second rate distortion cost, and the third rate distortion cost is the first rate distortion cost, then the no-partition strategy is used to determine the optimal partitioning strategy for the unit to be encoded.

[0124] If the lowest rate distortion cost among the first rate distortion cost, the second rate distortion cost, and the third rate distortion cost is the second rate distortion cost, then the target recursive partitioning strategy is used to determine the optimal partitioning strategy for the unit to be encoded.

[0125] If the lowest rate-distortion cost among the first rate-distortion cost, the second rate-distortion cost, and the third rate-distortion cost is the third rate-distortion cost, then the remaining recursive partitioning strategy is used to determine the optimal partitioning strategy for the unit to be encoded.

[0126] Understandably, the pause module 914 determines the target partitioning result of the unit to be encoded based on N first sub-units to be encoded and the unit to be encoded, including:

[0127] Based on the unit to be encoded, determine the first rate-distortion cost of the unit to be encoded when using a no-partitioning strategy for partitioning;

[0128] Based on N first sub-units to be encoded, determine the second rate-distortion cost of the sub-units to be encoded when using the target recursive partitioning strategy for partitioning.

[0129] If the first rate-distortion cost is less than the second rate-distortion cost, then the target partitioning result of the unit to be encoded is determined.

[0130] If the first rate-distortion cost is greater than or equal to the second rate-distortion cost, then N of the first sub-units to be encoded are determined as the target partitioning result of the unit to be encoded.

[0131] Understandably, the acquisition module 911 includes an acquisition unit 93b, a second determination unit 94b, and a filtering unit 95b;

[0132] Acquisition unit 93b is used to acquire K candidate recursive partitioning strategies for the unit to be encoded in the target video frame;

[0133] The second determining unit 94b is used to determine the partitioning precision corresponding to the K candidate recursive partitioning strategies respectively; K is a positive integer greater than 1;

[0134] The filtering unit 95b is used to filter out the candidate recursive partitioning strategy with the maximum partitioning precision from the K candidate recursive partitioning strategies.

[0135] The second determining unit 94b is used to determine the selected candidate recursive partitioning strategy as the target recursive partitioning strategy for the unit to be encoded in the target video frame.

[0136] Understandably, the second determining unit 94b determines the partitioning precision corresponding to the K candidate recursive partitioning strategies, including:

[0137] Obtain the number of units corresponding to the subunits to be encoded when the unit to be encoded is divided according to the K candidate recursive partitioning strategies respectively;

[0138] Based on the number of units corresponding to the K candidate recursive partitioning strategies, the partitioning precision corresponding to each of the K candidate recursive partitioning strategies is determined; there is a positive correlation between the number of units corresponding to the candidate recursive partitioning strategy Pi and the partitioning precision corresponding to the candidate recursive partitioning strategy Pi; i is a positive integer less than or equal to K.

[0139] According to one embodiment of this application, the steps involved in the video data processing method described above can be performed by... Figure 9 The video data processing device shown is executed by various modules within it. For example, Figure 5 Step S101 shown can be performed by Figure 9 The acquisition module 911 in the middle is used to execute, Figure 5 Step S102 shown can be performed by Figure 9 The partitioning module 912 in the middle is used for execution; Figure 5 Step S103 shown can be performed by Figure 9 The determination module 913 in the middle is used for execution; Figure 5 Step S104 shown can be derived from Figure 9 The pause module 914 in the middle is used to execute.

[0140] According to one embodiment of this application, Figure 9The various modules in the video data processing apparatus shown can be individually or entirely combined into one or more units, or some of these units can be further divided into at least two functionally smaller sub-units to achieve the same operation without affecting the technical effects of the embodiments of this application. The above modules are based on logical functional division. In practical applications, the function of one module can also be implemented by at least two units, or the function of at least two modules can be implemented by one unit. In other embodiments of this application, the data processing apparatus may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by at least two units.

[0141] According to one embodiment of this application, a computer program (including program code) capable of performing the steps involved in the corresponding methods described above can be executed on a general-purpose computer device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), to construct a system as described above. Figure 9 The video data processing apparatus shown herein, and the video data processing method for implementing the embodiments of this application, are described. The computer program described above may be recorded on, for example, a computer-readable recording medium, loaded onto the aforementioned computing device via the computer-readable recording medium, and run therein.

[0142] In this application, during the encoding of the unit to be encoded in the target video frame, a target recursive partitioning strategy is first attempted. This involves partitioning the unit to be encoded according to the target recursive partitioning strategy to obtain N first sub-units to be encoded. The parameter relationship between the encoding parameters of the N first sub-units to be encoded and the encoding parameters of the unit to be encoded is then determined. Here, the target recursive partitioning strategy can refer to any of the K candidate recursive partitioning strategies for the unit to be encoded, or it can refer to the candidate recursive partitioning strategy with the highest partitioning precision among the K candidate recursive partitioning strategies. The parameter relationship is used to reflect whether there is consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded. When the parameter relationship reflects consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded, it indicates that the texture information of each sub-unit to be encoded is similar, and the unit to be encoded is more suitable for encoding with a larger-sized encoding unit. In this case, it is determined that the unit to be encoded does not meet the conditions for further partitioning. Therefore, the parameter relationship can indicate whether the unit to be encoded meets the conditions for further partitioning. When the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, the partitioning of the unit to be encoded is paused. This means that there is no need to partition the first sub-unit to be encoded, nor is it necessary to try other recursive partitioning strategies. It can stop trying other recursive partitioning strategies in advance and can directly determine the final partitioning result (i.e., the target partitioning result) of the unit to be encoded based on the partitioning result of the target recursive partitioning strategy (i.e., the first sub-unit to be encoded) and the unit to be encoded. This accelerates the partitioning decision process of the encoder, thereby reducing encoding time and computational resource overhead. Simultaneously, the encoding parameters of the first sub-unit to be encoded and the parameters of the unit to be encoded are already available information during the encoding process, eliminating the need for additional highly complex analysis operations, reducing the complexity of the video data encoding process, and improving the encoding efficiency of video data.

[0143] Please see Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 10 As shown, the computer device 1000 may include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as Wi-Fi). I -F IInterface). The memory 1005 can be a high-speed RAM or a non-volatile memory. i (e.g., memory), such as at least one disk storage device. Optionally, memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. For example... Figure 10 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a media content interface module, and a device control application.

[0144] exist Figure 10 In the computer device 1000 shown, the network interface 1004 provides network communication functions; while the user interface 1003 is mainly used to provide an interface for inputting media content.

[0145] Understandably, processor 1001 can be used to call device-defined applications stored in memory 1005 to achieve:

[0146] Obtain the target recursive partitioning strategy for the unit to be encoded in the target video frame, and the encoding parameters of the unit to be encoded;

[0147] According to the target recursive partitioning strategy, the unit to be encoded is divided into N first sub-units to be encoded; N is a positive integer greater than 1.

[0148] Obtain the encoding parameters corresponding to the N first sub-units to be encoded respectively, and determine the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters corresponding to the N first sub-units to be encoded respectively;

[0149] If the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, then the partitioning of the unit to be encoded is paused, and the target partitioning result of the unit to be encoded is determined based on the N first sub-units to be encoded and the unit to be encoded.

[0150] It is understood that the encoding parameters of the first subunit to be encoded include the motion information of the first subunit to be encoded, and the encoding parameters of the unit to be encoded include the motion information of the unit to be encoded and the encoding block flag;

[0151] Understandably, the processor 1001 can be used to call a device-defined application stored in the memory 1005 to determine the parameter relationship between the encoding parameters of the unit to be encoded and the encoding parameters corresponding to the N first sub-units to be encoded, including:

[0152] If the value of the coded block flag is less than the threshold, then verify the consistency between the motion information of the N first sub-units to be encoded and the motion information of the unit to be encoded.

[0153] If the motion information of all N first sub-units to be encoded is consistent with the motion information of the unit to be encoded, then a parameter relationship is generated to indicate that the unit to be encoded does not meet the conditions for further partitioning.

[0154] It is understood that the motion information of the unit to be encoded and the motion information of the first sub-unit to be encoded include at least one of the prediction mode, reference frame mode, and reference frame index;

[0155] Understandably, processor 1001 can be used to call a device-defined application stored in memory 1005 to verify the consistency between the motion information of N first sub-units to be encoded and the motion information of the unit to be encoded, including:

[0156] If the prediction modes of the N first sub-units to be encoded and the prediction mode of the unit to be encoded are both translational inter-frame prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or,

[0157] If the reference frame patterns of all N first sub-units to be encoded are the same as the reference frame pattern of the unit to be encoded, then it is determined that the motion information of all N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or,

[0158] If the reference frame indices of the N first sub-units to be encoded are all the same as the reference frame index of the unit to be encoded, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded.

[0159] Understandably, the processor 1001 can be used to call the device-defined application stored in the memory 1005 to determine that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded if the reference frame patterns of the N first sub-units to be encoded are all the same as the reference frame pattern of the unit to be encoded. This includes:

[0160] If the reference frame modes of the N first sub-units to be encoded and the reference frame mode of the unit to be encoded are both forward prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or,

[0161] If the reference frame modes of the N first sub-units to be encoded and the reference frame mode of the unit to be encoded are both backward prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or,

[0162] If the reference frame modes of the N first sub-units to be encoded and the reference frame mode of the unit to be encoded are both bidirectional prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded.

[0163] Understandably, processor 1001 can be used to call device-defined applications stored in memory 1005 to achieve:

[0164] If the value of the coded block flag is greater than or equal to the threshold, or if the motion information of the first sub-unit to be encoded among the N first sub-units to be encoded is inconsistent with the motion information of the unit to be encoded, then the unit to be encoded is divided according to the residual recursive partitioning strategy to obtain M second sub-units to be encoded of the unit to be encoded; the residual recursive partitioning strategy is the candidate recursive partitioning strategy other than the target recursive partitioning strategy among the K candidate recursive partitioning strategies of the unit to be encoded, where M and K are both positive integers greater than 1;

[0165] Based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded, determine the target partitioning result of the unit to be encoded.

[0166] Understandably, processor 1001 can be used to call a device-defined application stored in memory 1005 to determine the target partitioning result of the unit to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded, including:

[0167] Based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded, determine the optimal partitioning strategy for the unit to be encoded;

[0168] If the optimal partitioning strategy for the unit to be encoded is no partitioning strategy, then the unit to be encoded is determined as the target partitioning result of the unit to be encoded.

[0169] If the optimal partitioning strategy of the unit to be encoded is the target recursive partitioning strategy, then it is determined that the unit to be encoded satisfies the condition for continued partitioning. The N first sub-units to be encoded are partitioned according to the target recursive partitioning strategy to obtain L third sub-units to be encoded of the unit to be encoded. The target partitioning result of the unit to be encoded is determined based on the L third sub-units to be encoded; L is a positive integer greater than 1.

[0170] If the optimal partitioning strategy for the unit to be encoded is the remaining recursive partitioning strategy, then the unit to be encoded is determined to meet the conditions for continued partitioning. The M second sub-units to be encoded are partitioned according to the target recursive partitioning strategy to obtain S fourth sub-units to be encoded of the unit to be encoded. The target partitioning result of the unit to be encoded is determined based on the S fourth sub-units to be encoded.

[0171] Understandably, processor 1001 can be used to call device-defined application programs stored in memory 1005 to determine the optimal partitioning strategy for the unit to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded, including:

[0172] Based on the unit to be encoded, determine the first rate-distortion cost of the unit to be encoded when using a no-partitioning strategy for partitioning;

[0173] Based on N first sub-units to be encoded, determine the second rate-distortion cost of the sub-units to be encoded when using the target recursive partitioning strategy for partitioning.

[0174] Based on the M second sub-units to be encoded, determine the third rate-distortion cost of the sub-units to be encoded when using the remaining recursive partitioning strategy for partitioning.

[0175] If the lowest rate distortion cost among the first rate distortion cost, the second rate distortion cost, and the third rate distortion cost is the first rate distortion cost, then the no-partition strategy is used to determine the optimal partitioning strategy for the unit to be encoded.

[0176] If the lowest rate distortion cost among the first rate distortion cost, the second rate distortion cost, and the third rate distortion cost is the second rate distortion cost, then the target recursive partitioning strategy is used to determine the optimal partitioning strategy for the unit to be encoded.

[0177] If the lowest rate-distortion cost among the first rate-distortion cost, the second rate-distortion cost, and the third rate-distortion cost is the third rate-distortion cost, then the remaining recursive partitioning strategy is used to determine the optimal partitioning strategy for the unit to be encoded.

[0178] Understandably, processor 1001 can be used to call a device-defined application stored in memory 1005 to determine the target partitioning result of the unit to be encoded based on N first sub-units to be encoded and the unit to be encoded, including:

[0179] Based on the unit to be encoded, determine the first rate-distortion cost of the unit to be encoded when using a no-partitioning strategy for partitioning;

[0180] Based on N first sub-units to be encoded, determine the second rate-distortion cost of the sub-units to be encoded when using the target recursive partitioning strategy for partitioning.

[0181] If the first rate-distortion cost is less than the second rate-distortion cost, then the target partitioning result of the unit to be encoded is determined.

[0182] If the first rate-distortion cost is greater than or equal to the second rate-distortion cost, then N of the first sub-units to be encoded are determined as the target partitioning result of the unit to be encoded.

[0183] Understandably, processor 1001 can be used to call device-defined application programs stored in memory 1005 to implement a target recursive partitioning strategy for the units to be encoded in the target video frame, including:

[0184] Obtain K candidate recursive partitioning strategies for the unit to be encoded in the target video frame;

[0185] Determine the partitioning precision corresponding to the K candidate recursive partitioning strategies; K is a positive integer greater than 1.

[0186] From the K candidate recursive partitioning strategies, select the candidate recursive partitioning strategy with the maximum partitioning precision;

[0187] The selected candidate recursive partitioning strategies are determined as the target recursive partitioning strategies for the units to be encoded in the target video frame.

[0188] Understandably, processor 1001 can be used to call device-defined application programs stored in memory 1005 to determine the partitioning fineness corresponding to the K candidate recursive partitioning strategies, including:

[0189] Obtain the number of units corresponding to the subunits to be encoded when the unit to be encoded is divided according to the K candidate recursive partitioning strategies respectively;

[0190] Based on the number of units corresponding to the K candidate recursive partitioning strategies, the partitioning precision corresponding to each of the K candidate recursive partitioning strategies is determined; there is a positive correlation between the number of units corresponding to the candidate recursive partitioning strategy Pi and the partitioning precision corresponding to the candidate recursive partitioning strategy Pi; i is a positive integer less than or equal to K.

[0191] In this application, during the encoding of the unit to be encoded in the target video frame, a target recursive partitioning strategy is first attempted. This involves partitioning the unit to be encoded according to the target recursive partitioning strategy to obtain N first sub-units to be encoded. The parameter relationship between the encoding parameters of the N first sub-units to be encoded and the encoding parameters of the unit to be encoded is then determined. Here, the target recursive partitioning strategy can refer to any of the K candidate recursive partitioning strategies for the unit to be encoded, or it can refer to the candidate recursive partitioning strategy with the highest partitioning precision among the K candidate recursive partitioning strategies. The parameter relationship is used to reflect whether there is consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded. When the parameter relationship reflects consistency between the encoding parameters of the unit to be encoded and the encoding parameters of the N first sub-units to be encoded, it indicates that the texture information of each sub-unit to be encoded is similar, and the unit to be encoded is more suitable for encoding with a larger-sized encoding unit. In this case, it is determined that the unit to be encoded does not meet the conditions for further partitioning. Therefore, the parameter relationship can indicate whether the unit to be encoded meets the conditions for further partitioning. When the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, the partitioning of the unit to be encoded is paused. This means that there is no need to partition the first sub-unit to be encoded, nor is it necessary to try other recursive partitioning strategies. It can stop trying other recursive partitioning strategies in advance and can directly determine the final partitioning result (i.e., the target partitioning result) of the unit to be encoded based on the partitioning result of the target recursive partitioning strategy (i.e., the first sub-unit to be encoded) and the unit to be encoded. This accelerates the partitioning decision process of the encoder, thereby reducing encoding time and computational resource overhead. Simultaneously, the encoding parameters of the first sub-unit to be encoded and the parameters of the unit to be encoded are already available information during the encoding process, eliminating the need for additional highly complex analysis operations, reducing the complexity of the video data encoding process, and improving the encoding efficiency of video data.

[0192] Furthermore, it should be noted that this application also provides a computer-readable storage medium storing a computer program executed by the aforementioned video data processing apparatus. This computer program includes program instructions, which, when executed by the processor, enable the execution of the video data processing method described in the corresponding embodiments above. Therefore, these descriptions will not be repeated here. Additionally, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments of this application, please refer to the description of the method embodiments of this application.

[0193] As an example, the above program instructions can be deployed and executed on a single computer device, or deployed and executed on at least two computer devices located in one location, or executed on at least two computer devices distributed in at least two locations and interconnected by a communication network. At least two computer devices distributed in at least two locations and interconnected by a communication network can form a blockchain network.

[0194] The aforementioned computer-readable storage medium can be an internal storage unit of the video data processing apparatus or the computer device provided in any of the foregoing embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0195] This application also provides a computer program product, including a computer program / instructions. When executed by a processor, the computer program / instructions implement the video data processing method described in the preceding embodiments, and therefore will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the embodiments of the computer program product involved in this application, please refer to the description of the method embodiments of this application.

[0196] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different media content, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.

[0197] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0198] The methods and related apparatuses provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.

[0199] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A video data processing method, characterized in that, include: Obtain the target recursive partitioning strategy for the units to be encoded in the target video frame, and the encoding parameters of the units to be encoded; According to the target recursive partitioning strategy, the unit to be encoded is divided into N first sub-units to be encoded; N is a positive integer greater than 1. Obtain the encoding parameters corresponding to N first sub-units to be encoded respectively. The encoding parameters of the first sub-unit to be encoded include the motion information of the first sub-unit to be encoded. The encoding parameters of the unit to be encoded include the motion information of the unit to be encoded and the encoding block flag. The motion information of the unit to be encoded and the motion information of the first sub-unit to be encoded both include at least one of prediction mode, reference frame mode, and reference frame index. If the value of the coded block flag is less than the threshold, then verify the consistency between the motion information of the N first sub-units to be encoded and the motion information of the unit to be encoded. If the motion information of all N first sub-units to be encoded is consistent with the motion information of the unit to be encoded, then a parameter relationship is generated to indicate that the unit to be encoded does not meet the conditions for further division. If the parameter relationship indicates that the unit to be encoded does not meet the conditions for further partitioning, then the partitioning of the unit to be encoded is paused, and the target partitioning result of the unit to be encoded is determined based on the N first sub-units to be encoded and the unit to be encoded.

2. The method as described in claim 1, characterized in that, The verification of the consistency between the motion information of the N first sub-units to be encoded and the motion information of the unit to be encoded includes: If the prediction modes of the N first sub-units to be encoded and the prediction mode of the unit to be encoded are both translational inter-frame prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or, If the reference frame patterns of all N first sub-units to be encoded are the same as the reference frame pattern of the unit to be encoded, then it is determined that the motion information of all N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or, If the reference frame indices of the N first sub-units to be encoded are all the same as the reference frame index of the unit to be encoded, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded.

3. The method as described in claim 2, characterized in that, If the reference frame patterns of all N first sub-units to be encoded are the same as the reference frame pattern of the unit to be encoded, then determining that the motion information of all N first sub-units to be encoded is consistent with the motion information of the unit to be encoded includes: If the reference frame modes of the N first sub-units to be encoded and the reference frame mode of the unit to be encoded are both forward prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or, If the reference frame modes of the N first sub-units to be encoded and the reference frame mode of the unit to be encoded are both backward prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded; or, If the reference frame modes of the N first sub-units to be encoded and the reference frame mode of the unit to be encoded are both bidirectional prediction modes, then it is determined that the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded.

4. The method as described in claim 1, characterized in that, The method further includes: If the value of the coded block flag is greater than or equal to the threshold, or if the motion information of the first sub-unit to be encoded among the N first sub-units to be encoded is inconsistent with the motion information of the unit to be encoded, then the unit to be encoded is divided according to the residual recursive partitioning strategy to obtain M second sub-units to be encoded of the unit to be encoded; the residual recursive partitioning strategy is the candidate recursive partitioning strategy other than the target recursive partitioning strategy among the K candidate recursive partitioning strategies of the unit to be encoded, where M and K are both positive integers greater than 1; Based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded, determine the target partitioning result of the unit to be encoded.

5. The method as described in claim 4, characterized in that, The step of determining the target partitioning result of the unit to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded includes: Based on N first sub-units to be encoded, M second sub-units to be encoded, and the unit to be encoded, determine the optimal partitioning strategy for the unit to be encoded; If the optimal partitioning strategy for the unit to be encoded is no partitioning strategy, then the unit to be encoded is determined as the target partitioning result of the unit to be encoded. If the optimal partitioning strategy of the unit to be encoded is the target recursive partitioning strategy, then it is determined that the unit to be encoded satisfies the condition for continued partitioning. The N first sub-units to be encoded are partitioned according to the target recursive partitioning strategy to obtain L third sub-units to be encoded of the unit to be encoded. The target partitioning result of the unit to be encoded is determined based on the L third sub-units to be encoded; L is a positive integer greater than 1. If the optimal partitioning strategy for the unit to be encoded is the remaining recursive partitioning strategy, then the unit to be encoded is determined to meet the conditions for continued partitioning. The M second sub-units to be encoded are partitioned according to the target recursive partitioning strategy to obtain S fourth sub-units to be encoded of the unit to be encoded. The target partitioning result of the unit to be encoded is determined based on the S fourth sub-units to be encoded.

6. The method as described in claim 5, characterized in that, The step of determining the optimal partitioning strategy for the units to be encoded based on N first sub-units to be encoded, M second sub-units to be encoded, and the units to be encoded includes: Based on the unit to be encoded, determine the first rate-distortion cost of the unit to be encoded when using a no-partitioning strategy for partitioning; Based on N first sub-units to be encoded, determine the second rate-distortion cost of the sub-units to be encoded when using the target recursive partitioning strategy for partitioning. Based on the M second sub-units to be encoded, determine the third rate-distortion cost of the sub-units to be encoded when using the remaining recursive partitioning strategy for partitioning. If the lowest rate distortion cost among the first rate distortion cost, the second rate distortion cost, and the third rate distortion cost is the first rate distortion cost, then the no-partition strategy is used to determine the optimal partitioning strategy for the unit to be encoded. If the lowest rate distortion cost among the first rate distortion cost, the second rate distortion cost, and the third rate distortion cost is the second rate distortion cost, then the target recursive partitioning strategy is used to determine the optimal partitioning strategy for the unit to be encoded. If the lowest rate-distortion cost among the first rate-distortion cost, the second rate-distortion cost, and the third rate-distortion cost is the third rate-distortion cost, then the remaining recursive partitioning strategy is used to determine the optimal partitioning strategy for the unit to be encoded.

7. The method as described in claim 1, characterized in that, The step of determining the target partitioning result of the unit to be encoded based on N first sub-units to be encoded and the unit to be encoded includes: Based on the unit to be encoded, determine the first rate-distortion cost of the unit to be encoded when using a no-partitioning strategy for partitioning; Based on N first sub-units to be encoded, determine the second rate-distortion cost of the sub-units to be encoded when using the target recursive partitioning strategy for partitioning. If the first rate-distortion cost is less than the second rate-distortion cost, then the target partitioning result of the unit to be encoded is determined. If the first rate-distortion cost is greater than or equal to the second rate-distortion cost, then N of the first sub-units to be encoded are determined as the target partitioning result of the unit to be encoded.

8. The method as described in claim 1, characterized in that, The method for obtaining the target recursive partitioning strategy for the units to be encoded in the target video frame includes: Obtain K candidate recursive partitioning strategies for the unit to be encoded in the target video frame; Determine the partitioning precision corresponding to the K candidate recursive partitioning strategies; K is a positive integer greater than 1. From the K candidate recursive partitioning strategies, select the candidate recursive partitioning strategy with the maximum partitioning precision; The selected candidate recursive partitioning strategies are determined as the target recursive partitioning strategies for the units to be encoded in the target video frame.

9. The method as described in claim 8, characterized in that, Determining the partitioning precision corresponding to the K candidate recursive partitioning strategies includes: Obtain the number of units corresponding to the subunits to be encoded when the unit to be encoded is divided according to the K candidate recursive partitioning strategies respectively; Based on the number of units corresponding to the K candidate recursive partitioning strategies, the partitioning precision corresponding to each of the K candidate recursive partitioning strategies is determined; there is a positive correlation between the number of units corresponding to the candidate recursive partitioning strategy Pi and the partitioning precision corresponding to the candidate recursive partitioning strategy Pi; i is a positive integer less than or equal to K.

10. A video data processing apparatus, characterized in that, include: The acquisition unit is used to acquire the target recursive partitioning strategy for the unit to be encoded in the target video frame, as well as the encoding parameters of the unit to be encoded. A partitioning unit is used to partition the unit to be encoded according to the target recursive partitioning strategy to obtain N first sub-units to be encoded. N is a positive integer greater than 1; The determining unit is used to obtain the encoding parameters corresponding to N first sub-units to be encoded respectively. The encoding parameters of the first sub-units to be encoded include the motion information of the first sub-units to be encoded. The encoding parameters of the unit to be encoded include the motion information of the unit to be encoded and the encoding block flag. If the value of the coded block flag is less than the threshold, the consistency between the motion information of the N first sub-units to be encoded and the motion information of the unit to be encoded is verified; if the motion information of the N first sub-units to be encoded is consistent with the motion information of the unit to be encoded, a parameter relationship is generated to indicate that the unit to be encoded does not meet the conditions for further partitioning; the motion information of the unit to be encoded and the motion information of the first sub-units to be encoded both include at least one of prediction mode, reference frame mode, and reference frame index; The pause module is used to pause the re-division of the unit to be encoded if the parameter relationship indicates that the unit to be encoded does not meet the conditions for continuing to divide it, and to determine the target division result of the unit to be encoded based on the N first sub-units to be encoded and the unit to be encoded.

11. A computer device, characterized in that, include: Processor and memory; The processor is connected to a memory; the memory is used to store program code, and the processor is used to call the program code to execute the method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-9.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Video coding method and video coding device

    CN105516719A

  • Rapid CU depth selection method for 3D-HEVC intra-frame depth map

    CN110446052A