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

By filtering the reference lines and candidate chromaticity encoding mode in the video frame, the target chromaticity encoding mode is determined, which solves the problem of low chromaticity encoding accuracy in the CCLM encoding mode and improves the video encoding performance.

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

Patent Information

Application Number
CN202310498342.X
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 compression technology, the chromaticity encoding accuracy is reduced due to the distortion of the reconstructed pixels in the CCLM encoding mode, making it difficult to effectively improve the encoding performance.

Method used

By filtering out multiple reference lines from the encoded pixel rows around the current encoded block in the video frame, chroma prediction is performed on the preset candidate chroma encoding mode, the target chroma encoding mode is determined to optimize the encoding process, and using multiple The chromatic distortion values ​​of each reference row are filtered to improve encoding accuracy.

Benefits of technology

On the premise that all reference pixels are reconstructed pixels, the chromaticity distortion of multiple reference lines is combined to remove the noise and error caused by a single reference line, improving the accuracy of chromaticity encoding and the encoding performance of the video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900331A_ABST
    Figure CN118900331A_ABST
Patent Text Reader

Abstract

The invention relates to a chroma coding mode determination method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: for a current coding block in a video frame, screening out a plurality of reference lines from surrounding coded pixel lines, and respectively selecting reference pixels from the plurality of reference lines in each candidate chroma coding mode; performing chromaticity prediction on the current coding block according to the selected reference pixels, and determining respective chromaticity prediction values of a plurality of reference lines in each candidate chromaticity coding mode; determining respective chroma distortion values of the plurality of reference lines in each candidate chroma coding mode according to the difference between the respective chroma predicted values of the plurality of reference lines in each candidate chroma coding mode and the original chroma value of the current coding block; and determining a target chroma coding mode according to the chroma distortion values of the plurality of reference lines in each candidate chroma coding mode. By adopting the method, the coding accuracy 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 preset coding modes, one of which is the CCLM (Cross-component linear model) coding mode, that is, the cross-component linear prediction mode, hereinafter referred to as the "CCLM coding mode". In the CCLM coding mode, the chrominance within the prediction block is predicted by selecting the surrounding reconstructed pixels adjacent to the coding block to fit the linear model. However, since the reconstructed pixels themselves have a certain degree of distortion, chrominance coding on this basis will lead to a further reduction in coding accuracy. 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 encoding mode that can improve encoding accuracy, as well as a method, device, computer equipment, computer-readable storage medium and computer program product for determining a chrominance decoding mode in order to address the above-mentioned 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, a plurality of reference rows are selected from the surrounding coded pixel rows of the current coding block;

[0007] For each candidate chroma coding mode among the preset multiple candidate chroma coding modes, select reference pixels from the multiple reference rows respectively according to the candidate chroma coding mode;

[0008] Perform chroma prediction on the current coding block according to reference pixels respectively selected from the multiple reference rows, and determine chroma prediction values ​​of the multiple reference rows respectively under the candidate chroma coding mode;

[0009] Determine the original chroma value of the current coding block, and determine the chroma distortion value of each of the multiple reference lines under the candidate chroma coding mode according to the difference between the chroma prediction value of each of the multiple reference lines under the candidate chroma coding mode and the original chroma value;

[0010] According to the chroma distortion values ​​of the multiple reference lines under each candidate chroma coding mode, a target chroma coding mode is determined from the multiple candidate chroma coding modes; the target chroma coding mode is used to encode the current coding block.

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

[0012] A screening module, configured to screen out a plurality of reference rows from the surrounding coded pixel rows of a current coding block in a video frame;

[0013] A selection module, configured to select, for each candidate chroma coding mode among a plurality of preset candidate chroma coding modes, reference pixels from the plurality of reference rows respectively according to the candidate chroma coding mode;

[0014] A prediction module, configured to perform chroma prediction on the current coding block according to reference pixels respectively selected from the multiple reference rows, and determine chroma prediction values ​​of the multiple reference rows respectively under the candidate chroma coding mode;

[0015] a determination module, configured to determine an original chroma value of the current coding block, and determine a chroma distortion value of each of the multiple reference lines under the candidate chroma coding mode according to differences between the chroma prediction values ​​of each of the multiple reference lines under the candidate chroma coding mode and the original chroma value;

[0016] The determination module is further used to determine a target chroma coding mode from the multiple candidate chroma coding modes according to the chroma distortion values ​​of the multiple reference lines under each candidate chroma coding mode; the target chroma coding mode is used to encode the current coding block.

[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 equipment, storage medium and computer program product for determining the chroma coding mode, for a current coding block in a video frame, screens out multiple reference rows from the surrounding coded pixel rows of the current coding block, and for each candidate chroma coding mode among the preset multiple candidate chroma coding modes, performs chroma prediction on each reference row according to the selected reference pixels, and determines the chroma distortion value according to the difference between the chroma prediction value and the original chroma value, and then screens the chroma distortion values ​​of each reference row under different candidate chroma coding modes, and finally determines the target chroma coding mode for encoding the current coding block. By performing chroma prediction based on multiple reference rows, the chroma distortion of multiple reference rows can be integrated under the premise that the reference pixels are all reconstructed pixels, thereby removing the noise and error caused by a single reference row, improving the accuracy of chroma coding and further improving the encoding performance of the video.

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

[0022] Determine the target mode identifier corresponding to the current decoding block according to the bitstream information corresponding to the video to be decoded;

[0023] When the chroma coding mode indicated by the target mode identifier is any one of a plurality of preset candidate chroma coding modes, determining a target reference row identifier corresponding to a current decoding block;

[0024] A reference pixel is selected from the target reference row indicated by the target reference row identifier, and the current decoding block is decoded according to the reference pixel. The current decoding block after the decoding is used to restore the original video.

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

[0026] A determination module, used to determine a target mode identifier corresponding to a current decoding block according to bitstream information corresponding to the video to be decoded;

[0027] The determination module is further configured to determine a target reference row identifier corresponding to a current decoding block when the chroma coding mode indicated by the target mode identifier is any one of a plurality of preset candidate chroma coding modes;

[0028] A decoding module is used to select reference pixels from the target reference row indicated by the target reference row identifier, and decode the current decoding block according to the reference pixels, wherein 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 extract, for the current decoding block in the video frame, the target mode identifier and the target reference row identifier corresponding to the current decoding block from the bitstream information, and decode the current decoding block according to the target chroma coding mode indicated by the target mode identifier and the target reference row indicated by the target reference row identifier under the target chroma coding. 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 and the reference row, only a few bits need to be transmitted, which greatly saves bandwidth occupancy and improves transmission efficiency and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 FIG. 1 is an application environment diagram 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 3 FIG. 1 is 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 flowchart 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 chroma blocks and luminance blocks in some embodiments;

[0040] Figure 8 is a schematic diagram of multiple reference rows in CCLM mode in some embodiments;

[0041] Fig. 9 is a schematic diagram of reference pixels in LM mode in some embodiments;

[0042] Fig.10 is a schematic diagram of reference pixels in LM-A mode in some embodiments;

[0043] Fig.11 is a schematic diagram of reference pixels in LM-L mode in some embodiments;

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

[0045] Fig.13 A schematic flow chart of the steps of determining the chroma encoding parameters of a reference row in some embodiments;

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

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

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

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

[0050] 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.

[0051] The method for determining the chroma coding mode provided in the embodiment of the present application can be applied to Figure 1In 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.

[0052] In some embodiments, the terminal 102 or the server 104 selects a plurality of reference rows from the surrounding coded pixel rows of the current coding block for the current coding block in the video frame. For each candidate chroma coding mode among the preset multiple candidate chroma coding modes, the terminal 102 or the server 104 selects reference pixels from the multiple reference rows respectively according to the candidate chroma coding mode, and performs chroma prediction on the current coding block according to the reference pixels respectively selected from the multiple reference rows, and determines the chroma prediction values ​​of the multiple reference rows respectively under the candidate chroma coding mode. The terminal 102 or the server 104 determines the original chroma value of the current coding block, and determines the chroma distortion values ​​of the multiple reference rows respectively under the candidate chroma coding mode according to the differences between the chroma prediction values ​​of the multiple reference rows respectively under the candidate chroma coding mode and the original chroma value. Therefore, the terminal 102 or the server 104 can determine the target chroma coding mode from the multiple candidate chroma coding modes according to the chroma distortion values ​​of the multiple reference lines under each candidate chroma coding mode; the target chroma coding mode is used to encode the current coding block.

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 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.

[0057] 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.

[0058] 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.

[0059] 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.

[0060] 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:

[0061] Step S502: for a current coding block in a video frame, a plurality of reference rows are selected from the surrounding coded pixel rows of the current coding block.

[0062] 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.

[0063] 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.

[0064] For example, Figure 6 As 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.

[0065] 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.

[0066] 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.

[0067] 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.

[0068] Specifically, for the current coding block in the video frame, the computer device filters out multiple reference rows from the surrounding coded pixel rows of the current coding block. Among them, the surrounding coded pixel rows of the current coding block refer to the pixel rows in the coded 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 the current coding block, etc.

[0069] For example, Figure 8As shown, there are multiple encoded pixel rows 0 to 6 around the current coding block, and the computer device selects multiple reference rows from the encoded pixel rows around the current coding block as the filtered reference rows. The selected reference rows may be adjacent or non-adjacent to each other. For example, the computer device may select encoded pixel row 0, encoded pixel row 1, and encoded pixel row 2 as the filtered reference rows. Alternatively, the computer device may also select encoded pixel row 0, encoded pixel row 3, and encoded pixel row 5 as the filtered reference rows, and so on.

[0070] Step S504 : for each candidate chroma coding mode among the preset multiple candidate chroma coding modes, select reference pixels from the multiple reference rows respectively according to the candidate chroma coding mode.

[0071] Among them, for the current coding block in the video frame, the computer device determines multiple chroma coding modes, including: from the chroma coding modes preset in the VVC standard, determining multiple chroma coding modes as candidates, namely candidate chroma coding modes.

[0072] In some embodiments, the multiple candidate chromaticity coding modes include at least one of a multi-directional coding mode, a first unidirectional coding mode, or a second unidirectional coding mode. Among them, the multiple coding modes are chromaticity coding modes for chromaticity coding based on reference pixels in multiple directions, such as the LM mode in the CCLM mode. The unidirectional coding mode is a chromaticity coding mode for chromaticity coding based on reference pixels in a single direction, such as the LM-A mode and the LM-L mode in the CCLM mode. In order to distinguish, different unidirectional coding modes are respectively referred to as the first unidirectional coding mode and the second unidirectional coding mode. Exemplarily, the first unidirectional coding mode is the LM-A mode, and the second unidirectional coding mode is the LM-L mode.

[0073] It should be noted that the above-mentioned terms first and second, etc. are used in this application to describe different unidirectional coding modes, but these unidirectional coding modes should not be limited by these terms. These terms are only used to distinguish one unidirectional coding mode from another unidirectional coding mode. For example, the first unidirectional coding mode can be referred to as the second unidirectional coding mode, and similarly, the second unidirectional coding mode can be referred to as the first unidirectional coding mode without departing from the scope of the various described embodiments, but unless the context clearly indicates otherwise, they are not the same unidirectional coding mode. Similar situations also include a first preset position and a second preset position, etc.

[0074] Among them, according to different chroma coding modes, the reference pixels selected in the reference row are also different. Specifically, for each candidate chroma coding mode, the computer device selects multiple reference pixels from the multiple reference rows according to the candidate chroma coding mode. For example, based on the determined reference row 0, reference row 1, and reference row 2, the computer device selects multiple reference pixels at preset positions from each reference row under the candidate chroma coding mode according to the candidate chroma coding mode.

[0075] Step S506 , performing chroma prediction on the current coding block according to the reference pixels respectively selected from the multiple reference rows, and determining the chroma prediction values ​​of the multiple reference rows respectively under the candidate chroma coding mode.

[0076] The computer device selects reference pixels from the reference row, and the reference pixels are used to perform chrominance prediction on the current coding block. More specifically, the reference pixels are used to determine chrominance coding parameters in the chrominance coding mode to construct a linear model in the corresponding chrominance coding mode to achieve prediction of chrominance values ​​through luminance values.

[0077] Specifically, the computer device performs chromaticity prediction on the chromaticity values ​​of the pixels within the block in the current coding block according to the reference pixels selected therefrom for each of the multiple reference lines, and obtains the chromaticity prediction value of the pixels within the block in the current coding block under the candidate chromaticity coding mode corresponding to the reference line. The above processing is performed for each reference line, and then the computer device can obtain multiple chromaticity prediction values ​​for each candidate chromaticity coding mode, and each chromaticity prediction value corresponds to one of the reference lines.

[0078] For example, when the multiple candidate chroma coding modes are the LM mode, the LM-A mode and the LM-L mode in the CCLM mode, Figure 7 As shown, the computer device predicts the chrominance of the current coding block by the following formula:

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

[0080] 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.

[0081] Exemplarily, in LM mode, the computer device performs chrominance prediction on the current coding block using reference pixels in reference row 0, reference row 1, and reference row 2, respectively, to obtain chrominance prediction values ​​LM0, LM1, and LM2 corresponding to reference row 0, reference row 1, and reference row 2, respectively.

[0082] Exemplarily, in LM-A mode, the computer device performs chrominance prediction on the current coding block using reference pixels in reference row 0, reference row 1, and reference row 2, respectively, and obtains chrominance prediction values ​​LM-A0, LM-A1, and LM-A2 corresponding to reference row 0, reference row 1, and reference row 2, respectively.

[0083] Exemplarily, in LM-L mode, the computer device performs chrominance prediction on the current coding block using reference pixels in reference row 0, reference row 1, and reference row 2, respectively, to obtain chrominance prediction values ​​LM-L0, LM-L1, and LM-L2 corresponding to reference row 0, reference row 1, and reference row 2, respectively.

[0084] 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.

[0085] Step S508, determine the original chrominance value of the current coding block, and determine the chrominance distortion value of each of the multiple reference rows under the candidate chrominance coding mode according to the differences between the chrominance prediction values ​​of each of the multiple reference rows under the candidate chrominance coding mode and the original chrominance value.

[0086] Among them, after determining the chroma prediction value corresponding to each chroma coding mode, the computer device needs to compare according to the chroma prediction value, and use 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. Among them, the coding performance includes but is not limited to one or more of the coding time, coding time complexity, coding bit consumption, or coding quality loss.

[0087] Exemplarily, the coding performance is coding quality loss, and the coding quality loss can be characterized by a chrominance distortion value, which refers to the difference between the chrominance value after coding and the original chrominance value. The smaller the chrominance distortion value, the higher the coding performance.

[0088] Specifically, the computer device obtains the original chrominance values ​​of the pixels in the block in the current coding block, and for the targeted candidate chrominance coding mode, based on the chrominance prediction values ​​corresponding to each reference row under the targeted candidate chrominance coding mode, respectively calculates the differences between the chrominance prediction values ​​and the original chrominance values ​​to obtain the differences corresponding to each reference row; thereby, the computer device determines the chrominance distortion values ​​of each reference row under the targeted candidate chrominance coding mode based on the differences corresponding to each reference row.

[0089] In some embodiments, the computer device determines the chroma distortion values ​​of the multiple reference lines under the candidate chroma coding mode according to the differences between the chroma prediction values ​​of the multiple reference lines under the candidate chroma coding mode and the original chroma values, including: performing numerical operations according to the differences between the chroma prediction values ​​of the multiple reference lines under the candidate chroma coding mode and the original chroma values ​​to obtain the chroma distortion values ​​of the multiple reference lines under the candidate chroma coding mode. The numerical operations include but are not limited to one or more of addition and subtraction operations, multiplication and division operations, logarithmic operations, or power operations.

[0090] For example, the chrominance distortion value may be obtained by calculating the SSD (sum of squared differences) of the original chrominance value and the chrominance prediction value, which may be expressed as follows:

[0091]

[0092] 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.

[0093] Step S510: determining a target chroma coding mode from the multiple candidate chroma coding modes according to the chroma distortion values ​​of the multiple reference lines under each candidate chroma coding mode; the target chroma coding mode is used to encode the current coding block.

[0094] Specifically, for any candidate chroma coding mode, the computer device determines a plurality of chroma distortion values ​​corresponding to each reference row. According to the number of reference rows selected, the number of chroma distortion values ​​calculated in each candidate chroma coding mode is also different. For example, when 4 reference rows are selected, each candidate chroma coding mode corresponds to 4 chroma distortion values.

[0095] After obtaining the multiple chroma distortion values ​​corresponding to each candidate chroma coding mode, the computer device selects the target chroma coding mode according to the encoding performance corresponding to each candidate chroma coding mode. In some embodiments, the computer device determines the minimum chroma distortion value according to the multiple chroma distortion values ​​corresponding to each candidate chroma coding mode, and uses the candidate chroma coding mode group corresponding to the minimum chroma distortion value as the target chroma coding mode.

[0096] Exemplarily, taking reference row 0, reference row 1 and reference row 2 as examples, the computer device determines a plurality of chromaticity distortion values ​​corresponding to each reference row for the LM mode, thereby obtaining the chromaticity distortion value in the LM mode, including: LossLM0 corresponding to reference row 0, LossLM1 corresponding to reference row 1, and LossLM3 corresponding to reference row 2. For the LM-A mode, the computer device determines the chromaticity distortion value in the LM-A mode, including: LossLM-A0 corresponding to reference row 0, LossLM-A1 corresponding to reference row 1, and LossLM-A3 corresponding to reference row 2. For the LM-L mode, the computer device determines the chromaticity distortion value in the LM-L mode, including: LossLM-L0 corresponding to reference row 0, LossLM-L1 corresponding to reference row 1, and LossLM-L3 corresponding to reference row 2. Thus, the computer device compares the 9 chromaticity distortion values ​​to determine the target chromaticity coding mode from the plurality of candidate chromaticity coding modes.

[0097] In some embodiments, the computer device also compares the chroma distortion value corresponding to each candidate chroma coding mode with the chroma distortion value calculated in other modes except CCLM mode in the VVC standard, so as to obtain the best chroma coding mode as the target chroma coding mode for chroma coding the current coding block. Among them, other modes except CCLM mode in the VVC standard include but are not limited to one or more of PLANAR mode (planar mode), VER mode (vertical mode), HOR mode (horizontal mode), or DC mode (mean mode).

[0098] In the above-mentioned method for determining the chroma coding mode, for the current coding block in the video frame, multiple reference rows are screened out from the surrounding coded pixel rows of the current coding block, and for each candidate chroma coding mode among the preset multiple candidate chroma coding modes, chroma prediction is performed for each reference row according to the selected reference pixels, and a chroma distortion value is determined according to the difference between the chroma prediction value and the original chroma value, and then the chroma distortion value of each reference row under different candidate chroma coding modes is screened, and finally a target chroma coding mode for encoding the current coding block is determined. By performing chroma prediction based on multiple reference rows, the chroma distortion of multiple reference rows can be integrated under the premise that the reference pixels are all reconstructed pixels, thereby removing the noise and error caused by a single reference row, improving the accuracy of chroma coding and further improving the encoding performance of the video.

[0099] In some embodiments, for the current coding block in the video frame, multiple reference rows are filtered out from the surrounding encoded pixel rows of the current coding block, including: for the current coding block in the video frame, in the multi-directional coding mode, multiple reference rows are filtered out from the multiple pixel rows located above and to the left of the current coding block as multiple reference rows matching the multi-directional coding mode; in the first unidirectional coding mode, multiple reference rows are filtered out from the multiple pixel rows located above the current coding block as multiple reference rows matching the first unidirectional coding mode; in the second unidirectional coding mode, multiple reference rows are filtered out from the multiple pixel rows located to the left of the current coding block as multiple reference rows matching the second unidirectional coding mode.

[0100] Wherein, in the multi-directional coding mode, the computer device selects multiple reference rows from multiple pixel rows located above and to the left of the current coding block as multiple reference rows matching the multi-directional coding mode. Fig. 9 As shown, for the multi-directional coding mode LM mode, the computer device selects pixel row 0, pixel row 1 and pixel row 2 from multiple pixel rows located above and to the left of the current coding block as multiple reference rows matching the multi-directional coding mode.

[0101] In the first unidirectional encoding mode, the computer device selects a plurality of reference rows from a plurality of pixel rows located above the current encoding block as a plurality of reference rows matching the first unidirectional encoding mode. Fig.10 As shown, for the first unidirectional encoding mode LM-A mode, the computer device selects pixel row 0, pixel row 1 and pixel row 2 from multiple pixel rows located above the current encoding block as multiple reference rows matching the first unidirectional encoding mode.

[0102] In the second unidirectional encoding mode, the computer device selects a plurality of reference rows from a plurality of pixel rows located to the left of the current encoding block as a plurality of reference rows matching the second unidirectional encoding mode. Fig.11 As shown, for the second unidirectional encoding mode LM-L mode, the computer device selects pixel row 0, pixel row 1 and pixel row 2 from multiple pixel rows located to the left of the current encoding block as multiple reference rows matching the second unidirectional encoding mode.

[0103] In the above embodiment, by introducing multiple reference rows, the chrominance distortion of multiple reference rows can be integrated under the premise that all reference pixels are reconstructed pixels, thereby removing the noise and error caused by a single reference row, improving the accuracy of chrominance encoding and further improving the encoding performance of the video.

[0104] In some embodiments, for each candidate chroma coding mode among the preset multiple candidate chroma coding modes, reference pixels are respectively selected from the multiple reference rows according to the candidate chroma coding mode, including: for the multi-directional coding mode, in each reference row among the multiple reference rows, the encoded pixels at the first preset position and the second preset position are respectively selected as reference pixels matching the multi-directional coding mode; for the first unidirectional coding mode, in each reference row among the multiple reference rows, the encoded pixels at the first preset position are respectively selected as reference pixels matching the first unidirectional coding mode; for the second unidirectional coding mode, in each reference row among the multiple reference rows, the encoded pixels at the first preset position are respectively selected as reference pixels matching the first unidirectional coding mode.

[0105] Among them, the first preset position and the second preset position are preset reference pixel selection positions, which are usually related to the size of the current coding block. The first preset position refers to the position of the reference pixel selected in one direction of the current coding block, such as the preset position above the current coding block. The second preset position refers to the position of the reference pixel selected in another direction of the current coding block, such as the preset position to the left of the current coding block.

[0106] 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.

[0107] Specifically, for the multi-directional coding mode, the computer device selects the encoded pixels at the first preset position and the second preset position in each of the multiple reference rows as reference pixels matching the multi-directional coding mode. Exemplarily, 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], S[-1,3*H' / 4] respectively.

[0108] For the first unidirectional coding mode, the computer device selects the encoded pixels at the first preset position in each reference row of the multiple reference rows as reference pixels matching the first unidirectional coding mode. Exemplarily, when in LM-A mode, the computer device selects reference pixels above the current coding block for 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].

[0109] For the second unidirectional coding mode, the computer device selects the encoded pixels at the first preset position in each reference row of the multiple reference rows as reference pixels matching the first unidirectional coding mode. Exemplarily, when in LM-L mode, the computer device selects reference pixels to the left 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], S[-1,7*H' / 8] respectively.

[0110] 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.

[0111] In some embodiments, Fig.12 As shown, the performing chroma prediction on the current coding block according to the reference pixels respectively selected from the multiple reference rows, and determining the chroma prediction values ​​of the multiple reference rows respectively under the candidate chroma coding mode, includes:

[0112] Step S1202: Determine the chrominance coding parameters of each of the multiple reference rows in the candidate coding mode according to the reference pixels selected from each of the multiple reference rows.

[0113] Step S1204: construct prediction linear relationship expressions respectively corresponding to the multiple reference rows in the candidate coding mode based on the chrominance coding parameters of the multiple reference rows in the candidate coding mode.

[0114] Step S1206, based on the prediction linear relationship corresponding to the multiple reference rows under the candidate coding mode, respectively perform chrominance prediction on the current coding block, and determine the chrominance prediction values ​​of the multiple reference rows under the candidate chrominance coding mode.

[0115] Specifically, for any candidate coding mode, the computer device determines the chrominance coding parameters of each reference row in the candidate coding mode according to the reference pixels selected from each reference row. Exemplarily, when the computer device performs chrominance prediction on the current coding block, the prediction is performed using the following formula:

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

[0117] Among them, the parameters α and β are the chrominance coding parameters.

[0118] Furthermore, when the computer device predicts the chrominance value of the pixel in the block by the luminance value of the pixel, the computer device fits the prediction linear relationship for each reference row according to the chrominance coding parameters determined based on the reference pixels, that is, constructs pred C (i,j) and Rec′ L The linear relationship between (i,j).

[0119] A prediction linear relationship is constructed for each reference row. Thus, the computer device predicts the chrominance value of the pixels in the block according to the luminance value of the pixels in the block and the prediction linear relationship corresponding to each reference row, thereby obtaining the chrominance prediction value of each reference row under the candidate coding mode.

[0120] In the above embodiment, by introducing multiple reference rows, the chrominance distortion of multiple reference rows can be integrated under the premise that all reference pixels are reconstructed pixels, thereby removing the noise and error caused by a single reference row, improving the accuracy of chrominance encoding and further improving the encoding performance of the video.

[0121] In some embodiments, Fig.13 As shown, each of the multiple reference rows selects multiple reference pixels. Exemplarily, each reference row selects four or more reference pixels. Accordingly, determining the chrominance coding parameters of the multiple reference rows under the candidate coding mode according to the reference pixels selected from the multiple reference rows includes:

[0122] Step S1302 : for any reference row among the plurality of reference rows, determine the reconstructed luminance value and the reconstructed chrominance value of each of the plurality of reference pixels according to the plurality of reference pixels selected from the reference row.

[0123] Step S1304: determining the chrominance coding parameters of the reference row in the candidate coding mode based on the reconstructed luminance values ​​and the reconstructed chrominance values ​​of the multiple reference pixels.

[0124] Specifically, the computer device determines the reconstructed luminance value and the reconstructed chrominance value of the selected reference pixels for any reference row among the multiple reference rows according to the selected reference pixels of the reference row. Thus, the computer device determines the chrominance coding parameters of the reference row under the candidate coding mode based on the reconstructed luminance value and the reconstructed chrominance value of the reference pixels and the linear relationship between the chrominance value and the luminance value in the chrominance prediction.

[0125] In some embodiments, for each reference row, the computer device compares 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 determines the chrominance encoding parameters that match the candidate encoding mode according to the larger and smaller values ​​of the reconstructed chrominance values ​​and the larger and smaller values ​​of the reconstructed luminance values.

[0126] 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.

[0127] Among them, in some embodiments, based on the reconstructed luminance values ​​and the reconstructed chrominance values ​​of each of the multiple reference pixels, the chrominance coding parameters of the reference row under the candidate coding mode are determined, including: determining a reconstructed luminance mean from the reconstructed luminance values ​​of each of the multiple reference pixels; determining a reconstructed chrominance mean from the reconstructed chrominance values ​​of each of the multiple reference pixels; and determining the chrominance coding parameters of the reference row under the candidate coding mode based on the reconstructed luminance mean and the reconstructed chrominance mean.

[0128] Specifically, the computer device determines the reconstructed brightness mean from the reconstructed brightness values ​​of each of the multiple reference pixels. In some embodiments, the computer device finds two larger reconstructed brightness values ​​from the reconstructed brightness values ​​of each of the multiple reference pixels to calculate a first reconstructed brightness mean, and finds two smaller reconstructed brightness values ​​to calculate a second reconstructed brightness mean.

[0129] The computer device determines a reconstructed chromaticity mean from the reconstructed chromaticity values ​​of each of the multiple reference pixels. In some embodiments, the computer device finds two larger reconstructed chromaticity values ​​from the reconstructed chromaticity values ​​of each of the multiple reference pixels to calculate a first reconstructed chromaticity mean, and finds two smaller reconstructed chromaticity values ​​to calculate a second reconstructed chromaticity mean.

[0130] Therefore, the computer device determines the chrominance coding parameters of the reference row under the candidate coding mode according to the reconstructed luminance mean and the reconstructed chrominance mean, including: determining the chrominance coding parameters of the reference row under the candidate coding mode according to the first reconstructed luminance mean, the second reconstructed luminance mean, the first reconstructed chrominance mean, and the second reconstructed chrominance mean.

[0131] In some embodiments, a computer device determines a reconstructed luminance difference between the first reconstructed luminance mean and the second luminance mean, and a reconstructed chrominance difference between the first reconstructed chrominance mean and the second chrominance mean; determines a first chrominance encoding parameter based on the reconstructed chrominance difference and the reconstructed chrominance difference; and determines a second chrominance encoding parameter based on the first chrominance encoding parameter, the second reconstructed measurement value, and the second reconstructed chrominance value.

[0132] Exemplarily, for a plurality of surrounding pixels selected in any reference row, 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 1 BThe 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 .

[0133] The computer device reconstructs the brightness value based on the two larger values ​​X 0 A and X 1 A , calculate 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 of the target candidate chrominance coding mode can be calculated according to the following formula:

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

[0135] β=Yb-α*Xb

[0136] 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.

[0137] 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.

[0138] In some embodiments, determining a target chroma coding mode from the multiple candidate chroma coding modes according to the chroma distortion values ​​of the multiple reference rows under each candidate chroma coding mode includes: determining a minimum chroma distortion value according to the chroma distortion values ​​of the multiple reference rows under each candidate chroma coding mode; using the candidate chroma coding mode indicated by the minimum chroma distortion value as the target chroma coding mode for encoding the current coding block, and using the reference row indicated by the minimum chroma distortion value as the target reference row used when encoding the target chroma coding mode.

[0139] Specifically, the computer device compares the chroma distortion values ​​of the multiple reference lines in each candidate chroma coding mode respectively, so as to determine the minimum chroma distortion value. Then, the computer device can use the candidate chroma coding mode indicated by the minimum chroma distortion value as the target chroma coding mode for encoding the current coding block. Moreover, the computer device uses the reference line indicated by the minimum chroma distortion value as the target reference line used when encoding the target chroma coding mode.

[0140] 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.

[0141] 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.

[0142] To this end, in some embodiments, the method for determining the chroma coding mode provided in the embodiments of the present application also includes: determining a target mode identifier corresponding to the target chroma coding mode, and a target reference row identifier corresponding to the target reference row; under the target chroma coding mode, encoding the current coding block based on the target reference row, and adding the target mode identifier and the target reference row identifier to the code stream information.

[0143] Specifically, the computer device sets a corresponding mode identifier for each candidate chroma coding mode in advance.

[0144] 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.

[0145] Chroma encoding mode Mode Identifier DM Mode 00 Planar Mode 0100 Vertical Mode 0101 Horizontal Mode 0110 DC Mode 0111 LM mode 10 LM-L mode 110 LM-A mode 111

[0146] Table 1

[0147] In the embodiment of the present application, since multiple reference rows are introduced, in addition to the mode identification, the reference rows used need to be identified. To this end, each reference row also corresponds to a reference row identification, as shown in Table 2.

[0148] Reference Line Reference line ID 0 0 1 10 2 11 …… ……

[0149] Table 2

[0150] When encoding is performed using reference row 0, the reference row identifier is represented by binary bit 0. When encoding is performed using reference row 1, the reference row identifier is represented by binary bit 10. When encoding is performed using reference row 2, the reference row identifier is represented by binary bit 11. The same applies to other subsequent reference row identifiers. For example, when encoding is performed using reference row 3, the reference row identifier is represented by binary bit 110, and so on.

[0151] Therefore, in the target chroma coding mode, the computer device encodes the current coding block based on the target reference line, and during the encoding process, adds the target mode identifier and the target reference line identifier to the bitstream information.

[0152] 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.

[0153] 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 certain mode being selected, 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 at the back to be represented by more bits. Similarly, each reference row is sorted according to the probability of selection. The higher the probability of a certain reference row being selected, the lower the complexity of the corresponding reference row identification, which can reduce the occupancy rate of bandwidth resources.

[0154] To this end, in some embodiments, the target mode identifier is represented by a first bit sequence, and the reference row identifier is represented by a second bit sequence; wherein, the higher the probability that any candidate chromaticity coding mode among the multiple candidate chromaticity coding modes is determined as the target chromaticity coding mode, the fewer the number of bits of the corresponding first bit sequence. For example, when most coding blocks select the LM mode, the computer device determines that the mode identifier of the LM mode is 10, that is, only 2 bits are needed to represent the LM mode. The less commonly used chromaticity coding modes are sorted later to be represented by more bits. The higher the probability that any reference row among the multiple reference rows is determined as the target reference row, the fewer the number of bits of the corresponding second bit sequence. For example, when most coding blocks select reference row 0, the computer device determines that the reference row identifier of reference row 0 is 0, so that the reference row identifier only needs to transmit one bit, and the decoding end only needs to parse one bit to determine the selected reference row, which can not only reduce the occupancy rate of bandwidth resources, but also improve decoding efficiency.

[0155] 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 processed 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 target mode identifier in the bitstream information, determines the target reference row based on the target reference row identifier in the bitstream information, and decodes the encoded video based on the target reference row under the target chroma coding mode.

[0156] 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.

[0157] After receiving the encoded video, the decoder obtains the bitstream information of the encoded video and extracts the target mode identifier therefrom, 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. In addition, the computer device determines the selected target reference row according to the target reference row identifier extracted from the bitstream information.

[0158] Then, the decoder selects reference pixels in the target reference row according to the target chroma coding mode to decode the coding block. 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.

[0159] 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.

[0160] 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 this application scenario is, for example, as follows: for the current coding block in the video frame, the computer device selects multiple reference rows from the surrounding coded pixel rows of the current coding block. For each candidate chroma coding mode in the preset multiple candidate chroma coding modes, the computer device selects reference pixels from the multiple reference rows respectively according to the candidate chroma coding mode, and performs chroma prediction on the current coding block according to the reference pixels respectively selected from the multiple reference rows, and determines the chroma prediction value of each of the multiple reference rows under the candidate chroma coding mode. The computer device determines the original chroma value of the current coding block, and determines the chroma distortion value of each of the multiple reference rows under the candidate chroma coding mode according to the difference between the chroma prediction value of each of the multiple reference rows under the candidate chroma coding mode and the original chroma value. Furthermore, the computer device determines a target chroma coding mode from the multiple candidate chroma coding modes according to the chroma distortion values ​​of the multiple reference lines under each candidate chroma coding mode; the target chroma coding mode is used to encode the current coding block.

[0161] 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.

[0162] In a specific example, the method for determining a chroma coding mode provided by an embodiment of the present application includes the following steps: for a current coding block in a video frame, a computer device determines multiple candidate chroma coding modes. The multiple candidate chroma coding modes include at least one of a multi-directional coding mode, a first unidirectional coding mode, or a second unidirectional coding mode.

[0163] Among them, in the multi-directional encoding mode, the computer device selects multiple reference rows from the multiple pixel rows located above and to the left of the current encoding block as the multiple reference rows matching the multi-directional encoding mode; in the first unidirectional encoding mode, the computer device selects multiple reference rows from the multiple pixel rows located above the current encoding block as the multiple reference rows matching the first unidirectional encoding mode; in the second unidirectional encoding mode, the computer device selects multiple reference rows from the multiple pixel rows located to the left of the current encoding block as the multiple reference rows matching the second unidirectional encoding mode.

[0164] After determining the reference rows, for the multi-directional encoding mode, the computer device selects the encoded pixels at the first preset position and the second preset position in each reference row among the multiple reference rows, respectively, as reference pixels matching the multi-directional encoding mode; for the first unidirectional encoding mode, the computer device selects the encoded pixels at the first preset position in each reference row among the multiple reference rows, respectively, as reference pixels matching the first unidirectional encoding mode; for the second unidirectional encoding mode, the computer device selects the encoded pixels at the first preset position in each reference row among the multiple reference rows, respectively, as reference pixels matching the first unidirectional encoding mode.

[0165] For any reference row among the multiple reference rows, the computer device determines the reconstructed luminance value and the reconstructed chrominance value of each of the multiple reference pixels based on the multiple reference pixels selected for the reference row, and determines the reconstructed luminance mean from the reconstructed luminance values ​​of each of the multiple reference pixels; determines the reconstructed chrominance mean from the reconstructed chrominance values ​​of each of the multiple reference pixels; and determines the chrominance coding parameters of the reference row under the candidate coding mode based on the reconstructed luminance mean and the reconstructed chrominance mean.

[0166] Furthermore, the computer device constructs prediction linear relationship expressions corresponding to the multiple reference rows in the candidate coding mode based on the chrominance coding parameters of each of the multiple reference rows in the candidate coding mode.

[0167] Therefore, the computer device can perform chrominance prediction on the current coding block based on the prediction linear relationship corresponding to the multiple reference rows under the candidate chrominance coding mode, and determine the chrominance prediction values ​​of the multiple reference rows under the candidate chrominance coding mode.

[0168] The computer device determines the original chrominance value of the current coding block, and determines the chrominance distortion value of each of the multiple reference lines under the candidate chrominance coding mode according to the difference between the chrominance prediction values ​​of each of the multiple reference lines under the candidate chrominance coding mode and the original chrominance value.

[0169] Therefore, the computer device can determine the minimum chroma distortion value according to the chroma distortion values ​​of the multiple reference rows under each candidate chroma coding mode, and use the candidate chroma coding mode indicated by the minimum chroma distortion value as the target chroma coding mode for encoding the current coding block, and use the reference row indicated by the minimum chroma distortion value as the target reference row used when encoding with the target chroma coding mode.

[0170] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned 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 does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can 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 to be 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.

[0171] 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.14 As shown, the method comprises the following steps:

[0172] Step S1402: Determine the target mode identifier corresponding to the current decoding block according to the bitstream information corresponding to the video to be decoded.

[0173] 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.

[0174] Step S1404: when the chroma coding mode indicated by the target mode identifier is any one of a plurality of preset candidate chroma coding modes, determine a target reference row identifier corresponding to the current decoding block.

[0175] 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.

[0176] When the chroma coding mode indicated by the target mode identifier is any one of a plurality of preset candidate chroma coding modes, the computer device further determines a target reference row identifier corresponding to the current decoding block to represent the reference row selected by the computer device when performing chroma coding in any candidate chroma coding mode during the encoding process.

[0177] In some embodiments, when the chroma coding mode indicated by the target mode identifier is a mode other than the CCLM mode in the VVC standard, the computer device directly performs decoding processing according to the indicated mode.

[0178] Step S1406, selecting reference pixels from the target reference row indicated by the target reference row identifier, and performing decoding processing on the current decoding block according to the reference pixels, and the current decoding block after the decoding processing is used to restore the original video.

[0179] Specifically, the computer device selects reference pixels in the target reference row indicated by the target reference row identifier according to the target chroma coding mode indicated by the target mode identifier, and determines chroma coding parameters based on the reference pixels to construct a prediction linear relationship that matches the target chroma coding mode.

[0180] Thus, the computer device can decode the current decoding block according to the predicted linear relationship. Each coding block in the video frame is decoded, and each video frame in the encoded video is decoded, so that the original video can be restored. After obtaining the original video, the decoding end can play the original video.

[0181] The above-mentioned method for determining the chroma decoding mode extracts the target mode identifier and the target reference row 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 chroma coding mode indicated by the target mode identifier and the target reference row indicated by the target reference row identifier under the target chroma coding. 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 and the reference row, only a few bits need to be transmitted, which greatly saves bandwidth occupancy and improves transmission efficiency and decoding efficiency.

[0182] 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.

[0183] In some embodiments, Fig.15 As shown, a device 1500 for determining a chroma coding mode is provided, comprising: a screening module 1501, a selection module 1502, a prediction module 1503 and a determination module 1504, wherein:

[0184] The screening module 1501 is used to screen out a plurality of reference rows from the surrounding coded pixel rows of the current coding block in the video frame.

[0185] The selection module 1502 is configured to select, for each candidate chroma coding mode among a plurality of preset candidate chroma coding modes, reference pixels from the plurality of reference rows according to the candidate chroma coding mode.

[0186] The prediction module 1503 is configured to perform chrominance prediction on the current coding block according to the reference pixels respectively selected from the multiple reference rows, and determine the chrominance prediction values ​​of the multiple reference rows respectively under the candidate chrominance coding mode.

[0187] The determination module 1504 is used to determine the original chrominance value of the current coding block, and determine the chrominance distortion value of each of the multiple reference lines under the candidate chrominance coding mode according to the difference between the chrominance prediction values ​​of each of the multiple reference lines under the candidate chrominance coding mode and the original chrominance value.

[0188] The determination module 1504 is further used to determine a target chroma coding mode from the multiple candidate chroma coding modes according to the chroma distortion values ​​of the multiple reference lines under each candidate chroma coding mode; the target chroma coding mode is used to encode the current coding block.

[0189] In some embodiments, the multiple candidate chroma coding modes include at least one of a multi-directional coding mode, a first unidirectional coding mode, or a second unidirectional coding mode; the screening module is also used to, for a current coding block in a video frame, in the multi-directional coding mode, screen out multiple reference rows from multiple pixel rows located above and to the left of the current coding block as multiple reference rows matching the multi-directional coding mode; in the first unidirectional coding mode, screen out multiple reference rows from multiple pixel rows located above the current coding block as multiple reference rows matching the first unidirectional coding mode; in the second unidirectional coding mode, screen out multiple reference rows from multiple pixel rows located to the left of the current coding block as multiple reference rows matching the second unidirectional coding mode.

[0190] In some embodiments, the multiple candidate chroma coding modes include at least one of a multi-directional coding mode, a first unidirectional coding mode, or a second unidirectional coding mode; the selection module is also used to, for the multi-directional coding mode, in each of the multiple reference rows, respectively select the encoded pixels at the first preset position and the second preset position as reference pixels matching the multi-directional coding mode; for the first unidirectional coding mode, in each of the multiple reference rows, respectively select the encoded pixels at the first preset position as reference pixels matching the first unidirectional coding mode; for the second unidirectional coding mode, in each of the multiple reference rows, respectively select the encoded pixels at the first preset position as reference pixels matching the first unidirectional coding mode.

[0191] In some embodiments, the prediction module is also used to determine the chrominance coding parameters of each of the multiple reference rows under the target candidate coding mode based on the reference pixels respectively selected from the multiple reference rows; construct prediction linear relationship equations respectively corresponding to the multiple reference rows under the target candidate coding mode based on the chrominance coding parameters of each of the multiple reference rows under the target candidate coding mode; perform chrominance prediction on the current coding block based on the prediction linear relationship equations respectively corresponding to the multiple reference rows under the target candidate coding mode, and determine the chrominance prediction values ​​of each of the multiple reference rows under the target candidate chrominance coding mode.

[0192] In some embodiments, each of the multiple reference rows has multiple reference pixels selected; the prediction module is also used to determine, for any reference row among the multiple reference rows, the reconstructed luminance value and the reconstructed chrominance value of each of the multiple reference pixels based on the multiple reference pixels selected for the reference row; based on the reconstructed luminance value and the reconstructed chrominance value of each of the multiple reference pixels, determine the chrominance coding parameters of the reference row under the candidate coding mode.

[0193] In some embodiments, the prediction module is also used to determine a reconstructed brightness mean from the reconstructed brightness values ​​of each of the multiple reference pixels; determine a reconstructed chrominance mean from the reconstructed chrominance values ​​of each of the multiple reference pixels; and determine the chrominance coding parameters of the reference row targeted in the candidate coding mode based on the reconstructed brightness mean and the reconstructed chrominance mean.

[0194] In some embodiments, the determination module is further used to determine a minimum chroma distortion value based on the chroma distortion values ​​of the multiple reference rows under each candidate chroma coding mode; use the candidate chroma coding mode indicated by the minimum chroma distortion value as the target chroma coding mode for encoding the current coding block, and use the reference row indicated by the minimum chroma distortion value as the target reference row used when encoding with the target chroma coding mode.

[0195] In some embodiments, the above-mentioned device also includes an encoding module for determining a target mode identifier corresponding to the target chroma encoding mode, and a target reference row identifier corresponding to the target reference row; under the target chroma encoding mode, the current coding block is encoded based on the target reference row, and the target mode identifier and the target reference row identifier are added to the code stream information.

[0196] In some embodiments, the target mode identifier is represented by a first bit sequence, and the reference row identifier is represented by a second bit sequence; wherein, the higher the probability that any candidate chromaticity coding mode among the multiple candidate chromaticity coding modes is determined as the target chromaticity coding mode, the smaller the number of bits of the corresponding first bit sequence; wherein, the higher the probability that any reference row among the multiple reference rows is determined as the target reference row, the smaller the number of bits of the corresponding second bit sequence.

[0197] In some embodiments, the above-mentioned device also includes a transmission module, which is used to encode each video frame in the video to be processed to obtain an encoded video; the encoded video carrying the code stream information is sent to the decoding end, so that the decoding end determines the target chroma encoding mode based on the received encoded video according to the target mode identifier in the code stream information, determines the target reference line based on the target reference line identifier in the code stream information, and decodes the encoded video based on the target reference line under the target chroma encoding mode.

[0198] 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.

[0199] 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.

[0200] In some embodiments, Fig.16 As shown, a device 1600 for determining a chroma decoding mode is provided, comprising: a determination module 1601 and a decoding module 1602, wherein:

[0201] The determination module 1601 is used to determine the target mode identifier corresponding to the current decoding block according to the bitstream information corresponding to the video to be decoded.

[0202] The determination module 1601 is further configured to determine a target reference row identifier corresponding to the current decoding block when the chroma coding mode indicated by the target mode identifier is any one of a plurality of preset candidate chroma coding modes.

[0203] The decoding module 1602 is used to select reference pixels from the target reference row indicated by the target reference row identifier, and decode the current decoding block according to the reference pixels, and the current decoding block after the decoding is used to restore the original video.

[0204] 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.

[0205] In some embodiments, a computer device is provided, which may be a terminal or a server. Taking the computer device as a server as an example, its internal structure diagram may be as follows: Fig.17 As 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.

[0206] Those skilled in the art will understand that Fig.17 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.

[0207] 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.

[0208] 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.

[0209] 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.

[0210] 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.

[0211] 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.

[0212] 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, characterized in that: The method comprises: For a current coding block in a video frame, a plurality of reference rows are selected from the surrounding coded pixel rows of the current coding block; For each candidate chroma coding mode among the preset multiple candidate chroma coding modes, select reference pixels from the multiple reference rows respectively according to the candidate chroma coding mode; Perform chroma prediction on the current coding block according to reference pixels respectively selected from the multiple reference rows, and determine chroma prediction values ​​of the multiple reference rows respectively under the candidate chroma coding mode; Determine the original chroma value of the current coding block, and determine the chroma distortion value of each of the multiple reference lines under the candidate chroma coding mode according to the difference between the chroma prediction value of each of the multiple reference lines under the candidate chroma coding mode and the original chroma value; According to the chroma distortion values ​​of the multiple reference lines under each candidate chroma coding mode, a target chroma coding mode is determined from the multiple candidate chroma coding modes; the target chroma coding mode is used to encode the current coding block.

2. The method according to claim 1, characterized in that The plurality of candidate chroma coding modes include at least one of a multi-directional coding mode, a first unidirectional coding mode, or a second unidirectional coding mode; For a current coding block in a video frame, a plurality of reference rows are selected from the surrounding coded pixel rows of the current coding block, including: For a current coding block in a video frame, in the multi-directional coding mode, selecting a plurality of reference rows from a plurality of pixel rows located above and to the left of the current coding block as a plurality of reference rows matching the multi-directional coding mode; In the first unidirectional encoding mode, selecting a plurality of reference rows from a plurality of pixel rows located above the current encoding block as a plurality of reference rows matching the first unidirectional encoding mode; In the second unidirectional encoding mode, a plurality of reference rows are selected from a plurality of pixel rows located to the left of the current encoding block as a plurality of reference rows matching the second unidirectional encoding mode.

3. The method according to claim 1, characterized in that The plurality of candidate chroma coding modes include at least one of a multi-directional coding mode, a first unidirectional coding mode, or a second unidirectional coding mode; The selecting, for each candidate chroma coding mode among the preset multiple candidate chroma coding modes, reference pixels from the multiple reference rows respectively according to the candidate chroma coding mode, comprises: For the multi-directional coding mode, in each of the multiple reference lines, respectively select encoded pixels at a first preset position and a second preset position as reference pixels matching the multi-directional coding mode; For the first unidirectional coding mode, in each reference row of the plurality of reference rows, respectively select an encoded pixel at the first preset position as a reference pixel matching the first unidirectional coding mode; For the second unidirectional coding mode, in each reference row of the multiple reference rows, an encoded pixel at the first preset position is selected as a reference pixel matching the first unidirectional coding mode.

4. The method according to claim 1, characterized in that: The performing chroma prediction on the current coding block according to the reference pixels respectively selected from the multiple reference rows, and determining the chroma prediction values ​​of the multiple reference rows respectively under the candidate chroma coding mode, comprises: Determining, according to the reference pixels respectively selected from the multiple reference rows, chroma coding parameters of the multiple reference rows respectively under the candidate coding mode; Based on the chrominance coding parameters of the multiple reference lines under the candidate coding mode, construct prediction linear relationship expressions corresponding to the multiple reference lines under the candidate coding mode; Based on the prediction linear relationship expressions respectively corresponding to the multiple reference rows under the candidate coding mode, chrominance prediction is performed on the current coding block respectively, and the chrominance prediction values ​​of the multiple reference rows under the candidate chrominance coding mode are determined.

5. The method according to claim 4, characterized in that Each of the multiple reference rows has multiple reference pixels selected; and determining, according to the reference pixels selected from the multiple reference rows, the chroma coding parameters of the multiple reference rows under the candidate coding mode, includes: For any reference row among the plurality of reference rows, determining a reconstructed luminance value and a reconstructed chrominance value of each of the plurality of reference pixels according to the plurality of reference pixels selected from the reference row; Based on the reconstructed luminance values ​​and the reconstructed chrominance values ​​of the multiple reference pixels, a chrominance coding parameter of the reference row in the candidate coding mode is determined.

6. The method according to claim 5, characterized in that Determining, based on the reconstructed luminance values ​​and the reconstructed chrominance values ​​of the multiple reference pixels, a chrominance coding parameter of the reference row in the candidate coding mode, comprising: Determining a reconstructed brightness mean from the reconstructed brightness values ​​of each of the plurality of reference pixels; Determining a reconstructed chrominance mean value from the reconstructed chrominance values ​​of each of the plurality of reference pixels; Determine, according to the reconstructed luminance mean value and the reconstructed chrominance mean value, a chrominance coding parameter of the reference row targeted under the targeted candidate coding mode.

7. The method according to claim 1, characterized in that The step of determining a target chroma coding mode from the plurality of candidate chroma coding modes according to the chroma distortion values ​​of the plurality of reference lines respectively in each candidate chroma coding mode comprises: Determine a minimum chroma distortion value according to the chroma distortion values ​​of the multiple reference lines in each candidate chroma coding mode; The candidate chroma coding mode indicated by the minimum chroma distortion value is used as a target chroma coding mode for encoding the current coding block, and the reference row indicated by the minimum chroma distortion value is used as a target reference row used when encoding with the target chroma coding mode.

8. The method according to claim 7, characterized in that The method further comprises: Determining a target mode identifier corresponding to the target chroma coding mode and a target reference row identifier corresponding to the target reference row; In the target chroma coding mode, the current coding block is coded based on the target reference line, and the target mode identifier and the target reference line identifier are added to the bitstream information.

9. The method according to claim 8, characterized in that The target mode identifier is represented by a first bit sequence, and the reference row identifier is represented by a second bit sequence; wherein, the higher the probability that any candidate chromaticity coding mode among the multiple candidate chromaticity coding modes is determined as the target chromaticity coding mode, the smaller the number of bits of the corresponding first bit sequence; wherein, the higher the probability that any reference row among the multiple reference rows is determined as the target reference row, the smaller the number of bits of the corresponding second bit sequence.

10. The method according to claim 8, characterized in that The method further comprises: Encoding each video frame in the video to be processed 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, determines a target reference row based on a target reference row identifier in the bitstream information, and decodes the encoded video based on the target reference row under the target chroma coding mode.

11. A method for determining a chroma decoding mode, characterized in that: The method comprises: Determine the target mode identifier corresponding to the current decoding block according to the bitstream information corresponding to the video to be decoded; When the chroma coding mode indicated by the target mode identifier is any one of a plurality of preset candidate chroma coding modes, determining a target reference row identifier corresponding to the current decoding block; A reference pixel is selected from the target reference row indicated by the target reference row identifier, and the current decoding block is decoded according to the reference pixel. The current decoding block after the decoding is used to restore the original video.

12. A device for determining a chroma coding mode, characterized in that: The device comprises: A screening module, configured to screen out a plurality of reference rows from the surrounding coded pixel rows of a current coding block in a video frame; A selection module, configured to select, for each candidate chroma coding mode among a plurality of preset candidate chroma coding modes, reference pixels from the plurality of reference rows respectively according to the candidate chroma coding mode; A prediction module, configured to perform chroma prediction on the current coding block according to reference pixels respectively selected from the multiple reference rows, and determine chroma prediction values ​​of the multiple reference rows respectively under the candidate chroma coding mode; a determination module, configured to determine an original chroma value of the current coding block, and determine a chroma distortion value of each of the multiple reference lines under the candidate chroma coding mode according to differences between the chroma prediction values ​​of each of the multiple reference lines under the candidate chroma coding mode and the original chroma value; The determination module is further used to determine a target chroma coding mode from the multiple candidate chroma coding modes according to the chroma distortion values ​​of the multiple reference lines under each candidate chroma coding mode; the target chroma coding mode is used to encode the current coding block.

13. A device for determining a chroma decoding mode, characterized in that: The device comprises: A determination module, used to determine a target mode identifier corresponding to a current decoding block according to bitstream information corresponding to the video to be decoded; The determination module is further configured to determine a target reference row identifier corresponding to the current decoding block when the chroma coding mode indicated by the target mode identifier is any one of a plurality of preset candidate chroma coding modes; A decoding module is used to select reference pixels from the target reference row indicated by the target reference row identifier, and decode the current decoding block according to the reference pixels, wherein 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, wherein: 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, 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, 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.