A template-based adaptive cross-component prediction method

By using an adaptive cross-component prediction method, the optimal chroma prediction mode is selected using templates and prediction models, which solves the problem of insufficient coding performance in existing video coding technologies and achieves more efficient coding performance and low bitrate transmission.

CN117061761BActive Publication Date: 2026-06-02SUN YAT SEN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUN YAT SEN UNIV
Filing Date
2023-08-29
Publication Date
2026-06-02

Smart Images

  • Figure CN117061761B_ABST
    Figure CN117061761B_ABST
Patent Text Reader

Abstract

The application discloses a template-based adaptive cross-component prediction method, which comprises the following steps: judging whether the reconstructed pixels of the neighboring area of a central unit are available, and obtaining a first judgment result; selecting a target prediction mode and obtaining a target reference area; combining the target reference area with the first judgment result to obtain a target extension area corresponding to the target reference area; obtaining a cross-component prediction model according to the target reference area and the target extension area; establishing a target template corresponding to the target prediction mode; obtaining a SATD cost according to the target template and the cross-component prediction model, and obtaining a first prediction model; obtaining a target RDO cost corresponding to the first prediction model, comparing the target RDO cost with a current optimal RDO cost, and obtaining a second prediction model as an optimal chroma prediction model. The application can obtain the optimal prediction model of the central unit, improves the coding performance, and can be widely applied in the technical field of video processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of video processing technology, and in particular to a template-based adaptive cross-component prediction method. Background Technology

[0002] The Joint Video Coding Unit (JVCO) has finalized the Universal Video Coding (VVC) standard. Compared to its predecessor, HEVC, VVC reduces the bit rate by approximately 50%, effectively meeting the application requirements of ultra-high-definition video, virtual reality, and cloud gaming. VVC introduces many key technologies compared to its predecessor. For example, it adds Cross-Component Linear Prediction Model (CCLM), Position-Based Intra-Prediction (PDPC), and Multiple Reference Line (MRL) techniques during intra-frame prediction. These new technologies reduce spatial and component redundancy during coding; however, the coding performance of existing technologies still needs improvement. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a template-based adaptive cross-component prediction method to obtain the optimal prediction model for the lumped cell, thereby improving coding performance.

[0004] One aspect of this invention provides a template-based adaptive cross-component prediction method, the method comprising:

[0005] Determine whether the reconstructed pixels in the vicinity of the concentrated unit are usable to obtain the first determination result;

[0006] Select the target prediction mode to obtain the target reference area;

[0007] By combining the target reference region with the first judgment result, the target extended region corresponding to the target reference region is obtained;

[0008] Based on the target reference region and the target extended region, obtain the cross-component prediction model;

[0009] Establish a target template corresponding to the target prediction pattern;

[0010] Based on the target template and the cross-component prediction model, the SATD cost is obtained to obtain the first prediction model;

[0011] Obtain the target RDO cost corresponding to the first prediction model, compare the target RDO cost with the current optimal RDO cost, and obtain the second prediction model as the optimal chromaticity prediction model.

[0012] Optionally, the target prediction mode includes a first prediction mode, a second prediction mode, and a third prediction mode; selecting the target prediction mode and obtaining the target reference area includes:

[0013] Select the first prediction mode, and form a first reference region by combining a region of several widths above the central unit and a region of several widths to the left of the central unit.

[0014] Select the second prediction mode and use a region of a certain width to the left of the central unit as the second reference region;

[0015] Select the third prediction mode and use a region of a certain width above the centralized unit as the third reference region.

[0016] Optionally, combining the target reference region with the first determination result to obtain the target extended region corresponding to the target reference region includes:

[0017] When the first determination result is that the reconstructed pixels in the upper right and lower left of the centralized unit are available, the first reference area is extended to the right by a certain width and extended downward by a certain height to obtain the first extended area corresponding to the first reference area.

[0018] When the first determination result is that the reconstructed pixel in the lower left corner of the centralized unit is available, the second reference region is extended downward by a certain height to obtain the second extended region corresponding to the second reference region;

[0019] When the first determination result indicates that the reconstructed pixel in the upper right corner of the centralized unit is available, the third reference region is extended to the right by a certain width to obtain the third extended region corresponding to the third reference region.

[0020] Optionally, obtaining the cross-component prediction model based on the target reference region and the target extended region further includes:

[0021] Based on the cross-component prediction model, quadratic function prediction model, cubic function prediction model, and quartic function prediction model are obtained.

[0022] Optionally, establishing the target template corresponding to the target prediction pattern includes:

[0023] When the target prediction mode is the first prediction mode, a first template is established to the left and above the centralized unit;

[0024] When the target prediction mode is the second prediction mode, a second template is established to the left of the centralized unit;

[0025] When the target prediction mode is the third prediction mode, a third template is established above the centralized unit.

[0026] Optionally, obtaining the SATD cost and thus the first prediction model based on the target template and the cross-component prediction model includes:

[0027] Obtain the corresponding reconstructed brightness values ​​of the first template, the second template, and the third template;

[0028] The corresponding chromaticity prediction values ​​of the first template, the second template, and the third template are obtained through the quadratic function prediction model, the cubic function prediction model, and the quartic function prediction model.

[0029] Based on the reconstructed luminance value and the predicted chrominance value, the SATD cost is obtained, and the cross-component prediction model with the minimum SATD cost is taken as the first prediction model.

[0030] This invention also provides a template-based adaptive cross-component prediction device, comprising:

[0031] The first module is used to determine whether the reconstructed pixels in the vicinity of the centralized unit are available, and to obtain the first determination result;

[0032] The second module is used to select the target prediction mode and obtain the target reference area;

[0033] The third module is used to combine the target reference region with the first judgment result to obtain the target extended region corresponding to the target reference region;

[0034] The fourth module is used to establish the target template corresponding to the target prediction pattern;

[0035] The fifth module is used to obtain a cross-component prediction model based on the target reference region and the target extended region;

[0036] The sixth module is used to obtain the SATD cost based on the target template and the cross-component prediction model, and to obtain the first prediction model.

[0037] The seventh module obtains the target RDO cost corresponding to the first prediction model, compares the target RDO cost with the current optimal RDO cost, and obtains the second prediction model as the optimal chromaticity prediction model.

[0038] This invention also provides an electronic device, which includes a processor and a memory; the memory stores a program; the processor executes the program to perform the aforementioned template-based adaptive cross-component prediction method; the electronic device has the function of carrying and running the business data processing software system provided in this invention, such as a personal computer (PC), mobile phone, smartphone, personal digital assistant (PDA), wearable device, PPC, tablet computer, vehicle terminal, etc.

[0039] This invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement the aforementioned template-based adaptive cross-component prediction method.

[0040] This invention also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned template-based adaptive cross-component prediction method.

[0041] In embodiments of the present invention, a first determination result is obtained by determining whether reconstructed pixels in the vicinity of a lumped cell are available; a target prediction mode is selected to obtain a target reference region; the target reference region is combined with the first determination result to obtain a target extended region corresponding to the target reference region; a cross-component prediction model is obtained based on the target reference region and the target extended region; a target template corresponding to the target prediction mode is established; a SATD cost is obtained based on the target template and the cross-component prediction model to obtain a first prediction model; a target RDO cost corresponding to the first prediction model is obtained, and the target RDO cost is compared with the current optimal RDO cost to obtain a second prediction model as the optimal chroma prediction model. Embodiments of the present invention can obtain the optimal prediction model for a lumped cell, thereby improving coding performance. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0043] Figure 1 A flowchart for obtaining the optimal chromaticity prediction model;

[0044] Figure 2 This is a schematic diagram of the reference area when the prediction mode is CCLM or MMLM;

[0045] Figure 3 This is a schematic diagram of the extended region when the prediction mode is CCLM or MMLM;

[0046] Figure 4 A schematic diagram of the reference region when the prediction mode is CCLM_L or MMLM_L;

[0047] Figure 5 This is a schematic diagram of the extended region when the prediction mode is CCLM_L or MMLM_L;

[0048] Figure 6 A schematic diagram of the reference region when the prediction mode is CCLM_T or MMLM_T;

[0049] Figure 7 This is a schematic diagram of the extended region when the prediction mode is CCLM_T or MMLM_T;

[0050] Figure 8 This is a schematic diagram of the template when the prediction mode is CCLM or MMLM;

[0051] Figure 9 This is a schematic diagram of the template when the prediction mode is CCLM_L or CCLM_L;

[0052] Figure 10 This is a schematic diagram of the template when the prediction mode is CCLM_T or CCLM_T. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] Before providing a detailed description of the embodiments of the present invention, necessary explanations will be given for the technical terms that may be involved in the embodiments of the present invention:

[0055] CCLM, or Cross-Component Linear Model (CCLM) prediction mode, is a technique whose core idea is to reduce cross-component redundancy and perform cross-component prediction. It mainly uses the reconstructed luminance pixels of the same coding block to construct the predicted values ​​of chrominance pixels.

[0056] Multi-model CCLM, or Multi-Model Cross-Component Linear Model (MMLM) prediction mode, is a technique that first divides the luminance values ​​of the reference region into two groups according to the mean luminance, and then constructs a linear model for each group. This results in two linear models. Then, the luminance values ​​within the coding unit are grouped, and different linear models are used to calculate the corresponding chrominance values ​​in different groups.

[0057] Compared to the previous generation of video coding standards, the existing VVC has added many key technologies, including the Cross-Component Linear Model (CCLM) prediction mode. The new technology can reduce spatial redundancy and component redundancy in the coding process, but the coding performance of the existing technology still needs to be improved.

[0058] Based on the above theoretical foundation and addressing the problems existing in the prior art, this invention provides a template-based adaptive cross-component prediction method, such as... Figure 1 As shown, the method includes:

[0059] S100: Determine whether the reconstructed pixels in the vicinity of the concentrated unit are available, and obtain the first determination result;

[0060] Specifically, the centralized unit (CU) mainly includes non-real-time wireless high-layer protocol stack functions, and also supports the deployment of some core network functions and edge application services.

[0061] S200: Select the target prediction mode and obtain the target reference area;

[0062] Specifically, the target prediction mode includes a first prediction mode, a second prediction mode, and a third prediction mode; when the target prediction mode is CCLM or MMLM, the target prediction mode is the first prediction mode; when the target prediction mode is CCLM_L or MMLM_L, the target prediction mode is the second prediction mode; when the target prediction mode is CCLM_T or MMLM_T, the target prediction mode is the third prediction mode.

[0063] Wherein, CCLM_L represents the CCLM prediction mode using only the left reference region, MMLM_L represents the MMLM prediction mode using only the left reference region, CCLM_T represents the CCLM prediction mode using only the upper reference region, and MMLM_T represents the MMLM prediction mode using only the upper reference region.

[0064] S300: Combine the target reference region with the first judgment result to obtain the target extended region corresponding to the target reference region;

[0065] Specifically, the first determination result includes: the reconstructed pixels in the upper right and lower left of the centralized unit are available, only the reconstructed pixels in the lower left of the centralized unit are available, and only the reconstructed pixels in the upper right of the centralized unit are available.

[0066] S400. Obtain a cross-component prediction model based on the target reference region and the target extended region;

[0067] Specifically, based on the cross-component prediction model, using the reconstructed luminance and chrominance values ​​of the target reference region, a quadratic function prediction model, a cubic function prediction model, and a quartic function prediction model are obtained; the cross-component prediction model is shown below:

[0068] pred C (i,j)=α0·X 4 +α1·X 3 +α2·X 2 +α3·X+α4·midValue

[0069] in,

[0070]

[0071]

[0072]

[0073] X = rec L (i,j),

[0074] midVal=2 bitDepth-1

[0075] In the formula, pred C (i,j) represents the predicted chromaticity value at position (i,j); midVal represents half the maximum value of the luminance value; α0 represents the quartic coefficient; α1 represents the cubic coefficient; α2 represents the quadratic coefficient; α3 represents the linear coefficient; α4·midValue represents the constant term; X represents the reconstructed luminance value; X 2 This represents squaring the reconstructed brightness values ​​and then scaling them to a fixed range; X 3 This means that the reconstructed brightness values ​​are cubed and then scaled to a fixed range; X 4 This means that the reconstructed brightness values ​​are processed to the fourth power and then scaled to a fixed range; rec L (i,j) represents the reconstructed brightness value at position (i,j), and bitDepth represents the bit depth;

[0076] When α0 is not 0, a quartic function prediction model can be derived; when α0 is 0, a cubic function prediction model can be derived; when both α0 and α1 are 0, a quadratic function prediction model can be derived.

[0077] Furthermore, assuming the target reference region has n pixels, the reconstructed luminance value and the reconstructed chrominance value can be represented as (x1, y1), (x2, y2), (x3, y3)...(x n ,y n ), where x1, x2, x3...x n The reconstructed brightness values ​​for each pixel are y1, y2, y3...y n The reconstructed chromaticity values ​​correspond to each pixel; the reconstructed luminance values ​​and the reconstructed chromaticity values ​​satisfy a nonlinear model correspondence, as shown below:

[0078] y n =α0·X n 4 +α1·X n 3 +α2·X n 2 +α3·X n +α4·midValu

[0079] The corresponding first matrix expression is:

[0080]

[0081] Simplifying the first matrix expression above, we obtain the second matrix, which is expressed as follows:

[0082] A·α=Y

[0083] in,

[0084] Multiply both sides of the expression for the second matrix above by A. T The expression for the third matrix is ​​obtained as follows:

[0085] ATA·α=A T Y

[0086] The expression of the third matrix is ​​subjected to LDL decomposition to obtain the coefficient values ​​of the prediction model.

[0087] Among them, A T A = LDL T

[0088] LDL T ·α=A T Y

[0089] α=(LDL T ) -1 A T Y

[0090] In the formula, X n The expression representing the result of substituting the nth pixel into the above expression; α0 represents the coefficient of the quartic term; α1 represents the coefficient of the cubic term; α2 represents the coefficient of the quadratic term; α3 represents the coefficient of the linear term; α4·midValue represents the constant term; (·) T L represents the transpose of a matrix; D represents a lower triangular matrix; and D represents a diagonal matrix.

[0091] S500. Establish the target template corresponding to the target prediction mode.

[0092] S600. Based on the target template and the cross-component prediction model, obtain the SATD cost to get the first prediction model;

[0093] Specifically, the SATD cost is the absolute sum of the coefficients after the residuals have undergone a Hadman transform.

[0094] S700. Obtain the target RDO cost corresponding to the first prediction model, compare the target RDO cost with the current optimal RDO cost, and obtain the second prediction model as the optimal chromaticity prediction model.

[0095] Specifically, the chromaticity prediction value of the lumped cell is calculated using the first prediction model, and the target RDO cost corresponding to the first prediction model is calculated. Further, the target RDO cost is compared with the optimal RDO cost corresponding to the current optimal target prediction model. If the target RDO cost is less than the optimal RDO cost, the first prediction model is selected as the second prediction model, and the obtained second prediction model is taken as the optimal chromaticity prediction model.

[0096] Optionally, in some embodiments, step S200 specifically includes the following steps:

[0097] S201. Select the first prediction mode and form a first reference region by combining a region of several widths above the central unit and a region of several widths to the left of the central unit.

[0098] Specifically, such as Figure 2 As shown, the area with a width of N above the current cluster unit and the area with a width of M to the left of the current cluster unit are combined to form the first reference area, where N and M represent the width of the first reference area, and the width of the first reference area can be set to 6.

[0099] S202. Select the second prediction mode and take the area of ​​a certain width to the left of the central unit as the second reference area;

[0100] Specifically, such as Figure 3 As shown, the area with a width of M to the left of the current concentrated unit is formed into a second reference area, where M represents the width of the second reference area, and the width of the second reference area can be set to 6.

[0101] S203. Select the third prediction mode and use a region of a certain width above the centralized unit as the third reference region;

[0102] Specifically, such as Figure 4 As shown, the area with a width of N above the current centralized unit is formed into a third reference area, where N represents the width of the third reference area, and the width of the third reference area can be set to 6.

[0103] Optionally, in some embodiments, step S300 specifically includes the following steps:

[0104] S301. When the first judgment result is that the reconstructed pixels in the upper right corner of the centralized unit and the reconstructed pixels in the lower left corner of the centralized unit are available, the first reference area is extended to the right by a certain width and extended downward by a certain height to obtain the first extended area corresponding to the first reference area.

[0105] Specifically, such as Figure 5 As shown, the first reference region can be extended to the right by the width of one of the central units and downward by the height of one of the central units.

[0106] S302. When the first judgment result is that the reconstructed pixel in the lower left corner of the centralized unit is available, the second reference area is extended downward by a certain height to obtain the second extended area corresponding to the second reference area.

[0107] Specifically, such as Figure 6 As shown, the second reference region can be extended downwards by the height of one of the centralized units.

[0108] S303. When the first judgment result is that the reconstructed pixel in the upper right corner of the centralized unit is available, the third reference region is extended to the right by a certain width to obtain the third extended region corresponding to the third reference region.

[0109] Specifically, such as Figure 7 As shown, the third reference region can be extended to the right by the width of one of the central units.

[0110] Optionally, in some embodiments, step S500 specifically includes the following steps:

[0111] S501. When the target prediction mode is the first prediction mode, a first template is established to the left and above the centralized unit.

[0112] Specifically, such as Figure 8 As shown, a first template is established in a region with a width of L to the left of the centralized unit and in a region with a width of L above the centralized unit, where L represents the width of the template, and the width of the template can be set to 4.

[0113] S502. When the target prediction mode is the second prediction mode, a second template is established to the left of the centralized unit.

[0114] Specifically, such as Figure 9 As shown, a second template is established in a region with a width of L to the left of the centralized unit, where L represents the width of the template, and the width of the template can be set to 4.

[0115] S503. When the target prediction mode is the third prediction mode, a third template is established above the centralized unit.

[0116] Specifically, such as Figure 10 As shown, a third template is established in an area with a width of L above the centralized unit, where L represents the width of the template, and the width of the template can be set to 4.

[0117] Optionally, in some embodiments, step S600 specifically includes the following steps:

[0118] S601. Obtain the corresponding reconstructed brightness values ​​of the first template, the second template, and the third template;

[0119] S602. Obtain the corresponding chromaticity prediction values ​​of the first template, the second template, and the third template through the quadratic function prediction model, the cubic function prediction model, and the quartic function prediction model.

[0120] S603. Based on the reconstructed luminance value and the predicted chrominance value, obtain the SATD cost, and take the cross-component prediction model with the smallest SATD cost as the first prediction model.

[0121] The present invention also provides a template-based adaptive cross-component prediction device, comprising:

[0122] The first module is used to determine whether the reconstructed pixels in the vicinity of the centralized unit are available, and to obtain the first determination result;

[0123] The second module is used to select the target prediction mode and obtain the target reference area;

[0124] The third module is used to combine the target reference region with the first judgment result to obtain the target extended region corresponding to the target reference region;

[0125] The fourth module is used to establish the target template corresponding to the target prediction pattern;

[0126] The fifth module is used to obtain a cross-component prediction model based on the target reference region and the target extended region;

[0127] The sixth module is used to obtain the SATD cost based on the target template and the cross-component prediction model, and to obtain the first prediction model.

[0128] The seventh module obtains the target RDO cost corresponding to the first prediction model, compares the target RDO cost with the current optimal RDO cost, and obtains the second prediction model as the optimal chromaticity prediction model.

[0129] This invention also provides an electronic device, which includes a processor and a memory; the memory stores a program; the processor executes the program to perform the aforementioned template-based adaptive cross-component prediction method; the electronic device has the function of carrying and running the business data processing software system provided in this invention, such as a personal computer (PC), mobile phone, smartphone, personal digital assistant (PDA), wearable device, PPC, tablet computer, vehicle terminal, etc.

[0130] This invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement the aforementioned template-based adaptive cross-component prediction method.

[0131] This invention also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned template-based adaptive cross-component prediction method.

[0132] In summary, the template-based adaptive cross-component prediction method of this invention has the following advantages:

[0133] 1. This invention obtains the first prediction model by acquiring the SATD cost, which can omit the processes of transformation, quantization, dequantization, inverse transformation and entropy encoding, greatly reducing the complexity of model selection.

[0134] 2. This invention utilizes RDO cost, which considers both bitrate and distortion factors when calculating the cost function, ensuring low bitrate while maintaining low distortion, which is beneficial for video stream transmission.

[0135] 3. The template-based adaptive cross-component prediction method provided by this invention can obtain the optimal prediction model of the lumped cell, thereby improving coding performance.

[0136] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and sub-operations described as part of a larger operation are executed independently.

[0137] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0138] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0139] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0140] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0141] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0142] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0143] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0144] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A template-based adaptive cross-component prediction method, characterized in that, include: Determine whether the reconstructed pixels in the vicinity of the concentrated unit are usable to obtain the first determination result; Select the target prediction mode to obtain the target reference area; The target prediction mode includes a first prediction mode, a second prediction mode, and a third prediction mode; By combining the target reference region with the first judgment result, the target extended region corresponding to the target reference region is obtained; Based on the target reference region and the target extended region, a cross-component prediction model is obtained, including: based on the cross-component prediction model, a quadratic function prediction model, a cubic function prediction model, and a quartic function prediction model are obtained. Establishing a target template corresponding to the target prediction mode includes: when the target prediction mode is the first prediction mode, establishing a first template to the left and above the centralized unit; when the target prediction mode is the second prediction mode, establishing a second template to the left of the centralized unit; and when the target prediction mode is the third prediction mode, establishing a third template above the centralized unit. Based on the target template and the cross-component prediction model, the SATD cost is obtained to obtain a first prediction model, including: obtaining the corresponding reconstructed luminance values ​​of the first template, the second template, and the third template; obtaining the corresponding chrominance prediction values ​​of the first template, the second template, and the third template through the quadratic function prediction model, the cubic function prediction model, and the quartic function prediction model; obtaining the SATD cost based on the reconstructed luminance value and the chrominance prediction value, and taking the cross-component prediction model with the minimum SATD cost as the first prediction model; Obtain the target RDO cost corresponding to the first prediction model, compare the target RDO cost with the current optimal RDO cost, and obtain the second prediction model as the optimal chromaticity prediction model.

2. The template-based adaptive cross-component prediction method according to claim 1, characterized in that, The step of selecting a target prediction mode and obtaining a target reference area includes: Select the first prediction mode, and form a first reference region by combining a region of several widths above the central unit and a region of several widths to the left of the central unit. Select the second prediction mode and use a region of a certain width to the left of the central unit as the second reference region; Selecting the third prediction mode, the region of a certain width above the centralized unit is used as the third reference region.

3. The template-based adaptive cross-component prediction method according to claim 2, characterized in that, The step of combining the target reference region with the first judgment result to obtain the target extended region corresponding to the target reference region includes: When the first determination result is that the reconstructed pixels in the upper right and lower left of the centralized unit are available, the first reference area is extended to the right by a certain width and extended downward by a certain height to obtain the first extended area corresponding to the first reference area. When the first determination result is that the reconstructed pixel in the lower left corner of the centralized unit is available, the second reference region is extended downward by a certain height to obtain the second extended region corresponding to the second reference region; When the first determination result indicates that the reconstructed pixel in the upper right corner of the centralized unit is available, the third reference region is extended to the right by a certain width to obtain the third extended region corresponding to the third reference region.

4. A template-based adaptive cross-component prediction device, characterized in that, include: The first module is used to determine whether the reconstructed pixels in the vicinity of the centralized unit are available, and to obtain the first determination result; The second module is used to select the target prediction mode and obtain the target reference area; The target prediction mode includes a first prediction mode, a second prediction mode, and a third prediction mode; The third module is used to combine the target reference region with the first judgment result to obtain the target extended region corresponding to the target reference region; The fourth module is used to establish a target template corresponding to the target prediction mode; specifically, the fourth module is used to: establish a first template to the left and above the central unit when the target prediction mode is the first prediction mode; establish a second template to the left of the central unit when the target prediction mode is the second prediction mode; and establish a third template above the central unit when the target prediction mode is the third prediction mode. The fifth module is used to obtain a cross-component prediction model based on the target reference region and the target extended region; specifically, the fifth module is used to obtain a quadratic function prediction model, a cubic function prediction model and a quartic function prediction model based on the cross-component prediction model. The sixth module is used to obtain the SATD cost based on the target template and the cross-component prediction model to obtain a first prediction model. Specifically, the sixth module is used to: obtain the corresponding reconstructed luminance values ​​of the first template, the second template, and the third template; obtain the corresponding chrominance prediction values ​​of the first template, the second template, and the third template through the quadratic function prediction model, the cubic function prediction model, and the quartic function prediction model; obtain the SATD cost based on the reconstructed luminance value and the chrominance prediction value; and select the cross-component prediction model with the minimum SATD cost as the first prediction model. The seventh module obtains the target RDO cost corresponding to the first prediction model, compares the target RDO cost with the current optimal RDO cost, and obtains the second prediction model as the optimal chromaticity prediction model.

5. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the method as described in any one of claims 1 to 3.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 3.