Method for determining prediction direction, decoder, and computer storage medium
The embodiments of the disclosure disclose a method for determining a prediction direction, a decoder and a computer storage medium. The method is implemented by a decoder. The method includes that: a Direct Mode (DM) in a chroma intra prediction mode of a block to be decoded is acquired (S 101 ); and an index number of a prediction direction in a DM derived mode is determined based on an offset N and an index number M of a prediction direction in the DM to determine the DM derived mode (S 102 ).
1. A method for determining a prediction direction, implemented by a decoder and comprising:
determining a chroma intra prediction mode of a block to be decoded;
acquiring a Direct Mode (DM) in the chroma intra prediction mode; and
in response to that a sum value of M and N is larger than or equal to K2 and a difference value between the M and N is smaller than or equal to K1, determining that an index value of prediction direction of a DM derived mode is the K1 and the K2 respectively,
wherein the N is an offset, the M is an index value of prediction direction of the DM, the K1 is a minimum value of index values of prediction directions of the DM, and K2 is a maximum value of the index values of the prediction directions of the DM, and
wherein the DM derived mode is set after a Cross-Component Linear Model Prediction (CCLM) mode is set.
2. A method for determining a prediction direction, implemented by an encoder and comprising:
determining a chroma intra prediction mode of a block to be decoded;
acquiring a Direct Mode (DM) in the chroma intra prediction mode; and
in response to that a sum value of M and N is larger than or equal to K2 and a difference value between the M and N is smaller than or equal to K1, determining that an index value of prediction direction of a DM derived mode is the K1 and the K2 respectively,
wherein the N is an offset, the M is an index value of prediction direction of the DM, the K1 is a minimum value of index values of prediction directions of the DM, and K2 is a maximum value of the index values of the prediction directions of the DM, and
wherein the DM derived mode is set after a Cross-Component Linear Model Prediction (CCLM) mode is set.
3. A decoder, comprising:
a processor; and
a storage medium storing instructions executable by the processor,
wherein the storage medium is configured to communicate with the processor through a communication bus to execute an operation, and the instructions are executed by the processor to implement the method for determining a prediction direction, the method comprising:
determining a chroma intra prediction mode of a block to be decoded;
acquiring a Direct Mode (DM) in the chroma intra prediction mode; and
in response to that a sum value of M and N is larger than or equal to K2 and a difference value between the M and N is smaller than or equal to K1, determining that an index value of prediction direction of a DM derived mode is the K1 and the K2 respectively,
wherein the N is an offset, the M is an index value of prediction direction of the DM, the K1 is a minimum value of index values of prediction directions of the DM, and K2 is a maximum value of the index values of the prediction directions of the DM, and
wherein the DM derived mode is set after a Cross-Component Linear Model Prediction (CCLM) mode is set.
4. An encoder, comprising:
a processor; and
a storage medium storing instructions executable by the processor,
wherein the storage medium is configured to communicate with the processor through a communication bus to execute an operation, and the instructions are executed by the processor to implement the method for determining a prediction direction, the method comprising:
determining a chroma intra prediction mode of a block to be decoded;
acquiring a Direct Mode (DM) in the chroma intra prediction mode; and
in response to that a sum value of M and N is larger than or equal to K2 and a difference value between the M and N is smaller than or equal to K1, determining that an index value of prediction direction of a DM derived mode is the K1 and the K2 respectively,
wherein the N is an offset, the M is an index value of prediction direction of the DM, the K1 is a minimum value of index values of prediction directions of the DM, and K2 is a maximum value of the index values of the prediction directions of the DM, and
wherein the DM derived mode is set after a Cross-Component Linear Model Prediction (CCLM) mode is set.