Method for determining a prediction direction, decoder and computer storage medium
By utilizing the prediction direction index number and offset N of the DM mode in multi-function video coding, the prediction direction index number of the DM derivation mode is determined, which solves the problem of complex and inaccurate construction of chroma intra-frame prediction mode and improves decoding accuracy and video data transmission quality.
Patent Information
- Application Number
- CN202211246636.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-02
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2039-01-02
AI Technical Summary
In multi-functional video coding, the candidate list for chroma intra-frame prediction modes is complex and inaccurate. Existing DM modes have sequence dependencies and cannot effectively reflect the local texture features of chroma blocks, resulting in inaccurate decoding.
By obtaining the luminance DM mode at the same position in the chroma intra-prediction mode of the block to be decoded, and using the prediction direction index number M and offset N of the DM mode, the prediction direction index number of the DM derivation mode is determined. A new prediction direction index number construction method is adopted to reduce the decoding priority of the DM mode and increase the decoding priority of the DM derivation mode.
It improves the accuracy of intra-frame chroma prediction, reduces decoding complexity, and enhances the transmission quality of video data.
Smart Images

Figure CN115695786B_ABST
Abstract
Description
[0001] This application is a divisional application of PCT / CN2019 / 070145, which entered the Chinese national phase on January 2, 2019, and has a Chinese patent application number of 201980064447.6, and a title of "Method for determining prediction direction, decoder, and computer storage medium". TECHNICAL FIELD
[0002] Embodiments of the present application relate to the technical field of determining prediction direction in direct mode (DM) in video decoding, and in particular to a method for determining prediction direction, a decoder, and a computer storage medium. BACKGROUND
[0003] In the versatile video coding (VVC), the candidate modes of the chroma intra prediction mode can include: a DM mode, a linear model prediction (LM), a linear model prediction of the previous row (LM_T mode), a linear model prediction of the left column (LM_L mode), a direct current (DC) mode, a gradual change (PLANAR) mode, a vertical (VER) mode, and a horizontal (HOR) mode.
[0004] At present, the candidate list of the VVC chroma intra prediction mode can also be constructed by using multiple direct mode signaling (MDMS). However, 17 candidate schemes need to be compared, the number of comparisons is huge, the dependence on neighboring blocks is strong, and the decoding is complex. In addition, in the construction of the candidate list of the VVC chroma intra prediction mode, when the DM mode is an angle mode, the default angle candidate mode uses fixed HOR mode, VER mode, and 66 mode. However, the three fixed modes have strong sequence dependence, and the angle characteristics that meet the requirements are often represented by the DM, so they are rarely selected in actual applications. In addition, the existing DM mode can only reflect the local texture characteristics of the chroma block. When the chroma block corresponds to multiple direct mode (DM) blocks, it is unreasonable to directly use a single DM mode for prediction. Therefore, it can be seen that there is a problem of inaccurate prediction when decoding the candidate mode of the existing chroma intra prediction mode. SUMMARY
[0005] Therefore, embodiments of the present application aim to provide a method for determining prediction direction, a decoder, and a computer storage medium, which can improve the accuracy of chroma intra prediction of the decoder.
[0006] The technical solutions of the embodiments of the present application can be implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides a method, which is applied to a decoder, and the method comprises the following steps:
[0008] obtaining a same-position luma DM mode in a chroma intra prediction mode of a to-be-decoded block; determining an index number of a prediction direction of a DM derivation mode according to an index number M of a prediction direction of the DM mode and a preset offset N, so as to determine the DM derivation mode; wherein N is a positive integer greater than or equal to 2, and M is a positive integer.
[0009] In the above scheme, the step of determining the index number of the prediction direction of the DM derivation mode according to the index number M of the prediction direction of the DM mode and the preset offset N, so as to determine the DM derivation mode, comprises the following steps:
[0010] summing M and N to obtain a sum value, and subtracting M from N to obtain a difference value; obtaining a minimum value K1 of the index numbers of the prediction directions contained in the DM mode, and a maximum value K2 of the index numbers of the prediction directions contained in the DM mode; and determining the index number of the prediction direction of the DM derivation mode according to the sum value, the difference value, K1 and K2, so as to determine the DM derivation mode.
[0011] In the above scheme, the step of determining the index number of the prediction direction of the DM derivation mode according to the sum value and the difference value, so as to determine the DM derivation mode, comprises the following steps:
[0012] when the sum value is less than or equal to K2 and the difference value is greater than or equal to K1, determining the index number of the prediction direction of the DM derivation mode as the sum value and the difference value respectively; when the difference value is less than or equal to K1, determining the index number of the prediction direction of the DM derivation mode as the sum value and a first output value respectively; wherein the first output value is a value obtained by inputting M and N into a preset first preset formula; when the sum value is greater than or equal to K2, determining the index number of the prediction direction of the DM derivation mode as a second output value and the difference value respectively; wherein the second output value is a value obtained by inputting M and N into a preset second preset formula.
[0013] In the above scheme, the step of determining the index number of the prediction direction of the DM derivation mode according to the sum value and the difference value, so as to determine the DM derivation mode, comprises the following steps:
[0014] when the sum value is less than or equal to K2 and the difference value is greater than or equal to K1, determining the index number of the prediction direction of the DM derivation mode as the sum value and the difference value respectively; when the difference value is less than or equal to K1, determining the index number of the prediction direction of the DM derivation mode as the sum value and K1 respectively; when the sum value is greater than or equal to K2, determining the index number of the prediction direction of the DM derivation mode as the difference value and K2 respectively.
[0015] In the above solution, when the index number of the prediction direction contained in the DM mode is different from the index number of the prediction direction contained in the to-be-decoded block, correspondingly, the determining, according to the sum value and the difference value, of the index number of the prediction direction of the DM derivation mode to determine the DM derivation mode comprises:
[0016] obtaining a minimum value L1 of the index number of the prediction direction contained in the to-be-decoded block and a maximum value L2 of the index number of the prediction direction contained in the DM mode; a corresponding relationship between the index number of the prediction direction contained in the DM mode and the index number of the prediction direction contained in the to-be-decoded block; determining, according to the sum value, the difference value, L1 and L2, an index number from the index numbers of the prediction directions contained in the to-be-decoded block; and determining, according to the corresponding relationship, the index number of the prediction direction of the DM mode corresponding to the determined index number as the index number of the prediction direction of the DM derivation mode to determine the DM derivation mode.
[0017] In the above solution, the determining, according to the sum value, the difference value, L1 and L2, of the index number from the index numbers of the prediction directions contained in the to-be-decoded block comprises:
[0018] when the sum value is less than or equal to L2 and the difference value is greater than or equal to L1, the determined index number is respectively the sum value and the difference value; when the difference value is less than or equal to L1, the determined index number is respectively the sum value and a third output value; wherein the third output value is a value obtained by inputting M and N into a preset third preset formula; and when the sum value is greater than or equal to L2, the determined index number is respectively a fourth output value and the difference value; wherein the fourth output value is a value obtained by inputting M and N into a preset fourth preset formula.
[0019] In the above solution, the determining, according to the sum value, the difference value, L1 and L2, of the index number from the index numbers of the prediction directions contained in the to-be-decoded block comprises:
[0020] when the sum value is less than or equal to L2 and the difference value is greater than or equal to L1, the determined index number is respectively the sum value and the difference value; when the difference value is less than or equal to L1, the determined index number is respectively the sum value and L1; and when the sum value is greater than or equal to L2, the determined index number is respectively the difference value and L2.
[0021] In the above solution, after the index number of the prediction direction of the DM derivation mode is determined according to the index number M of the prediction direction of the DM mode and a preset offset N to determine the DM derivation mode, the method further comprises:
[0022] determining that the decoding priority of the DM-derived mode is lower than the decoding priority of the DM mode and lower than the decoding priority of a cross-component linear model prediction (CCLM) mode.
[0023] In the above scheme, after determining the DM-derived mode according to the index number M of the prediction direction of the DM mode and the preset offset N, the method further comprises:
[0024] determining that the decoding priority of the DM-derived mode is lower than the decoding priority of the DM mode and lower than the decoding priority of the CCLM mode, and higher than the decoding priority of a vertical (VER) mode and higher than the decoding priority of a horizontal (HOR) mode.
[0025] In the above scheme, after determining the DM-derived mode according to the index number M of the prediction direction of the DM mode and the preset offset N, the method further comprises:
[0026] determining that the decoding priority of the DM-derived mode is lower than the decoding priority of the DM mode and lower than the decoding priority of the CCLM mode, and lower than the decoding priority of a direct current (DC) mode and lower than the decoding priority of a gradual change flat (PLANAR) mode.
[0027] In the above scheme, after determining the DM-derived mode according to the index number M of the prediction direction of the DM mode and the preset offset N, the method further comprises:
[0028] determining that the decoding priority of the DM-derived mode is lower than the decoding priority of the DM mode and lower than the decoding priority of the CCLM mode, and lower than the decoding priority of the DC mode and lower than the decoding priority of the PLANAR mode, and higher than the decoding priority of the VER mode and higher than the decoding priority of the HOR mode.
[0029] In a second aspect, an embodiment of the present application provides a decoder, which comprises:
[0030] a first determining module configured to determine, according to an index number M of a prediction direction of a DM mode and a preset offset N, an index number of a prediction direction of a DM-derived mode, so as to determine the DM-derived mode; wherein N is a positive integer greater than or equal to 2, and M is a positive integer.
[0031] In the above scheme, the first determining module comprises:
[0032] a calculating sub-module, configured to sum M and N to obtain a sum value and to subtract N from M to obtain a difference value; a first obtaining sub-module, configured to obtain a minimum value K1 of index numbers of prediction directions contained in the DM mode and a maximum value K2 of the index numbers of the prediction directions contained in the DM mode; and a first determining sub-module, configured to determine an index number of a prediction direction of the DM derivation mode according to the sum value, the difference value, K1 and K2, so as to determine the DM derivation mode.
[0033] In the above scheme, the first determining sub-module is specifically configured to:
[0034] when the sum value is less than or equal to K2 and the difference value is greater than or equal to K1, determining the index number of the prediction direction of the DM derivation mode as the sum value and the difference value respectively; when the difference value is less than or equal to K1, determining the index number of the prediction direction of the DM derivation mode as the sum value and a first output value; wherein the first output value is a value obtained by inputting M and N into a preset first preset formula; and when the sum value is greater than or equal to K2, determining the index number of the prediction direction of the DM derivation mode as a second output value and the difference value; wherein the second output value is a value obtained by inputting M and N into a preset second preset formula.
[0035] In the above scheme, the first determining sub-module is specifically configured to:
[0036] when the sum value is less than or equal to K2 and the difference value is greater than or equal to K1, determining the index number of the prediction direction of the DM derivation mode as the sum value and the difference value respectively; when the difference value is less than or equal to K1, determining the index number of the prediction direction of the DM derivation mode as the sum value and K1; and when the sum value is greater than or equal to K2, determining the index number of the prediction direction of the DM derivation mode as the difference value and K2.
[0037] In the above scheme, when the index numbers of the prediction directions contained in the DM mode are different from the index numbers of the prediction directions contained in the to-be-decoded block, the first determining sub-module correspondingly comprises:
[0038] a second obtaining sub-module, configured to obtain a minimum value L1 of index numbers of prediction directions contained in the to-be-decoded block and a maximum value L2 of index numbers of prediction directions contained in the DM mode; a third obtaining sub-module, configured to obtain a correspondence between the index numbers of prediction directions contained in the DM mode and the index numbers of prediction directions contained in the to-be-decoded block; a second determining sub-module, configured to determine an index number from the index numbers of prediction directions contained in the to-be-decoded block according to the sum value, the difference value, L1 and L2; and a third determining sub-module, configured to determine, according to the correspondence, an index number of a prediction direction of the DM mode corresponding to the determined index number as an index number of a prediction direction of the DM derivation mode, so as to determine the DM derivation mode.
[0039] In the above scheme, the second determining sub-module is specifically configured to:
[0040] when the sum value is less than or equal to L2 and the difference value is greater than or equal to L1, the determined index numbers are the sum value and the difference value respectively; when the difference value is less than or equal to L1, the determined index numbers are the sum value and a third output value respectively; wherein the third output value is a value obtained by inputting M and N into a preset third preset formula; and when the sum value is greater than or equal to L2, the determined index numbers are a fourth output value and the difference value respectively; wherein the fourth output value is a value obtained by inputting M and N into a preset fourth preset formula.
[0041] In the above scheme, the second determining sub-module is specifically configured to:
[0042] when the sum value is less than or equal to L2 and the difference value is greater than or equal to L1, the determined index numbers are the sum value and the difference value respectively; when the difference value is less than or equal to L1, the determined index numbers are the sum value and L1 respectively; and when the sum value is greater than or equal to L2, the determined index numbers are the difference value and L2 respectively.
[0043] In the above scheme, the decoder further comprises:
[0044] a second determining module, configured to determine, after determining an index number of a prediction direction of a DM derivation mode according to an index number M of a prediction direction of the DM mode and a preset offset N, that a decoding priority of the DM derivation mode is lower than a priority of the DM mode and lower than a decoding priority of a cross-component linear model prediction (CCLM) mode.
[0045] In the above scheme, the second determining module is specifically configured to:
[0046] determining that the decoding priority of the DM derived mode is lower than the decoding priority of the DM mode, and lower than the decoding priority of the CCLM mode, and lower than the decoding priority of a vertical, VER, mode, and higher than the decoding priority of a horizontal, HOR, mode.
[0047] In the above scheme, the second determining module is specifically configured to:
[0048] determining that the decoding priority of the DM derived mode is lower than the decoding priority of the DM mode, and lower than the decoding priority of the CCLM mode, and lower than the decoding priority of a direct current, DC, mode, and lower than the decoding priority of a gradual planar, PLANAR, mode.
[0049] In the above scheme, the second determining module is specifically configured to:
[0050] determining that the decoding priority of the DM derived mode is lower than the decoding priority of the DM mode, and lower than the decoding priority of the CCLM mode, and lower than the decoding priority of the DC mode, and lower than the decoding priority of the PLANAR mode, and higher than the decoding priority of the VER mode, and higher than the decoding priority of the HOR mode.
[0051] In a third aspect, an embodiment of the present application provides a decoder, the decoder comprising:
[0052] a processor and a storage medium having instructions executable by the processor, the storage medium being dependent on the processor to perform operations, when the instructions are executed by the processor, performing the prediction direction determination method in the first aspect.
[0053] In a fourth aspect, an embodiment of the present application provides a computer storage medium having executable instructions, when the executable instructions are executed by one or more processors, the processor performing the prediction direction determination method in the first aspect.
[0054] The embodiment of the present application provides a prediction direction determination method, a decoder and a computer storage medium. The method is applied to a decoder, and the method comprises the following steps: obtaining a DM mode in a chroma intra prediction mode of a to-be-decoded block; determining an index number of a prediction direction of a DM derivation mode according to an index number M of the prediction direction of the DM mode and a preset N, so as to determine the DM derivation mode; that is, in the embodiment of the present application, the index number of the prediction direction of the DM derivation mode is determined according to the index number M of the prediction direction of the DM mode obtained from candidate modes of the chroma intra prediction mode and the N value, so that the DM derivation mode can be determined, the DM derivation mode is used as a candidate mode of the chroma intra prediction mode, intra prediction is performed on a chroma frame of the to-be-decoded block, the DM derivation mode is added to the candidate modes of the chroma intra prediction mode, and the intra prediction is performed on the to-be-decoded block, so that the decoding accuracy can be improved, and the high-quality transmission of image video data can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0055] Figure 1 An optional prediction direction determination method provided by the embodiment of the present application is shown in a flowchart;
[0056] Figure 2 An arrangement diagram of a current processing block is shown in a flowchart;
[0057] Figure 3 An arrangement diagram of a prediction direction and an arrangement diagram of a prediction value after filling are shown in a flowchart;
[0058] Figure 4 An arrangement diagram of a VER mode prediction and an arrangement diagram of a HOR mode prediction are shown in a flowchart;
[0059] Figure 5 An arrangement diagram of a luminance block corresponding to a current processing block is shown in a flowchart;
[0060] Figure 6 Arrangement diagrams of chroma blocks respectively used in a DM mode and a chroma neighboring block mode in Table 2 are shown in a flowchart;
[0061] Figure 7 An iteration sequence diagram of an intra prediction direction of an MDMS is shown in a flowchart;
[0062] Figure 8 A component block diagram example of a video encoding system provided by the embodiment of the present application is shown in a flowchart;
[0063] Figure 9 A component block diagram example of a video decoding system provided by the embodiment of the present application is shown in a flowchart;
[0064] Figure 10 An optional prediction direction determination method provided by the embodiment of the present application is shown in a flowchart;
[0065] Figure 11 A flowchart illustrating another optional method for determining the prediction direction provided in an embodiment of this application;
[0066] Figure 12 A schematic diagram of the structure of a decoder provided in an embodiment of this application. Figure 1 ;
[0067] Figure 13 A schematic diagram of the structure of a decoder provided in an embodiment of this application. Figure 2 . Detailed Implementation
[0068] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.
[0069] This application provides a method for determining the prediction direction, which is applied in a decoder. Figure 1 A flowchart illustrating an optional method for determining the prediction direction provided in this application embodiment is shown below. Figure 2 As shown, the method for determining the prediction direction may include:
[0070] S101: Obtain the DM mode in the chroma intra-prediction mode of the block to be decoded;
[0071] Currently, with the rapid development of electronic devices, video encoding and decoding technology has also developed rapidly. Specifically, video encoding and decoding utilizes existing reconstructed images in space or time to construct the predicted value of the current processing block, and only transmits the difference between the true value and the predicted value to reduce the amount of data transmitted. This is called predictive encoding and decoding.
[0072] Figure 2 This is a schematic diagram of the current processing block layout, such as... Figure 2 As shown, Figure 2 The largest square composed of several smaller squares in the image represents the current processing block. The row of circles above the current processing block represents the previous row of pixels, and the column of circles to the left of the current processing block represents the leftmost column of pixels. Intra-frame prediction uses the pixels from the previous row and the leftmost column of pixels to construct the predicted value for the current processing block. (Refer to...) Figure 3 As shown, using Figure 3 The circles in the diagram represent the recovered neighboring pixels used to predict each pixel in the current processing block.
[0073] In constructing the predicted value of the current processing block using neighboring pixels, multiple prediction directions are employed. Figure 3 The diagram shows the arrangement of the predicted directions and the arrangement after the predicted values are filled in, as shown below.Figure 3 Figure (a) shows the 67 intra-prediction modes for luma currently supported by VVC. With the introduction of DM and other technologies, chroma blocks can also use these intra-prediction modes. Each prediction mode is represented by an index number. The value for the DM mode can be angle-dependent or angle-independent. For example, when the DM mode is angle-independent, index number 0 represents the PLANA mode, and 1 represents the DC mode. When the DM mode is an angle-dependent mode, index numbers 2-66 represent 65 prediction directions.
[0074] It should be noted that the DC mode and PLANAR mode mentioned above are two relatively flat construction prediction modes. The DC mode fills the entire luminance or chrominance block using the average value of the reference pixels in the top row and left column, while the PLANAR mode fills the luminance or chrominance block in a gradient manner.
[0075] like Figure 4 Figure (b) shows the arrangement of pixels after filling with the constructed predicted values. Taking the DM mode as an example (predicting direction index 66), the method for constructing the predicted value for each pixel is given. Pixels numbered 0-16 represent the previous row of data in the current processing block. Each pixel in the current processing block is filled according to the pixel in the upper right corner. After filling, it looks like... Figure 4 As shown in Figure (b) of the document.
[0076] When the DM mode is the angle mode, index numbers 2-66 indicate that among the 65 prediction directions, there are also two special direction modes. For example, index number 18 is called the HOR mode, and index number 50 is called the VER mode, which can perform horizontal prediction and vertical prediction respectively.
[0077] Figure 4 The diagrams show the layout for VER mode prediction and the layout for HOR mode prediction, as follows: Figure 4 As shown in Figure (a), the pixels in the top row are represented by 0, 1, 2, 3, 4, 5, 6, and 7. The VER pattern is predicted using these top row pixels, as follows: Figure 4 As shown in (a), fill this column with the pixels from the previous row; as... Figure 3 As shown in Figure (b), the pixels in the left column are represented by 0, 1, 2, 3, 4, 5, 6, and 7. HOR pattern prediction is performed using these left column pixels, as follows: Figure 5 As shown in Figure (b), this row is filled with pixels from the left column.
[0078] In practical applications, for brightness modes, according to Figure 5In Figure (a), the 0-66 prediction directions are predicted sequentially. The prediction direction that best matches the current processing block (or has the smallest rate-distortion cost difference) is selected to construct the prediction value. The encoder writes the difference and prediction direction into the bitstream. The decoder obtains the bitstream and parses it. After obtaining the prediction direction index number, the brightness prediction value can be calculated. This value is added to the difference signal parsed from the bitstream to obtain the reconstructed brightness value.
[0079] For chroma intra-frame prediction, unlike the luma intra-frame prediction mode, only a portion of the prediction directions are extracted. This reduces complexity. For example, the candidate list for chroma intra-frame prediction modes in VVC is constructed as shown in Table 1 below:
[0080] Table 1
[0081]
[0082]
[0083] Figure 5 This is a schematic diagram showing the arrangement of the luminance blocks corresponding to the current processing block, such as... Figure 6 As shown, the grayscale block on the left is the luma block corresponding to the current chroma block, and the grayscale block on the right is the current chroma block. When performing intra-frame prediction of the current chroma block, the prediction direction of the center block of the luma block is used, and the center block is... Figure 6 The CR block represents the brightness block in the grayscale block on the left.
[0084] As can be seen from Table 1 above, if the prediction direction obtained by the DM mode is the same as that of the last four modes, the last four modes will be replaced by the mode with the prediction direction index number 66.
[0085] Besides the methods mentioned above, there is another method called MDMS mode, which is a more complex method for constructing the candidate list of chroma intra-prediction modes. Compared with VVC, it has a bitrate saving of 0.2%, but its complexity is too high. The construction method of this scheme is shown in Table 2 below:
[0086] Table 2
[0087]
[0088] Figure 6 The diagrams in Table 2 show the arrangement of chroma blocks used in the DM mode and the chroma neighbor block mode, respectively. Figure 7 As shown by the small squares in Figure (a), the DM mode in Table 2 refers to the intra-frame prediction mode used at the five positions of the center CR, upper left TL, upper right TR, lower left BL, and lower right BR of the luma block region corresponding to the current chroma block. Figure 7The chroma neighboring block mode in Table 2 is the adopted intra prediction mode of the spatial neighboring left, top-left, bottom-left, top and top-right blocks of the chroma block as shown in the small square in (b) of FIG. 1.
[0089] Figure 7 The schematic diagram of the traversal order of the intra prediction directions of the MDMS is shown in FIG. 2. Figure 7 As shown in FIG. 2, the order of the intra prediction is: 1. the center luma block C, 2. the top-left luma block TL, 3. the top-right luma block TR, 4. the bottom-left luma block BL, 5. the bottom-right luma block BR, 6. the left chroma block L, 7. the top chroma block, 8. the bottom-left chroma block LB, 9. the top-right chroma block AR, 10. the top-left chroma block AL, 11. PLANAR, 12. DC, 13. the existing prediction direction index number plus or minus 1 (equivalent to +1 derived angular modes), 14. the prediction direction index number is 50 (equivalent to VER IDX), 15. the prediction direction index number is 18 (equivalent to HOR IDX), 16. the prediction direction index number is 2, 17. the prediction direction index number is 34 (equivalent to DIA IDX).
[0090] It can be seen that the construction method of the VVC chroma intra prediction direction is simple, but the fixed HOR, VER and 66 modes have strong sequence dependence and cannot well adapt to all sequences. The later statistical data shows that the probability of selection of these modes is relatively small.
[0091] The MDMS needs to compare 17 candidate schemes, which will bring a gain of -0.2%, but the number of comparisons is large, and the dependence on neighboring blocks is strong, so it is difficult to realize. At present, there are some methods to reduce the complexity of MDMS, for example, deleting the prediction directions of 2, 3, 4 and 5 in Figure 8 , or deleting the top-right luma block AR, PLANAR, DC, the existing prediction direction index number plus or minus 1 in Figure 8 .
[0092] In order to improve the accuracy of the candidate prediction directions, Figure 9 a constituent block diagram example of a video coding system provided by an embodiment of the present application is shown in FIG. 3. Figure 9As shown, the video coding system 800 includes components such as transform and quantization 801, intra estimation 802, intra prediction 803, motion compensation 804, motion estimation 805, inverse transform and inverse quantization 806, filter control analysis 807, deblocking filter and sample adaptive offset (SAO) filter 808, header information coding and context-based adaptive binary arithmatic coding (CABAC) 809, and decoded picture buffer 810. For an input raw video signal, a video coding block can be obtained by partitioning a coding tree unit (CTU), and then the residual pixel information obtained after intra or inter prediction is transformed on the video coding block by transform and quantization 801. The transform and quantization 801 transforms the video coding block includes transforming the residual information from pixel domain to transform domain, and quantizing the obtained transform coefficients to further reduce the bit rate. Intra estimation 802 and intra prediction 803 are used for intra prediction of the video coding block; in particular, intra estimation 802 and intra prediction 803 are used to determine an intra prediction mode to be used to encode the video coding block. Motion compensation 804 and motion estimation 805 are used to perform inter prediction encoding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information. Motion estimation performed by motion estimation 805 is a process of generating motion vectors that can estimate the motion of the video coding block, and then motion compensation 804 performs motion compensation based on the motion vectors determined by motion estimation 805. After the intra prediction mode is determined, intra prediction 803 is also used to provide the selected intra prediction data to header information coding and CABAC 809, and motion estimation 805 sends the calculated determined motion vector data to header information coding and CABAC 809. The inverse transform and inverse quantization 806 is used for reconstruction of the video coding block, reconstructing the residual block in pixel domain. The reconstructed residual block is removed of blocking artifacts by filter control analysis 807 and deblocking filter and SAO filter 808, and then the reconstructed residual block is added to a predictive block in one of the frames of decoded picture buffer 810 to generate a reconstructed video coding block. Header information coding and CABAC 809 is used to encode various coding parameters and quantized transform coefficients, and in CABAC-based encoding algorithm, context content can be based on neighboring coding blocks, which can be used to encode information indicating the determined intra prediction mode, and output a bitstream of the video signal. Decoded picture buffer 810 is used to store reconstructed video coding blocks for predictive reference.As video image encoding progresses, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer 810.
[0093] Figure 8 This is an example of a block diagram illustrating the composition of a video decoding system provided in an embodiment of this application. Figure 8 As shown, the video decoding system 900 includes components such as header information decoding and CABAC decoding 901, inverse transform and inverse quantization 902, intra-frame prediction 903, motion compensation 904, deblocking filtering and SAO filtering 905, and a decoded image buffer 906. The input video signal is processed through... Figure 9 After encoding, the video signal bitstream is output. This bitstream is input into the video decoding system 900, where it first undergoes header information decoding and CABAC decoding 901 to obtain the decoded transform coefficients. These transform coefficients are then processed by inverse transform and inverse quantization 902 to generate residual blocks in the pixel domain. Intra-frame prediction 903 is used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from previously decoded blocks in the current frame or image. Motion compensation 904 determines prediction information for the video decoding block by analyzing motion vectors and other associated syntax elements, and uses this prediction information to generate predictive blocks for the video decoding block being decoded. The decoded video block is formed by summing the residual block from inverse transform and inverse quantization 902 with the corresponding predictive block generated by intra-frame prediction 903 or motion compensation 904. The decoded video signal is then subjected to deblocking filtering and SAO filtering 905 to remove block artifacts, thus improving video quality. The decoded video block is stored in the decoded image buffer 906. The decoded image buffer 906 stores reference images for subsequent intra-frame prediction or motion compensation, and is also used for the output of the video signal, thus obtaining the recovered original video signal.
[0094] The embodiments of this application are mainly applied in, for example... Figure 1 The intra-prediction 803 part shown and as follows Figure 10 The intra-frame prediction 903 portion is shown. The embodiments of this application can be applied to both encoding and decoding systems, but are not specifically limited thereto.
[0095] Please refer to this again. Figure 10 To obtain the DM derivation pattern, firstly, the DM pattern is acquired, which allows us to know the index number of the prediction direction of the DM pattern.
[0096] S102: Determine the index number of the prediction direction of the DM derivation mode based on the index number M of the prediction direction of the DM mode and the preset offset N, so as to determine the DM derivation mode.
[0097] Wherein, N is a positive integer greater than or equal to 2, and M is a positive integer.
[0098] Here, it should be noted that the index number of the prediction direction contained in the DM mode can be the same as or different from the index number of the prediction direction contained in the to-be-decoded block, which is related to the shape and / or size of the to-be-decoded block. For example, when the aspect ratio of the block division shape of the to-be-decoded block and the reference region is the same, the index number of the prediction direction contained in the DM mode is the same as the index number of the prediction direction contained in the to-be-decoded block. Otherwise, when the aspect ratio of the block division shape of the to-be-decoded block and the reference region is different, the prediction direction corresponding to the extended mode number in the wide-angle mode can be different.
[0099] In actual applications, N is generally 3, 5, or 7, which is not specifically limited in the embodiments of the present application.
[0100] In order to determine the index number of the prediction direction of the DM derivation mode, in an optional embodiment, Figure 11 For another optional method for determining the prediction direction provided by the embodiments of the present application, refer to Figure 11 As shown in the figure, S102 can include:
[0101] S1001: Sum M and N to obtain a sum value, and subtract N from M to obtain a difference value;
[0102] S1002: Obtain the minimum value K1 of the index number of the prediction direction contained in the DM mode, and the maximum value K2 of the index number of the prediction direction contained in the DM mode;
[0103] S1003: Determine the index number of the prediction direction of the DM derivation mode according to the sum value, the difference value, K1, and K2, to determine the DM derivation mode.
[0104] That is, first calculate the sum of M and N, and the difference between M and N, and obtain K1 and K2. Here, there are two cases: one is that the index number of the prediction direction contained in the DM mode is the same as the index number of the prediction direction contained in the to-be-decoded block, and the other is that the index number of the prediction direction contained in the DM mode is different from the index number of the prediction direction contained in the to-be-decoded block.
[0105] When the index number of the prediction direction contained in the DM mode is the same as the index number of the prediction direction contained in the to-be-decoded block, in order to determine the index number of the prediction direction of the DM derivation mode, in an optional embodiment, S1003 can include:
[0106] When the sum value is less than or equal to K2, and the difference value is greater than or equal to K1, the index number of the prediction direction of the DM derivation mode is determined to be the sum value and the difference value, respectively.
[0107] When the difference is less than or equal to K1, the index numbers of the prediction directions of the DM derived mode are determined as M+N and M-N, and the first output value is a value obtained by inputting M and N into a preset first preset formula.
[0108] When the sum is greater than or equal to K2, the index numbers of the prediction directions of the DM derived mode are determined as the second output value and the difference; wherein the second output value is a value obtained by inputting M and N into a preset second preset formula.
[0109] The first preset formula and the second preset formula are obtained according to K1 and K2, and the variables are M and N, which are preset.
[0110] For example, when the DM mode is an angle mode, the minimum value of the index numbers of the prediction directions contained in the DM mode is 2, and the maximum value is 66; N is added or subtracted therefrom, and mapped into a valid angle range to obtain a DM derived mode, and N is greater than 2, and 3, 5 or 7 are recommended.
[0111] Taking 5 as an example, the current DM mode is an M angle mode (2≤M≤66). (Here, the same as the angle mode plus-minus N processing in the luma intra candidate), assuming that the wide angle mode is not considered (equivalent to the index numbers of the prediction directions contained in the DM mode being the same as the index numbers of the prediction directions contained in the to-be-decoded block), the prediction direction determination method is as follows:
[0112] When M+N≤66 and M-N≥2, the index numbers of the prediction directions in the DM derived mode are M+N and M-N;
[0113] When M-N≤2, the index numbers of the prediction directions in the DM derived mode are M+N and ((M+62-N) % 64)+2;
[0114] When M+N≥66, the index numbers of the prediction directions in the DM derived mode are ((M-2+N) % 64)+2 and M-N;
[0115] Wherein, the above symbol "%" represents the modulo operation. For example, the DM mode is 40, and the offset N value is 5, then the index numbers of the prediction directions of the DM derived mode are 35 and 45. If DM is 62, the derived mode is 57 and 3 (62+5=67, which exceeds the range of [2, 66], and will be taken modulo to return to 3, except for the wide angle mode). If the wide angle mode is considered, the mapping can be performed according to the real angle range. Then, the construction method of the chroma intra prediction direction of the present example is shown in the following table 3:
[0116] Table 3
[0117]
[0118]
[0119] When the index number of the prediction direction contained in the DM mode is the same as the index number of the prediction direction contained in the to-be-decoded block, in order to determine the index number of the prediction direction of the DM derived mode, in an optional embodiment, S1003 can include:
[0120] When the sum value is less than or equal to K2 and the difference value is greater than or equal to K1, the index number of the prediction direction of the DM derived mode is determined to be the sum value and the difference value respectively;
[0121] When the difference value is less than or equal to K1, the index number of the prediction direction of the DM derived mode is determined to be the sum value and K1 respectively;
[0122] When the sum value is greater than or equal to K2, the index number of the prediction direction of the DM derived mode is determined to be the difference value and K2.
[0123] For example, when the DM mode is an angle mode, the minimum value of the index number of the prediction direction contained in the DM mode is 2 and the maximum value is 66; N is added or subtracted to obtain the DM derived mode; it is assumed that the current DM mode is an M angle mode (2≤M≤66). (Here, the same as the angle mode plus or minus N processing in the luminance intra candidate)
[0124] When M+N≤66 and M-N≥2, the DM derived mode is M+N and M-N;
[0125] When M+N≥66, the DM derived mode is equal to M-N and 66;
[0126] When M-N≤2, the DM derived mode is equal to 2 and M+N;
[0127] For example, the DM mode is 40 and the offset N value is set to 5, then the DM derived mode is 35 and 45; if the DM is 62, the derived mode is 57 and 2 (62+5=67, 67 exceeds the range of [2, 66], and will be clamped to 66).
[0128] In order to determine the index number of the prediction direction of the DM derived mode, in an optional embodiment, when the index number of the prediction direction contained in the DM mode is different from the index number of the prediction direction contained in the to-be-decoded block, correspondingly, Mode number Another optional flowchart of a prediction direction determination method provided by the embodiments of the present application is shown in FIG. 10, S102 can include: Real mode
[0129] S1101: Obtain the minimum value L1 of the index number of the prediction direction contained in the to-be-decoded block and the maximum value L2 of the index number of the prediction direction contained in the DM mode;
[0130] S1102: Obtain a correspondence relationship between an index number of a prediction direction contained in the DM mode and an index number of a prediction direction contained in the to-be-decoded block;
[0131] S1103: Determine the index number from the index number of the prediction direction contained in the to-be-decoded block according to the sum value, the difference value, L1, and L2.
[0132] S1104: Determine, according to the correspondence relationship, an index number of a prediction direction of the DM mode corresponding to the determined index number as an index number of a prediction direction of the DM derivation mode, to determine the DM derivation mode.
[0133] Specifically, when the to-be-decoded block is a rectangle, the prediction direction indicated by the index number contained in the to-be-decoded block is different from the prediction direction indicated by the index value contained in the DM mode, but there is a corresponding relationship; for example, for the to-be-decoded block being a rectangle, the prediction direction indicated by the index number contained in the to-be-decoded block is equivalent to rotating a certain number of degrees clockwise or counterclockwise relative to the prediction direction indicated by the index value contained in the DM mode; for different index numbers of the prediction direction, a corresponding relationship can be obtained, and finally an index number of a prediction direction of the DM derivation mode is obtained within the index numbers of the prediction directions contained in the DM mode.
[0134] To determine the index number from the index number of the prediction direction contained in the to-be-decoded block, in an optional embodiment, S1103 can include:
[0135] When the sum value is less than or equal to L2 and the difference value is greater than or equal to L1, the determined index number is the sum value and the difference value, respectively.
[0136] When the difference value is less than or equal to L1, the determined index number is the sum value and a third output value, respectively; wherein the third output value is a value obtained by inputting M and N into a preset third preset formula.
[0137] When the sum value is greater than or equal to L2, the determined index number is a fourth output value and the difference value, respectively; wherein the fourth output value is a value obtained by inputting M and N into a preset fourth preset formula.
[0138] The above third preset formula and fourth preset formula are obtained according to L1 and L2, and the variables therein are M and N, which are preset.
[0139] For example, when the DM is an angle mode, the DM derivation mode is obtained by adding or subtracting N from the DM; assuming that the current DM mode is an M-angle mode (2≤M≤66), and according to the correspondence relationship of the wide-angle mode, it is known that the real effective range (equivalent to the index number of the prediction direction contained in the to-be-decoded block) is (8≤M≤72); taking a wide-angle mode with an aspect ratio of 2 as an example, the correspondence relationship is shown in Table 4.
[0140] Table 4
[0141] Figure 12 2 3 4 5 6 7 Figure 12 67 68 69 70 71 72
[0142] The DM derivation mode process is as follows:
[0143] When M+N≤72 and M-N≥8, the DM derivation mode is M+N and M-N.
[0144] When M-N≤8, the DM derivation mode is M+N and ((M+56-N) % 64)+8.
[0145] When M+N≥72, the DM derivation mode is ((M-8+N) % 64)+8 and M-N.
[0146] When the result obtained is between 67 and 72, the corresponding mapping to 2-66 according to Table 4 is performed again.
[0147] In order to determine the index number from the index number of the prediction direction contained in the to-be-decoded block, in an optional embodiment, S1103 can include:
[0148] When the sum value is less than or equal to L2 and the difference value is greater than or equal to L1, the determined index number is the sum value and the difference value respectively.
[0149] When the difference value is less than or equal to L1, the determined index number is the sum value and L1 respectively.
[0150] When the sum value is greater than or equal to L2, the determined index number is the difference value and L2 respectively.
[0151] For example, the present technology proposes to add DM derivation mode, and the specific derivation method in the wide-angle mode is as follows:
[0152] When DM is an angle mode, DM derivation mode is obtained by adding and subtracting N from DM. Assuming that the current DM mode is M angle mode (2≤M≤66), and from the corresponding relationship of the wide-angle mode, it is known that its real effective range is (8≤M≤72), and the corresponding mode is shown in Table 4, then the DM derivation mode process is as follows:
[0153] When M+N≤72 and M-N≥8, the DM derivation mode is M+N and M-N.
[0154] When M-N≤8, the DM derivation mode is M+N and 8.
[0155] When M+N≥72, the DM derivation mode is 72 and M-N.
[0156] When the result obtained is between 67 and 72, the corresponding mapping to 2-66 according to Table 1 is performed again.
[0157] In an alternative embodiment, after S102, the method further comprises:
[0158] determining that the decoding priority of the DM derived mode is lower than the decoding priority of the DM mode, and lower than the decoding priority of the CCLM mode.
[0159] That is, the DM derived mode is set after the DM mode and the CCLM mode, so that, in the process of decoding, the higher the priority, the less the bit rate received.
[0160] In an alternative embodiment, after S102, the method further comprises:
[0161] determining that the decoding priority of the DM derived mode is lower than the decoding priority of the DM mode, and lower than the decoding priority of the CCLM mode, and higher than the decoding priority of the VER mode, and higher than the decoding priority of the HOR mode.
[0162] When the DM is an angular mode, the method of constructing the chroma intra prediction direction of the present example is shown in Table 5 as follows:
[0163] Table 5
[0164]
[0165] In an alternative embodiment, after S102, the method further comprises:
[0166] determining that the decoding priority of the DM derived mode is lower than the decoding priority of the DM mode, and lower than the decoding priority of the CCLM mode, and lower than the decoding priority of the DC mode, and lower than the decoding priority of the PLANAR mode.
[0167] When the DM is an angular mode, the method of constructing the chroma intra prediction direction of the present example is shown in Table 6 as follows:
[0168] Table 6
[0169]
[0170]
[0171] In an alternative embodiment, after S102, the method further comprises:
[0172] determining that the decoding priority of the DM derived mode is lower than the decoding priority of the DM mode, and lower than the decoding priority of the CCLM mode, and lower than the decoding priority of the DC mode, and lower than the decoding priority of the PLANAR mode, and higher than the decoding priority of the vertical VER mode, and higher than the decoding priority of the horizontal HOR mode.
[0173] When the DM is an angular mode, the color difference intra prediction direction construction method of the embodiment is shown in Table 7 as follows:
[0174] Table 7
[0175]
[0176] It can be seen that, based on the 2.2.1 VVC color difference intra prediction direction construction method, the DM derivation mode is determined, the DM mode is extended according to the DM mode, the quality of the candidate prediction direction is improved, and the DM derivation mode is placed after the CCLM mode and before the other angular modes, which is prior to the HOR, VER and 66 fixed modes.
[0177] The embodiment of the application provides a method for determining a prediction direction, which is applied to a decoder, and the method comprises the following steps: obtaining a DM mode in a color difference intra prediction mode of a to-be-decoded block; determining an index number of a prediction direction of a DM derivation mode according to an index number M of the prediction direction of the DM mode and a preset N, so as to determine the DM derivation mode; that is, in the embodiment of the application, the index number of the prediction direction of the DM derivation mode is determined according to the index number of the prediction direction of the DM mode in the candidate mode of the color difference intra prediction mode and the N value, so that the DM derivation mode can be determined and used as the candidate mode of the color difference intra prediction mode to perform intra prediction on the color frame of the to-be-decoded block, the DM derivation mode is added to the candidate mode of the color difference intra prediction mode, the intra prediction is performed on the to-be-decoded block, the accuracy of decoding can be improved, and then the high-quality transmission of image video data can be improved.
[0178] Based on the same inventive concept as the foregoing embodiments, refer to Figure 1 , Figure 13 The structure of a decoder provided by the embodiment of the application is shown in Figure 2 The decoder can comprise:
[0179] The acquisition module 121 is configured to acquire a DM mode in a color difference intra prediction mode of a to-be-decoded block; the first determination module 122 is configured to determine an index number of a prediction direction of a DM derivation mode according to an index number M of the prediction direction of the DM mode and a preset offset N, so as to determine the DM derivation mode; wherein the N is a positive integer greater than or equal to 2, and the M is a positive integer.
[0180] In the foregoing scheme, the first determination module 122 comprises:
[0181] The calculation sub-module is configured to sum the M and the N to obtain a sum value, and subtract the M from the N to obtain a difference value.
[0182] The first obtaining sub-module is configured to obtain a minimum value K1 of index numbers of prediction directions contained in the DM mode and a maximum value K2 of the index numbers of the prediction directions contained in the DM mode.
[0183] The first determining sub-module is configured to determine the index numbers of the prediction directions of the DM derivation mode according to the sum value, the difference value, the K1 and the K2, so as to determine the DM derivation mode.
[0184] In the above scheme, the first determining sub-module is specifically configured to:
[0185] When the sum value is less than or equal to the K2 and the difference value is greater than or equal to the K1, the index numbers of the prediction directions of the DM derivation mode are determined to be the sum value and the difference value respectively.
[0186] When the difference value is less than or equal to the K1, the index numbers of the prediction directions of the DM derivation mode are determined to be the sum value and a first output value respectively; wherein the first output value is a value obtained by inputting the M and the N into a preset first preset formula.
[0187] When the sum value is greater than or equal to the K2, the index numbers of the prediction directions of the DM derivation mode are determined to be a second output value and the difference value respectively; wherein the second output value is a value obtained by inputting the M and the N into a preset second preset formula.
[0188] In the above scheme, the first determining sub-module is specifically configured to:
[0189] When the sum value is less than or equal to the K2 and the difference value is greater than or equal to the K1, the index numbers of the prediction directions of the DM derivation mode are determined to be the sum value and the difference value respectively.
[0190] When the difference value is less than or equal to the K1, the index numbers of the prediction directions of the DM derivation mode are determined to be the sum value and the K1 respectively.
[0191] When the sum value is greater than or equal to the K2, the index numbers of the prediction directions of the DM derivation mode are determined to be the difference value and the K2 respectively.
[0192] In the above scheme, when the index numbers of the prediction directions contained in the DM mode are different from the index numbers of the prediction directions contained in the to-be-decoded block, correspondingly, the first determining sub-module comprises:
[0193] The second obtaining sub-module is configured to obtain a minimum value L1 of index numbers of prediction directions contained in the to-be-decoded block and a maximum value L2 of the index numbers of the prediction directions contained in the DM mode.
[0194] The third obtaining sub-module is configured to obtain a corresponding relationship between the index numbers of the prediction directions contained in the DM mode and the index numbers of the prediction directions contained in the to-be-decoded block.
[0195] a second determining sub-module, configured to determine an index number from index numbers of prediction directions contained in the to-be-decoded block according to the sum value, the difference value, L1 and L2;
[0196] a third determining sub-module, configured to determine, according to the correspondence relationship, an index number of a prediction direction of a DM mode corresponding to the determined index number as an index number of a prediction direction of a DM derivation mode, so as to determine the DM derivation mode.
[0197] In the above scheme, the second determining sub-module is specifically configured to:
[0198] when the sum value is less than or equal to L2 and the difference value is greater than or equal to L1, the determined index numbers are the sum value and the difference value respectively;
[0199] when the difference value is less than or equal to L1, the determined index numbers are the sum value and a third output value respectively; wherein the third output value is a value obtained by inputting M and N into a third preset formula;
[0200] when the sum value is greater than or equal to L2, the determined index numbers are a fourth output value and the difference value respectively; wherein the fourth output value is a value obtained by inputting M and N into a fourth preset formula.
[0201] In the above scheme, the second determining sub-module is specifically configured to:
[0202] when the sum value is less than or equal to L2 and the difference value is greater than or equal to L1, the determined index numbers are the sum value and the difference value respectively;
[0203] when the difference value is less than or equal to L1, the determined index numbers are the sum value and L1 respectively;
[0204] when the sum value is greater than or equal to L2, the determined index numbers are the difference value and L2 respectively.
[0205] In the above scheme, the decoder further comprises:
[0206] a second determining module, configured to determine, after determining an index number of a prediction direction of a DM derivation mode from an index number M of a prediction direction of a DM mode and a preset offset N, that a decoding priority of the DM derivation mode is lower than a decoding priority of the DM mode and lower than a decoding priority of a cross-component linear model prediction (CCLM) mode.
[0207] In the above scheme, the second determining module is specifically configured to:
[0208] determine that the decoding priority of the DM derivation mode is lower than the decoding priority of the DM mode and lower than the decoding priority of the CCLM mode, and higher than a decoding priority of a vertical (VER) mode and higher than a decoding priority of a horizontal (HOR) mode.
[0209] In the above scheme, the second determining module is specifically configured to:
[0210] determine that the decoding priority of the DM derived mode is lower than the decoding priority of the DM mode, lower than the decoding priority of the CCLM mode, lower than the decoding priority of the DC mode, and lower than the decoding priority of the PLANAR mode.
[0211] In the above scheme, the second determining module is specifically configured to:
[0212] determine that the decoding priority of the DM derived mode is lower than the decoding priority of the DM mode, lower than the decoding priority of the CCLM mode, lower than the decoding priority of the DC mode, and lower than the decoding priority of the PLANAR mode.
[0213] It can be understood that, in the embodiment, the "unit" can be a partial circuit, a partial processor, a partial program or software, and of course can be a module, and can also be non-modular.
[0214] In addition, each component unit in the embodiment can be integrated in a processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.
[0215] The integrated unit, if realized in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiment can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in the embodiment. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0216] Figure 13 A structure diagram of a decoder provided in the embodiment of the application Figure 13 As shown in the embodiment of the application provides a decoder 130,
[0217] The terminal includes a processor 131 and a storage medium 132 storing instructions executable by the processor 131, and the storage medium 132 performs operations in dependence on the processor 131 when the instructions are executed by the processor 131, and the determination method of the prediction direction of the above-mentioned embodiment one is performed.
[0218] It should be noted that in actual application, various components in the terminal are coupled together through the communication bus 133. It can be understood that the communication bus 133 is used to realize the connection and communication between the components. The communication bus 133 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the communication bus 133 in the
[0219] The embodiment of the present application provides a computer storage medium, which stores executable instructions, and when the executable instructions are executed by one or more processors, the processor executes the determination method of the prediction direction described in one or more embodiments.
[0220] It can be understood that the memory in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM) used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory of the system and method described herein is intended to include but not limited to these and any other suitable types of memory.
[0221] The processor can be an integrated circuit chip, having a signal processing capability. In implementation process, each step of the above method can be completed by integrated logic circuits or instructions in the form of software in the processor. The processor can be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block in the embodiments disclosed in the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, or other mature storage medium in the art. The storage medium is located in the storage, and the processor reads the information in the storage, and combines the hardware to complete the steps of the above method.
[0222] It can be understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field-Programmable Gate Arrays (FPGAs), general-purpose processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described in the present application, or a combination thereof.
[0223] For software implementation, the techniques described herein can be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes can be stored in the memory and executed by the processor. The memory can be implemented within the processor or external to the processor.
[0224] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a", "comprising", or "includes a", does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0225] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent advantages or disadvantages of the embodiments.
[0226] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part of the prior art that makes a contribution. The computer software product is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device) to execute the methods described in the various embodiments of the present application.
[0227] The embodiments of the present application are described above in combination with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative and not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope of protection of the claims.
[0228] Industrial applicability
[0229] In the embodiments of the present application, the embodiments of the present application provide a determination method of a prediction direction, a decoder and a computer storage medium. The method is applied to a decoder, and the method comprises the following steps: obtaining a DM mode in a chroma intra prediction mode of a to-be-decoded block; determining an index number of a prediction direction of a DM derivation mode according to an index number M of the prediction direction of the DM mode and a preset N, so as to determine the DM derivation mode. That is, in the embodiments of the present application, the index number of the prediction direction of the DM derivation mode is determined according to the index number M of the prediction direction of the DM mode obtained from the candidate modes of the chroma intra prediction mode and the N value, so that the DM derivation mode can be determined and used as a candidate mode of the chroma intra prediction mode to perform intra prediction on a chroma frame of the to-be-decoded block. By adding the DM derivation mode to the candidate modes of the chroma intra prediction mode, the intra prediction on the to-be-decoded block can be performed, the accuracy of decoding can be improved, and the high-quality transmission of image and video data can be improved.
Claims
1. A method of determining a prediction direction, wherein, The method is applied to a decoder, and the method comprises: determining a chroma intra prediction mode of a block to be decoded, and obtaining a co-located luma DM mode of the chroma intra prediction; determining an index number of a prediction direction corresponding to a DM derivation mode according to an index number M of a prediction direction corresponding to the DM mode and an offset N, so as to determine the DM derivation mode; wherein N is a positive integer greater than or equal to 2, and M is a positive integer; wherein a decoding process of the DM derivation mode is after a decoding process of a cross-component linear model (CCLM) mode.
2. The method of claim 1, wherein, The method of determining the index number of the prediction direction corresponding to the DM derivation mode according to the index number M of the prediction direction corresponding to the DM mode and the offset N, so as to determine the DM derivation mode, comprises: determining the index number of the prediction direction corresponding to the DM derivation mode according to a sum of M and N, a difference between M and N, a minimum value K1 of the index numbers of the prediction directions contained in the DM mode, and a maximum value K2 of the index numbers of the prediction directions contained in the DM mode, so as to determine the DM derivation mode.
3. The method of claim 2, wherein, The method of determining the index number of the prediction direction corresponding to the DM derivation mode according to the sum and the difference, so as to determine the DM derivation mode, comprises: when the sum is greater than K2 and the difference is less than K1, determining that the index numbers of the prediction directions corresponding to the DM derivation mode are K1 and K2 respectively.
4. The method of claim 2, wherein, The method of determining the index number of the prediction direction corresponding to the DM derivation mode according to the sum and the difference, so as to determine the DM derivation mode, comprises: when the sum is less than or equal to K2 and the difference is greater than or equal to K1, determining that the index numbers of the prediction directions corresponding to the DM derivation mode are the sum and the difference respectively; when the difference is less than or equal to K1, determining that the index numbers of the prediction directions corresponding to the DM derivation mode are the sum and K1 respectively; when the sum is greater than or equal to K2, determining that the index numbers of the prediction directions corresponding to the DM derivation mode are the difference and K2 respectively.
5. A method of determining a predicted direction, wherein, The method is applied to an encoder, and the method comprises: determining a chroma intra prediction mode of a block to be encoded, and obtaining a co-located luma DM mode of the chroma intra prediction; determining an index number of a prediction direction corresponding to a DM derivation mode according to an index number M of a prediction direction corresponding to the DM mode and an offset N, so as to determine the DM derivation mode; wherein N is a positive integer greater than or equal to 2, and M is a positive integer; wherein an encoding process of the DM derivation mode is after an encoding process of a cross-component linear model (CCLM) mode.
6. The method of claim 5, wherein, The method of determining the index number of the prediction direction corresponding to the DM derivation mode according to the index number M of the prediction direction corresponding to the DM mode and the offset N, so as to determine the DM derivation mode, comprises: determining the index number of the prediction direction corresponding to the DM derivation mode according to a sum of M and N, a difference between M and N, a minimum value K1 of the index numbers of the prediction directions contained in the DM mode, and a maximum value K2 of the index numbers of the prediction directions contained in the DM mode, so as to determine the DM derivation mode; The sum value is a sum of M and N, the difference value is a difference between M and N, K1 is a minimum value of index numbers of the prediction directions contained in the DM mode, and K2 is a maximum value of index numbers of the prediction directions contained in the DM mode.
7. The method of claim 6, wherein, The determining the index number of the prediction direction corresponding to the DM derivation mode according to the sum value and the difference value to determine the DM derivation mode comprises: When the sum value is greater than K2 and the difference value is less than K1, the index number of the prediction direction corresponding to the DM derivation mode is determined as K1 and K2 respectively.
8. The method of claim 6, wherein, The determining the index number of the prediction direction corresponding to the DM derivation mode according to the sum value and the difference value to determine the DM derivation mode comprises: When the sum value is less than or equal to K2 and the difference value is greater than or equal to K1, the index number of the prediction direction corresponding to the DM derivation mode is determined as the sum value and the difference value respectively. When the difference value is less than or equal to K1, the index number of the prediction direction corresponding to the DM derivation mode is determined as the sum value and K1 respectively. When the sum value is greater than or equal to K2, the index number of the prediction direction corresponding to the DM derivation mode is determined as the difference value and K2 respectively.
9. A decoder, wherein, The decoder comprises: The first acquisition module is configured to determine a chroma intra prediction mode of a to-be-decoded block, and acquire a same-position luminance DM mode of chroma intra prediction. The first determination module is configured to determine an index number of a prediction direction corresponding to a DM derivation mode according to an index number M of a prediction direction corresponding to the DM mode and an offset N, so as to determine the DM derivation mode. The N is a positive integer greater than or equal to 2, and the M is a positive integer. The decoding process of the DM derivation mode is after a decoding process of a cross-component linear model (CCLM) mode.
10. The decoder of claim 9, wherein, The first determination module comprises: The first determination submodule is configured to determine an index number of a prediction direction corresponding to a DM derivation mode according to a sum value of M and N, a difference value of M and N, a minimum value K1 of index numbers of prediction directions contained in the DM mode, and a maximum value K2 of index numbers of prediction directions contained in the DM mode, so as to determine the DM derivation mode. The sum value is a sum of M and N, the difference value is a difference between M and N, K1 is a minimum value of index numbers of the prediction directions contained in the DM mode, and K2 is a maximum value of index numbers of the prediction directions contained in the DM mode.
11. The decoder of claim 10, wherein, The first determination submodule is specifically configured to: When the sum value is greater than K2 and the difference value is less than K1, the index number of the prediction direction corresponding to the DM derivation mode is determined as K1 and K2 respectively.
12. The decoder of claim 10, wherein, The first determination submodule is specifically configured to: When the sum value is less than or equal to K2 and the difference value is greater than or equal to K1, the index number of the prediction direction corresponding to the DM derivation mode is determined as the sum value and the difference value respectively. When the difference value is less than or equal to K1, the index number of the prediction direction corresponding to the DM derivation mode is determined as the sum value and K1 respectively. When the sum value is greater than or equal to K2, the index number of the prediction direction corresponding to the DM derivation mode is determined as the difference value and K2 respectively.
13. An encoder, wherein, The encoder comprises: The second obtaining module is configured to determine a chroma intra prediction mode of a to-be-encoded block, and obtain a co-located luma DM mode of the chroma intra prediction; The second determining module is configured to determine an index number of a prediction direction corresponding to a DM derivation mode according to an index number M of the prediction direction corresponding to the DM mode and an offset N, so as to determine the DM derivation mode. N is a positive integer greater than or equal to 2, and M is a positive integer. The encoding process of the DM derivation mode is after the encoding process of a cross-component linear model (CCLM) mode.
14. The encoder of claim 13, wherein, The second determining module includes: The second determining submodule is configured to determine an index number of a prediction direction corresponding to a DM derivation mode according to a sum of M and N, a difference between M and N, a minimum value K1 of index numbers of prediction directions included in the DM mode, and a maximum value K2 of the index numbers of the prediction directions included in the DM mode, so as to determine the DM derivation mode. The sum is a sum of M and N, the difference is a difference between M and N, K1 is a minimum value of index numbers of prediction directions included in the DM mode, and K2 is a maximum value of the index numbers of the prediction directions included in the DM mode.
15. The encoder of claim 14, wherein, The second determining submodule is specifically configured to: When the sum is greater than K2 and the difference is less than K1, determine the index numbers of the prediction direction corresponding to the DM derivation mode as K1 and K2 respectively.
16. The encoder of claim 14, wherein, The second determining submodule is specifically configured to: When the sum is less than or equal to K2 and the difference is greater than or equal to K1, determine the index numbers of the prediction direction corresponding to the DM derivation mode as the sum and the difference respectively. When the difference is less than or equal to K1, determine the index numbers of the prediction direction corresponding to the DM derivation mode as the sum and K1 respectively. When the sum is greater than or equal to K2, determine the index numbers of the prediction direction corresponding to the DM derivation mode as the difference and K2 respectively.
17. A decoder, wherein, The decoder includes: A processor and a storage medium having processor-executable instructions stored thereon, the storage medium being dependent on the processor to perform operations, when the instructions are executed by the processor, the prediction direction determination method in any one of claims 1 to 4 is executed.
18. An encoder, wherein, The encoder includes: A processor and a storage medium having processor-executable instructions stored thereon, the storage medium being dependent on the processor to perform operations, when the instructions are executed by the processor, the prediction direction determination method in any one of claims 5 to 8 is executed.
19. A computer storage medium, wherein, Executable instructions are stored, when the executable instructions are executed by one or more processors, the processor executes the prediction direction determination method in any one of claims 1 to 4 or executes the prediction direction determination method in any one of claims 5 to 8.