Chroma coding mode determination method and device, computer equipment and storage medium

By combining multiple encoding modes and reference pixel direction relationships, the target encoding mode is screened out, which solves the problem of inaccurate chrominance prediction in the prior art, and improves the video encoding effect and transmission efficiency.

CN118900322APending Publication Date: 2024-11-05TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310503523.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-05
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

In the existing video encoding technology, the intra-color prediction method assumes that the chromaticity and brightness are linear, resulting in inaccurate chromaticity prediction and affecting the video compression effect.

Method used

Provide a method for determining chromaticity encoding mode, by determining multiple encoding modes, including equalization encoding mode, bidirectional encoding mode and unidirectional encoding mode, combined with the directional relationship and importance of reference pixels, the target encoding mode is selected to improve chromaticity. Prediction accuracy.

Benefits of technology

It improves the accuracy and encoding effect of chromaticity prediction in video frames, reduces encoding complexity, and saves bandwidth during encoding and decoding, improving transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900322A_ABST
    Figure CN118900322A_ABST
Patent Text Reader

Abstract

The invention relates to a chroma coding mode determination method and device, computer equipment and a storage medium. The method comprises the following steps: determining a plurality of chroma coding modes for a current coding block in a video frame; according to the reference pixel matched with each one-way coding mode in the video frame, performing chroma prediction on the current coding block to obtain a chroma prediction value of each one-way coding mode; determining the importance degree of each one-way coding mode according to the direction relation of the reference pixel matched with each one-way coding mode relative to the current coding block; according to the chromaticity prediction value and the importance degree of each unidirectional coding mode, determining a chromaticity prediction value of a balanced coding mode; and according to the chroma predicted value of the bidirectional coding mode, the chroma predicted value of each unidirectional coding mode and the chroma predicted value of the balanced coding mode, screening out a target chroma coding mode for performing chroma coding on the current coding block from the plurality of chroma coding modes. By adopting the method, the chroma coding effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video processing technology, and in particular to a method, device, computer equipment and storage medium for determining a chroma coding mode. Background Art

[0002] Videos usually need to be compressed during transmission to reduce bandwidth consumption. In current video compression technology, compression is mainly achieved by removing redundancy. With the development of video coding technology, the video coding standard VVC (Versatile Video Coding) is widely used for intra-frame chrominance prediction in video frames to achieve video compression.

[0003] The VVC standard provides a variety of intra-frame chroma prediction methods. Each intra-frame chroma prediction method selects different reference pixels to fit a linear model to predict the chroma in the prediction block. The current intra-frame chroma prediction methods all assume that there is a preset linear relationship between chroma and brightness, which leads to the problem of inaccurate chroma prediction. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for determining a chrominance coding mode that can improve the accuracy of chrominance prediction in order to solve the above technical problems.

[0005] In one aspect, the present application provides a method for determining a chroma coding mode. The method comprises:

[0006] For a current coding block in a video frame, determining a plurality of chroma coding modes; the plurality of chroma coding modes at least include a balanced coding mode, a bidirectional coding mode for performing chroma coding based on reference pixels in multiple directions, and a plurality of unidirectional coding modes for performing chroma coding based on reference pixels in a single direction; the plurality of modes is at least two;

[0007] According to reference pixels respectively matched by the multiple unidirectional coding modes in the video frame, respectively, chrominance prediction is performed on the current coding block to obtain chrominance prediction values ​​of the multiple unidirectional coding modes;

[0008] Determining the importance of each of the multiple unidirectional coding modes according to the directional relationships of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block;

[0009] Determining a chrominance prediction value corresponding to the balanced coding mode according to the chrominance prediction values ​​and importances of the multiple unidirectional coding modes;

[0010] According to the chrominance prediction value of the bidirectional coding mode, the chrominance prediction values ​​of each of the multiple unidirectional coding modes and the chrominance prediction value of the balanced coding mode, a target chrominance coding mode for chrominance coding the current coding block is screened out from the multiple chrominance coding modes.

[0011] On the other hand, the present application also provides a device for determining a chroma coding mode. The device comprises:

[0012] A determination module, configured to determine a plurality of chroma coding modes for a current coding block in a video frame; the plurality of chroma coding modes at least include a balanced coding mode, a bidirectional coding mode for performing chroma coding based on reference pixels in multiple directions, and a plurality of unidirectional coding modes for performing chroma coding based on reference pixels in a single direction; the plurality of modes is at least two;

[0013] A prediction module, configured to perform chrominance prediction on the current coding block according to reference pixels respectively matched by the multiple unidirectional coding modes in the video frame, so as to obtain chrominance prediction values ​​of the multiple unidirectional coding modes respectively;

[0014] The determination module is further configured to determine the importance of each of the multiple unidirectional coding modes according to the direction relationship between the reference pixels matched by each of the multiple unidirectional coding modes and the current coding block;

[0015] The determination module is further configured to determine the chrominance prediction value corresponding to the balanced coding mode according to the chrominance prediction values ​​and importances of the respective unidirectional coding modes;

[0016] A screening module is used to screen out a target chroma coding mode for chroma coding the current coding block from the multiple chroma coding modes based on the chroma prediction value of the bidirectional coding mode, the chroma prediction values ​​of each of the multiple unidirectional coding modes and the chroma prediction value of the balanced coding mode.

[0017] On the other hand, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned method for determining the chroma coding mode are implemented.

[0018] On the other hand, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned method for determining the chroma coding mode are implemented.

[0019] On the other hand, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for determining the chroma coding mode are implemented.

[0020] The above-mentioned method, apparatus, computer device, storage medium and computer program product for determining the chroma coding mode first determine multiple chroma coding modes as candidates for the current coding block in the video frame, and for the unidirectional coding modes, respectively perform chroma prediction on the current coding block according to the reference pixels matched by the multiple unidirectional coding modes in the video frame to obtain the chroma prediction values ​​of the multiple unidirectional coding modes, and determine the importance of the multiple unidirectional coding modes according to the directional relationship of the reference pixels matched by the multiple unidirectional coding modes relative to the current coding block, thereby being able to combine the importance of the multiple unidirectional coding modes. The chroma prediction value and importance are used to determine the chroma prediction value corresponding to the balanced coding mode. The balanced coding mode can take into account the various linear relationships between chroma and luminance in the video frame, and combine the predictions of different unidirectional coding modes to improve the prediction accuracy of the current coding block. Therefore, based on the chroma prediction value of each chroma coding mode, the target chroma coding mode for chroma encoding of the current coding block can be screened out. By providing a new chroma coding mode, namely the balanced coding mode, as a candidate, the chroma coding mode with better prediction effect can be selected as much as possible for chroma encoding, thereby further improving the video coding effect.

[0021] On the other hand, the present application provides a method for determining a chroma decoding mode. The method comprises:

[0022] Extracting, from the bitstream information corresponding to the video to be decoded, a target mode identifier corresponding to a current decoding block in a video frame of the video to be decoded;

[0023] Determine a target chroma coding mode indicated by the target mode identifier among multiple chroma coding modes; the chroma coding modes at least include a balanced coding mode, a bidirectional coding mode for performing chroma coding based on reference pixels in multiple directions, and multiple unidirectional coding modes for performing chroma coding based on reference pixels in a single direction;

[0024] The current decoding block is decoded according to the target chroma decoding mode, and the current decoding block after the decoding is used to restore the original video.

[0025] On the other hand, the present application provides a device for determining a chroma decoding mode. The device comprises:

[0026] An extraction module, used to extract a target mode identifier corresponding to a current decoding block in a video frame of the video to be decoded from the bitstream information corresponding to the video to be decoded;

[0027] A determination module, configured to determine a target chroma coding mode indicated by the target mode identifier among a plurality of chroma coding modes; the chroma coding modes at least include a balanced coding mode, a bidirectional coding mode for performing chroma coding based on reference pixels in multiple directions, and a plurality of unidirectional coding modes for performing chroma coding based on reference pixels in a single direction;

[0028] A decoding module is used to decode the current decoding block according to the target chroma decoding mode, and the current decoding block after the decoding process is used to restore the original video.

[0029] On the other hand, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned method for determining the chroma decoding mode are implemented.

[0030] On the other hand, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned method for determining the chroma decoding mode when executed by a processor.

[0031] On the other hand, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for determining the chroma decoding mode are implemented.

[0032] The above-mentioned method, apparatus, computer equipment, storage medium and computer program product for determining the chroma decoding mode, for the current decoding block in the video frame, extract the target mode identifier corresponding to the current decoding block from the bitstream information, and decode the current decoding block according to the target mode identifier, and indicate the chroma coding mode by the mode identifier. When the video is transmitted between the encoding end and the decoding end, there is no need to transmit parameter information related to the mode, which greatly saves bandwidth occupancy and improves transmission efficiency. At the same time, by selecting the target chroma coding mode for decoding according to the mode identifier among multiple chroma coding modes, the decoding performance of the chroma block can be improved, thereby improving the decoding performance of the entire video. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A diagram of an application environment of a method for determining a chroma coding mode in some embodiments;

[0034] Figure 2 is an application environment diagram of a method for determining a chroma coding mode in some other embodiments;

[0035] Figure 3is an application environment diagram of a method for determining a chroma coding mode in some other embodiments;

[0036] Figure 4 FIG. 1 is an application environment diagram of a method for determining a chroma coding mode in some further embodiments;

[0037] Figure 5 is a flow chart of a method for determining a chroma coding mode in some embodiments;

[0038] Figure 6 A schematic diagram of the coding order of coding blocks within a video frame in some embodiments;

[0039] Figure 7 is a schematic diagram of the principles of chrominance blocks and luminance blocks in some embodiments;

[0040] Fig. 8A is a schematic diagram of reference pixels in LM mode in some embodiments;

[0041] Figure 8B Schematic diagram of reference pixels in LM-A mode in some other embodiments;

[0042] Figure 8C Schematic diagram of reference pixels in LM-L mode in some other embodiments;

[0043] Fig. 9 is a flowchart of steps of performing chrominance prediction on a current coding block in some embodiments;

[0044] Fig.10 A schematic flow chart of the steps of selecting a target chroma coding mode in some embodiments;

[0045] Fig.11 is a flowchart of a method for determining a chroma decoding mode in some embodiments;

[0046] Fig.12 is a structural block diagram of a device for determining a chroma coding mode in some embodiments;

[0047] Fig.13 is a structural block diagram of a device for determining a chroma decoding mode in some embodiments;

[0048] Fig.14 1 is a diagram of the internal structure of a computer device in some embodiments. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] The method for determining the chroma coding mode provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 is connected to the server 104 for communication. The terminal 102 and the server 104 can be directly or indirectly connected by wired or wireless communication, and this application does not limit this. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers.

[0051] In some embodiments, the terminal 102 or the server 104 determines a plurality of chroma coding modes for the current coding block in the video frame, and performs chroma prediction on the current coding block according to the reference pixels matched by the various unidirectional coding modes in the video frame, respectively, to obtain the chroma prediction values ​​of the various unidirectional coding modes. The terminal 102 or the server 104 determines the importance of the various unidirectional coding modes according to the directional relationship of the reference pixels matched by the various unidirectional coding modes relative to the current coding block. Furthermore, the terminal 102 or the server 104 determines the chroma prediction value corresponding to the balanced coding mode according to the chroma prediction values ​​and importance of the various unidirectional coding modes. Thus, the terminal 102 or the server 104 uses the bidirectional coding mode, the various unidirectional coding modes, and the balanced coding mode as candidates, and selects the target chroma coding mode for chroma coding the current coding block from the various chroma coding modes according to the chroma prediction values ​​of the bidirectional coding mode, the chroma prediction values ​​of the various unidirectional coding modes, and the chroma prediction values ​​of the balanced coding mode.

[0052] The terminal 102 may be, but is not limited to, one or more of various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, or portable wearable devices, etc. The IoT devices may be one or more of smart speakers, smart TVs, smart air conditioners, or smart vehicle-mounted devices, etc. The portable wearable devices may be one or more of smart watches, smart bracelets, or head-mounted devices, etc.

[0053] In some embodiments, the terminal 102 may be loaded with an APP (Application) application, or loaded with a video encoding application, a video decoding application, or an application with a video playback function, etc., including traditional applications that need to be installed separately, or small program applications that can be used without downloading and installing, etc. The terminal 102 can perform one or more functions of video encoding, decoding, or playback through the application.

[0054] Among them, server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0055] The terminal or the server may be an encoding end that encodes the video to be encoded, or a decoding end that decodes the video to be encoded.

[0056] In some embodiments, Figure 2 As shown, the terminal 202 is connected to the server 204 through a network for communication. The terminal 202 as an encoding end encodes the original video (i.e., the video to be encoded) to obtain the encoded video, and sends the encoded video to the server 204. The server 204 can decode the encoded video as a decoding end, or the server 204 can also send the encoded video to the terminal as a decoding end, so that the terminal as the decoding end performs decoding. Alternatively, the server 204 can also encode the original video as an encoding end to obtain the encoded video, and send the encoded video to the terminal 202, and the terminal 202 performs decoding as a decoding end.

[0057] In some embodiments, the method for determining the encoding mode provided in the embodiments of the present application can be applied to end-to-end video transmission scenarios. Figure 3 As shown, the terminal 302 as the encoding end can be connected to the network of one or more terminals 302' as the decoding end for communication. The terminal 302 encodes the original video to obtain the encoded video, and transmits the encoded video to the terminal 302'; after receiving the encoded video, the other terminal 302' decodes the encoded video to restore the original video.

[0058] In some embodiments, the method for determining the encoding mode provided in the embodiments of the present application can be applied to content distribution scenarios. Content distribution technology is a method for distributing content from a central server to an edge server close to the user, thereby achieving distributed local access to content. Content distribution technology effectively improves the service quality of content access and supports large-scale concurrent access capabilities. Figure 4As shown, it includes a terminal 402 for collecting original video, a content distribution network, and a terminal 402' for playing the original video. The terminal 402 for collecting original video is used, for example, to collect video streams in scenarios such as live video broadcasting and remote conferencing. The content distribution network includes one or more servers 404. After collecting the original video, the terminal 402 performs encoding processing to obtain an encoded video and pushes it to the server 404; the server 404 caches the encoded video and forwards it to one or more terminals 402'. Alternatively, after collecting the original video, the terminal 402 pushes the original video to the server 404; the server 404 encodes the original video to obtain an encoded video, and forwards the encoded video to one or more terminals 402'. After receiving the encoded video, the terminal 402' decodes the encoded video to restore the original video.

[0059] In some embodiments, Figure 5 As shown, a method for determining a chrominance coding mode is provided. The method is used at the encoding end. The method can be applied to a terminal or a server, or can be executed by a terminal and a server in collaboration. The following is an example of the method being applied to a computer device, which can be a terminal or a server. The method includes the following steps:

[0060] Step S502, for the current coding block in the video frame, determine multiple chroma coding modes; the multiple chroma coding modes include at least a balanced coding mode, a bidirectional coding mode for chroma coding based on reference pixels in multiple directions, and multiple unidirectional coding modes for chroma coding based on reference pixels in a single direction; the multiple modes are at least two.

[0061] Among them, encoding the video is to encode the video frames that constitute the video. In the embodiment of the present application, the video that has not been encoded is called the original video, and the video obtained after encoding the original video is the encoded video. The encoded video is also called the video to be decoded after being transmitted to the decoding end; the decoding end decodes the video to be decoded to restore the original video. Encoding the video usually includes brightness encoding, chrominance encoding, etc. In the embodiment of the present application, it is used to determine the chrominance encoding mode of the coding block in the video frame.

[0062] When encoding each video frame, it is necessary to divide the video frame to be encoded into multiple coding blocks (Coding blocks, CUs), and use the coding blocks as the basic units for determining the intra-frame chroma coding mode, and process them one by one in a certain coding order. The size of each coding block can be equal or different.

[0063] For example, Figure 6As shown, the video frame is divided into multiple coding blocks, including 32*32 coding blocks, 16*16 coding blocks, 8*8 coding blocks, etc. The computer device processes the coding blocks in sequence according to the coding order indicated by the dotted arrows.

[0064] Generally, the size of the coding block can be 8, 16, 32, 64, etc. The size of the coding block can be determined according to the distribution of high-frequency information and low-frequency information in the video frame. For example, the computer device sets a smaller coding block for the high-frequency part of the video frame to avoid losing details, and sets a larger coding block for the low-frequency part to increase the coding speed. Among them, high-frequency information usually refers to information such as contours, lines or noise, and low-frequency information usually refers to information such as large color blocks.

[0065] In an embodiment of the present application, the video frame is in the format of YUV or YCbCr (color encoding method), for example. In the YUV color space, Y represents brightness, U and V represent chrominance, and are used to specify the color of a pixel. The YCbCr color space is similar to the YUV color space, in which Y represents brightness, Cb represents the difference between the blue part of the RGB input signal and the signal brightness value, and Cr represents the difference between the red part of the RGB input signal and the signal brightness value. In the encoding and decoding process, the encoding and decoding processes corresponding to the two formats of YUV or YCbCr are similar. Correspondingly, the encoding information corresponding to each encoding block includes a brightness block and two chrominance blocks, and the two chrominance blocks correspond to the chrominance blocks of the Cb channel and the chrominance blocks of the Cr channel, respectively.

[0066] Among them, because the visual system is more sensitive to brightness than chrominance, when sampling the video frame, the sampling rate of chrominance can be lower than the sampling rate of brightness, that is, several adjacent pixels can share the same chrominance value, thereby achieving the purpose of data compression. Therefore, the size of the brightness block is usually multiple times larger than the size of the chrominance block. For example, Figure 7 As shown, the size of the chroma block (Chroma) is 4 × 4, and the size of the luma block (Luma) is 8 × 8. In one embodiment, a 4:4:4 sampling rate may be used for a YUV format video frame, in which case the size of the luma block is the same as the size of the chroma block.

[0067] In some embodiments, for the current coding block in the video frame, the computer device determines multiple chroma coding modes, including: the computer device determines multiple chroma coding modes as candidates from the chroma coding modes preset in the VVC standard, including one or more of the CCLM mode (cross component mode), PLANAR mode (planar mode), VER mode (vertical mode), HOR mode (horizontal mode), or DC mode (mean mode).

[0068] In some embodiments, the CCLM mode includes a bidirectional coding mode (LM mode) for chroma encoding based on reference pixels in multiple directions, and multiple unidirectional coding modes (LM-A mode and LM-L mode) for chroma encoding based on reference pixels in a single direction. Since the chroma in the video frame, that is, in the same area, is roughly the same or the difference is small, the distance between the block pixel and the reference pixel in the current coding block can also be used as a measurement factor for chroma encoding. For example, the closer the block pixel in the current coding block is to a reference pixel, the closer its chroma value may be to the chroma value of the reference pixel. Since the unidirectional coding mode performs chroma prediction based on reference pixels at a fixed position in one direction of the current coding block, the distance factor between the block pixel in the current coding block and the reference pixel is not considered. Therefore, a new chroma encoding mode, namely a balanced coding mode, is proposed in an embodiment of the present application. By considering the distance factor between the block pixel and the reference pixel in the current coding block during chroma encoding, the accuracy of the prediction of the chroma value of the block pixel is improved. Among them, the balanced coding mode is obtained based on the LM-A mode and the LM-L mode, which can be expressed as the LM-W mode.

[0069] Step S504 , performing chrominance prediction on the current coding block according to the reference pixels matched by the various unidirectional coding modes in the video frame, respectively, to obtain chrominance prediction values ​​of the various unidirectional coding modes.

[0070] Among them, the reference pixel is the pixel adjacent to the current coding block in the coded coding blocks around the current coding block. Usually according to the coding order, the coding blocks above and to the left of the current coding block are coded blocks, so the pixels above and to the left of the current coding block are used as reference pixels for subsequent mode selection. Of course, depending on the coding order, the coded block can be located above, to the left, to the right, or below the current coding block, and accordingly, the surrounding pixels can also be pixels located above and to the right, to the left and below, or to the right and below, etc. of the current coding block.

[0071] Exemplarily, assuming that the size of the current coding block is W*H, the position of the reference pixel selected by the computer device is different for different coding modes. For the current coding block, the position of the upper adjacent pixel is expressed as S[0, -1]...S[W'-1, -1], and the position of the left adjacent pixel is expressed as S[-1, 0]...S[-1, H'-1]. When the LM mode is applied, W'=W, H'=H; when the LM-A mode is applied, W'=W+H; when the LM-L mode is applied, H'=H+W.

[0072] For example, Fig. 8AAs shown in the figure, when the LM mode is applied, the computer device selects reference pixels above and to the left of the current coding block for chrominance prediction. The positions of the reference pixels selected by the computer device in the LM mode are S[W' / 4,-1], S[3*W' / 4,-1], S[-1,H' / 4], and S[-1,3*H' / 4], as shown in the black circles in the figure.

[0073] For example, Figure 8B As shown in the figure, when in LM-A mode, the computer device selects reference pixels above the current coding block to perform chrominance prediction. The positions of the reference pixels selected by the computer device in LM-A mode are S[W' / 8,-1], S[3*W' / 8,-1], S[5*W' / 8,-1], and S[7*W' / 8,-1], as shown by the black circles in the figure.

[0074] For example, Figure 8C As shown in the figure, when in LM-L mode, the computer device selects reference pixels on the left side of the current coding block for chrominance prediction. The positions of the reference pixels selected by the computer device in LM-L mode are S[-1,H' / 8], S[-1,3*H' / 8], S[-1,5*H' / 8], and S[-1,7*H' / 8], as shown in the black circles in the figure.

[0075] In some embodiments, a computer device performs chrominance prediction on a current coding block according to reference pixels that respectively match a plurality of unidirectional coding modes in a video frame to obtain chrominance prediction values ​​of the plurality of unidirectional coding modes, including: for each of the plurality of unidirectional coding modes, the computer device selects a plurality of reference pixels from the surrounding pixels of the current coding block as reference pixels that match the targeted unidirectional coding mode, and performs chrominance prediction on the current coding block according to the selected plurality of reference pixels, thereby obtaining a chrominance prediction value corresponding to the targeted unidirectional coding mode.

[0076] Among them, in CCLM mode, the chrominance value is mainly predicted by the reconstructed luminance value of the coding block. Figure 7 As shown, when the computer device predicts the chrominance of the current coding block, it predicts by the following formula:

[0077] pred C (i,j)=α×Rec′ L (i,j)+β

[0078] Among them, pred C (i, j) is the predicted chrominance value of the pixel in the current coding block, Rec′ L(i, j) represents the result of downsampling the reconstructed brightness value of the pixel in the current coding block. (i, j) is the position of the pixel in the current coding block. Parameters α and β are chroma coding parameters. Rec C (i,j) represents the chrominance value of the reference pixel.

[0079] Exemplarily, the computer device obtains the chrominance prediction value of the pixel in the current coding block as pred0(i,j) based on the LM-L mode, and obtains the chrominance prediction value of the pixel in the current coding block as pred1(i,j) based on the LM-A mode.

[0080] In some embodiments, a computer device performs chrominance prediction on a current coding block based on multiple selected reference pixels, including: determining chrominance coding parameters through the selected multiple reference pixels, and predicting chrominance values ​​of pixels in the current coding block based on the determined chrominance coding parameters and reconstructed luminance values ​​of pixels in the current coding block.

[0081] It should be noted that, when the current coding block is the first coding block, since there are no coded blocks around the coding block, the computer device directly sets the pixel value according to a preset rule. For example, the computer device directly sets the brightness value of the current coding block to 100 and the chrominance value to 255.

[0082] Step S506: Determine the importance of each of the multiple unidirectional coding modes according to the directional relationships of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block.

[0083] The directional relationship of the reference pixel relative to the current coding block refers to whether the reference pixel is located above, to the left, below, or to the right of the current coding block.

[0084] There may be multiple linear relationships between the brightness and chrominance of pixels in a coding block. For example, the chrominance value of the pixel near the left in the current coding block may be closer to the chrominance value of the reference pixel on the left, and the chrominance value of the pixel near the top in the current coding block may be closer to the chrominance value of the reference pixel above. In view of this, in the embodiment of the present application, importance is determined for different unidirectional coding modes to characterize the importance of the reference pixels selected in the corresponding unidirectional coding mode.

[0085] In some embodiments, a computer device determines the directional relationship of reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block, including: for each of the multiple unidirectional coding modes, determining the reference pixels corresponding to the targeted unidirectional coding mode; and determining the directional relationship of the reference pixels matched by the targeted unidirectional coding mode relative to the current coding block based on the positions of the determined reference pixels and the positions of the pixels within the block in the current coding block.

[0086] In other embodiments, a computer device determines the directional relationship of reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block, including: for each of the multiple unidirectional coding modes, directly determining the directional relationship of the matched reference pixels relative to the current coding block according to a rule for selecting reference pixels preset in the targeted unidirectional coding mode.

[0087] For example, considering that the accuracy of pixels near the top of the current coding block is higher in the LM-A mode, and the accuracy of pixels near the left of the current coding block is higher in the LM-L mode, the weight of the prediction result of pixels near the top of the current coding block should be higher when predicting based on the LM-A mode, and the weight of the prediction result of pixels near the left of the current coding block should be higher when predicting based on the LM-L mode. In view of this, the importance w1(i,j) corresponding to the LM-A mode can be expressed as:

[0088]

[0089] Where W and H are the width and height of the current coding block. Correspondingly, the importance w0(i,j) corresponding to the LM-L mode can be expressed as:

[0090] w0(i,j)=64-w1(i,j)

[0091] Step S508: Determine the chrominance prediction value corresponding to the balanced coding mode according to the chrominance prediction values ​​and importance of each of the multiple unidirectional coding modes.

[0092] On the basis of the existing unidirectional coding modes, the importance corresponding to each unidirectional coding mode is determined respectively, and the unidirectional coding modes in different directions are combined, so that the distances between the pixels in the current coding block and the reference pixels in different directions can be balanced. For example, for the pixel in the upper right corner of the current coding block, the distance between it and the reference pixel above is closer and the distance between it and the reference pixel on the left is farther, so the importance of the unidirectional coding mode that selects the reference pixel above for chroma encoding should be higher, and the importance of the unidirectional coding mode that selects the reference pixel on the left for chroma encoding should be lower, which reflects the characteristic that the chroma value of the pixel in the block should be closer to the chroma value of the reference pixel above.

[0093] Specifically, the computer device combines the chrominance prediction values ​​of various unidirectional coding modes according to the importance corresponding to each unidirectional coding mode, thereby obtaining a chrominance prediction value corresponding to the balanced coding mode.

[0094] Among them, the manner of combining the chrominance prediction values ​​of various unidirectional coding modes includes but is not limited to weighted summation, etc. In some embodiments, the computer device determines the chrominance prediction value corresponding to the balanced coding mode according to the chrominance prediction values ​​and importance of each of the multiple unidirectional coding modes, including: taking the importance of each of the multiple unidirectional coding modes as a weighting factor, performing weighted summation on the chrominance prediction values ​​of each of the multiple unidirectional coding modes, and obtaining the chrominance prediction value corresponding to the balanced coding mode.

[0095] Exemplarily, the computer device obtains the predicted pixel of the current chroma block based on the LM-L mode as pred0(i, j), and obtains the predicted pixel of the current chroma block based on the LM-A mode as pred1(i, j), and performs weighted summation to obtain the chroma prediction value pred corresponding to the balanced coding mode W (i,j) can be expressed by the following formula:

[0096] pred W (i,j)=(pred0(i,j)*w0(i,j)+pred1(i,j)*w1(i,j)+32)>>6

[0097] Here, ">>6" means shifting right by 6 bits.

[0098] Therefore, by combining various unidirectional coding modes in an importance manner, while considering the regional characteristics of chrominance in the video frame, the influence of the distance between the intra-block pixels in the coding block and the reference pixels on the chrominance values ​​of the intra-block pixels is taken into account, thereby improving the coding accuracy and reducing the coding complexity.

[0099] Step S510, selecting a target chroma coding mode for chroma coding the current coding block from multiple chroma coding modes according to the chroma prediction value of the bidirectional coding mode, the chroma prediction values ​​of multiple unidirectional coding modes, and the chroma prediction value of the equalization coding mode.

[0100] Specifically, after determining the chroma prediction value corresponding to each chroma coding mode, the computer device compares the chroma prediction value and uses the chroma coding mode with the highest coding performance as the target chroma coding mode. Thus, after determining the target chroma coding mode, the computer device can use the target chroma coding mode to encode the current coding block.

[0101] In some embodiments, the computer device selects a target chroma coding mode for chroma coding of the current coding block from multiple chroma coding modes according to the chroma prediction value of the bidirectional coding mode, the chroma prediction values ​​of each of the multiple unidirectional coding modes, and the chroma prediction value of the balanced coding mode, including: evaluating the chroma prediction values ​​corresponding to each coding mode respectively with the same performance evaluation index, and selecting the target coding mode. The performance evaluation index includes but is not limited to one or more of the coding time, coding time complexity, coding bit consumption, or coding quality loss. The coding quality loss can be the difference between the chroma prediction value and the original chroma value.

[0102] Exemplarily, for the LM mode, LM-L mode, LM-A mode and the newly added LM-W mode, the computer device calculates the prediction distortion value of each mode according to the chrominance prediction value corresponding to each mode, and selects the mode with the smallest prediction distortion value as the target chrominance coding mode. The prediction distortion value is used to characterize the coding quality loss.

[0103] Exemplarily, the predicted distortion value may be obtained by calculating the SSD (sum of squared differences) of the original chrominance value and the chrominance predicted value, which may be expressed as follows:

[0104]

[0105] Among them, pred(x,y) represents the chrominance prediction value of the pixel in the block located at the (x,y) coordinate in the current coding block, orig(x,y) represents the original chrominance value of the pixel in the block located at the (x,y) coordinate in the current coding block, and W and H are the width and height of the current coding block.

[0106] In some embodiments, if the predicted distortion value of any chroma coding mode in the CCLM mode is the smallest, the computer device selects the CCLM mode (including LM mode, LM-L mode, LM-A mode and the newly added LM-W mode), otherwise the computer device may select other modes in the VVC standard except the CCLM mode.

[0107] In the above-mentioned method for determining the chroma coding mode, for the current coding block in the video frame, multiple chroma coding modes as candidates are first determined. For the unidirectional coding modes therein, chroma prediction is performed on the current coding block according to the reference pixels matched by the multiple unidirectional coding modes in the video frame, so as to obtain the chroma prediction values ​​of the multiple unidirectional coding modes respectively, and the importance of the multiple unidirectional coding modes is determined according to the directional relationship of the reference pixels matched by the multiple unidirectional coding modes respectively relative to the current coding block. Thus, the chroma prediction values ​​and importance of the multiple unidirectional coding modes can be combined to determine the chroma prediction value corresponding to the balanced coding mode. The balanced coding mode can take into account the multiple linear relationships between chroma and luminance in the video frame, and combine the predictions of different unidirectional coding modes to improve the prediction accuracy of the current coding block. Thus, based on the chroma prediction values ​​of each chroma coding mode, the target chroma coding mode for chroma coding the current coding block can be screened out. By providing a new chroma coding mode, namely the balanced coding mode, as a candidate, the chroma coding mode with better prediction effect can be selected as much as possible for chroma coding, thereby further improving the video coding effect.

[0108] In the embodiment of the present application, the linear model parameters in the CCLM mode are determined based on the reference pixels. Based on the selected reference pixels, the linear models in different modes can be determined respectively. Then, the computer device can perform chrominance prediction on the luminance values ​​of the pixels in the current coding block according to the determined linear model, thereby obtaining the chrominance prediction values ​​of the pixels in the block. To this end, in some embodiments, such as Fig. 9 As shown, according to the reference pixels matched by the various unidirectional coding modes in the video frame, the chrominance prediction of the current coding block is performed respectively to obtain the chrominance prediction values ​​of the various unidirectional coding modes, including:

[0109] Step S902: for any one-way coding mode among the multiple one-way coding modes, determine surrounding pixels matching the one-way coding mode in the video frame.

[0110] Step S904 , determining a reference pixel among surrounding pixels, and obtaining a reconstructed brightness value and a reconstructed chrominance value of the reference pixel.

[0111] Step S906: Based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixel, chrominance prediction is performed on the pixels within the current coding block to obtain a chrominance prediction value for the unidirectional coding mode.

[0112] Specifically, for any one of the multiple one-way coding modes, the computer device determines the surrounding pixels that match the one-way coding mode in the coded block in the video frame. The computer device determines the surrounding pixels in the coded block adjacent to the current coding block according to the one-way coding mode, and determines the reference pixel in the surrounding pixels. In some embodiments, the coded block is located to the left, above, below, or right of the current coding block.

[0113] For example, taking four reference pixels as an example, the pixel positions of the reference pixels selected in the LM mode can be referred to again. Fig. 8A The pixel position of the reference pixel selected in the LM-A mode can be referred to Figure 8B The pixel position of the reference pixel selected in the LM-L mode can be referred to Figure 8C shown.

[0114] Furthermore, the computer device obtains the reconstructed luminance value and the reconstructed chrominance value of the reference pixel, and performs chrominance prediction on the intra-block pixels in the current coding block according to the reconstructed luminance value and the reconstructed chrominance value, thereby obtaining the chrominance prediction value of the targeted unidirectional coding mode.

[0115] In the above embodiment, by selecting different reference pixels according to different modes, and performing chrominance prediction on pixels that have not yet been reconstructed in the current coding block based on the reconstructed luminance values ​​and reconstructed chrominance values ​​of the reference pixels, component redundancy between chrominance components and luminance components can be reduced, thereby improving coding performance.

[0116] Among them, in some embodiments, determining the surrounding pixels that match the targeted unidirectional coding mode in the video frame includes: taking pixels adjacent to the current coding block and located in a first preset direction of the current coding block as surrounding pixels that match the targeted unidirectional coding mode; or, taking pixels adjacent to the current coding block and located in a second preset direction of the current coding block as surrounding pixels that match the targeted unidirectional coding mode.

[0117] The reference pixel selected in the unidirectional coding mode is located in one direction of the current coding block relative to the current coding block. The first preset direction refers to one direction above, left, below, or right of the current coding block. The second preset direction is a direction different from the first preset direction.

[0118] Specifically, for any unidirectional coding mode, the computer device uses pixels in a coded block adjacent to the current coding block and located in a first preset direction of the current coding block as surrounding pixels that match the targeted unidirectional coding mode. The surrounding pixels may, for example, be adjacent to the current coding block. Alternatively, the computer device uses pixels in a coded block adjacent to the current coding block and located in a second preset direction of the current coding block as surrounding pixels that match the targeted unidirectional coding mode.

[0119] In the above embodiment, by determining different directions according to different modes and then selecting reference pixels according to the determined directions, the continuity of chrominance values ​​within a certain range in the video frame is fully taken into account, thereby improving the accuracy of chrominance encoding.

[0120] Among them, in some embodiments, chroma prediction is performed on the current coding block based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixel to obtain the chroma prediction value of the targeted unidirectional coding mode, including: determining the chroma coding parameters matching the targeted unidirectional coding mode based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixel; constructing a prediction linear relationship matching the targeted unidirectional coding mode based on the chroma coding parameters matching the targeted unidirectional coding mode; substituting the luminance value of the pixel in the block in the current coding block into the prediction linear relationship to obtain the chroma prediction value of the targeted unidirectional coding mode.

[0121] Specifically, the computer device determines the chrominance coding parameters matching the targeted unidirectional coding mode based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixel and the linear relationship between the chrominance value and the luminance value preset in the CCLM mode to construct a prediction linear relationship. The selected reference pixels are four or more.

[0122] In some embodiments, a computer device determines chrominance coding parameters that match the targeted unidirectional coding mode based on the reconstructed luminance values ​​and the reconstructed chrominance values ​​of the reference pixels, including: comparing the selected reference pixels to obtain the larger and smaller values ​​of the reconstructed chrominance values ​​and the larger and smaller values ​​of the reconstructed luminance values, and determining the chrominance coding parameters that match the targeted unidirectional coding mode based on the larger and smaller values ​​of the reconstructed chrominance values ​​and the larger and smaller values ​​of the reconstructed luminance values.

[0123] Exemplarily, for the selected surrounding pixels, the computer device compares the reconstructed brightness values ​​corresponding to the surrounding pixels to obtain two larger values ​​X of the reconstructed brightness values. 0 A and X 1 A , and two smaller values ​​X 0 B and X 1B The computer equipment obtains two larger values ​​X 0 A and X 1 A The reconstructed chromaticity value Y of the corresponding second surrounding pixel 0 A and Y 1 A , and two smaller values ​​X 0 B and X 1 B The reconstructed chromaticity value Y of the corresponding second surrounding pixel 0 B and Y 1 B .

[0124] According to the two larger values ​​X of the reconstructed brightness value 0 A and X 1 A , computer equipment calculation X 0 A and X 1 A The mean Xa, and the corresponding reconstructed chrominance value Y 0 A and Y 1 A The mean value Ya; according to the two smaller values ​​X of the reconstructed brightness value 0 B and X 1 B , computer equipment calculation X 0 B and X 1 B The mean value Xb, and the corresponding reconstructed chrominance value Y 0 B and Y 1 B The mean value Yb. Therefore, the chrominance coding parameter can be calculated according to the following formula:

[0125] α=(Ya-Yb) / (Xa-Xb)

[0126] β=Yb-α*Xb

[0127] Of course, the above formula is only an example, and the computer device can also calculate the chrominance coding parameters α and β using other applicable formulas.

[0128] Thus, the computer device can construct a prediction linear relationship that matches the targeted unidirectional coding mode based on the chrominance coding parameters that match the targeted unidirectional coding mode. Exemplarily, the computer device constructs the prediction linear relationship as shown below:

[0129] pred C (i,j)=α×Rec′ L (i,j)+β

[0130] Furthermore, the computer device substitutes the brightness value of the pixels in the current coding block into the prediction linear relationship to obtain the chrominance prediction value for the unidirectional coding mode.

[0131] In the above embodiment, by performing chrominance prediction on pixels of the current coding block that have not been reconstructed by referring to the reconstructed luminance value and the reconstructed chrominance value of the reconstructed reference pixel, component redundancy between chrominance components and luminance components can be reduced, thereby improving coding performance.

[0132] Since the chromaticity value of the pixel close to the left in the current coding block may be closer to the chromaticity value of the reference pixel on the left, the chromaticity value of the pixel close to the top in the current coding block may be closer to the chromaticity value of the reference pixel above, in view of this, in some embodiments, the importance of each of the multiple unidirectional coding modes is determined according to the directional relationship of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block, including: determining the pixel distance between the reference pixels matched by each of the multiple unidirectional coding modes and the pixels within the block in the current coding block according to the directional relationship of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block; determining the importance of each of the multiple unidirectional coding modes according to the pixel distance between the reference pixels matched by each of the multiple unidirectional coding modes and the pixels within the block in the current coding block.

[0133] Specifically, for any one-way coding mode, the computer device determines the pixel distance between the reference pixel matched by the one-way coding mode and the pixel in the current coding block according to the direction relationship of the reference pixel matched by the one-way coding mode relative to the current coding block, such as above or left, etc. The pixel distance refers to the coordinate distance of the pixel in the video frame.

[0134] For example, when the reference pixel selected in the targeted unidirectional coding mode is located above the current coding block, the computer device determines the pixel distance in the vertical direction between the reference pixel in the mode and the intra-block pixel in the current coding block.

[0135] Furthermore, the computer device determines the importance of each of the multiple unidirectional coding modes according to the pixel distance between the reference pixels matched by each of the multiple unidirectional coding modes and the pixels in the block of the current coding block. In some embodiments, the computer device determines the importance according to the size of the pixel distance, that is, the pixel distance is proportional to the importance. In other embodiments, the computer device performs a numerical transformation according to the pixel distance to obtain the importance. Among them, the numerical transformation includes but is not limited to one or more of addition and subtraction operations, multiplication and division operations, exponential operations, or power operations.

[0136] In the above embodiment, by considering the directional relationship between the reference pixels selected in different unidirectional coding modes and the current coding block, the continuity of the chrominance values ​​in the video frame is further utilized, and the predictions of different unidirectional coding modes are combined, which can further improve the prediction accuracy of the current coding block.

[0137] Among them, in some embodiments, the multiple unidirectional coding modes include a first unidirectional coding mode and a second unidirectional coding mode; the reference pixels matched by the first unidirectional coding mode are located in a first preset direction of the current coding block; the reference pixels matched by the second unidirectional coding mode are located in a second preset direction of the current coding block; the first preset direction is different from the second preset direction. For example, the computer device uses the LM-A mode as the first unidirectional coding mode and the LM-L mode as the second unidirectional coding mode. Then the computer device determines the pixel distance between the intra-block pixels in the current coding block and the reference pixels matched under different coding modes according to the directions of the reference pixels selected by different coding modes relative to the current coding block.

[0138] Accordingly, in some embodiments, the pixel distances between the reference pixels matched by each of the multiple unidirectional coding modes and the intra-block pixels in the current coding block are determined respectively according to the directional relationships between the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block, including: determining the longitudinal pixel distance between the intra-block pixels in the current coding block and the reference pixels matched by the first unidirectional coding mode; the smaller the longitudinal pixel distance, the higher the importance of the first unidirectional coding mode and the lower the importance of the second unidirectional coding mode; determining the transverse pixel distance between the intra-block pixels in the current coding block and the reference pixels matched by the second unidirectional coding mode; the smaller the transverse pixel distance, the lower the importance of the first unidirectional coding mode and the higher the importance of the second unidirectional coding mode.

[0139] Taking the first preset direction characterizing that the reference pixel is located above the current coding block as an example, the computer device determines the vertical pixel distance between the intra-block pixel in the current coding block and the reference pixel matched by the first unidirectional coding mode. Taking the second preset direction characterizing that the reference pixel is located to the left of the current coding block as an example, the computer device determines the horizontal pixel distance between the intra-block pixel in the current coding block and the reference pixel matched by the second unidirectional coding mode.

[0140] Among them, the smaller the vertical pixel distance is, the higher the importance of the first unidirectional coding mode is and the lower the importance of the second unidirectional coding mode is; the smaller the horizontal pixel distance is, the lower the importance of the first unidirectional coding mode is and the higher the importance of the second unidirectional coding mode is. Thus, it can be represented that the chromaticity value of the pixel close to the left in the current coding block may be closer to the chromaticity value of the reference pixel on the left, and the chromaticity value of the pixel close to the top in the current coding block may be closer to the chromaticity value of the reference pixel above. The linear relationship.

[0141] In the above embodiment, by considering the directional relationship between the reference pixels selected in different unidirectional coding modes and the current coding block, the continuity of the chrominance values ​​in the video frame is further utilized, and the predictions of different unidirectional coding modes are combined, which can further improve the prediction accuracy of the current coding block.

[0142] In some embodiments, Fig.10 As shown, according to the chrominance prediction value of the bidirectional coding mode, the chrominance prediction values ​​of the multiple unidirectional coding modes, and the chrominance prediction value of the balanced coding mode, a target chrominance coding mode for chrominance coding of the current coding block is selected from the multiple chrominance coding modes, including:

[0143] Step S1002: determining a first prediction distortion value between a chroma prediction value of a bidirectional coding mode and an original chroma value of a pixel in a current coding block.

[0144] Step S1004: determining second prediction distortion values ​​between the chrominance prediction values ​​of the plurality of unidirectional coding modes and the original chrominance values ​​of the pixels in the current coding block.

[0145] Step S1006: determine a third prediction distortion value between the chrominance prediction value of the balanced coding mode and the original chrominance value of the pixel in the current coding block.

[0146] Step S1008: determining a minimum prediction distortion value among the first prediction distortion value, each second prediction distortion value, and the third prediction distortion value.

[0147] Step S1010: Using the chroma coding mode corresponding to the minimum prediction distortion value as the target chroma coding mode for chroma coding the current coding block.

[0148] Specifically, the computer device calculates the prediction distortion value under each chroma coding mode respectively. The prediction distortion value refers to the distortion between the chroma prediction value under different chroma coding modes and the original chroma value of the pixel in the block, so as to characterize the difference in chroma value caused by chroma prediction under different chroma coding modes.

[0149] Among them, the computer device calculates the prediction distortion value between the chrominance prediction value of the bidirectional coding mode and the original chrominance value of the pixel in the block in the current coding block as the first prediction distortion value; calculates the prediction distortion value between the chrominance prediction value of each unidirectional coding mode and the original chrominance value of the pixel in the block as the second prediction distortion value; and calculates the prediction distortion value between the chrominance prediction value of the equalization coding mode and the original chrominance value of the pixel in the block as the third prediction distortion value.

[0150] Exemplarily, the predicted distortion value may be obtained by calculating the SSD (sum of squared differences) of the original chrominance value and the chrominance predicted value, which may be expressed as follows:

[0151]

[0152] Furthermore, the computer device compares the prediction distortion values ​​of various chroma coding modes, determines the minimum prediction distortion value, and uses the chroma coding mode corresponding to the minimum prediction distortion value as the target chroma coding mode for chroma coding the current coding block.

[0153] In the above embodiment, by selecting the chroma coding mode with the smallest prediction distortion value as the target chroma coding mode through coding decision, the coding performance of the coding block can be improved, thereby improving the compression performance of the video.

[0154] Among them, in the process of networked video transmission, the code stream information usually records the information when the video is encoded, such as video frame rate, video width and height, resolution, etc. Since the calculation process of the chrominance coding parameters is not only performed at the encoding end, but also at the decoding end, the chrominance coding parameters α and β do not need to be recorded in the code stream information. During the encoding process, the computer device also needs to indicate the selected chrominance coding mode through a mode identifier. The mode identifier is usually represented by binary.

[0155] As shown in Table 1 below, Table 1 gives the mode identifiers of various traditional chroma coding modes in the VVC standard, where mode identifiers 0 to 4 are traditional chroma modes, and mode identifiers 5 to 7 are three modes in the CCLM mode, namely LM mode, LM-A mode and LM-L mode.

[0156]

[0157]

[0158] Table 1

[0159] In the embodiment of the present application, since a new CCLM mode (i.e., LM-W mode) is added, it is necessary to modify the bit to identify which CCLM mode is selected. As shown in Table 2 below, Table 2 gives the mode identifiers of the various chrominance coding modes in the embodiment of the present application. Among them, for example, the mode identifier corresponding to the DM mode is 00, the mode identifier corresponding to the Planar mode is 0100, the mode identifier corresponding to the vertical mode is 0101, the mode identifier corresponding to the horizontal mode is 0110, and the mode identifier corresponding to the DC mode is 0111. Mode identifier 5 represents the LM mode, mode identifier 6 represents the newly added LM-W mode, mode identifier 7 represents the LM-L mode, and mode identifier 8 represents the LM-A mode.

[0160] Chroma encoding mode Mode Identifier 4 00 0 0100 1 0101 2 0110 3 0111 5(LM) 10 6(LM-W) 110 7(LM-L) 1110 8(LM-A) 1111

[0161] Table 2

[0162] When encoding, the encoding end writes the mode identifier into the bitstream information. For example, when the computer device selects the LMW mode for the current encoding block, the mode identifier 110 is written into the bitstream information.

[0163] Among them, for each mode in the CCLM mode, each mode is sorted according to the probability of selection; the higher the probability of a mode selection, the lower the complexity of the corresponding mode identification, thereby reducing the occupancy rate of bandwidth resources. For example, when most coding blocks select the LM mode, the mode identification of the LM mode is determined to be 10, that is, only 2 bits are needed to represent the LM mode. The less commonly used chroma coding modes are sorted later to be represented by more bits.

[0164] After determining the target chroma coding mode, the computer device encodes the current coding block according to the target chroma coding mode. To this end, in some embodiments, the method for determining the chroma coding mode provided in the embodiments of the present application also includes: encoding the current coding block according to the target chroma coding mode, and adding the target mode identifier corresponding to the target chroma coding mode to the bitstream information; the target mode identifier is used to instruct the decoding end to perform decoding according to the target chroma coding mode adopted during chroma coding.

[0165] Specifically, the computer device performs encoding processing on the current coding block according to the target chroma coding mode. In the process of encoding processing, the computer device also adds the target mode identifier corresponding to the target chroma coding mode to the bitstream information, so that the decoding end can subsequently determine the corresponding target chroma coding mode by extracting the target mode identifier from the bitstream information. Then, the decoding end performs decoding processing on the current coding block according to the target chroma coding mode.

[0166] In the above embodiment, the selected chroma coding mode is indicated by a mode identifier, and the video does not need to carry information such as chroma coding parameters during transmission, which greatly reduces the occupation of bandwidth resources and thus improves transmission efficiency.

[0167] In some embodiments, the method for determining the chroma coding mode provided in the embodiments of the present application also includes: encoding each video frame in the video to be encoded to obtain an encoded video; sending the encoded video carrying the bitstream information to the decoding end, so that the decoding end determines the target chroma coding mode based on the received encoded video according to the mode identifier in the bitstream information, and decodes the encoded video based on the chroma target coding mode.

[0168] Specifically, the computer device performs the above processing on each coding block in the video frame, and performs the above processing on each video frame in the video to be coded, so as to achieve compression in the video frame, thereby obtaining the coded video. Then, the computer device can send the coded video carrying the code stream information to the decoding end.

[0169] After receiving the encoded video, the decoder obtains the bitstream information of the encoded video and extracts the target mode identifier from it, and then determines the target chroma coding mode corresponding to a certain coding block in one of the video frames according to the target mode identifier. Then, the decoder decodes the coding block based on the target chroma coding mode. Each coding block in the video frame is decoded, and each video frame in the encoded video is decoded, thereby restoring the original video. After obtaining the original video, the decoder can play the original video, etc.

[0170] In the above embodiment, the selected chroma coding mode is represented by a mode identifier, and the selected reference row is represented by a reference row identifier. During the transmission process, the video does not need to carry information such as chroma coding parameters, and only needs to transmit a few bits, which greatly reduces the occupancy of bandwidth resources and improves transmission efficiency.

[0171] The present application also provides an application scenario, which applies the above-mentioned method for determining the chroma coding mode. Specifically, the application of the method for determining the chroma coding mode in the application scenario is as follows: for the current coding block in the video frame, the computer device determines multiple chroma coding modes. The computer device performs chroma prediction on the current coding block according to the reference pixels matched by each of the multiple unidirectional coding modes in the video frame, obtains the chroma prediction values ​​of each of the multiple unidirectional coding modes, and determines the importance of each of the multiple unidirectional coding modes according to the directional relationship of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block. Thus, the computer device determines the chroma prediction value corresponding to the balanced coding mode according to the chroma prediction value and importance of each of the multiple unidirectional coding modes. Furthermore, the computer device selects the target chroma coding mode for chroma coding the current coding block from the multiple chroma coding modes according to the chroma prediction value of the bidirectional coding mode, the chroma prediction values ​​of each of the multiple unidirectional coding modes, and the chroma prediction value of the balanced coding mode.

[0172] Of course, it is not limited to this. The method for determining the chrominance coding mode provided in the present application can also be applied to other application scenarios, such as video playback on video websites, real-time live broadcast, online conferences, online classes, car navigation, or image transmission, thereby improving the video compression performance and saving transmission bandwidth.

[0173] In a specific example, the method for determining the chrominance coding mode provided in an embodiment of the present application includes the following steps: for a current coding block in a video frame, a computer device determines multiple chrominance coding modes, and for any one of the multiple unidirectional coding modes, pixels adjacent to the current coding block and located in a first preset direction of the current coding block are used as surrounding pixels that match the targeted unidirectional coding mode; or, pixels adjacent to the current coding block and located in a second preset direction of the current coding block are used as surrounding pixels that match the targeted unidirectional coding mode.

[0174] The computer device determines the reference pixel among the surrounding pixels, obtains the reconstructed brightness value and the reconstructed chrominance value of the reference pixel, and determines the chrominance coding parameters that match the targeted unidirectional coding mode based on the reconstructed brightness value and the reconstructed chrominance value of the reference pixel. Thus, the computer device can construct a prediction linear relationship that matches the targeted unidirectional coding mode based on the chrominance coding parameters that match the targeted unidirectional coding mode. For the intra-block pixels in the current coding block, the computer device substitutes the brightness value of the intra-block pixels in the current coding block into the prediction linear relationship to obtain the chrominance prediction value of the targeted unidirectional coding mode.

[0175] The computer device uses a unidirectional coding mode in which the reference pixel is located in a first preset direction of the current coding block as the first unidirectional coding mode, and uses a unidirectional coding mode in which the reference pixel is located in a second preset direction of the current coding block as the second unidirectional coding mode, among multiple unidirectional coding modes, so that the computer device determines the longitudinal pixel distance between the intra-block pixel in the current coding block and the reference pixel matched by the first unidirectional coding mode, and determines the transverse pixel distance between the intra-block pixel in the current coding block and the reference pixel matched by the second unidirectional coding mode. The smaller the longitudinal pixel distance, the higher the importance of the first unidirectional coding mode and the lower the importance of the second unidirectional coding mode; the smaller the transverse pixel distance, the lower the importance of the first unidirectional coding mode and the higher the importance of the second unidirectional coding mode.

[0176] The computer device determines the importance of each of the multiple unidirectional coding modes based on the pixel distance between the reference pixels matched by each of the multiple unidirectional coding modes and the pixels within the block in the current coding block, and uses the importance of each of the multiple unidirectional coding modes as a weighting factor to perform weighted summation on the chrominance prediction values ​​of each of the multiple unidirectional coding modes to obtain a chrominance prediction value corresponding to the balanced coding mode.

[0177] Thus, the computer device determines a first prediction distortion value between the chrominance prediction value of the bidirectional coding mode and the original chrominance value of the intra-block pixel in the current coding block, determines a second prediction distortion value between the chrominance prediction value of each of the multiple unidirectional coding modes and the original chrominance value of the intra-block pixel in the current coding block, and determines a third prediction distortion value between the chrominance prediction value of the equalization coding mode and the original chrominance value of the intra-block pixel in the current coding block.

[0178] Furthermore, the computer device determines the minimum prediction distortion value among the first prediction distortion value, each second prediction distortion value, and the third prediction distortion value, and uses the chroma coding mode corresponding to the minimum prediction distortion value as the target chroma coding mode for chroma coding the current coding block.

[0179] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0180] Based on the same inventive concept, the embodiment of the present application also provides a method for determining a chrominance decoding mode. The method is used at the decoding end. The method can be applied to a terminal or a server, or can be executed collaboratively by a terminal and a server. The following is an example of the method being applied to a computer device, which can be a terminal or a server. Fig.11 As shown, the method comprises the following steps:

[0181] Step S1101 : extracting a target mode identifier corresponding to a current decoding block in a video frame of the video to be decoded from the bitstream information corresponding to the video to be decoded.

[0182] The computer device receives a video to be decoded, which is an encoded video obtained after the encoding end performs encoding processing. For the received video to be decoded, the computer device determines the code stream information corresponding to each video frame of the video to be decoded from the code stream information corresponding to the video to be decoded, and extracts the target mode identifier corresponding to the decoding block from the code stream information corresponding to each video frame. The current decoding block and the current encoding block are essentially the same CU block. Specifically, the computer device extracts the target mode identifier corresponding to the current decoding block from the code stream information corresponding to the video frame of the video to be decoded.

[0183] Step S1102, among multiple chroma coding modes, determine the target chroma coding mode indicated by the target mode identifier; the chroma coding mode at least includes a balanced coding mode, a bidirectional coding mode for chroma coding based on reference pixels in multiple directions, and multiple unidirectional coding modes for chroma coding based on reference pixels in a single direction.

[0184] Specifically, the computer device determines the corresponding target chromaticity coding mode by looking up a table according to a preset correspondence table of chromaticity coding modes and mode identifiers and according to the extracted target mode identifier.

[0185] Among them, when the computer device uses the balanced coding mode for chroma coding, it performs chroma prediction on the current coding block according to the reference pixels matched by each of the multiple unidirectional coding modes in the video frame, obtains the chroma prediction values ​​of each of the multiple unidirectional coding modes, and determines the importance of each of the multiple unidirectional coding modes according to the directional relationship of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block, and then determines the chroma prediction value corresponding to the balanced coding mode according to the chroma prediction values ​​and importance of each of the multiple unidirectional coding modes. Thus, the computer device encodes the current coding block based on the chroma prediction value obtained under the balanced coding mode, thereby achieving video compression.

[0186] Step S1103, decoding processing is performed on the current decoding block according to the target chroma decoding mode, and the current decoding block after decoding processing is used to restore the original video.

[0187] Specifically, the computer device performs decoding processing on the current decoding block according to the target chroma coding mode indicated by the target mode identifier. The decoding processing is performed on each decoding block in the video frame, and the decoding processing is performed on each video frame in the encoded video, thereby restoring the original video. After obtaining the original video, the decoding end can play the original video, etc.

[0188] The above-mentioned method for determining the chroma decoding mode extracts the target mode identifier corresponding to the current decoding block from the bitstream information for the current decoding block in the video frame, and decodes the current decoding block according to the target encoding mode indicated by the target mode identifier. The chroma encoding mode is indicated by the mode identifier. When the video is transmitted between the encoding end and the decoding end, there is no need to transmit mode-related parameter information, which greatly saves bandwidth occupancy and improves transmission efficiency. At the same time, by selecting the target chroma encoding mode for decoding according to the mode identifier among multiple chroma encoding modes, the decoding performance of the chroma block can be improved, thereby improving the decoding performance of the entire video.

[0189] Based on the same inventive concept, the embodiment of the present application also provides a device for determining a chromaticity coding mode for implementing the above-mentioned method for determining a chromaticity coding mode. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiments of one or more chromaticity coding mode determination devices provided below can refer to the limitations of the chromaticity coding mode determination method in the above text, and will not be repeated here.

[0190] In some embodiments, Fig.12 As shown, a device 1200 for determining a chroma coding mode is provided, comprising: a determination module 1201, a prediction module 1202 and a screening module 1203, wherein:

[0191] Determination module 1201 is used to determine multiple chroma coding modes for the current coding block in the video frame; the multiple chroma coding modes include at least a balanced coding mode, a bidirectional coding mode for chroma coding based on reference pixels in multiple directions, and multiple unidirectional coding modes for chroma coding based on reference pixels in a single direction; the multiple modes are at least two.

[0192] The prediction module 1202 is used to perform chrominance prediction on the current coding block according to the reference pixels matched by the multiple unidirectional coding modes in the video frame, so as to obtain the chrominance prediction values ​​of the multiple unidirectional coding modes.

[0193] The determination module 1201 is further configured to determine the importance of each of the multiple unidirectional coding modes according to the directional relationships of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block.

[0194] The determination module 1201 is further configured to determine the chrominance prediction value corresponding to the balanced coding mode according to the chrominance prediction values ​​and importances of the multiple unidirectional coding modes.

[0195] The screening module 1203 is used to screen out a target chroma coding mode for chroma coding of a current coding block from multiple chroma coding modes according to the chroma prediction value of the bidirectional coding mode, the chroma prediction values ​​of multiple unidirectional coding modes and the chroma prediction value of the equalization coding mode.

[0196] In some embodiments, the prediction module is also used to determine, for any one of a plurality of unidirectional coding modes, surrounding pixels in a video frame that match the targeted unidirectional coding mode; determine a reference pixel among the surrounding pixels, and obtain a reconstructed luminance value and a reconstructed chrominance value of the reference pixel; and perform chrominance prediction on intra-block pixels in a current coding block based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixel to obtain a chrominance prediction value for the targeted unidirectional coding mode.

[0197] In some embodiments, the prediction module is also used to use pixels adjacent to the current coding block and located in a first preset direction of the current coding block as surrounding pixels that match the targeted unidirectional coding mode; or, use pixels adjacent to the current coding block and located in a second preset direction of the current coding block as surrounding pixels that match the targeted unidirectional coding mode.

[0198] In some embodiments, the prediction module is also used to determine the chrominance coding parameters that match the targeted unidirectional coding mode based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixel; based on the chrominance coding parameters that match the targeted unidirectional coding mode, construct a prediction linear relationship that matches the targeted unidirectional coding mode; substitute the luminance value of the pixel in the block in the current coding block into the prediction linear relationship to obtain the chrominance prediction value of the targeted unidirectional coding mode.

[0199] In some embodiments, the determination module is also used to determine the pixel distances between the reference pixels matched by each of the multiple unidirectional coding modes and the pixels within the block in the current coding block according to the directional relationships of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block; and determine the importance of each of the multiple unidirectional coding modes according to the pixel distances between the reference pixels matched by each of the multiple unidirectional coding modes and the pixels within the block in the current coding block.

[0200] In some embodiments, the multiple unidirectional coding modes include a first unidirectional coding mode and a second unidirectional coding mode; the reference pixels matched by the first unidirectional coding mode are located in a first preset direction of the current coding block; the reference pixels matched by the second unidirectional coding mode are located in a second preset direction of the current coding block; the first preset direction is different from the second preset direction; the determination module is also used to determine the longitudinal pixel distance between the intra-block pixels in the current coding block and the reference pixels matched by the first unidirectional coding mode; the smaller the longitudinal pixel distance, the higher the importance of the first unidirectional coding mode and the lower the importance of the second unidirectional coding mode; determine the transverse pixel distance between the intra-block pixels in the current coding block and the reference pixels matched by the second unidirectional coding mode; the smaller the transverse pixel distance, the lower the importance of the first unidirectional coding mode and the higher the importance of the second unidirectional coding mode.

[0201] In some embodiments, the determination module is further used to use the importance of each of the multiple unidirectional coding modes as a weighting factor, perform weighted summation on the chrominance prediction values ​​of the multiple unidirectional coding modes, and obtain a chrominance prediction value corresponding to the balanced coding mode.

[0202] In some embodiments, the screening module is also used to determine a first prediction distortion value between the chrominance prediction value of the bidirectional coding mode and the original chrominance value of the intra-block pixel in the current coding block; determine a second prediction distortion value between the chrominance prediction value of each of the multiple unidirectional coding modes and the original chrominance value of the intra-block pixel in the current coding block; determine a third prediction distortion value between the chrominance prediction value of the balanced coding mode and the original chrominance value of the intra-block pixel in the current coding block; determine the minimum prediction distortion value among the first prediction distortion value, each second prediction distortion value, and the third prediction distortion value; and use the chrominance coding mode corresponding to the minimum prediction distortion value as the target chrominance coding mode for chrominance encoding of the current coding block.

[0203] In some embodiments, the above-mentioned device also includes a processing module, which is used to encode the current coding block according to the target chroma coding mode, and add a mode identifier corresponding to the target chroma coding mode to the bit stream information; the mode identifier is used to instruct the decoding end to perform decoding processing according to the target chroma coding mode adopted during chroma encoding.

[0204] In some embodiments, the above-mentioned device also includes a sending module, which is used to encode each video frame in the encoded video to obtain an encoded video; and send the encoded video carrying the bit stream information to the decoding end, so that the decoding end can determine the target chroma encoding mode based on the received encoded video according to the mode identifier in the bit stream information, and decode the encoded video based on the chroma target encoding mode.

[0205] Each module in the above-mentioned device for determining the chroma coding mode can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0206] Based on the same inventive concept, the embodiment of the present application also provides a device for determining a chroma decoding mode for implementing the above-mentioned method for determining a chroma decoding mode. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiments of one or more chroma decoding mode determination devices provided below can refer to the limitations of the chroma decoding mode determination method in the above text, and will not be repeated here.

[0207] In some embodiments, Fig.13 As shown, a device 1300 for determining a chroma decoding mode is provided, comprising: an extraction module 1301, a determination module 1302 and a decoding module 1303, wherein:

[0208] The extraction module 1301 is used to extract the target mode identifier corresponding to the current decoding block in the video frame of the video to be decoded from the bitstream information corresponding to the video to be decoded.

[0209] Determination module 1302 is used to determine the target chroma coding mode indicated by the target mode identifier among multiple chroma coding modes; the chroma coding modes at least include a balanced coding mode, a bidirectional coding mode for chroma coding based on reference pixels in multiple directions, and multiple unidirectional coding modes for chroma coding based on reference pixels in a single direction.

[0210] The decoding module 1303 is used to perform decoding processing on the current decoding block according to the target chroma decoding mode, and the current decoding block after decoding processing is used to restore the original video.

[0211] Each module in the above-mentioned device for determining the chrominance decoding mode can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0212] In some embodiments, a computer device is provided, which may be a terminal or a server in the aforementioned embodiments. The following description takes the computer device as a server as an example, and its internal structure diagram may be as follows: Fig.14As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store video data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for determining a chromaticity encoding mode is implemented, or when the computer program is executed by the processor, a method for determining a chromaticity decoding mode is implemented.

[0213] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0214] In some embodiments, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0215] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0216] In some embodiments, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.

[0217] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0218] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0219] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for determining a chroma coding mode, It is characterized in that The method comprises: For a current coding block in a video frame, determining a plurality of chroma coding modes; the plurality of chroma coding modes at least include a balanced coding mode, a bidirectional coding mode for performing chroma coding based on reference pixels in multiple directions, and a plurality of unidirectional coding modes for performing chroma coding based on reference pixels in a single direction; the plurality of modes is at least two; According to reference pixels respectively matched by the multiple unidirectional coding modes in the video frame, respectively, chrominance prediction is performed on the current coding block to obtain chrominance prediction values ​​of the multiple unidirectional coding modes; Determining the importance of each of the multiple unidirectional coding modes according to the directional relationships of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block; Determining a chrominance prediction value corresponding to the balanced coding mode according to the chrominance prediction values ​​and importances of the multiple unidirectional coding modes; According to the chrominance prediction value of the bidirectional coding mode, the chrominance prediction values ​​of each of the multiple unidirectional coding modes and the chrominance prediction value of the balanced coding mode, a target chrominance coding mode for chrominance coding the current coding block is screened out from the multiple chrominance coding modes.

2. The method according to claim 1, It is characterized in that The performing chrominance prediction on the current coding block according to reference pixels respectively matched by the multiple unidirectional coding modes in the video frame to obtain chrominance prediction values ​​of the multiple unidirectional coding modes respectively includes: For any one of the multiple one-way coding modes, determining surrounding pixels matching the one-way coding mode in the video frame; Determine a reference pixel among the surrounding pixels, and obtain a reconstructed brightness value and a reconstructed chrominance value of the reference pixel; Based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixel, chrominance prediction is performed on the intra-block pixels in the current coding block to obtain the chrominance prediction value of the targeted unidirectional coding mode.

3. The method according to claim 2, It is characterized in that The determining, in the video frame, surrounding pixels matching the targeted unidirectional encoding mode comprises: Using pixels adjacent to the current coding block and located in a first preset direction of the current coding block as surrounding pixels matching the targeted unidirectional coding mode; or, Pixels adjacent to the current coding block and located in a second preset direction of the current coding block are used as surrounding pixels matching the targeted unidirectional coding mode.

4. The method according to claim 2, It is characterized in that The step of performing chrominance prediction on the current coding block based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixel to obtain the chrominance prediction value for the targeted unidirectional coding mode includes: Determining chrominance coding parameters matching the targeted unidirectional coding mode based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixel; Based on the chrominance coding parameters matching the targeted unidirectional coding mode, constructing a prediction linear relationship matching the targeted unidirectional coding mode; Substitute the brightness value of the pixels in the current coding block into the prediction linear relationship to obtain the chrominance prediction value of the targeted unidirectional coding mode.

5. The method according to claim 1, It is characterized in that The determining the importance of each of the multiple unidirectional coding modes according to the directional relationships of the reference pixels matched by each of the multiple unidirectional coding modes relative to the current coding block includes: Determine, according to the directional relationships of the reference pixels respectively matched by the multiple unidirectional coding modes relative to the current coding block, pixel distances between the reference pixels respectively matched by the multiple unidirectional coding modes and intra-block pixels in the current coding block; The importance of each of the multiple unidirectional coding modes is determined according to the pixel distance between the reference pixels matched by each of the multiple unidirectional coding modes and the intra-block pixels in the current coding block.

6. The method according to claim 5, It is characterized in that The multiple unidirectional coding modes include a first unidirectional coding mode and a second unidirectional coding mode; the reference pixels matched by the first unidirectional coding mode are located in a first preset direction of the current coding block; the reference pixels matched by the second unidirectional coding mode are located in a second preset direction of the current coding block; the first preset direction is different from the second preset direction; The determining, according to the directional relationships of the reference pixels respectively matched by the multiple unidirectional coding modes with respect to the current coding block, pixel distances between the reference pixels respectively matched by the multiple unidirectional coding modes and pixels within the block in the current coding block respectively, comprises: Determine a vertical pixel distance between a pixel in a block of the current coding block and a reference pixel matched by the first unidirectional coding mode; the smaller the vertical pixel distance, the higher the importance of the first unidirectional coding mode and the lower the importance of the second unidirectional coding mode; Determine a horizontal pixel distance between a pixel within a block in the current coding block and a reference pixel matched by the second unidirectional coding mode; the smaller the horizontal pixel distance, the lower the importance of the first unidirectional coding mode and the higher the importance of the second unidirectional coding mode.

7. The method according to claim 1, It is characterized in that The determining, according to the chrominance prediction values ​​and importances of the respective multiple unidirectional coding modes, the chrominance prediction value corresponding to the balanced coding mode comprises: The importance of each of the multiple unidirectional coding modes is used as a weighting factor, and the chrominance prediction values ​​of the multiple unidirectional coding modes are weighted and summed to obtain the chrominance prediction value corresponding to the balanced coding mode.

8. The method according to claim 1, It is characterized in that The step of selecting a target chroma coding mode for chroma coding the current coding block from the multiple chroma coding modes according to the chroma prediction value of the bidirectional coding mode, the chroma prediction values ​​of each of the multiple unidirectional coding modes, and the chroma prediction value of the balanced coding mode includes: Determine a first prediction distortion value between a chroma prediction value of the bidirectional coding mode and an original chroma value of a pixel in a block within the current coding block; Determine a second prediction distortion value between the chrominance prediction value of each of the multiple unidirectional coding modes and the original chrominance value of the pixel in the current coding block; Determine a third prediction distortion value between the chrominance prediction value of the balanced coding mode and the original chrominance value of the intra-block pixel in the current coding block; Determining a minimum prediction distortion value among the first prediction distortion value, each of the second prediction distortion values, and the third prediction distortion value; The chroma coding mode corresponding to the minimum prediction distortion value is used as the target chroma coding mode for chroma coding the current coding block.

9. The method according to any one of claims 1 to 8, It is characterized in that The method further comprises: The current coding block is encoded according to the target chroma coding mode, and a target mode identifier corresponding to the target chroma coding mode is added to the bitstream information; the target mode identifier is used to instruct the decoding end to perform decoding according to the target chroma coding mode adopted during chroma encoding.

10. The method according to any one of claims 1 to 8, It is characterized in that The method further comprises: Performing encoding processing on each video frame in the video to be encoded to obtain an encoded video; The encoded video carrying the bitstream information is sent to a decoding end, so that the decoding end determines a target chroma coding mode based on the received encoded video according to a target mode identifier in the bitstream information, and decodes the encoded video based on the chroma target coding mode.

11. A method for determining a chroma decoding mode, It is characterized in that The method comprises: Extracting, from the bitstream information corresponding to the video to be decoded, a target mode identifier corresponding to a current decoding block in a video frame of the video to be decoded; Determine a target chroma coding mode indicated by the target mode identifier among multiple chroma coding modes; the chroma coding modes at least include a balanced coding mode, a bidirectional coding mode for performing chroma coding based on reference pixels in multiple directions, and multiple unidirectional coding modes for performing chroma coding based on reference pixels in a single direction; The current decoding block is decoded according to the target chroma decoding mode, and the current decoding block after the decoding is used to restore the original video.

12. A device for determining a chroma coding mode, It is characterized in that The device comprises: A determination module, configured to determine a plurality of chroma coding modes for a current coding block in a video frame; the plurality of chroma coding modes at least include a balanced coding mode, a bidirectional coding mode for performing chroma coding based on reference pixels in multiple directions, and a plurality of unidirectional coding modes for performing chroma coding based on reference pixels in a single direction; the plurality of modes is at least two; A prediction module, configured to perform chrominance prediction on the current coding block according to reference pixels respectively matched by the multiple unidirectional coding modes in the video frame, so as to obtain chrominance prediction values ​​of the multiple unidirectional coding modes respectively; The determination module is further configured to determine the importance of each of the multiple unidirectional coding modes according to the direction relationship between the reference pixels matched by each of the multiple unidirectional coding modes and the current coding block; The determination module is further configured to determine the chrominance prediction value corresponding to the balanced coding mode according to the chrominance prediction values ​​and importances of the respective unidirectional coding modes; A screening module is used to screen out a target chroma coding mode for chroma coding the current coding block from the multiple chroma coding modes based on the chroma prediction value of the bidirectional coding mode, the chroma prediction values ​​of each of the multiple unidirectional coding modes and the chroma prediction value of the balanced coding mode.

13. A device for determining a chroma decoding mode, It is characterized in that The device comprises: An extraction module, used to extract a target mode identifier corresponding to a current decoding block in a video frame of the video to be decoded from the bitstream information corresponding to the video to be decoded; A determination module, configured to determine a target chroma coding mode indicated by the target mode identifier among a plurality of chroma coding modes; the chroma coding modes at least include a balanced coding mode, a bidirectional coding mode for performing chroma coding based on reference pixels in multiple directions, and a plurality of unidirectional coding modes for performing chroma coding based on reference pixels in a single direction; A decoding module is used to decode the current decoding block according to the target chroma decoding mode, and the current decoding block after the decoding process is used to restore the original video.

14. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

16. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.