Prediction unit division pattern generation method and apparatus, electronic device, and medium

By dividing the coding unit into target blocks of preset sizes and generating residual value groups, and adjusting the target distortion parameters in combination with penalty terms, the problem of high computational complexity of intra-frame prediction is solved, the prediction accuracy and efficiency are improved, and the hardware cost is reduced.

CN118660161BActive Publication Date: 2025-10-21GUANGDONG VIMICRO +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410678761.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2025-10-21
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

In existing video coding technologies, intra-frame prediction has high computational complexity, and different block divisions and prediction modes affect prediction efficiency, resulting in increased hardware implementation costs and poor prediction accuracy.

Method used

The target coding unit is divided into target blocks of a preset size, a residual value group is generated, and the target distortion parameter of the prediction unit group is adjusted through the penalty term to determine the optimal prediction unit division method.

Benefits of technology

The computational complexity of determining the optimal prediction unit division method is reduced, the prediction accuracy and efficiency of intra-frame prediction are improved, and the cost of hardware implementation is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660161B_ABST
    Figure CN118660161B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a prediction unit division mode generation method, device, electronic equipment and medium. A specific implementation of the method comprises: dividing a target coding unit into target blocks of a preset size; for each prediction mode, performing a first processing step: for each target block, performing a second processing step: in response to the existence of a matching relationship, predicting each pixel; in response to the non-existence of a matching relationship, determining a pixel value corresponding to each pixel as a prediction value; generating a residual value; for each prediction unit division mode, performing a determination step: fusing residual value groups; determining a sum of a target distortion cost and a penalty term as a target distortion parameter; determining a prediction unit division mode corresponding to the smallest target distortion parameter as an optimal division mode. The implementation effectively reduces the computational complexity of determining the optimal way of dividing the coding unit by dividing the coding unit into multiple target blocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and more particularly to a method, device, electronic device, and medium for generating a prediction unit partitioning method. Background Art

[0002] Currently, intra-frame prediction is a key technology in video coding and is used in multiple video coding standards. Intra-frame prediction is used to compress video data, improving coding efficiency by reducing redundant information within a single video frame. Block partitioning is a fundamental step in the video coding process. A single video frame can be divided into multiple coding units (CUs), which can be further divided into prediction units (PUs). Appropriate block partitioning can significantly improve coding efficiency, but flexible block partitioning also increases the computational burden of the video encoder. To determine the optimal method for dividing a CU, the following approach is commonly used: first, iterate through each prediction unit partitioning method and determine the rate-distortion cost of each prediction unit partitioning method. Then, the prediction unit partitioning method that minimizes the rate-distortion cost is selected as the CU partitioning method.

[0003] However, using the above method to determine the optimal prediction unit division method often encounters the following technical problems:

[0004] First, because intra-frame prediction is inherently computationally complex, determining the optimal prediction unit division requires iterating over each prediction unit division and calculating the corresponding rate-distortion cost, resulting in excessive computational complexity. Furthermore, different block divisions and prediction modes also affect the efficiency of intra-frame prediction. Typically, high computational complexity translates to increased chip area and power consumption in hardware implementation.

[0005] Second, because the more prediction units a coding unit is divided into, the smaller the prediction unit size is. The smaller the prediction unit size, the higher the prediction accuracy when performing intra-frame prediction on the coding unit, but higher prediction accuracy does not necessarily mean better.

[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the Invention

[0007] The content of this disclosure is used to briefly introduce concepts that will be described in detail in the detailed description section below. The content of this disclosure is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0008] Some embodiments of the present disclosure provide methods, devices, electronic devices, and media for generating a prediction unit partitioning method to solve one or more of the technical problems mentioned in the above background technology section.

[0009] In a first aspect, some embodiments of the present disclosure provide a method for generating a prediction unit division method, the method comprising: dividing a target coding unit into target blocks of a preset size to obtain a target block group; for each prediction mode in a prediction mode set, performing the following first processing step: for each target block in the above target block group, performing the following second processing step: in response to determining that a matching relationship exists between the prediction mode and the target block, predicting each pixel in the target block to generate a prediction value to obtain a prediction value group; in response to determining that no matching relationship exists between the prediction mode and the target block, determining a pixel value corresponding to each pixel in the target block as a prediction value to obtain a prediction value group; and according to the prediction value, a group and a corresponding group of true pixel values ​​to generate a residual value; for each prediction unit division method in the prediction unit division method set, performing the following determination steps: based on the prediction unit group and the above-mentioned prediction mode set, fusing the obtained residual value group set to obtain a target distortion cost corresponding to the prediction unit group, wherein the prediction unit group is generated based on the prediction unit division method; determining the sum of the above-mentioned target distortion cost and a penalty term as the target distortion parameter of the above-mentioned prediction unit group, wherein the penalty term is related to the number of prediction units corresponding to the above-mentioned prediction unit group; and determining the prediction unit division method corresponding to the smallest target distortion parameter in the obtained target distortion parameter set as the optimal division method.

[0010] In a second aspect, some embodiments of the present disclosure provide a prediction unit division method generation device, the device comprising: a division unit, configured to divide the coding unit into target blocks of a preset size to obtain a target block group; a first execution unit, configured to perform the following first processing step for each prediction mode in the prediction mode set: for each target block in the above target block group, perform the following second processing step: in response to determining that the prediction mode has a matching relationship with the target block, predict each pixel in the target block to generate a prediction value to obtain a prediction value group; in response to determining that the prediction mode has no matching relationship with the target block, determine the pixel value corresponding to each pixel in the target block as the prediction value to obtain a prediction value group; according to the prediction a second execution unit, configured to, for each prediction unit division method in the prediction unit division method set, perform the following determination steps: based on the prediction unit group and the above-mentioned prediction mode set, fuse the obtained residual value groups to obtain a target distortion cost corresponding to the prediction unit group, wherein the prediction unit group is generated based on the prediction unit division method; determine the sum of the target distortion cost and the penalty term as the target distortion parameter of the prediction unit group, wherein the penalty term is related to the number of prediction units corresponding to the prediction unit group; and determine the prediction unit division method corresponding to the minimum target distortion parameter in the obtained target distortion parameter set as the optimal division method.

[0011] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0012] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation of the first aspect is implemented.

[0013] The above-described embodiments of the present disclosure have the following beneficial effects: The prediction unit partitioning method of some embodiments of the present disclosure divides a coding unit into multiple target blocks, effectively reducing the computational complexity of determining the optimal method for partitioning the coding unit. Specifically, the high computational complexity of intra-frame prediction is due to the fact that intra-frame prediction itself is a relatively complex calculation. Determining the optimal prediction unit partitioning method requires traversing each prediction unit partitioning method and calculating the rate-distortion cost corresponding to each prediction unit partitioning method before determining the optimal prediction unit partitioning method. Based on this, the prediction unit partitioning method generation method of some embodiments of the present disclosure first divides the target coding unit into target blocks of a preset size to obtain a target block group. This allows the target coding unit to be divided into smaller units, thereby reducing computational complexity. Then, based on the prediction mode set and the target block group, a set of residual value groups is generated. This allows the residual value corresponding to each target block in each prediction mode to be obtained. Adjacent pixels often have similar values. Calculating the residual value can remove this spatial redundancy, thereby reducing the amount of data required for subsequent encoding. The magnitude of the residual value also represents the prediction accuracy of intra-frame prediction using that prediction mode. Smaller residual values ​​indicate higher prediction accuracy. Next, for each prediction unit partitioning method in the prediction unit partitioning method set, the following determination step is performed: based on the prediction unit group and the prediction mode set, the residual value groups are merged to obtain the target distortion cost corresponding to the prediction unit group. This results in the minimum distortion cost corresponding to the target coding unit. The target distortion cost represents the magnitude of the residual value corresponding to the target coding unit. Then, the sum of the target distortion cost and a penalty term is determined as the target distortion parameter for the prediction unit group. Because the target distortion cost corresponding to a prediction unit group decreases with the number of prediction units and the size of the prediction units, a penalty term is added to balance the target distortion costs corresponding to the various prediction unit partitioning methods. Finally, the prediction unit partitioning method corresponding to the minimum target distortion parameter in the obtained target distortion parameter set is determined as the optimal partitioning method. Thus, when the target coding unit is partitioned using the optimal partitioning method, the target distortion parameter of the target coding unit is minimized during intra-frame prediction. In summary, by dividing the target coding unit into multiple target blocks, the computational complexity of traversing each prediction unit partition is reduced to the complexity of traversing only once. This reduces the computational complexity of determining the optimal coding unit partitioning method, making this method easier to implement in hardware. Furthermore, the prediction unit partitioning method that corresponds to the minimum target distortion parameter is determined as the optimal partitioning method, which can improve the prediction accuracy and efficiency of subsequent intra-frame prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0015] Figure 1 is a flowchart of some embodiments of a method for generating a prediction unit partitioning method according to the present disclosure;

[0016] Figure 2 is a schematic structural diagram of some embodiments of a device for generating a prediction unit division method according to the present disclosure;

[0017] Figure 3 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure;

[0018] Figure 4 is a schematic diagram of a direction prediction mode suitable for implementing some embodiments of the present disclosure;

[0019] Figure 5 Schematic diagram of a prediction unit division method suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0021] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.

[0022] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0023] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0024] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0025] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0026] refer to Figure 1 , shows a process 100 of some embodiments of the method for generating a prediction unit partitioning mode according to the present disclosure. The method for generating a prediction unit partitioning mode includes the following steps:

[0027] Step 101: Divide a target coding unit into target blocks of a preset size to obtain a target block group.

[0028] In some embodiments, the execution subject (e.g., electronic device) of the above-mentioned prediction unit division method generation method can divide the target coding unit into target blocks of a preset size via a wired connection or a wireless connection to obtain a target block group. The target coding unit is generated by dividing the video frame currently to be video encoded. The target coding unit is the coding unit in the video frame to be intra-frame predicted.

[0029] As an example, in the AVS3 audio and video source coding standard, the size of the coding unit can be square or non-square. The size of the target coding unit can be 32×32, and the preset size can be 4×4. The target coding unit can be divided into 64 target blocks of size 4×4, resulting in a target block group containing 64 target blocks.

[0030] Optionally, before step 101, the steps further include:

[0031] In the first step, a ratio of the size of the initial coding unit to the target size is determined as a scaling ratio. The target size is the size of the target coding unit obtained by sampling the initial coding unit. The size of the initial coding unit includes the length and width of the initial coding unit. The target size includes the length and width of the target coding unit obtained by sampling the initial coding unit.

[0032] As an example, the size of the initial coding unit may be 64×64, the target size may be 32×32, and the scaling ratio is 64:32 = 64:32 = 2: 1. For another example, the size of the initial coding unit may be 128×64, the target size may be 64×32, and the scaling ratio is 128:64 = 64:32 = 2:1.

[0033] In the second step, based on the scaling ratio, each coordinate in the target coordinate set is mapped onto the initial coding unit to generate a mapped coordinate, thereby obtaining a mapped coordinate set. The target coordinate set is the coordinate corresponding to each pixel in the target coding unit.

[0034] As an example, for a target coding unit of size 32×32, the target coordinate set may be {(x, y)|0≤x≤32,0≤y≤32,x∈Z,y∈Z}. For an initial coding unit of size 64×64, based on the scaling ratio 64:32=64:32=2:1, a mapping coordinate set {(2x, 2y)|0≤2x≤64,0≤2y≤64,x∈Z,y∈Z} is generated.

[0035] The third step is to determine the mapping coordinate set as the set of points to be sampled.

[0036] Continuing with the above example, the set of points to be sampled is {(2x, 2y)|0≤2x≤64,0≤2y≤64,x∈Z,y∈Z}.

[0037] The fourth step is to sample the set of sampling points to generate a value for each pixel in the target coding unit, thereby obtaining the target coding unit. Sampling the set of sampling points involves sampling the pixel value corresponding to each sampling point. Sampling methods include, but are not limited to, the following: nearest neighbor interpolation sampling, bilinear interpolation sampling, and bicubic interpolation sampling.

[0038] Taking the sample point (4,4) in the above set of sample points as an example, the sampling method can be bilinear interpolation sampling. First, obtain the four nearest sample points (3,4), (4,3), (5,4), and (4,5) of the sample point (4,4). The pixel values ​​corresponding to the four nearest sample points can be 6, 7, 10, and 11. Obtain the interpolation weights w1, w2, w3, and w4 corresponding to the four nearest sample points. The interpolation weights are determined based on the distance between the nearest sample point and the sample point, and are inversely proportional to the distance. Here, the distances between the four nearest sample points and the sample point are the same, so the values ​​of w1, w2, w3, and w4 are all 0.25. The pixel value corresponding to the sample point (4,4) is 0.25×6+0.25×7+0.25×10+0.25×11=8.5. In practice, the pixel values ​​corresponding to the sample points can be rounded as needed.

[0039] In practice, the initial coding unit is sampled as needed to obtain a shortened coding unit of the initial coding unit. Using the shortened coding unit as the target coding unit can reduce the computational complexity of subsequent steps. Alternatively, the initial coding unit can be directly used as the target coding unit.

[0040] Step 102: For each prediction mode in the prediction mode set, perform the following first processing step:

[0041] Step 1021: For each target block in the target block group, perform the following second processing step:

[0042] Step 10211: In response to determining that the prediction mode matches the target block, each pixel in the target block is predicted to generate a prediction value, thereby obtaining a prediction value group.

[0043] In some embodiments, the execution entity may, in response to determining that the prediction mode and the target block have a matching relationship, predict each pixel in the target block to generate a prediction value and obtain a prediction value group. The matching relationship may indicate whether the prediction mode is used to predict each pixel in the target block. The existence of a matching relationship indicates that the prediction mode is used to predict each pixel in the target block. Under one prediction mode, the prediction values ​​in the prediction value group and the target blocks in the target block group have a one-to-one correspondence. The prediction mode may be one of the following: mean prediction mode, directional prediction mode.

[0044] As an example, a prediction mode set may include nine directional prediction modes and one mean prediction mode. For each prediction mode in the prediction mode set, prediction may be performed on each target block in the target block group. For a target coding unit divided into 64 target blocks, and for each prediction mode in the prediction mode set, 64 prediction value groups may be obtained. Thus, for this prediction mode set, a total of 64×10 prediction value groups may be obtained for the target coding unit.

[0045] Optionally, the execution entity may perform prediction on each pixel in the target block to generate a prediction value in response to determining that the prediction mode matches the target block through the following steps:

[0046] The first step is to obtain the reference pixel group corresponding to the pixel. The reference pixel group is related to the prediction mode. The reference pixel group consists of pixels surrounding the pixel and may include, but is not limited to, one of the following: pixels in the top row of the pixel, pixels in the column to the left of the pixel, pixels at the upper left corner of the pixel, and pixels in the direction corresponding to the directional prediction mode. In practice, the pixels in the reference pixel group can be adjusted as needed.

[0047] In the second step, the pixels are predicted based on the reference pixel group and the prediction mode to generate a predicted value.

[0048] Optionally, predicting a pixel based on a reference pixel group and a prediction mode to generate a predicted value comprises the following steps:

[0049] In the first step, in response to determining that the prediction mode is the mean prediction mode, mean prediction is performed on the pixel to generate a predicted value. The mean prediction mode is a prediction mode in which the average of the sum of the pixel values ​​of each pixel in the reference pixel group is used as the predicted value of the pixel. For example, the reference pixel group of the pixel may include: the pixel to the left and the pixel above the pixel.

[0050] In the second step, in response to determining that the prediction mode is a directional prediction mode based on the coordinate axis direction, tile prediction is performed on the pixel to generate a prediction value. The directional prediction mode based on the coordinate axis direction refers to a vertical prediction mode or a horizontal prediction mode. The vertical prediction mode or the horizontal prediction mode is a prediction mode in which the pixel values ​​of the pixels in the reference pixel group corresponding to the pixel are directly used as the prediction value. The reference pixel group corresponding to the vertical prediction mode is the pixel above the pixel. The reference pixel group corresponding to the horizontal prediction mode is the pixel to the left of the pixel.

[0051] In the third step, in response to determining that the prediction mode is a directional prediction mode based on directions other than the coordinate axes, interpolation prediction is performed on the pixels to generate a predicted value. Directions other than the coordinate axes are directions other than the vertical and horizontal directions. A directional prediction mode based on directions other than the coordinate axes performs interpolation prediction on the pixels and uses the resulting prediction result as the predicted value for the pixels. Interpolation prediction methods include, but are not limited to, the following: bilinear interpolation prediction method and bicubic interpolation prediction method.

[0052] like Figure 4 As shown, pixel A is predicted using the directional prediction mode based on the 22.5-degree direction as an example. First, pixel A1, pixel A2, and pixel A3 can be used as the reference pixel group of pixel A. Then, bilinear interpolation prediction is used for interpolation prediction. Determine that the distances between pixel A1, pixel A2, and pixel A3 and pixel A are 1, 1.4, and 2.2, respectively. Next, determine the corresponding weight values ​​v1, v2, and v3 of pixel A1, pixel A2, and pixel A3. The weight values ​​corresponding to the reference pixels in the reference pixel group are inversely proportional to the distance between the pixels. The weight values ​​v1, v2, and v3 can be: v1 = 2.2 / (1+1.4+2.2) = 0.48, v2 = 1.4 / (1+1.4+2.2) = 0.30, and v3 = 1 / (1+1.4+2.2) = 0.22. Next, the pixel values ​​of pixel A1, pixel A2, and pixel A3 are multiplied by their corresponding weight values. Finally, the sum of the products is used to determine the pixel value of pixel A. In practice, a specific reference pixel group for the directional prediction mode can be selected as needed.

[0053] Step 10212: In response to determining that there is no matching relationship between the prediction mode and the target block, a pixel value corresponding to each pixel in the target block is determined as a prediction value to obtain a prediction value group.

[0054] In some embodiments, in response to determining that the prediction mode does not match the target block, the execution entity may determine the pixel value corresponding to each pixel in the target block as the prediction value to obtain a set of prediction values, wherein the absence of a matching relationship indicates that the prediction mode is not used to predict each pixel in the target block.

[0055] Continuing with the example of step 10211, interval prediction can be performed on the target blocks in the target block group to reduce computational complexity. For example, for the eight target blocks in the first row of the target coding unit, the first, third, fifth, and seventh target blocks are predicted using any five of the prediction modes, while the second, fourth, sixth, and eighth target blocks are predicted using the other five prediction modes. In response to determining that the prediction mode does not match the target block, it can be assumed that the predicted value groups are derived from the prediction modes. For example, the first, third, fifth, and seventh target blocks are matched with the mean prediction mode, while the second, fourth, sixth, and eighth target blocks are not matched with the mean prediction mode. The predicted value groups corresponding to the second, fourth, sixth, and eighth target blocks are generated from the true pixel value groups corresponding to the respective target blocks. However, the predicted value groups corresponding to the second, fourth, sixth, and eighth target blocks can be assumed to be derived from the mean prediction mode. Thus, 64 predicted value groups can still be obtained under each prediction mode.

[0056] Step 10213: Generate a residual value based on the predicted value group and the corresponding true pixel value group.

[0057] In some embodiments, the execution entity may generate a residual value based on the predicted value group and the corresponding true pixel value group. The residual value is the absolute value of the sum of the absolute differences between the predicted value group and the corresponding true pixel value group. Adjacent pixels often have similar values, and calculating the residual value can remove this spatial redundancy, thereby reducing the amount of data subsequently encoded. The magnitude of the residual value also indicates the prediction accuracy of intra-frame prediction using this prediction mode. The smaller the residual value, the higher the prediction accuracy.

[0058] Optionally, the execution entity may generate a residual value according to the predicted value group and the corresponding true pixel value group through the following steps:

[0059] In the first step, each predicted value in the predicted value group is subtracted from the corresponding true pixel value in the true pixel value group to generate an absolute error, thereby obtaining an absolute error group.

[0060] In the second step, the sum corresponding to each absolute error in the absolute error group is determined as the absolute error sum.

[0061] In the third step, the absolute value of the sum of absolute errors is determined as the residual value.

[0062] Step 103: For each prediction unit division method in the prediction unit division method set, perform the following determination steps:

[0063] Step 1031 : Based on the prediction unit group and the above prediction mode set, the obtained residual value groups are fused to obtain the target distortion cost corresponding to the prediction unit group.

[0064] In some embodiments, the execution subject can fuse the obtained residual value group set based on the prediction unit group and the prediction mode set to obtain the target distortion cost corresponding to the prediction unit group. The prediction unit group is generated based on the prediction unit division method. The prediction unit division method is a method of dividing the target coding unit into one or more prediction units. According to the AVS3 audio and video source coding standard, when performing intra-frame prediction on the coding unit, there are a total of 7 prediction unit division methods allowed. Figure 5 As shown in FIG, a coding unit can be completely divided into 1 prediction unit. A coding unit can also be divided into 4 prediction units or 2 prediction units in the horizontal direction. A coding unit can also be divided into 4 prediction units or 2 prediction units in the vertical direction. Therefore, the number of prediction units in a prediction unit group can be 1, 2, or 4. As an example, Figure 5 As shown in the figure, the method of dividing the coding unit in the horizontal direction corresponds to three prediction unit division methods. The first prediction unit division method can divide the coding unit into four prediction units in the vertical direction: PU1, PU2, PU3 and PU4, where the sizes of PU1, PU2, PU3 and PU4 can be the same or different. The second prediction unit division method can divide the coding unit into two prediction units in the vertical direction: PU1 and PU2, where the size of PU1 is smaller than that of PU2. The third prediction unit division method can divide the coding unit into two prediction units in the vertical direction: PU1 and PU2, where the size of PU1 is larger than that of PU2.

[0065] Optionally, the execution entity may fuse the obtained residual value groups based on the prediction unit group and the prediction mode set through the following steps to obtain a target distortion cost corresponding to the prediction unit group:

[0066] In the first step, for each prediction unit in the prediction unit group, the following first generation step is performed:

[0067] The first sub-step is to divide the obtained residual value set based on the prediction unit group to generate a residual value set corresponding to the prediction unit. Continuing with the example of step 10212, the obtained residual value set contains a total of 640 residual values. As an example, a prediction unit group may contain one prediction unit. In this case, the prediction unit contains 64 target blocks, and the residual value set corresponding to the prediction unit should contain 64×10 residual values.

[0068] The second sub-step is to perform the following second generation step for each prediction mode in the above prediction mode set:

[0069] Sub-step 1: Based on the above prediction mode set, the residual value set is divided to generate residual value subsets corresponding to the above prediction modes. Continuing with the example of the first sub-step, based on the 10 prediction modes in the above prediction mode set, the 64×10 residual values ​​in the residual value set are divided. Each prediction mode corresponds to a residual value subset, and each residual value subset contains 64 residual values.

[0070] Sub-step 2: adding the residual values ​​in the residual value subset to generate the distortion cost corresponding to the above prediction mode.

[0071] In the third sub-step, the minimum distortion cost in the obtained distortion cost set is determined as the minimum distortion cost corresponding to the prediction unit.

[0072] In the second step, the minimum distortion costs corresponding to the prediction units in the prediction unit group are added together to generate a target distortion cost corresponding to the prediction unit group.

[0073] Step 1032: Determine the sum of the target distortion cost and the penalty term as the target distortion parameter of the prediction unit group.

[0074] In some implementations, the execution entity may determine the target distortion parameter of the prediction unit group as the sum of the target distortion cost and the penalty term. The penalty term is related to the number of prediction units corresponding to the prediction unit group. Since the greater the number of prediction units corresponding to the prediction unit group, the smaller the size of the prediction unit obtained after dividing the target coding unit. The smaller the size of the prediction unit, the smaller the target distortion cost corresponding to the prediction unit group. Therefore, in order to eliminate the impact of the number of prediction units corresponding to the prediction unit group, a penalty term needs to be added to the target distortion cost to balance the target distortion costs corresponding to each prediction unit division method.

[0075] Optionally, the execution entity may determine the penalty item through the following steps:

[0076] In the first step, in response to the number of prediction units in the prediction unit group being 1, 0 is set as the penalty coefficient for the prediction unit group. When the number of prediction units in the prediction unit group is 1, it will not affect the target distortion cost corresponding to the prediction unit group. Therefore, the penalty coefficient of a prediction unit group containing only one prediction unit is 0.

[0077] In the second step, in response to the number of prediction units in the prediction unit group being 2, λ1 is preset as the penalty coefficient of the prediction unit group. The value range of λ1 is (0, 1). As an example, the value of λ1 can be any one of {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}.

[0078] In the third step, in response to the number of prediction units in the prediction unit group being 4, λ2 is preset as the penalty coefficient of the prediction unit group. The value range of λ2 is (0, 1). As an example, the value of λ2 can be any one of {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}.

[0079] The fourth step is to obtain a reference video sequence. A video sequence is a plurality of video frames arranged in chronological order. In practice, at least one reference video sequence can be selected according to the needs.

[0080] Step 5: For each video frame in the reference video sequence, perform the following training steps:

[0081] In the first sub-step, the parameter of the video encoder is set to λ. The parameter λ of the video encoder is a combination of λ1 and λ2. The value of λ will vary with the values ​​of λ1 and λ2. A weight value k1 can be assigned to λ1, and a weight value k2 can be assigned to λ2. The combination method can be a method of multiplying λ1 and λ2 with their respective corresponding weight values, and then adding the resulting products. Since the more prediction units in the prediction unit group, the greater the impact on the target distortion cost corresponding to the prediction unit group, λ2 should have a larger weight value. As an example, k1 can be 0.33, k2 can be 0.67, then λ = 0.33λ 1+ 0.67λ2. In practice, k1 and k2 can be adjusted according to actual needs.

[0082] In the second substep, a video encoder with a parameter λ is used to perform intra-frame prediction and encode the video frame, obtaining a distortion metric and bit count corresponding to the encoded video frame. The distortion metric can be mean square error or peak signal-to-noise ratio. The bit count is the number of bits occupied by the encoded video frame. Different values ​​of the parameter λ result in different distortion metrics and bit counts.

[0083] As an example, the distortion metric can be a peak signal-to-noise ratio. Example 1: When the value of λ1 is 0.2 and the value of λ2 is 0.5, the value of λ is rounded to one decimal place, which is 0.4. In this case, the distortion metric corresponding to the encoded video frame can be 40, and the number of bits can be 1000 bits. Example 2: When the value of λ1 is 0.7 and the value of λ2 is 0.4, the value of λ is rounded to one decimal place, which is 0.5. In this case, the distortion metric corresponding to the encoded video frame can be 30, and the number of bits can be 1200 bits.

[0084] The third sub-step is to select the optimal λ value according to the constraint conditions and determine the optimal λ value as λ m The constraint condition can be one of the following: the number of bits of the encoded video frame must not exceed a set upper limit to meet storage requirements, and the distortion metric of the encoded video frame must not exceed a set upper limit to meet the quality of the encoded video frame. In practice, the constraint condition can be adjusted according to actual needs.

[0085] As an example, the constraint condition may be that the number of bits of the encoded video frame shall not exceed 1000 bits. For example 1 and example 2 in the above example, the λ value corresponding to example 1 is λ m In practice, the optimal value of λ can be selected according to different constraints.

[0086] The fourth sub-step is to set λ m The corresponding λ1 value is determined as the first penalty coefficient, and λ m The corresponding λ2 value is determined as the second penalty coefficient.

[0087] In step 6, in response to the number of prediction units in the prediction unit group being 2, the average value of the obtained first penalty coefficient sequence is determined as the penalty coefficient of the prediction unit group, wherein the average value of the first penalty coefficient sequence is the average value of the sum of the first penalty coefficients in the first penalty coefficient sequence.

[0088] In step 7, in response to the number of prediction units in the prediction unit group being 4, the average value of the obtained second penalty coefficient sequence is determined as the penalty coefficient of the prediction unit group, wherein the average value of the second penalty coefficient sequence is the average value of the sum of the second penalty coefficients in the second penalty coefficient sequence.

[0089] In the eighth step, the product of the number of prediction units corresponding to the prediction unit group and the penalty coefficient is determined as the penalty item of the prediction unit group.

[0090] The above-mentioned "optionally," as an inventive feature of the present disclosure, addresses the technical problem mentioned in the background art: "Due to the prediction unit division method, the more prediction units a coding unit is divided into, the smaller the size of the resulting prediction units. A smaller prediction unit size leads to higher prediction accuracy during intra-frame prediction of the coding unit, but higher prediction accuracy does not necessarily mean better." Based on this, the present disclosure first sets a penalty coefficient of 0 for a prediction unit group when the number of prediction units in the prediction unit group is 1. When the number of prediction units in a prediction unit group is 1, the target distortion cost corresponding to the prediction unit group is not affected. Therefore, the penalty coefficient for a prediction unit group containing only one prediction unit is 0. Secondly, when the number of prediction units in the prediction unit group is 2 or 4, λ1 and λ2 are preset as the penalty coefficients for the corresponding prediction unit group, respectively. Then, a reference video sequence is obtained. Thus, the penalty coefficients corresponding to the case where the number of prediction units in the prediction unit group is 2 or 4 are trained using the reference video sequence, making the penalty coefficients more reliable. Next, for each video frame in the reference video sequence, the following training steps are performed: Setting the video encoder parameter λ. Among them, the parameter λ of the video encoder is a combination of λ1 and λ2. Combining λ1 and λ2 and using them as parameters of the video encoder can fully match λ1 and λ2 with each other, and better apply to the prediction unit division method generation method. The video frame is intra-frame predicted and encoded using a video encoder with parameter λ to obtain the distortion metric and number of bits corresponding to the encoded video frame. Therefore, the quality of the encoded video frame can be measured using the distortion metric and number of bits. The distortion metric is used to evaluate the difference between the encoded video frame and the video frame, and is a key indicator for measuring the degree of distortion of the video frame. The number of bits directly determines the size of the encoded video frame, which affects the storage and transmission of the encoded video frame. Then, the optimal λ value is selected according to the constraint conditions, and the optimal λ value is determined as λ m. Thus, adding constraints can ensure that the encoded video frames meet specific quality standards. Next, in response to the number of prediction units in the prediction unit group being 2, the average value of the obtained first penalty coefficient sequence is determined as the penalty coefficient of the prediction unit group. In response to the number of prediction units in the prediction unit group being 4, the average value of the obtained second penalty coefficient sequence is determined as the penalty coefficient of the prediction unit group. Thus, the average value is determined as the penalty coefficient corresponding to when the number of prediction units in the prediction unit group is 2 or 4, which improves the reliability and accuracy of the penalty coefficient. Finally, the product of the number of prediction units corresponding to the prediction unit group and the penalty coefficient is determined as the penalty term of the prediction unit group. In summary, the penalty coefficient of the prediction unit group is obtained by training with a reference video sequence, and then the product of the number of prediction units corresponding to the prediction unit group and the penalty coefficient is determined as the penalty term of the prediction unit group. Thus, the penalty term can effectively balance the target distortion costs corresponding to each prediction unit division method, thereby eliminating the influence of the number of prediction units corresponding to the prediction unit group on the target distortion cost.

[0091] Step 104 : Determine the prediction unit division mode corresponding to the minimum target distortion parameter in the obtained target distortion parameter set as the optimal division mode.

[0092] In some embodiments, the execution entity may determine the prediction unit division method corresponding to the minimum target distortion parameter in the obtained target distortion parameter set as the optimal division method. When the target coding unit is divided using the optimal division method, the target distortion parameter of the target coding unit can be minimized when performing intra-frame prediction.

[0093] Optionally, after step 104, the steps further include:

[0094] The first step is to divide the target coding unit based on the optimal division method.

[0095] In the second step, based on the prediction mode corresponding to the optimal division method, intra-frame prediction is performed on the divided target coding unit.

[0096] Determining the prediction unit partitioning method corresponding to the minimum target distortion parameter as the optimal partitioning method can effectively improve the prediction efficiency of intra-frame prediction. Using the prediction mode corresponding to the optimal partitioning method to perform intra-frame prediction on the target coding unit can effectively improve the prediction accuracy of intra-frame prediction.

[0097] The above-described embodiments of the present disclosure have the following beneficial effects: The prediction unit partitioning method of some embodiments of the present disclosure divides a coding unit into multiple target blocks, effectively reducing the computational complexity of determining the optimal method for partitioning the coding unit. Specifically, the high computational complexity of intra-frame prediction is due to the fact that intra-frame prediction itself is a relatively complex calculation. Determining the optimal prediction unit partitioning method requires traversing each prediction unit partitioning method and calculating the rate-distortion cost corresponding to each prediction unit partitioning method before determining the optimal prediction unit partitioning method. Based on this, the prediction unit partitioning method generation method of some embodiments of the present disclosure first divides the target coding unit into target blocks of a preset size to obtain a target block group. This allows the target coding unit to be divided into smaller units, thereby reducing computational complexity. Then, based on the prediction mode set and the target block group, a set of residual value groups is generated. This allows the residual value corresponding to each target block in each prediction mode to be obtained. Adjacent pixels often have similar values. Calculating the residual value can remove this spatial redundancy, thereby reducing the amount of data required for subsequent encoding. The magnitude of the residual value also represents the prediction accuracy of intra-frame prediction using that prediction mode. Smaller residual values ​​indicate higher prediction accuracy. Next, for each prediction unit partitioning method in the prediction unit partitioning method set, the following determination step is performed: based on the prediction unit group and the prediction mode set, the residual value groups are merged to obtain the target distortion cost corresponding to the prediction unit group. This results in the minimum distortion cost corresponding to the target coding unit. The target distortion cost represents the magnitude of the residual value corresponding to the target coding unit. Then, the sum of the target distortion cost and a penalty term is determined as the target distortion parameter for the prediction unit group. Because the target distortion cost corresponding to a prediction unit group decreases with the number of prediction units and the size of the prediction units, a penalty term is added to balance the target distortion costs corresponding to the various prediction unit partitioning methods. Finally, the prediction unit partitioning method corresponding to the minimum target distortion parameter in the obtained target distortion parameter set is determined as the optimal partitioning method. Thus, when the target coding unit is partitioned using the optimal partitioning method, the target distortion parameter of the target coding unit is minimized during intra-frame prediction. In summary, by dividing the target coding unit into multiple target blocks, the computational complexity of traversing each prediction unit partition is reduced to the complexity of traversing only once. This reduces the computational complexity of determining the optimal coding unit partitioning method, making this method easier to implement in hardware. Furthermore, the prediction unit partitioning method that corresponds to the minimum target distortion parameter is determined as the optimal partitioning method, which can improve the prediction accuracy and efficiency of subsequent intra-frame prediction.

[0098] Further references Figure 2As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a prediction unit division method generation device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the prediction unit division mode generating device can be specifically applied to various electronic devices.

[0099] like Figure 2 As shown, a prediction unit division method generation device 200 includes: a division unit 201, a first execution unit 202, a second execution unit 203 and a determination unit 204. The division unit 201 is configured to: divide the coding unit into target blocks of a preset size to obtain a target block group. The first execution unit 202 is configured to: for each prediction mode in the prediction mode set, perform the following first processing step: for each target block in the above target block group, perform the following second processing step: in response to determining that the prediction mode and the target block have a matching relationship, predict each pixel in the target block to generate a prediction value to obtain a prediction value group; in response to determining that the prediction mode and the target block do not have a matching relationship, determine the pixel value corresponding to each pixel in the target block as the prediction value to obtain a prediction value group; and generate a residual value based on the prediction value group and the corresponding true pixel value group. The second execution unit 203 is configured to: for each prediction unit partitioning method in the prediction unit partitioning method set, perform the following determination steps: based on the prediction unit group and the above-mentioned prediction mode set, fuse the obtained residual value group set to obtain a target distortion cost corresponding to the prediction unit group, wherein the prediction unit group is generated based on the prediction unit partitioning method; and determine the sum of the target distortion cost and a penalty term as the target distortion parameter of the prediction unit group, wherein the penalty term is related to the number of prediction units corresponding to the prediction unit group. The determination unit 204 is configured to: determine the prediction unit partitioning method corresponding to the minimum target distortion parameter in the obtained target distortion parameter set as the optimal partitioning method.

[0100] It can be understood that the units recorded in the prediction unit division method generating device 200 are similar to the reference units. Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the prediction unit division mode generating device 200 and the units contained therein, and will not be described in detail here.

[0101] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device (eg, an electronic device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0102] like Figure 3As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. Various programs and data required for the operation of the electronic device 300 are also stored in the RAM 303. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0103] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as needed.

[0104] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.

[0105] It should be noted that in some embodiments of the present disclosure, the computer-readable medium mentioned above may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0106] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0107] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: divides the target coding unit into target blocks of preset sizes to obtain a target block group; for each prediction mode in the prediction mode set, performs the following first processing step: for each target block in the above-mentioned target block group, performs the following second processing step: in response to determining that the prediction mode has a matching relationship with the target block, predicts each pixel in the target block to generate a prediction value to obtain a prediction value group; in response to determining that the prediction mode has no matching relationship with the target block, determines the pixel value corresponding to each pixel in the target block as the prediction value to obtain a prediction value group ; Generate a residual value based on the prediction value group and the corresponding real pixel value group; for each prediction unit division method in the prediction unit division method set, perform the following determination steps: based on the prediction unit group and the above-mentioned prediction mode set, fuse the obtained residual value group set to obtain the target distortion cost corresponding to the prediction unit group, wherein the prediction unit group is generated based on the prediction unit division method; determine the sum of the above-mentioned target distortion cost and the penalty term as the target distortion parameter of the above-mentioned prediction unit group, wherein the penalty term is related to the number of prediction units corresponding to the above-mentioned prediction unit group; determine the prediction unit division method corresponding to the smallest target distortion parameter in the obtained target distortion parameter set as the optimal division method.

[0108] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0109] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0110] The units described in some embodiments of the present disclosure may be implemented in software or in hardware. The described units may also be provided in a processor. For example, they may be described as follows: a processor includes a partitioning unit, a first execution unit, a second unit, and a determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the partitioning unit may also be described as a "unit that divides the coding unit into target blocks of a preset size to obtain a target block group."

[0111] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0112] The above description is only an illustration of some preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A method for generating a prediction unit partitioning method, comprising: Step 101: Divide the target coding unit into target blocks of a preset size to obtain a target block group; Step 102: For each prediction mode in the prediction mode set, perform the following first processing step: Step 1021: For each target block in the target block group, perform the following second processing step: Step 10211: In response to determining that the prediction mode matches the target block, predict each pixel in the target block to generate a prediction value, thereby obtaining a prediction value group. Step 10212: In response to determining that there is no matching relationship between the prediction mode and the target block, a pixel value corresponding to each pixel in the target block is determined as a prediction value to obtain a prediction value group. Step 10213: Generate a residual value based on the predicted value group and the corresponding true pixel value group; Step 103: For each prediction unit division method in the prediction unit division method set, perform the following determination steps: Step 1031: Based on the prediction unit group and the prediction mode set, the obtained residual value set is merged to obtain a target distortion cost corresponding to the prediction unit group, wherein the prediction unit group is generated based on the prediction unit division method; Step 1032: Determine the sum of the target distortion cost and a penalty term as a target distortion parameter of the prediction unit group, wherein the penalty term is related to the number of prediction units corresponding to the prediction unit group; Step 104 : Determine the prediction unit division mode corresponding to the minimum target distortion parameter in the obtained target distortion parameter set as the optimal division mode.

2. The method according to claim 1, wherein Before dividing the target coding unit into target blocks of a preset size to obtain a target block group, the method further includes: Determine a ratio of a size of an initial coding unit to a target size as a scaling ratio; Based on the scaling ratio, mapping each coordinate in the target coordinate set to the initial coding unit to generate a mapped coordinate, thereby obtaining a mapped coordinate set; Determining the mapping coordinate set as a set of points to be sampled; The set of points to be sampled is sampled to generate a value of each pixel in a target coding unit, thereby obtaining the target coding unit.

3. The method according to claim 1, wherein In response to determining that the prediction mode matches the target block, predicting each pixel in the target block to generate a prediction value includes: Obtaining a reference pixel group corresponding to the pixel, wherein the reference pixel group is related to the prediction mode; The pixel is predicted based on the reference pixel group and the prediction mode to generate the predicted value.

4. The method according to claim 3, wherein: The predicting the pixel based on the reference pixel group and the prediction mode to generate the predicted value includes: In response to determining that the prediction mode is a mean prediction mode, performing mean prediction on the pixel to generate the predicted value; In response to determining that the prediction mode is a directional prediction mode based on a coordinate axis direction, performing tile prediction on the pixel to generate the prediction value; In response to determining that the prediction mode is a directional prediction mode based on a direction other than a coordinate axis, interpolation prediction is performed on the pixel to generate the prediction value.

5. The method according to claim 1, wherein Generating a residual value according to the predicted value group and the corresponding true pixel value group includes: Subtracting each predicted value in the predicted value group from the corresponding true pixel value in the true pixel value group to generate an absolute error, thereby obtaining an absolute error group; Determine the sum corresponding to each absolute error in the absolute error group as the absolute error sum; The absolute value of the sum of absolute errors is determined as a residual value.

6. The method according to claim 1, wherein The step of fusing the obtained residual value groups based on the prediction unit group and the prediction mode set to obtain a target distortion cost corresponding to the prediction unit group includes: In the first step, for each prediction unit in the prediction unit group, the following first generation step is performed: A first sub-step is to divide the obtained residual value group set based on the prediction unit group to generate a residual value set corresponding to the prediction unit; The second sub-step is to perform the following second generation step for each prediction mode in the prediction mode set: Sub-step 1: dividing the residual value set based on the prediction mode set to generate residual value subsets corresponding to the prediction mode; Sub-step 2: adding the residual values ​​in the residual value subset to generate a distortion cost corresponding to the prediction mode; In the third sub-step, the minimum distortion cost in the obtained distortion cost set is determined as the minimum distortion cost corresponding to the prediction unit; In the second step, the minimum distortion costs corresponding to the prediction units in the prediction unit group are added together to generate a target distortion cost corresponding to the prediction unit group.

7. The method according to claim 1, wherein The method further comprises: Dividing the target coding unit based on the optimal division method; Based on the prediction mode corresponding to the optimal division method, intra-frame prediction is performed on the divided target coding unit.

8. A prediction unit division method generating device, comprising: a dividing unit configured to divide the coding unit into target blocks of a preset size to obtain a target block group; The first execution unit is configured to, for each prediction mode in the prediction mode set, perform the following first processing step: for each target block in the target block group, perform the following second processing step: in response to determining that the prediction mode has a matching relationship with the target block, predict each pixel in the target block to generate a prediction value, thereby obtaining a prediction value group; In response to determining that the prediction mode does not have a matching relationship with the target block, determining a pixel value corresponding to each pixel in the target block as a prediction value to obtain a prediction value group; and generating a residual value based on the prediction value group and the corresponding true pixel value group; The second execution unit is configured to, for each prediction unit partitioning method in the prediction unit partitioning method set, perform the following determining steps: fusing the obtained residual value groups based on the prediction unit group and the prediction mode set to obtain a target distortion cost corresponding to the prediction unit group, wherein the prediction unit group is generated based on the prediction unit partitioning method; and determining a sum of the target distortion cost and a penalty term as a target distortion parameter of the prediction unit group, wherein the penalty term is related to the number of prediction units corresponding to the prediction unit group; The determining unit is configured to determine the prediction unit division mode corresponding to the minimum target distortion parameter in the obtained target distortion parameter set as the optimal division mode.

9. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data processing method and device, computer equipment and storage medium

    CN114697660A

  • Video coding method, video decoding method, video coding device, video decoding device and server

    CN117156162A