Chroma intra prediction method and device
Chroma intra prediction methods and devices are provided. The method comprises: decoding bitstream data corresponding to a current block, and determining that a prediction mode corresponding to a chroma component of the current block is a direct mode (DM); determining an intra prediction mode of a chroma component of the current block from a set of chroma prediction modes, wherein the set of chroma prediction modes comprises at least one of the DM derived modes, LM, LM_T or LM_L; and determining a reconstructed value of the current chroma block according to the intra prediction mode.
1. A chroma intra prediction method, applied to a decoder, the method comprising:
decoding bitstream data corresponding to a current block, and determining that a prediction mode corresponding to a chroma component of the current block is a direct mode (DM);
determining an intra prediction mode of a chroma component of the current block from a set of chroma prediction modes, wherein the set of chroma prediction modes comprises at least one of the DM derived modes, LM, LM_T or LM_L,
wherein when a luma prediction mode corresponding to the current block is a direct current (DC) mode or a planar mode, the DM derived modes comprise at least one modified candidate mode; and
the at least one modified candidate mode is of a prediction direction with a first angle from a prediction direction of a mode with an index 66 in a first angular direction, and the prediction direction of a mode with an index 66 points in a top-right direction; or the at least one modified candidate mode is of a prediction direction with the first angle from a prediction direction of a mode with an index 2 in a direction opposite to the first angular direction, and the prediction direction of a mode with an index 2 points in a bottom-left direction; and
determining a reconstructed value of the current chroma block according to the intra prediction mode.
2. The method of claim 1 , wherein when a luma prediction mode corresponding to the current block is a direct current (DC) mode or a planar mode, the set of chroma prediction modes further comprises a diagonal angular mode with prediction direction index number 66.
3. The method of claim 1 , further comprising: acquiring a linear mode corresponding to the current block from the bitstream data.
4. The method of claim 2 , wherein
when a luma prediction mode corresponding to the current block is the DC mode, the set of chroma prediction modes comprises the Planar mode and the at least one modified candidate mode, and
when a luma prediction mode corresponding to the current block is the Planar mode, the set of chroma prediction modes comprises the DC mode and the at least one modified candidate mode.
5. The method of claim 1 , wherein when the luma prediction mode corresponding to the current block is one of a DC mode, Planar mode, VER mode or HOR mode, the set of chroma prediction modes comprises an angular mode with an index number 66.
6. A chroma intra prediction method, applied to an encoder, the method comprising:
encoding bitstream data corresponding to a current block, and determining that a prediction mode corresponding to a chroma component of the current block is a direct mode (DM);
determining an intra prediction mode of a chroma component of the current block from a set of chroma prediction modes, wherein the set of chroma prediction modes comprises at least one of the DM derived modes, LM, LMT or LM_L,
wherein when a luma prediction mode corresponding to the current block is a direct current (DC) mode or a planar mode, the DM derived modes comprise at least one modified candidate mode; and
the at least one modified candidate mode is of a prediction direction with a first angle from a prediction direction of a mode with an index 66 in a first angular direction, and the prediction direction of a mode with an index 66 points in a top-right direction; or the at least one modified candidate mode is of a prediction direction with the first angle from a prediction direction of a mode with an index 2 in a direction opposite to the first angular direction, and the prediction direction of a mode with an index 2 points in a bottom-left direction; and
determining a reconstructed value of the current chroma block according to the intra prediction mode.
7. The method of claim 6 , wherein when a luma prediction mode corresponding to the current block is a direct current (DC) mode or a planar mode, the set of chroma prediction modes further comprises a diagonal angular mode with prediction direction index number 66.
8. The method of claim 6 , further comprising: acquiring a linear mode corresponding to the current block from the bitstream data.
9. The method of claim 7 , wherein
when a luma prediction mode corresponding to the current block is the DC mode, the set of chroma prediction modes comprises the Planar mode and the at least one modified candidate mode, and
when a luma prediction mode corresponding to the current block is the Planar mode, the set of chroma prediction modes comprises the DC mode and the at least one modified candidate mode.
10. The method of claim 6 , wherein when the luma prediction mode corresponding to the current block is one of a DC mode, Planar mode, VER mode or HOR mode, the set of chroma prediction modes comprises an angular mode with an index number 66.
11. A chroma intra prediction device, applied to a decoder, the device comprising: a processor and a memory storing instructions executable by the processor, wherein the processor is configured to execute the instructions to perform operations of:
decoding bitstream data corresponding to a current block, and determining that a prediction mode corresponding to a chroma component of the current block is a direct mode (DM);
determining an intra prediction mode of a chroma component of the current block from a set of chroma prediction modes, wherein the set of chroma prediction modes comprises at least one of the DM derived modes, LM, LMT or LM_L,
wherein when a luma prediction mode corresponding to the current block is a direct current (DC) mode or a planar mode, the DM derived modes comprise at least one modified candidate mode; and
the at least one modified candidate mode is of a prediction direction with a first angle from a prediction direction of a mode with an index 66 in a first angular direction, and the prediction direction of a mode with an index 66 points in a top-right direction; or the at least one modified candidate mode is of a prediction direction with the first angle from a prediction direction of a mode with an index 2 in a direction opposite to the first angular direction, and the prediction direction of a mode with an index 2 points in a bottom-left direction; and
determining a reconstructed value of the current chroma block according to the intra prediction mode.
12. The device of claim 11 , wherein when a luma prediction mode corresponding to the current block is a direct current (DC) mode or a planar mode, the set of chroma prediction modes further comprises a diagonal angular mode with prediction direction index number 66.
13. The device of claim 11 , wherein the processor is configured to execute the instructions to perform an operation of: acquiring a linear mode corresponding to the current block from the bitstream data.
14. The device of claim 12 , wherein
when a luma prediction mode corresponding to the current block is the DC mode, the set of chroma prediction modes comprises the Planar mode and the at least one modified candidate mode, and
when a luma prediction mode corresponding to the current block is the Planar mode, the set of chroma prediction modes comprises the DC mode and the at least one modified candidate mode.
15. The device of claim 11 , wherein when the luma prediction mode corresponding to the current block is one of a DC mode, Planar mode, VER mode or HOR mode, the set of chroma prediction modes comprises an angular mode with an index number 66.
16. A chroma intra prediction device, applied to an encoder, the device comprising: a processor and a memory storing instructions executable by the processor, wherein the processor is configured to execute the instructions to perform operations of:
encoding bitstream data corresponding to a current block, and determining that a prediction mode corresponding to a chroma component of the current block is a direct mode (DM);
determining an intra prediction mode of a chroma component of the current block from a set of chroma prediction modes, wherein the set of chroma prediction modes comprises at least one of the DM derived modes, LM, LMT or LM_L,
wherein when a luma prediction mode corresponding to the current block is a direct current (DC) mode or a planar mode, the DM derived modes comprise at least one modified candidate mode; and
the at least one modified candidate mode is of a prediction direction with a first angle from a prediction direction of a mode with an index 66 in a first angular direction, and the prediction direction of a mode with an index 66 points in a top-right direction; or the at least one modified candidate mode is of a prediction direction with the first angle from a prediction direction of a mode with an index 2 in a direction opposite to the first angular direction, and the prediction direction of a mode with an index 2 points in a bottom-left direction; and
determining a reconstructed value of the current chroma block according to the intra prediction mode.
17. The device of claim 16 , wherein when a luma prediction mode corresponding to the current block is a direct current (DC) mode or a planar mode, the set of chroma prediction modes further comprises a diagonal angular mode with prediction direction index number 66.
18. The device of claim 16 , wherein the processor is configured to execute the instructions to perform an operation of: acquiring a linear mode corresponding to the current block from the bitstream data.
19. The device of claim 17 , wherein
when a luma prediction mode corresponding to the current block is the DC mode, the set of chroma prediction modes comprises the Planar mode and the at least one modified candidate mode, and
when a luma prediction mode corresponding to the current block is the Planar mode, the set of chroma prediction modes comprises the DC mode and the at least one modified candidate mode.
20. The device of claim 16 , wherein when the luma prediction mode corresponding to the current block is one of a DC mode, Planar mode, VER mode or HOR mode, the set of chroma prediction modes comprises an angular mode with an index number 66.