Intra block copy coding and decoding
A method of video processing includes determining, for a conversion between a current block of a video and a coded representation of the video, whether a syntax element indicating usage of a skip mode for an intra-block copy (IBC) coding model is included in the coded representation according to a rule that specifies that signaling of the syntax element is based on a dimension of the current block and/or a maximum allowed dimension for a block that is coded using the IBC coding model. The method also includes performing the conversion based on the determining.
1. A method for processing video data, comprising:
determining, for a conversion between a current video block of a video and a bitstream of the video, whether a first syntax element is included in the bitstream according to a first rule;
determining whether a second syntax element indicating whether a skip mode is applied to the current video block is included in the bitstream according to a second rule; and
performing the conversion at least based on the determining,
wherein the first syntax element indicates whether an Intra Block Copy (IBC) mode is applied to the current video block,
wherein in the IBC mode, prediction samples are derived from blocks of sample values of a same video region as determined by block vectors, and
wherein the first rule specifies that the first syntax element is not included in the bitstream when a width of the current video block is greater than a first threshold of 64 or a height of the current video block is greater than a second threshold of 64,
wherein the first rule further specifies that the first syntax element is included in the bitstream when a set of conditions are satisfied, wherein the set of conditions comprises that the width of the current video block is less than or equal to the first threshold, the height of the current video block is less than or equal to the second threshold, the current video block is not a chroma block with a tree type of dual tree, and
an enabled flag in a sequence parameter set indicates that the IBC mode is enabled, and
wherein the second rule specifies that the second syntax element is included in the bitstream when the current video block is not a chroma block with a tree type of dual tree, the enabled flag in the sequence parameter set indicates that the IBC mode is enabled, the width of the current video block is less than or equal to the first threshold, and the height of the current video block is less than or equal to the second threshold.
2. The method of claim 1 , wherein the first threshold and the second threshold are equal to a size of a virtual unit when a size of a coding tree block is greater than 64.
3. The method of claim 1 , further comprising:
determining whether a third syntax element is included in the bitstream for the current video block,
wherein the third syntax element specifies whether and which one of low frequency non-separable transform (LFNST) kernels in a selected transform set is used,
wherein a single context selected from contexts with an index increasement of 0 or 1 is used for a first bin of the third syntax element, and
wherein the index increasement is determined only based on whether a tree type of the current video block being a single tree.
4. The method of claim 3 , wherein the index increasement is 0 in response to the tree type of the current video block being a single tree, and the index increasement is 1 in response to the tree type of the current video block not being a single tree.
5. The method of claim 3 , wherein the third syntax element is associated with a LFNST coding model,
wherein the LFNST coding model comprises, applying, during encoding, a forward secondary transform between a forward primary transform and a quantization step, or applying, during decoding, an inverse secondary transform between a de-quantization step and an inverse primary transform, and
wherein the index increasement is determined excluding referring to the forward primary transform or the inverse primary transform.
6. The method of claim 1 , wherein the conversion includes encoding the video into the bitstream.
7. The method of claim 1 , wherein the conversion includes decoding the video from the bitstream.
8. The method of claim 1 , wherein the set of conditions further comprises that a slice type of the current video block is not equal to I slice and the second syntax element indicates that the skip mode is not applied.
9. An apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to:
determine, for a conversion between a current video block of a video and a bitstream of the video, whether a first syntax element is included in the bitstream according to a first rule;
determine whether a second syntax element indicating whether a skip mode is applied to the current video block is included in the bitstream according to a second rule; and
perform the conversion at least based on the determining,
wherein the first syntax element indicates whether an Intra Block Copy (IBC) mode is applied to the current video block,
wherein in the IBC mode, prediction samples are derived from blocks of sample values of a same video region as determined by block vectors, and
wherein the first rule specifies that the first syntax element is not included in the bitstream when a width of the current video block is greater than a first threshold of 64 or a height of the current video block is greater than a second threshold of 64,
wherein the first rule further specifies that the first syntax element is included in the bitstream when a set of conditions are satisfied, wherein the set of conditions comprises that the width of the current video block is less than or equal to the first threshold, the height of the current video block is less than or equal to the second threshold, the current video block is not a chroma block with a tree type of dual tree, and
an enabled flag in a sequence parameter set indicates that the IBC mode is enabled, and
wherein the second rule specifies that the second syntax element is included in the bitstream when the current video block is not a chroma block with a tree type of dual tree, the enabled flag in the sequence parameter set indicates that the IBC mode is enabled, the width of the current video block is less than or equal to the first threshold, and the height of the current video block is less than or equal to the second threshold.
10. The apparatus of claim 9 , wherein the first threshold and the second threshold are equal to a size of a virtual unit when a size of a coding tree block is greater than 64.
11. The apparatus of claim 9 , wherein the instructions upon execution by the processor, further cause the processor to:
determine whether a third syntax element is included in the bitstream for the current video block,
wherein the third syntax element specifies whether and which one of low frequency non-separable transform (LFNST) kernels in a selected transform set is used,
wherein a single context selected from contexts with an index increasement of 0 or 1 is used for a first bin of the third syntax element, and
wherein the index increasement is determined only based on whether a tree type of the current video block being a single tree.
12. The apparatus of claim 11 , wherein the index increasement is 0 in response to the tree type of the current video block being a single tree, and the index increasement is 1 in response to the tree type of the current video block not being a single tree.
13. The apparatus of claim 11 , wherein the third syntax element is associated with a LFNST coding model,
wherein the LFNST coding model comprises, applying, during encoding, a forward secondary transform between a forward primary transform and a quantization step, or applying, during decoding, an inverse secondary transform between a de-quantization step and an inverse primary transform, and
wherein the index increasement is determined excluding referring to the forward primary transform or the inverse primary transform.
14. A non-transitory computer-readable storage medium storing instructions that cause a processor to:
determine, for a conversion between a current video block of a video and a bitstream of the video, whether a first syntax element is included in the bitstream according to a first rule;
determine whether a second syntax element indicating whether a skip mode is applied to the current video block is included in the bitstream according to a second rule; and
perform the conversion at least based on the determining,
wherein the first syntax element indicates whether an Intra Block Copy (IBC) mode is applied to the current video block,
wherein in the IBC mode, prediction samples are derived from blocks of sample values of a same video region as determined by block vectors, and
wherein the first rule specifies that the first syntax element is not included in the bitstream when a width of the current video block is greater than a first threshold of 64 or a height of the current video block is greater than a second threshold of 64,
wherein the first rule further specifies that the first syntax element is included in the bitstream when a set of conditions are satisfied, wherein the set of conditions comprises that the width of the current video block is less than or equal to the first threshold, the height of the current video block is less than or equal to the second threshold, and the current video block is not a chroma block with a tree type of dual tree, and
an enabled flag in a sequence parameter set indicates that the IBC mode is enabled, and
wherein the second rule specifies that the second syntax element is included in the bitstream when the current video block is not a chroma block with a tree type of dual tree, the enabled flag in the sequence parameter set indicates that the IBC mode is enabled, the width of the current video block is less than or equal to the first threshold, and the height of the current video block is less than or equal to the second threshold.
15. The non-transitory computer-readable storage medium of claim 14 , the instructions further cause the processor to:
determine whether a third syntax element is included in the bitstream for the current video block,
wherein the third syntax element specifies whether and which one of low frequency non-separable transform (LFNST) kernels in a selected transform set is used,
wherein a single context selected from contexts with an index increasement of 0 or 1 is used for a first bin of the third syntax element, and
wherein the index increasement is determined only based on whether a tree type of the current video block being a single tree.
16. The non-transitory computer-readable storage medium of claim 15 , wherein the index increasement is 0 in response to the tree type of the current video block being a single tree, and the index increasement is 1 in response to the tree type of the current video block not being a single tree.
17. The non-transitory computer-readable storage medium of claim 15 , wherein the third syntax element is associated with a LFNST coding model,
wherein the LFNST coding model comprises, applying, during encoding, a forward secondary transform between a forward primary transform and a quantization step, or applying, during decoding, an inverse secondary transform between a de-quantization step and an inverse primary transform, and
wherein the index increasement is determined excluding referring to the forward primary transform or the inverse primary transform.
18. A method for storing a bitstream of a video comprises:
determining, for a current video block of a video, whether a first syntax element is included in the bitstream according to a first rule;
determining whether a second syntax element indicating whether a skip mode is applied to the current video block is included in the bitstream according to a second rule;
generating the bitstream at least based on the determining; and
storing the bitstream in a computer-readable recording medium,
wherein the first syntax element indicates whether an Intra Block Copy (IBC) mode is applied to the current video block,
wherein in the IBC mode, prediction samples are derived from blocks of sample values of a same video region as determined by block vectors, and
wherein the first rule specifies that the first syntax element is not included in the bitstream when a width of the current video block is greater than a first threshold of 64 or a height of the current video block is greater than a second threshold of 64,
wherein the first rule further specifies that the first syntax element is included in the bitstream when a set of conditions are satisfied, wherein the set of conditions comprises that the width of the current video block is less than or equal to the first threshold, the height of the current video block is less than or equal to the second threshold, and the current video block is not a chroma block with a tree type of dual tree, and
an enabled flag in a sequence parameter set indicates that the IBC mode is enabled, and
wherein the second rule specifies that the second syntax element is included in the bitstream when the current video block is not a chroma block with a tree type of dual tree, the enabled flag in the sequence parameter set indicates that the IBC mode is enabled, the width of the current video block is less than or equal to the first threshold, and the height of the current video block is less than or equal to the second threshold.
19. The method of claim 18 , further comprising:
determining whether a third syntax element is included in the bitstream for the current video block,
wherein the third syntax element specifies whether and which one of low frequency non-separable transform (LFNST) kernels in a selected transform set is used,
wherein a single context selected from contexts with an index increasement of 0 or 1 is used for a first bin of the third syntax element, and
wherein the index increasement is determined only based on whether a tree type of the current video block being a single tree.
20. The method of claim 19 , wherein the index increasement is 0 in response to the tree type of the current video block being a single tree, and the index increasement is 1 in response to the tree type of the current video block not being a single tree.