Chroma intra-frame prediction method and device, and computer storage medium
By obtaining the DC mode or Planar mode from the bitstream data of the chroma block, a set of chroma prediction modes for optimizing alternative modes is constructed, which solves the problem of low accuracy of intra-frame chroma prediction in the existing technology and improves encoding and decoding efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2019-01-02
- Publication Date
- 2026-04-28
AI Technical Summary
In the next-generation video coding standards H.266 or VVC, existing intra-frame prediction methods, when using a single DC mode or planar mode with independent division of luma and chroma blocks, result in low intra-frame prediction accuracy and reduced encoding and decoding efficiency.
After obtaining the DC mode or planar mode from the bitstream data of the chroma block, a set of optimized alternative chroma prediction modes is constructed, including diagonal angle modes and their derivative modes, to replace the original horizontal and vertical prediction directions for chroma block reconstruction.
It improves the accuracy of intra-frame chroma prediction, enhances encoding and decoding efficiency, and solves the problem of low prediction accuracy in single-mode operation.
Smart Images

Figure CN121940546A_ABST
Abstract
Description
[0001] This application is a divisional application of Chinese patent application No. 201980062647.8, which entered the Chinese national phase of PCT international patent application PCT / CN2019 / 070148, filed on January 2, 2019, and entitled "Intra-frame Chroma Prediction Method and Apparatus, and Computer Storage Medium". Technical Field
[0002] This application relates to intra-frame prediction technology in the field of video coding, and more particularly to a chroma intra-frame prediction method and apparatus, as well as a computer storage medium. Background Technology
[0003] In next-generation video coding standards like H.266 or Versatile Video Coding (VVC), luma and chroma are encoded in independent blocks, with one chroma block potentially corresponding to multiple luma blocks. However, the existing Direct Mode (DM) only reflects the local texture features of the central region of the current chroma block. When a chroma block corresponds to multiple luma blocks in the same location, directly using a single DM for chroma prediction is unreasonable. For example, when the DM is in Direct Current (DC) mode or Planar mode, the current chroma block can be considered flat and smooth. However, if the corresponding luma blocks are not flat, then using only DM for intra-frame chroma prediction will significantly reduce the accuracy of intra-frame prediction, thereby reducing encoding and decoding efficiency. Although horizontal and vertical directions are available as default alternatives in chroma prediction mode, very few chroma blocks in this case conform to the overall horizontal and vertical prediction directions, thus wasting alternative positions and hindering the improvement of encoding and decoding efficiency. Summary of the Invention
[0004] This application provides a chroma intra-frame prediction method, a decoder, and a computer storage medium, which can effectively improve the accuracy of intra-frame prediction and improve encoding and decoding efficiency.
[0005] The technical solution of this application embodiment is implemented as follows: This application proposes a chroma intra-frame prediction method, the method comprising: Obtain the direct mode (DM) corresponding to the current chroma block from the bitstream data corresponding to the current chroma block; If the DM is a DC mode or a planar mode, then according to the optimized alternative mode, a chromaticity prediction mode set is obtained; wherein, the chromaticity prediction mode set is used to perform chromaticity reconstruction on the current chromaticity block.
[0006] This application provides a decoder, which includes: an acquisition part, The acquisition part is used to acquire the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block; and if the DM is a DC mode or a planar mode, then acquire a chroma prediction mode set according to the optimized alternative mode; wherein, the chroma prediction mode set is used to perform chroma reconstruction on the current chroma block.
[0007] This application provides a decoder, which includes a processor, a memory storing processor-executable instructions, a communication interface, and a bus for connecting the processor, the memory, and the communication interface. When the instructions are executed, the processor implements the chroma intra-frame prediction method as described above.
[0008] This application provides a computer-readable storage medium storing a program applied in a decoder. When the program is executed by a processor, it implements the chroma intra-frame prediction method as described above.
[0009] This application provides a chroma intra-frame prediction method, a decoder, and a computer storage medium. The decoder obtains the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block. If the DM is a DC mode or a planar mode, a chroma prediction mode set is obtained according to the optimized candidate modes. The chroma prediction mode set is used to reconstruct the chroma of the current chroma block. Therefore, in this application's embodiment, after obtaining the DM from the bitstream data of the current chroma block, if the DM is a DC mode or a planar mode, the decoder can construct the chroma prediction mode set using the optimized candidate modes, and then reconstruct the current chroma block based on the chroma prediction mode set. This solves the problem of low chroma intra-frame prediction accuracy when the DM is in DC mode or planar mode, thereby improving encoding and decoding efficiency. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of intra-frame prediction; Figure 2 A schematic diagram of 67 intra-frame prediction modes; Figure 3 This is a schematic diagram of the intra-frame prediction method; Figure 4 Schematic diagram of vertical prediction; Figure 5 This is a schematic diagram of horizontal prediction. Figure 6 This is a schematic diagram of the chroma intra-frame candidate mode set; Figure 7 A diagram of chroma blocks and luminance blocks. Figure 1 ; Figure 8 A diagram of chroma blocks and luminance blocks. Figure 2 ; Figure 9 This is a schematic diagram of the video encoding process; Figure 10 This is a schematic diagram of the video decoding process; Figure 11 A schematic diagram illustrating the implementation process of a chroma intra-frame prediction method proposed in this application embodiment; Figure 12 To establish an optimized alternative model Figure 1 ; Figure 13 To establish an optimized alternative model Figure 2 ; Figure 14 To establish an optimized alternative model Figure 3 ; Figure 15 To establish an optimized alternative model Figure 4 ; Figure 16 To establish an optimized alternative model Figure 5 ; Figure 17 A schematic diagram of the decoder structure proposed in the embodiments of this application. Figure 1 ; Figure 18 A schematic diagram of the decoder structure proposed in the embodiments of this application. Figure 2 . Detailed Implementation
[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely for explaining the relevant application and not for limiting the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the application are shown in the accompanying drawings.
[0012] In video coding, the predicted value for the current processing block is constructed using existing spatially or temporally reconstructed images. Only the difference between the true and predicted values is transmitted to reduce the amount of data transmitted. Intra-frame prediction utilizes spatial correlations within or over image regions. Intra-frame prediction for the current processing block can be performed using pixels from already processed neighboring blocks; for example, the predicted value for the current processing block can be constructed using the row above and column to the left. Figure 1 This is a schematic diagram of intra-frame prediction, such as... Figure 1 As shown, the pixels of the adjacent processing blocks are used to predict each pixel of the current processing block.
[0013] The choice of prediction direction is also important when performing intra-frame prediction. Specifically, when constructing the prediction value of the current processing block using pixels from neighboring coded blocks, various prediction directions can be used. For example, Figure 2 A schematic diagram of 67 intra-frame prediction modes, such as Figure 2 As shown, among the 67 intra-frame prediction modes, there are 65 prediction directions with prediction direction index numbers 2-66, as well as the Planar mode with index number 0 and the DC mode with index number 1.
[0014] In the embodiments of this application, based on the above... Figure 2 , Figure 3 This is a schematic diagram of the intra-frame prediction method, such as... Figure 3 As shown, when constructing the predicted value for each pixel with a prediction direction index of 66, pixels numbered 0-16 represent the data from the previous row of the current processing block. Each pixel in the current processing block is filled with pixels along the upper right diagonal.
[0015] In the embodiments of this application, the Planar mode is mainly used for regions with relatively smooth image textures and relatively gradual changes. Its prediction method uses the pixel values of the reconstructed neighboring processing blocks corresponding to the current processing block as reference pixel values, and then performs linear interpolation and averaging calculations.
[0016] Compared to Planar mode, DC mode is primarily used for images with flat surfaces, smooth textures, and few areas with significant gradients. Specifically, the prediction method involves using the last row of reference pixels already decoded above the current processing block and the rightmost column of reference pixels already decoded to the left of the current processing block for prediction. It's evident that in intra-frame prediction, both Planar and DC modes construct prediction blocks in a relatively flat manner. Specifically, DC mode fills the entire chroma block using the average value of the leftmost column of reference pixels in the previous row, while Planar mode fills the chroma block using a gradient.
[0017] In the above Figure 2 There are two special direction modes: the VER mode (vertical prediction) with a prediction direction index number of 50 and the HOR mode (horizontal prediction) with a prediction direction index number of 18.
[0018] Figure 4 This is a schematic diagram of vertical prediction. Figure 5 This is a schematic diagram of horizontal prediction, such as... Figure 4 and 5 As shown, if the prediction direction is vertical, then vertical prediction can be performed based on the pixel values of the vertically corresponding pixels in the previous row; if the prediction direction is horizontal, then horizontal prediction can be performed based on the pixel values of the horizontally corresponding pixels in the left column.
[0019] When performing intra-frame prediction of brightness, it can be done as described above. Figure 2 The system performs predictions on 0-66 modes, then selects the prediction direction with the smallest difference from the current processing block (i.e., the best match) to construct the predicted value. The encoder writes the difference and prediction direction into the bitstream. The decoder parses the bitstream to obtain the prediction direction index number, then calculates the luminance prediction value. This value is added to the difference signal parsed from the bitstream to obtain the reconstructed luminance value.
[0020] However, chroma intra-frame prediction differs from luma intra-frame prediction. To reduce encoding and decoding complexity, only a portion of the prediction direction is extracted for processing during chroma intra-frame prediction. For example, in VVC, the chroma intra-frame candidate mode set can include one or more chroma intra-frame prediction modes, such as Linear Model Prediction (LM), with LM_T mode on the left and LM_L mode on the right, DC mode, Planar mode, vertical VER mode, and horizontal HOR mode, etc.
[0021] Figure 6 This is a schematic diagram of the chroma intra-frame candidate mode set, such as... Figure 6 As shown, the chroma intra-frame candidate mode set can include different modes. Existing technologies can perform chroma intra-frame prediction by selecting one of the different modes. For example, DM can represent the prediction mode of the corresponding luma center block, while Cross-component Linear Model Prediction (CCLM) represents the construction of the prediction signal using the scheme of (a*luminance value + b), where a and b are both natural numbers. When DM is any of the DC mode, Planar mode, VER mode, or HOR mode, this mode can be replaced with the angle mode with the prediction direction index number 66.
[0022] Furthermore, if the encoding / decoding framework supports separate partitions for luma and chroma, meaning the partitions can be inconsistent, then one chroma block may correspond to multiple luma blocks. Figure 7 A diagram of chroma blocks and luminance blocks. Figure 1 , Figure 8 A diagram of chroma blocks and luminance blocks. Figure 2 ,like Figure 7 and 8 As shown, Figure 7 The chroma blocks in the middle correspond to Figure 8 The luma blocks in the chroma block are coded separately into five parts (represented by different gray levels). Since the CR under DM can only reflect the local texture features of the chroma block, it is unreasonable to directly use a single DM for prediction when a chroma block corresponds to multiple corresponding luma blocks, as shown in the example. Figure 7In the process, when the prediction mode for the brightness center block is selected as DC mode or Planar mode, it is necessary to assume that the current block is flat. However, Figure 7 The current luma blocks in the image may not be flat. Although horizontal and vertical directions are available as default alternatives in chroma prediction mode, very few chroma blocks in this case conform to the overall horizontal and vertical prediction directions, thus wasting alternative positions and hindering the improvement of encoding and decoding efficiency.
[0023] In the embodiments of this application, the above-described chroma intra-frame prediction method can be applied to the intra-frame prediction part of a video coding hybrid framework. Besides being applicable to VVC, it can also be applied to any other video coding hybrid framework. This application uses VVC as an example, but does not impose limitations. Specifically, the above-described chroma intra-frame prediction method can operate simultaneously on both the encoding and decoding ends. For example, Figure 9 This is a diagram illustrating the video encoding process, such as... Figure 9 As shown, video coding can include several specific steps such as intra-frame estimation, intra-frame prediction, and motion compensation. Among them, the chroma intra-frame prediction method proposed in this application can be applied to the intra-frame prediction part. Figure 10 This is a diagram illustrating the video decoding process, such as... Figure 10 As shown, video decoding can include several specific steps such as filtering, intra-frame prediction, and motion compensation. Among them, the chroma intra-frame prediction method proposed in this application can be applied to the intra-frame prediction part.
[0024] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0025] In one embodiment, this application provides a chroma intra-frame prediction method. Figure 11 A schematic diagram illustrating the implementation process of a chroma intra-frame prediction method proposed in this application is shown below. Figure 11 As shown in the embodiments of this application, the method for the decoder to perform intra-frame chroma prediction may include the following steps: Step 101: Obtain the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block.
[0026] In the embodiments of this application, the decoder can obtain the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block.
[0027] It should be noted that, in the embodiments of this application, the decoder may first receive the video bitstream, and then obtain the bitstream data corresponding to the current coding block from the received video bitstream.
[0028] In the implementation of this application, after the decoder obtains the bitstream data corresponding to the current coding block, it can also obtain the residual data corresponding to the current chroma block from the bitstream data.
[0029] It should be noted that, in the embodiments of this application, when the encoder selects the intra-frame prediction mode for luminance, prediction can be performed according to multiple modes, for example, according to the above... Figure 2 The encoder predicts each of the 0-66 modes individually, then selects the best-matching prediction direction to construct the predicted value. However, when the encoder selects the intra-chroma prediction mode, it does not predict all 0-66 modes, but only extracts a portion of the prediction directions for prediction and selection. Therefore, after acquiring the bitstream data, the decoder can further construct a chroma intra-frame candidate set corresponding to the current chroma block from the bitstream data, that is, the chroma prediction mode set corresponding to the previous chroma block.
[0030] In embodiments of this application, the chroma prediction mode set may include at least one chroma intra-frame prediction mode. For example, the chroma prediction mode set may include DM, LM, LM_T, LM_L, DC, Planar, and other directional prediction modes.
[0031] In the embodiments of this application, the current chroma block can be a square chroma block or a rectangular chroma block; the embodiments of this application do not impose specific limitations.
[0032] Step 102: If DM is in DC mode or Planar mode, then obtain the chromaticity prediction mode set according to the optimized alternative mode; wherein, the chromaticity prediction mode set is used to reconstruct the chromaticity of the current chromaticity block.
[0033] In the embodiments of this application, after the decoder obtains the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block, if the DM is in DC mode or Planar mode, the decoder can obtain a set of chroma prediction modes according to the optimized alternative modes. The set of chroma prediction modes can be used to perform intra-frame chroma prediction on the current chroma block.
[0034] It should be noted that, in the embodiments of this application, the chroma prediction mode set is used to predict chroma. Specifically, the decoder can use the chroma prediction mode set to predict the chroma of the current chroma block, thereby reconstructing the chroma corresponding to the current chroma block.
[0035] In the embodiments of this application, after the decoder obtains the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block, the decoder can determine whether the DM is in DC mode or Planar mode.
[0036] It should be noted that, in the embodiments of this application, if the decoder determines that DM is in DC mode or Planar mode, then the encoder can add modes according to the optimized alternative modes, thereby obtaining a set of chromaticity prediction modes.
[0037] In the embodiments of this application, after the decoder determines the DM corresponding to the current chroma block from the above bitstream data, it can first read and analyze the above DM to determine whether the above DM is in DC mode or Planar mode.
[0038] It should be noted that in the implementation of this application, since both Planar mode and DC mode are relatively flat prediction block construction methods, when the luma center block is selected in DC mode or Planar mode during DM, the luma block can be considered flat. However, this is not the case in reality. For example, VVC supports independent block division for luma and chroma encoding, and one chroma block may correspond to multiple luma blocks. Therefore, DM can only reflect the local texture features of the central area, meaning that there is a possibility that the luma block is not flat. In other words, when DM is in Planar mode or DC mode, it is unreasonable to directly use a single DM for prediction, which will lead to a decrease in accuracy. Although horizontal and vertical directions are also available as default alternatives in chroma prediction mode, very few chroma blocks in this case conform to the overall horizontal and vertical prediction directions, thus wasting alternative option positions and hindering the improvement of encoding and decoding efficiency.
[0039] It should be noted that in the implementation of this application, Table 1 shows the initial state of the intra-prediction direction design table. As shown in Table 1, when DM is in DC mode or Planar mode, the initial state of the prediction direction is DC mode or Planar mode. Table 2 shows the subsequent state of the intra-prediction direction design table. As shown in Table 2, when the corresponding luma center block is in Planar mode or DC mode, if the entire luma block adopts one intra-prediction direction, it means that the current block is likely to be flat. In order to ensure the efficiency of flat blocks, another flat mode will be filled in. Among them, since DM and CCLM are important coding tools, they need to be prioritized.
[0040] Table 1
[0041] Table 2
[0042] Currently, only flatness information in DC or Planar mode can be obtained through luma blocks. In reality, the corresponding chroma blocks may cover multiple luma block regions, which contain directional texture information, and the directions of this texture information have different probability distributions.
[0043] On the other hand, in the prior art, when DM is any of the DC mode, Planar mode, VER mode or HOR mode, the mode can be replaced with the angle mode with prediction direction index number 66.
[0044] However, in practical applications, although the VER and HOR modes with prediction direction index numbers of 18 and 50 account for a large proportion, the probability of the texture running through the entire chroma block is very small. In contrast, the diagonal angle modes with prediction direction index numbers of 34, 66 and 2 and the direction modes near them can accurately predict the chroma block with a greater probability.
[0045] Therefore, since DM can only reflect the local texture features of chroma blocks, it is unreasonable to directly use a single DM prediction and supplement it with horizontal, vertical, and diagonal patterns corresponding to prediction direction index number 66 when a chroma block corresponds to multiple co-located luma blocks. Thus, the decoder needs to optimize the chroma prediction pattern set according to optimized alternative patterns. Furthermore, in practical applications, the diagonal angle patterns with prediction direction indices 34, 66, and 2, and their nearby directional patterns, can more accurately predict chroma blocks with a higher probability. Therefore, these prediction direction patterns can be used to replace the original horizontal and vertical prediction direction patterns, further supplementing the DM.
[0046] In the embodiments of this application, if the DM is in DC mode or Planar mode, the decoder can further obtain a set of chromaticity prediction modes for chromaticity prediction according to the optimized alternative modes.
[0047] It should be noted that, in the embodiments of this application, the decoder may pre-set at least one mode as an alternative mode, that is, the decoder has pre-set an optimized alternative mode.
[0048] In the embodiments of this application, the diagonal angle modes with prediction direction index numbers 34, 66, and 2 are more frequently used for prediction in small blocks of the luminance region corresponding to the current chroma. Therefore, the optimized candidate modes can store modes with prediction direction index numbers 34, 66, and 2. For example, if the current chroma block is a square chroma block, that is, the diagonal angle mode of the current chroma block is the mode with prediction direction index numbers 34, 66, and 2, then when the decoder obtains the chroma prediction mode set according to the optimized candidate modes, it can first add the mode with prediction direction index number 34 to the chroma prediction mode set, and then add one of the modes with prediction direction index numbers 66 and 2 in the other diagonal angle direction to the chroma prediction mode set.
[0049] In the embodiments of this application, since the modes with prediction direction index numbers 66 and 2 belong to two directions with the same slope, the decoder can adjust the mode with prediction direction index number 2 clockwise by an angle and then use it as an optimized candidate mode, for example, adjusting it to the mode with prediction direction index number 6. Simultaneously, the decoder can also adjust the mode with prediction direction index number 66 counterclockwise by an angle and then use it as an optimized candidate mode, for example, adjusting it to the mode with prediction direction index number 61. Furthermore, the decoder can also simultaneously adjust the modes with prediction direction index numbers 66 and 2 by an angle and then use them as optimized candidate modes.
[0050] In the embodiments of this application, besides the diagonal angle pattern being used more frequently for prediction, other extrapolated angles near the diagonal angle pattern are also frequently used for prediction. Therefore, the above-mentioned optimized candidate patterns may include patterns with prediction direction index numbers of 32, 64, and 4. For example, when the decoder obtains the chroma prediction pattern set based on the optimized candidate patterns, it can first add the pattern with prediction direction index number 32 to the chroma prediction pattern set, and then add one of the patterns with prediction direction index numbers of 64 and 4 to the chroma prediction pattern set.
[0051] In summary, in the embodiments of this application, when establishing optimized candidate modes, the decoder can determine at least one diagonal angle mode as an optimized candidate mode; it can also determine the derived angle modes of at least one diagonal angle mode as optimized candidate modes; and it can also determine at least one diagonal angle mode and at least one derived angle mode of a diagonal angle mode as optimized candidate modes. Specifically, the decoder can first determine the derived angles. Specifically, the decoder can first determine the index number M corresponding to DM, where M is an integer greater than 0; then the decoder can obtain the transform parameter N, and finally, based on M and N, further determine the index number corresponding to the derived angle mode, thereby obtaining the derived angle mode; where N is an integer greater than 0.
[0052] In the embodiments of this application, when the decoder determines the index number corresponding to the derived angle mode based on M and N, it can either perform addition or subtraction operations on M and N to obtain the index number corresponding to the derived angle mode. N can be 3, 5, or 7, but is not limited to these values. For example, if the index number M corresponding to DM is 1 (i.e., DM is DC mode), then the decoder can use the angle direction obtained by 1+5 or 1-5 as the index number corresponding to the derived angle mode. Since prediction modes are generally not represented by negative numbers, a specific mapping method can be used to map the calculated value to the effective representation range. For example, the specific calculation formula can be (M+62-N)%64+2, which yields 60.
[0053] In the embodiments of this application, for the wide-angle mode of non-square blocks, one of the modes with prediction direction index numbers 66 and 2 can be selected as an alternative based on its effective prediction direction range, while the angle corresponding to the other index number can be adjusted as an alternative.
[0054] In the embodiments of this application, after the decoder obtains the chroma prediction mode set according to the optimized alternative modes, i.e. after step 102, the method for the decoder to perform intra-frame chroma prediction may further include the following steps: Step 103: Decode the current chroma block according to the chroma prediction mode set to reconstruct the chroma.
[0055] In the embodiments of this application, after the decoder obtains a set of chroma prediction modes according to the optimized alternative modes, it can perform decoding processing according to the set of chroma prediction modes to reconstruct the chroma of the current chroma block.
[0056] In the embodiments of this application, after obtaining the chroma prediction mode set, the decoder can further decode the current chroma block using the chroma prediction mode set, thereby reconstructing the current chroma block.
[0057] It should be noted that, in the embodiments of this application, while the decoder obtains the bitstream data corresponding to the current coding block from the received video bitstream and obtains the DM from the bitstream data, the decoder can also obtain the residual data corresponding to the current chroma block from the bitstream data.
[0058] In the embodiments of this application, after the decoder obtains the chroma prediction mode set according to the optimized alternative mode, and at the same time obtains the residual data corresponding to the current chroma block from the bitstream data, it can perform chroma intra-frame prediction decoding on the residual data based on the chroma prediction mode set, thereby reconstructing the current chroma block.
[0059] This application proposes an intra-frame chroma prediction method. The decoder obtains the direct prediction mode (DM) corresponding to the current chroma block from the bitstream data corresponding to the current chroma block. If the DM is in DC mode or Planar mode, a set of chroma prediction modes is obtained according to optimized candidate modes. This set of chroma prediction modes is used to reconstruct the chroma of the current chroma block. Therefore, in this embodiment, after obtaining the DM from the bitstream data of the current chroma block, if the DM is in DC mode or Planar mode, the decoder can construct a set of chroma prediction modes using optimized candidate modes, and then reconstruct the current chroma block based on the set of chroma prediction modes. This solves the problem of low accuracy in intra-frame chroma prediction when the DM is in DC mode or Planar mode, thereby improving encoding and decoding efficiency.
[0060] Based on the above embodiments, in another embodiment of this application, after the decoder obtains the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block, if the DM in the DM is DC mode or Planar mode, then the decoder may consider that it is necessary to obtain a set of chroma prediction modes according to the optimized alternative modes, thereby improving the accuracy of decoding.
[0061] It should be noted that in the implementation of this application, since both Planar mode and DC mode are relatively flat prediction block construction methods, when the luma center block is selected as DC mode or Planar mode in DM, the luma block can be considered flat. However, this is not the case in reality. VVC supports independent block division for luma and chroma encoding. One chroma block may correspond to multiple luma blocks. Therefore, DM can only reflect the local texture features of the central area. In other words, there is a possibility that the luma block is not flat. That is to say, when DM is Planar mode or DC mode, it is unreasonable to directly use a single DM for prediction, which will lead to a decrease in accuracy. Although there are horizontal and vertical directions as default alternatives in the chroma prediction mode, there are very few chroma blocks that conform to the horizontal and vertical prediction directions in this case, thus wasting alternative option positions and not conducive to improving encoding and decoding efficiency. Therefore, it is necessary to obtain a set of chroma prediction modes according to the optimized alternative modes. Specifically, before obtaining the set of chroma prediction modes according to the optimized alternative modes, the decoder also needs to obtain the linear mode LM corresponding to the current chroma block from the bitstream data.
[0062] In the implementation of this application, the method for the decoder to obtain a set of chromaticity prediction modes according to the optimized alternative modes can specifically include the following steps: Step 201: Fill the DM and LM into the chromaticity prediction mode set.
[0063] Step 202: Fill the set of chromaticity prediction modes according to the optimized alternative modes.
[0064] In the embodiments of this application, the decoder can first add DM and LM to the chroma prediction mode set, thereby determining the two modes in the chroma prediction mode set. Then, the decoder can continue to fill the chroma prediction mode set according to the optimized candidate modes, and finally obtain the chroma prediction mode set.
[0065] It should be noted that, in the embodiments of this application, when the decoder adds DM and LM to the chroma prediction mode set, it specifically adds the prediction direction index number of the mode corresponding to DM and the prediction direction index number of the mode corresponding to LM to the prediction mode set. For example, if DM is a DC mode and the prediction direction index number of the mode corresponding to LM is 15, then the decoder can first add prediction direction index numbers 1 and 15 to the chroma prediction mode set respectively, and then fill the chroma prediction mode set according to the optimized candidate modes. Specifically, precisely because DM is a DC mode, the decoder will supplement the chroma prediction mode set with the prediction direction index number 0 of the Planar mode during the process of filling the chroma prediction mode set according to the optimized candidate modes.
[0066] It should be noted that, in the embodiments of this application, when the decoder fills the chroma prediction mode set according to the optimized alternative modes, it may specifically include the following steps: Step 202a: When DM is in DC mode, fill the color prediction mode set with Planar mode and optimized alternative mode.
[0067] In the embodiments of this application, if the DM corresponding to the current chroma block is in DC mode, then the decoder does not need to modify or replace the Planar mode. Therefore, the Planar mode and optimized alternative modes can be filled into the chroma prediction mode set, and when the number of allocated bits is the same, the order does not matter.
[0068] It should be noted that, in the embodiments of this application, when the decoder adds the Planar mode and the optimized candidate modes to the chroma prediction mode set, it specifically adds the prediction direction index number corresponding to the Planar mode and the prediction direction index numbers corresponding to the other optimized candidate modes to the prediction mode set. For example, if the prediction direction index numbers corresponding to the other optimized candidate modes are 32 and 61, then the decoder can add the prediction direction index numbers 0, 132, and 61 to the chroma prediction mode set, respectively.
[0069] Step 202b: When DM is in Planar mode, fill the chromaticity prediction mode set with DC mode and optimized alternative mode.
[0070] In the embodiments of this application, if the DM corresponding to the current chroma block is Planar mode, then the decoder does not need to modify or replace the DC mode. Therefore, the DC mode and the optimized alternative mode can be filled into the chroma prediction mode set. When the number of allocated bits is the same, they can be used in any order.
[0071] It should be noted that, in the embodiments of this application, when the decoder adds the DC mode and the optimized candidate modes to the chroma prediction mode set, it specifically adds the prediction direction index number corresponding to the DC mode and the prediction direction index number corresponding to the other optimized candidate modes to the prediction mode set. For example, if the prediction direction index numbers corresponding to the other optimized candidate modes are 2 and 60, then the decoder can add the prediction direction index numbers 1, 2, and 60 to the chroma prediction mode set respectively.
[0072] In embodiments of this application, the method by which the decoder adds optimized alternative modes to the chroma prediction mode set may further include the following steps: Step 301: Determine the priority of at least one of the optimization candidate modes.
[0073] In embodiments of this application, the decoder may first determine the priority of at least one of the alternative optimization modes.
[0074] It should be noted that, in the embodiments of this application, the optimized alternative mode can be at least one mode, and specifically, the prediction direction index numbers of the above at least one mode are all different.
[0075] It should be noted that, in the embodiments of this application, the decoder can determine the priority according to the actual usage probability of at least one mode.
[0076] Step 302: Add the optimized alternative modes to the color prediction mode set in order of priority from high to low.
[0077] In the embodiments of this application, after the decoder determines the priority of at least one of the optimized candidate modes, it can further add the optimized candidate modes to the chroma prediction mode set in descending order of priority.
[0078] In the embodiments of this application, when the decoder adds optimized candidate modes to the chroma prediction mode set, it can first add the optimized candidate mode with the highest priority, and then select the next optimized candidate mode in order of priority from high to low to construct the chroma prediction mode set.
[0079] It should be noted that, in the embodiments of this application, when the decoder adds the optimized candidate mode to the chroma prediction mode set, it specifically adds the prediction direction index number corresponding to the optimized candidate mode to the prediction mode set.
[0080] In other words, if the decoder can construct the set of chroma prediction modes according to the preset optimized alternative modes, it can improve the accuracy of the prediction.
[0081] This application proposes an intra-frame chroma prediction method. The decoder obtains the direct prediction mode (DM) corresponding to the current chroma block from the bitstream data corresponding to the current chroma block. If the DM is in DC mode or Planar mode, a set of chroma prediction modes is obtained according to optimized candidate modes. This set of chroma prediction modes is used to reconstruct the chroma of the current chroma block. Therefore, in this embodiment, after obtaining the DM from the bitstream data of the current chroma block, if the DM is in DC mode or Planar mode, the decoder can construct a set of chroma prediction modes using optimized candidate modes, and then reconstruct the current chroma block based on the set of chroma prediction modes. This solves the problem of low accuracy in intra-frame chroma prediction when the DM is in DC mode or Planar mode, thereby improving encoding and decoding efficiency.
[0082] In embodiments of this application, the current chroma block includes square chroma blocks and non-square chroma blocks. Based on this, when establishing optimized candidate modes, the decoder can determine at least one diagonal angle mode as an optimized candidate mode, or it can determine the derived angle modes of at least one diagonal angle mode as optimized candidate modes, or it can determine both the at least one diagonal angle mode and the derived angle modes of the at least one diagonal angle mode as optimized candidate modes.
[0083] In embodiments of this application, the decoder can determine at least one diagonal angle pattern as an optimized candidate pattern. Specifically, if the current chroma block is a square chroma block, that is, if the diagonal angle pattern of the current chroma block is a pattern with prediction direction index numbers 34, 66, and 2, the diagonal angle patterns with prediction direction index numbers 34, 66, and 2 are more likely to be used for prediction. Figure 12 To establish an optimized alternative model Figure 1 ,like Figure 12 As shown, the decoder can first determine a diagonal angle prediction mode, i.e., the mode with prediction direction index number 34, as the above-mentioned optimized candidate mode. Then, it can determine any one of the other diagonal angle directions, i.e., the modes with prediction direction index numbers 66 and 2, as the above-mentioned optimized candidate mode.
[0084] In embodiments of this application, the decoder can also determine at least one diagonal angle pattern derived from a diagonal angle pattern as an optimized candidate pattern. Specifically, if the current chroma block is a square chroma block, that is, if the diagonal angle pattern of the current chroma block is a pattern with prediction direction index numbers 34, 66, and 2, in addition to the diagonal angle pattern being used more for prediction, other derived angles near the diagonal angle pattern are also used more for prediction. Figure 13 To establish an optimized alternative model Figure 2 ,like Figure 13 As shown, the decoder can first determine a prediction mode with a derivation angle, i.e., the mode with prediction direction index number 32, as the above-mentioned optimized candidate mode. Then, it can determine any one of the modes with prediction direction index numbers 66 and 2 as the above-mentioned optimized candidate mode.
[0085] In the embodiments of this application, the decoder can first determine at least one derived angle pattern. Specifically, the decoder can first determine the index number M corresponding to DM, where M is an integer greater than 0; then the decoder can obtain the transformation parameter N, and finally further determine the index number corresponding to the derived angle pattern based on M and N, thereby obtaining the derived angle pattern; where N is an integer greater than 0.
[0086] In embodiments of this application, when the decoder determines the index number corresponding to the derived angle pattern based on M and N, it can either perform addition or subtraction operations on M and N to ultimately obtain the index number corresponding to the derived angle pattern. Here, N can take the value 3, 5, or 7. For example, based on the above... Figure 2 When the index number M corresponding to DM is 0 (i.e., DM is in Planar mode), the decoder can use the angle direction obtained by 0+5 or 0-5 as the index number corresponding to the derived angle mode. Since the prediction mode is generally not represented by negative numbers, a specific mapping method can be used to map the calculated value to the effective representation range. For example, the specific calculation formula can be (M+62-N)%64+2, which yields 60. That is, at this time, the derived angle modes can be obtained as the predicted direction angle 5 mode and the predicted direction angle 60 mode.
[0087] In the embodiments of this application, since the modes with prediction direction index numbers 66 and 2 belong to two directions with the same slope, the decoder can adjust the mode with prediction direction index number 2 clockwise by an angle and then use it as an optimized candidate mode. For example, Figure 14 To establish an optimized alternative model Figure 3 ,like Figure 14As shown, the decoder adjusts the mode with prediction direction index number 2 to the mode with prediction direction index number 6. Simultaneously, the decoder can also adjust the mode with prediction direction index number 66 counterclockwise by one angle and then use it as an optimized alternative mode, for example... Figure 15 To establish an optimized alternative model Figure 4 ,like Figure 15 As shown, the decoder adjusts the mode with prediction direction index number 66 to the mode with prediction direction index number 61. Furthermore, the decoder can simultaneously adjust both the mode with prediction direction index number 66 and the mode with prediction direction index number 2 by one angle and then use them as optimized alternative modes. For example, Figure 16 To establish an optimized alternative model Figure 5 ,like Figure 16 As shown, the decoder adjusts the mode with prediction direction index number 66 to the mode with prediction direction index number B, and adjusts the mode with prediction direction index number 2 to the mode with prediction direction index number A.
[0088] It should be noted that, in the embodiments of this application, when the decoder constructs the chroma prediction mode set according to the optimized candidate modes, it can freely combine the diagonal angle modes and the derived angle modes. For example, if it is necessary to construct the chroma prediction mode set using three optimized candidate modes, then one diagonal angle mode and two derived angle modes can be added to the chroma prediction mode set, or two diagonal angle modes and one derived angle mode can be added to the chroma prediction mode set, or three derived angle modes can be added to the chroma prediction mode set, or three diagonal angle modes can be added to the chroma prediction mode set. For example, when the decoder constructs the chroma prediction mode set according to the optimized candidate modes, it can add prediction direction angle modes 6, 61, and 66 to the chroma prediction mode set, or prediction direction angle modes 6, 61, and 34 to the chroma prediction mode set, or prediction direction angle modes 6, 61, and 40 to the chroma prediction mode set. The embodiments of this application do not make specific limitations.
[0089] In the embodiments of this application, for the wide-angle mode of the elongated block, one of the modes with prediction direction index numbers 66 and 2 can be selected as an alternative based on its effective prediction direction range, while the angle corresponding to the other index number can be adjusted as an alternative.
[0090] This application proposes a chroma intra-frame prediction method. The decoder obtains the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block. If the DM is in DC mode or Planar mode, a chroma prediction mode set is obtained according to optimized candidate modes. The chroma prediction mode set is used to reconstruct the chroma of the current chroma block. Therefore, in the embodiments of this application, after obtaining the DM from the bitstream data of the current chroma block, if the DM is in DC mode or Planar mode, the decoder can construct the chroma prediction mode set using optimized candidate modes, and then reconstruct the current chroma block based on the chroma prediction mode set. This solves the problem of low chroma intra-frame prediction accuracy when the DM is in DC mode or Planar mode, thereby improving encoding and decoding efficiency.
[0091] Based on the above embodiments, in another embodiment of this application, Figure 17 A schematic diagram of the decoder structure proposed in the embodiments of this application. Figure 1 ,like Figure 17 As shown, the decoder 1 proposed in this application embodiment may include an acquisition part 11, a decoding part 12, an establishment part 13, and a receiving part 14.
[0092] The acquisition part 11 is used to acquire the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block; and if the DM is a DC mode or a planar mode, then acquire a chroma prediction mode set according to the optimized alternative mode; wherein, the chroma prediction mode set is used to perform chroma reconstruction on the current chroma block.
[0093] In an embodiment of this application, the acquisition part 11 is further configured to acquire the linear mode LM corresponding to the current chroma block from the bitstream data before acquiring the chroma prediction mode set according to the optimized alternative mode.
[0094] In embodiments of this application, the acquisition portion 11 is specifically used to fill the DM and the LM into the chromaticity prediction mode set; and to fill the chromaticity prediction mode set according to the optimized alternative mode.
[0095] In embodiments of this application, the acquisition portion 11 is further specifically used to fill the Planar mode and the optimized alternative mode into the chromaticity prediction mode set when the DM is the DC mode; and to fill the DC mode and the optimized alternative mode into the chromaticity prediction mode set when the DM is the Planar mode.
[0096] In embodiments of this application, the optimized alternative modes include at least one mode; wherein the prediction direction index numbers of the at least one mode are different.
[0097] In an embodiment of this application, the establishment part 13 is used to establish the optimized alternative mode before obtaining the chromaticity prediction mode set according to the optimized alternative mode.
[0098] In the embodiments of this application, the establishment part 13 is specifically used to determine at least one diagonal angle pattern as the optimized candidate pattern; or, to determine the derived angle pattern of the at least one diagonal angle pattern as the optimized candidate pattern; or, to determine the at least one diagonal angle pattern and the derived angle pattern of the at least one diagonal angle pattern as the optimized candidate pattern.
[0099] In an embodiment of this application, the acquisition part 11 is further configured to determine the index number M corresponding to the DM before establishing the optimized alternative mode; wherein, the M is an integer greater than 0; and to acquire the transformation parameter N, and determine the index number corresponding to the derived angle mode according to the M and the N, so as to obtain the derived angle mode; wherein, the N is an integer greater than 0.
[0100] In the embodiments of this application, the acquisition part 11 is specifically used to perform an addition operation on the M and the N to obtain the index number corresponding to the derived angle mode; or, to perform a subtraction operation on the M and the N to obtain the index number corresponding to the derived angle mode.
[0101] In embodiments of this application, N includes 3, 5, or 7.
[0102] In embodiments of this application, the current chroma block includes square chroma blocks and non-square chroma blocks.
[0103] In an embodiment of this application, the receiving part 14 is used to receive a video bitstream to obtain the bitstream data before obtaining the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block.
[0104] In the embodiments of this application, the decoding part 12 is used to obtain a set of chroma prediction modes according to the optimized alternative modes, and then perform decoding processing according to the set of chroma prediction modes to reconstruct the chroma of the current chroma block.
[0105] In an embodiment of this application, the acquisition part 11 is further configured to perform decoding processing based on the chroma prediction mode set, so as to obtain the residual data corresponding to the current chroma block from the bitstream data before performing chroma reconstruction on the current chroma block.
[0106] In the embodiments of this application, the decoding part 12 is specifically used to perform intra-frame chroma prediction decoding on the residual data based on the chroma prediction mode set, so as to reconstruct the chroma of the current chroma block.
[0107] In an embodiment of this application, the acquisition part 11 is further configured to receive a video bitstream to obtain the bitstream data, and if there is a common prediction mode among the prediction modes corresponding to the current chroma block obtained from the bitstream data, then obtain a set of chroma prediction modes according to the optimized alternative modes to perform chroma reconstruction on the current chroma block.
[0108] Figure 18 A schematic diagram of the decoder structure proposed in the embodiments of this application. Figure 2 ,like Figure 18 As shown, the decoder 1 proposed in this application embodiment may further include a processor 15, a memory 16 storing executable instructions of the processor 15, a communication interface 17, and a bus 18 for connecting the processor 15, the memory 16, and the communication interface 17.
[0109] In the embodiments of this application, the processor 15 can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and this application embodiment does not specifically limit it. The device 1 may also include a memory 16, which can be connected to the processor 15. The memory 16 is used to store executable program code, which includes computer operation instructions. The memory 16 may include high-speed RAM memory and may also include non-volatile memory, such as at least two disk drives.
[0110] In embodiments of this application, bus 18 is used to connect communication interface 17, processor 15, and memory 16, as well as the mutual communication between these devices.
[0111] In embodiments of this application, memory 16 is used to store instructions and data.
[0112] Furthermore, in an embodiment of this application, the processor 15 is configured to obtain the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block; if the DM is a DC mode or a planar mode, then according to the optimized alternative mode, obtain a chroma prediction mode set; wherein, the chroma prediction mode set is used to perform chroma reconstruction on the current chroma block.
[0113] In practical applications, the aforementioned memory 16 may be a volatile first memory, such as random-access memory (RAM); or a non-volatile first memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of first memory, and provide instructions and data to the processor 15.
[0114] Furthermore, in this embodiment, the functional modules can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.
[0115] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0116] This application proposes an apparatus in which a decoder obtains the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block; if the DM is a DC mode or a planar mode, a chroma prediction mode set is obtained according to an optimized alternative mode; wherein, the chroma prediction mode set is used to reconstruct the chroma of the current chroma block. Therefore, in this embodiment, after obtaining the DM from the bitstream data of the current chroma block, if the DM is a DC mode or a planar mode, the decoder can construct a chroma prediction mode set using optimized alternative modes, and then reconstruct the current chroma block according to the chroma prediction mode set. This solves the problem of low intra-frame chroma prediction accuracy when the DM is in DC mode or a planar mode, thereby improving encoding and decoding efficiency.
[0117] This application provides a first computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the intra-frame chroma prediction method as described above.
[0118] Specifically, the program instructions corresponding to a chroma intra-frame prediction method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to a chroma intra-frame prediction method in the storage media are read or executed by an electronic device, the following steps are included: Obtain the DM corresponding to the current chroma block from the bitstream data corresponding to the current chroma block; If the DM is a DC mode or a planar mode, then obtain the chromaticity prediction mode set according to the optimized alternative modes; The chromaticity prediction mode set is used to reconstruct the chromaticity of the current chromaticity block.
[0119] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0120] This application is described with reference to schematic and / or block diagrams of implementations of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the schematic and / or block diagrams can be implemented by computer program instructions, and combinations of blocks in the schematic and / or block diagrams can be implemented. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the schematic and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0121] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the implementation flow diagram. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0122] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0123] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. A method for intra-frame chroma prediction, applied to a decoder, characterized in that, The method includes: Analyze the bitstream data corresponding to the current chroma block to determine that the prediction mode of the current chroma block is direct mode DM; Obtain the linear mode corresponding to the current chroma block from the bitstream data; Based on the optimized alternative modes, a set of chromaticity prediction modes is determined; wherein, when the luminance prediction mode corresponding to the direct mode DM is any one of DC mode, planar mode, vertical VER mode or horizontal HOR mode, the set of chromaticity prediction modes includes the angle mode with index number 66. Determine the intra-prediction mode of the current chroma block from the set of chroma prediction modes; The reconstruction value of the current chroma block is determined based on the intra-frame prediction mode.
2. The method according to claim 1, characterized in that, When the luminance prediction mode corresponding to the direct mode DM is the DC mode, the chromaticity prediction mode set is determined at least according to the planar mode and the optimized alternative mode; When the luminance prediction mode corresponding to the direct mode DM is the planar mode, the chromaticity prediction mode set is determined at least based on the DC mode and the optimized alternative mode.
3. The method according to claim 1, characterized in that, When the brightness prediction mode corresponding to the direct mode DM is the DC mode or the planar mode, the diagonal angle mode with prediction direction index number 66 and the diagonal angle mode with prediction direction index number 2 are each adjusted by one angle as the optimized alternative mode.
4. A method for intra-frame chroma prediction, applied to an encoder, characterized in that, The method includes: The prediction mode for the current chroma block is determined to be Direct Mode (DM). Based on the optimized alternative modes, a set of chromaticity prediction modes is determined; wherein, when the luminance prediction mode corresponding to the direct mode DM is any one of DC mode, planar mode, vertical VER mode or horizontal HOR mode, the set of chromaticity prediction modes includes the angle mode with index number 66. Determine the intra-prediction mode of the current chroma block from the set of chroma prediction modes; The reconstruction value of the current chroma block is determined based on the intra-frame prediction mode.
5. The method according to claim 4, characterized in that, When the luminance prediction mode corresponding to the direct mode DM is the DC mode, the chromaticity prediction mode set is determined at least according to the planar mode and the optimized alternative mode; When the luminance prediction mode corresponding to the direct mode DM is the planar mode, the chromaticity prediction mode set is determined at least based on the DC mode and the optimized alternative mode.
6. The method according to claim 4, characterized in that, When the brightness prediction mode corresponding to the direct mode DM is the DC mode or the planar mode, the diagonal angle mode with prediction direction index number 66 and the diagonal angle mode with prediction direction index number 2 are each adjusted by one angle as the optimized alternative mode.
7. An apparatus for intra-frame chroma prediction, applied to a decoder, characterized in that, The device includes: A module that parses the bitstream data corresponding to the current chroma block to determine whether the prediction mode of the current chroma block is direct mode (DM). The module that obtains the linear mode corresponding to the current chroma block from the bitstream data; The module that determines the set of chromaticity prediction modes based on the optimized alternative modes; wherein, when the luminance prediction mode corresponding to the direct mode DM is any one of the DC mode, planar mode, vertical VER mode or horizontal HOR mode, the set of chromaticity prediction modes includes the angle mode with index number 66. A module that determines the intra-prediction mode of the current chroma block from the set of chroma prediction modes; The module that determines the reconstruction value of the current chroma block based on the intra-frame prediction mode.
8. The apparatus according to claim 7, characterized in that, Also includes: When the luminance prediction mode corresponding to the direct mode DM is the DC mode, the module that determines the chromaticity prediction mode set is based at least on the planar mode and the optimized alternative mode; When the luminance prediction mode corresponding to the direct mode DM is the planar mode, the module that determines the chromaticity prediction mode set is based at least on the DC mode and the optimized alternative mode.
9. The apparatus according to claim 7, characterized in that, When the brightness prediction mode corresponding to the direct mode DM is the DC mode or the planar mode, the diagonal angle mode with prediction direction index number 66 and the diagonal angle mode with prediction direction index number 2 are each adjusted by one angle as the optimized alternative mode.
10. An apparatus for intra-frame chroma prediction, applied to an encoder, characterized in that, The device includes: The module that determines whether the prediction mode of the current chroma block is direct mode (DM); The module that determines the set of chromaticity prediction modes based on the optimized alternative modes; wherein, when the luminance prediction mode corresponding to the direct mode DM is any one of the DC mode, planar mode, vertical VER mode or horizontal HOR mode, the set of chromaticity prediction modes includes the angle mode with index number 66. A module that determines the intra-prediction mode of the current chroma block from the set of chroma prediction modes; The module that determines the reconstruction value of the current chroma block based on the intra-frame prediction mode.
11. The apparatus according to claim 10, characterized in that, Also includes: When the luminance prediction mode corresponding to the direct mode DM is the DC mode, the module that determines the chromaticity prediction mode set is based at least on the planar mode and the optimized alternative mode; When the luminance prediction mode corresponding to the direct mode DM is the planar mode, the module that determines the chromaticity prediction mode set is based at least on the DC mode and the optimized alternative mode.
12. The apparatus according to claim 10, characterized in that, When the brightness prediction mode corresponding to the direct mode DM is the DC mode or the planar mode, the diagonal angle mode with prediction direction index number 66 and the diagonal angle mode with prediction direction index number 2 are each adjusted by one angle as the optimized alternative mode.
13. A decoder, characterized in that, include: Memory is used to store instructions that can be executed by the processor; A processor for executing the instructions to perform the method of any one of claims 1-3.
14. An encoder, characterized in that, include: Memory is used to store instructions that can be executed by the processor; A processor for executing the instructions to perform the method of any one of claims 4-6.
15. A computer-readable storage medium having a computer program and a bitstream stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 4-6 to generate the bitstream.