Methods and devices for high precision intra prediction
Methods, apparatuses, and non-transitory computer-readable storage mediums are provided for video coding and compression with high precision intra prediction technology. In one method, a decoder obtains a first control flag signaled at a specified level that comprises one of following levels: a Transform Block (TB) level, a Coding Block (CB) level, a slice level, a picture level, or a sequence level, where the first control flag indicates whether a Decoder-side High Precision Intra Mode Derivation (DHI) mode is enabled.
1 . A method for video decoding, comprising:
obtaining, by a decoder, a first control flag signaled at a specified level that comprises one of following levels: a Transform Block (TB) level, a Coding Block (CB) level, a slice level, a picture level, or a sequence level,
wherein the first control flag indicates whether a Decoder-side High Precision Intra Mode Derivation (DHI) mode is enabled, and
wherein the DHI mode is derived based on a cost of Template-based Intra Mode Derivation (TIMD) mode, and the method further comprises:
obtaining, by the decoder, an intra direction mode;
checking, by the decoder and according to the cost of the TIMD mode, a neighboring high precision intra mode of the intra direction mode; and
selecting, by the decoder, the neighboring high precision intra mode based on a cost of the neighboring high precision intra mode, or
wherein the DHI mode is derived based on a histogram of Decoder-side Intra Mode Derivation (DIMD) mode, and the method further comprises:
obtaining, by the decoder, an intra direction mode;
checking, by the decoder and according to the histogram of the DIMD mode, a neighboring high precision intra mode of the intra direction mode; and
selecting, by the decoder, the neighboring high precision intra mode based on a histogram of the neighboring high precision intra mode.
2 . The method of claim 1 , further comprising:
in response to determining that the first control flag is enabled, obtaining, by the decoder, a second flag of DHI indicating whether the DHI mode is used at the specified level.
3 . The method of claim 2 , further comprising:
determining, by the decoder, whether one or more neighboring intra modes are coded using the TIMD mode;
storing, by the decoder and in response to determining that the one or more neighboring intra modes are coded using the TIMD mode, high precision intra modes and corresponding low precision intra modes of the one or more neighboring intra modes to a mapping table; and
in response to obtaining a low precision intra mode, obtaining, by the decoder and based on the mapping table, a corresponding high precision intra mode.
4 . The method of claim 1 , wherein the DHI mode is derived based on the cost of the TIMD mode, and the method further comprises:
determining, by the decoder, that the neighboring high precision intra mode is used in response to determining that the cost of the neighboring high precision intra mode is lower than an original cost of the intra direction mode.
5 . The method of claim 1 , wherein the DHI mode is derived based on the histogram of the DIMD mode, and the method further comprises:
determining, by the decoder, that the neighboring high precision intra mode is used in response to determining that the histogram of the neighboring high precision intra mode is higher than an original histogram of the intra direction mode.
6 . An apparatus, comprising:
one or more processors; and
a memory configured to store instructions executable by the one or more processors; wherein the one or more processors, upon execution of the instructions, are configured to perform the method of claim 1 .
7 . The apparatus of claim 6 , wherein the one or more processors are further configured to perform:
in response to determining that the first control flag is enabled, obtaining a second flag of High Precision Intra Mode Derivation (DHI) that indicates whether the DHI mode is used at the specified level.
8 . The apparatus of claim 7 , wherein the one or more processors are further configured to perform:
determining whether one or more neighboring intra modes are coded using Template-based Intra Mode Derivation (TIMD) mode;
in response to determining that the one or more neighboring intra modes are coded using the TIMD mode, sorting high precision intra modes and corresponding low precision intra modes of the one or more neighboring intra modes to a mapping table; and
in response to obtaining a low precision intra mode, obtaining a corresponding high precision intra mode based on the mapping table.
9 . A method for video encoding, comprising:
signaling, by an encoder, a first control flag at a specified level that comprises one of the following levels: a Transform Block (TB) level, a Coding Block (CB) level, a slice level, a picture level, or a sequence level,
wherein the first control flag indicates whether a Decoder-side High Precision Intra Mode Derivation (DHI) mode is enabled, and
wherein the DHI mode is derived based on a cost of Template-based Intra Mode Derivation (TIMD) mode, and the method further comprises:
signaling, by the encoder, an intra direction mode;
checking, by the encoder and according to the cost of the TIMD mode, a neighboring high precision intra mode of the intra direction mode, and
selecting, by the encoder, the neighboring high precision intra mode based on a cost of neighboring high precision intra mode, or
wherein the DHI mode is derived based on a histogram of Decoder-side Intra Mode Derivation (DIMD) mode, and the method further comprises:
signaling, by the encoder, an intra direction mode;
checking, by the encoder and according to the histogram of the DIMD mode, neighboring high precision intra mode of the intra direction mode, and
selecting, by the encoder, the neighboring high precision intra mode based on a histogram of neighboring high precision intra mode.
10 . The method of claim 9 , further comprising:
in response to determining that the first control flag is enabled, signaling, by the encoder, a second flag of DHI indicating whether the DHI mode is used at the specified level.
11 . The method of claim 10 , further comprising:
determining, by the encoder, whether neighboring intra modes are coded using the TIMD mode; and
storing, by the encoder and in response to determining that neighboring intra modes are coded using the TIMD mode, high precision intra modes and corresponding low precision intra modes of the neighboring intra modes to a mapping table.
12 . The method of claim 9 , wherein the DHI mode is derived based on the cost of the TIMD mode, and the method further comprises:
determining, by the encoder, that the neighboring high precision intra mode is used in response to determining that the cost of the neighboring high precision intra mode is lower than an original cost of the intra direction mode.
13 . The method of claim 9 , wherein the DHI mode is derived based on the histogram of the DIMD mode, and the method further comprises:
determining, by the encoder, that the neighboring high precision intra mode is used in response to determining that the histogram of the neighboring high precision intra mode is higher than an original histogram of the intra direction mode.
14 . A method for storing a bitstream, comprising:
performing a method for video encoding to generate a bitstream; and
storing the bitstream;
wherein the method for video encoding comprises:
signaling, by an encoder, a first control flag at a specified level that comprises one of the following levels: a Transform Block (TB) level, a Coding Block (CB) level, a slice level, a picture level, or a sequence level,
wherein the first control flag indicates whether a Decoder-side High Precision Intra Mode Derivation (DHI) mode is enabled, and
wherein the DHI mode is derived based on a cost of Template-based Intra Mode Derivation (TIMD) mode, and the method further comprises:
signaling, by the encoder, an intra direction mode;
checking, by the encoder and according to the cost of the TIMD mode, a neighboring high precision intra mode of the intra direction mode, and
selecting, by the encoder, the neighboring high precision intra mode based on a cost of neighboring high precision intra mode, or
wherein the DHI mode is derived based on a histogram of Decoder-side Intra Mode Derivation (DIMD) mode, and the method further comprises:
signaling, by the encoder, an intra direction mode;
checking, by the encoder and according to the histogram of the DIMD mode, neighboring high precision intra mode of the intra direction mode, and
selecting, by the encoder, the neighboring high precision intra mode based on a histogram of neighboring high precision intra mode.
15 . An apparatus, comprising:
one or more processors; and
a memory configured to store instructions executable by the one or more processors;
wherein the one or more processors, upon execution of the instructions, are configured to perform the method of claim 9 .
16 . A non-transitory computer-readable storage medium storing a bitstream and instructions, wherein the instructions, which when executed by a computing device having one or more processors, cause the one or more processors to perform the method of claim 9 to generate the bitstream.