Method and apparatus for video encoding/decoding using IBC mode, and method for transmitting bitstream
An image decoding method is disclosed. The image decoding method includes determining a prediction mode of a current block based on prediction mode information of the current block obtained from a bitstream, obtaining a transform coefficient block of the current block from the bitstream, dequantizing the transform coefficient to generate a dequantized transform coefficient block, determining a transform kernel for the dequantized transform coefficient block, and generating a residual block of the current block by performing inverse transform on the dequantized transform coefficient block using the transform kernel.
1 . An image decoding apparatus comprising:
at least one processor; and
at least one memory comprising instructions stored therein that, when executed by the at least one processor, cause the image decoding apparatus to perform at least:
determining a prediction mode of a current block, based on prediction mode information of the current block obtained from a bitstream;
obtaining a transform coefficient block of the current block from the bitstream;
dequantizing the transform coefficient block to generate a dequantized transform coefficient block;
determining a transform kernel for the dequantized transform coefficient block; and
generating a residual block of the current block by performing inverse transform on the dequantized transform coefficient block based on the transform kernel,
wherein the transform kernel is determined based on transform kernel index information obtained from the bitstream,
wherein the transform kernel index information specifies a combination of a horizontal transform kernel for the transform coefficient block and a vertical transform kernel for the transform coefficient block,
wherein, in an instance in which the prediction mode of the current block is an intra block copy (IBC) mode which refers to a block located in a same picture as the current block and decoded before the current block, a value of the transform kernel index information is derived as a predetermined value rather than the transform kernel index information being obtained from the bitstream, regardless of predetermined flag information in the bitstream specifying whether explicit signaling is being performed in the bitstream, and
wherein, in an instance in which the prediction mode of the current block is a prediction mode other than the IBC mode, the transform kernel index information is obtained from the bitstream based on the predetermined flag information in the bitstream.
2 . The image decoding apparatus of claim 1 , wherein, in an instance in which the transform kernel index information is derived as the predetermined value, the predetermined value specifies a predetermined first transform kernel.
3 . The image decoding apparatus of claim 2 , wherein the predetermined first transform kernel is either discrete cosine transform 2 (DCT2) or discrete cosine transform 7 (DCT7).
4 . An image encoding apparatus comprising:
at least one processor; and
at least one memory comprising program instructions stored therein that, when executed by the at least one processor, cause the image encoding apparatus to perform at least:
selecting a prediction mode of a current block;
generating a prediction block for the current block based on the selected prediction mode;
generating a residual block for the current block based on the prediction block;
selecting a transform kernel for transforming the residual block based on the prediction mode;
transforming the residual block based on the transform kernel to generate a transform coefficient block;
quantizing the transform coefficient block to generate a quantized transform coefficient block; and
encoding the quantized transform coefficient block to generate a bitstream,
wherein, in an instance in which the prediction mode of the current block is an intra block copy (IBC) mode which refers to a block located in a same picture as the current block and the block located in the same picture is encoded before the current block is encoded, the bitstream is encoded without including therein transform kernel index information of the transform kernel, regardless of whether predetermined flag information is encoded in the bitstream,
wherein the predetermined flag information is configured to specify whether explicit signaling of transform kernel index information is performed via the bitstream,
wherein the transform kernel index information is configured to specify a combination of a horizontal transform kernel for the transform coefficient block and a vertical transform kernel for the transform coefficient block,
wherein a value of the transform kernel index information is derivable as a predetermined value, and
wherein, in an instance in which the prediction mode of the current block is a prediction mode other than the IBC mode, the transform kernel index information of the transform kernel is encoded into the bitstream based on the predetermined flag information.
5 . The image encoding apparatus of claim 4 , wherein the program instructions stored in the at least one memory, when executed by the at least one processor, cause the image encoding apparatus to perform the transforming the residual block by causing the image encoding apparatus to further perform:
in an instance in which the prediction mode of the current block is the IBC mode, transforming the residual block based on a predetermined transform kernel,
wherein the bitstream does not include transform kernel index information of the predetermined transform kernel used for the transforming the residual block.
6 . The image encoding apparatus of claim 4 , wherein the program instructions stored in the at least one memory, when executed by the at least one processor, further cause the image encoding device to perform:
including, in the bitstream, first flag information and second flag information,
wherein the first flag information specifies whether the transform kernel index information for a block encoded in an intra prediction mode is able to be included in the bitstream,
wherein the second flag information specifies whether the transform kernel index information for a block encoded in an inter prediction mode is able to be included in the bitstream are included in the bitstream; and
in an instance in which the prediction mode of the current block is the IBC mode, transforming the residual block based on a predetermined transform kernel and refraining from including in the bitstream the transform kernel index information of the predetermined transform kernel used for the transforming the residual block, regardless of whether at least one of the first flag information and the second flag information has a second value specifying that the transform kernel index information is able to be included in the bitstream.
7 . The image encoding apparatus of claim 6 , wherein the program instructions stored in the at least one memory, when executed by the at least one processor, further cause the image encoding device to perform the transforming the residual block by causing the image encoding device to perform:
in an instance in which the prediction mode of the current block is the IBC mode and both the first flag information and the second flag information have a first value specifying that the transform kernel index information is not included in the bitstream, deriving a predetermined transform kernel based at least on a width of the current block and a height of the current block; and
transforming the residual block based on the predetermined transform kernel,
wherein transform kernel index information of the predetermined transform kernel used for the transforming the residual block is not included in the bitstream.
8 . A non-transitory computer-readable storage medium comprising program instructions stored therein that, when executed by at least one processor of an image decoding apparatus, cause the image decoding apparatus to perform an image decoding method, the image decoding method comprising:
determining a prediction mode of a current block, based on prediction mode information of the current block obtained from a bitstream;
obtaining a transform coefficient block of the current block from the bitstream;
dequantizing the transform coefficient block to generate a dequantized transform coefficient block;
determining a transform kernel for the dequantized transform coefficient block; and
generating a residual block of the current block by performing inverse transform on the dequantized transform coefficient block based on the transform kernel,
wherein the transform kernel is determined based on transform kernel index information obtained from the bitstream,
wherein the transform kernel index information specifies a combination of a horizontal transform kernel for the transform coefficient block and a vertical transform kernel for the transform coefficient block,
determining that the prediction mode of the current block is an intra block copy (IBC) mode which refers to a block located in a same picture as the current block and decoded before the current block, a value of the transform kernel index information is derived as a predetermined value rather than the transform kernel index information being obtained from the bitstream, regardless of predetermined flag information in the bitstream specifying whether explicit signaling is being performed in the bitstream, and
wherein, in an instance in which the prediction mode of the current block is a prediction mode other than the IBC mode, the transform kernel index information is obtained from the bitstream based on the predetermined flag information in the bitstream.
9 . The non-transitory computer-readable storage medium of claim 8 , wherein, in an instance in which the transform kernel index information is derived as the predetermined value, the predetermined value specifies a predetermined first transform kernel.
10 . The non-transitory computer-readable storage medium of claim 9 , wherein the predetermined first transform kernel is either discrete cosine transform 2 (DCT2) or discrete cosine transform 7 (DCT7).
11 . The non-transitory computer-readable storage medium of claim 8 ,
wherein the determining the transform kernel for the dequantized transform coefficient block comprises deriving the transform kernel of the current block,
wherein the deriving the transform kernel of the current block is based on first flag information specifying whether the transform kernel index information for a block encoded in an intra prediction mode is able to be included in the bitstream,
wherein the deriving the transform kernel of the current block is further based on second flag information specifying whether the transform kernel index information for a block encoded in an inter prediction mode is able to be included in the bitstream, and
wherein the first flag information and the second flag information are obtained from the bitstream.
12 . The non-transitory computer-readable storage medium of claim 11 , wherein the program instructions stored therein, when executed by the at least one processor, further cause the image decoding apparatus to perform the determining the transform kernel for the dequantized transform coefficient block by causing the image decoding apparatus to perform at least:
in an instance in which the prediction mode of the current block is the IBC mode and both the first flag information and the second flag information comprise or are set to a first value specifying that the transform kernel index information is not included in the bitstream, deriving the transform kernel of the current block based on at least a width of the current block and a height of the current block.
13 . The non-transitory computer-readable storage medium of claim 12 , wherein the transform kernel of the current block comprises the horizontal transform kernel and the vertical transform kernel, and wherein the program instructions stored in the non-transitory computer-readable storage medium, when executed by the at least one processor of the image decoding apparatus, cause the image decoding apparatus to perform the determining the transform kernel for the dequantized transform coefficient block by causing the image decoding apparatus to perform at least:
determining the horizontal transform kernel of the current block based at least on whether the width of the current block is within a predetermined range and a comparison between the width of the current block and the height of the current block, and
determining the vertical transform kernel of the current block based at least on whether the height of the current block is within a predetermined range and a comparison between the width of the current block and the height of the current block.
14 . The non-transitory computer-readable storage medium of claim 11 , wherein program instructions stored therein, when executed by the at least one processor of the image decoding apparatus, further cause the image decoding apparatus to perform the determining the transform kernel for the dequantized transform coefficient block by causing the image decoding apparatus to perform at least:
in an instance in which the prediction mode of the current block is the IBC mode, deriving the transform kernel index information as the predetermined value instead of obtaining the transform kernel index information from the bitstream, regardless of whether at least one of the first flag information or the second flag information comprises or is set to a second value specifying that the transform kernel index information is able to be included in the bitstream; and
deriving the transform kernel of the current block based on the predetermined value of the transform kernel index information.
15 . The non-transitory computer-readable storage medium of claim 8 , wherein
in an instance in which the transform kernel index information is not obtained from the bitstream, the transform kernel index information is derived as the predetermined value,
in an instance in which the prediction mode of the current block is the IBC mode, the transform kernel index information is derived as a first value, and
in an instance in which the prediction mode of the current block is a prediction mode other than the IBC mode, the transform kernel index information is derived as a second value different from the first value.
16 . A non-transitory computer-readable storage medium comprising program instructions stored therein that, when executed by at least one processor of an image encoding apparatus, cause the image encoding apparatus to perform an image encoding method, the image encoding method comprising:
selecting a prediction mode of a current block;
generating a prediction block for the current block based on the selected prediction mode;
generating a residual block for the current block based on the prediction block;
selecting a transform kernel for transforming the residual block based on the prediction mode;
transforming the residual block based on the transform kernel to generate a transform coefficient block;
quantizing the transform coefficient block to generate a quantized transform coefficient block; and
encoding the quantized transform coefficient block to generate a bitstream,
wherein, in an instance in which the prediction mode of the current block is an intra block copy (IBC) mode which refers to a block located in a same picture as the current block and the block located in the same picture is encoded before the current block is encoded, the bitstream is encoded without including therein transform kernel index information of the transform kernel, regardless of whether predetermined flag information is encoded in the bitstream,
wherein the predetermined flag information is configured to specify whether explicit signaling of transform kernel index information is performed via the bitstream,
wherein the transform kernel index information is configured to specify a combination of a horizontal transform kernel for the transform coefficient block and a vertical transform kernel for the transform coefficient block,
wherein a value of the transform kernel index information is derivable as a predetermined value, and
wherein, in an instance in which the prediction mode of the current block is a prediction mode other than the IBC mode, the transform kernel index information of the transform kernel is encoded into the bitstream based on the predetermined flag information.
17 . The non-transitory computer-readable storage medium of claim 16 , wherein the program instructions stored therein, when executed by the at least one processor of the image encoding apparatus, cause the image encoding apparatus to perform the transforming the residual block by causing the image encoding apparatus to perform at least:
in an instance in which the prediction mode of the current block is the IBC mode, transforming the residual block based on a predetermined transform kernel,
wherein the bitstream does not include transform kernel index information of the predetermined transform kernel used for the transforming the residual block.
18 . The non-transitory computer-readable storage medium of claim 16 , wherein the program instructions stored therein, when executed by the at least one processor of the image encoding device, further cause the image encoding device to perform: including, in the bitstream, first flag information and second flag information, wherein the first flag information specifies whether the transform kernel index information for a block encoded in an intra prediction mode is able to be included in the bitstream, wherein the second flag information specifies whether the transform kernel index information for a block encoded in an inter prediction mode is able to be included in the bitstream are included in the bitstream; and in an instance in which the prediction mode of the current block is the IBC mode, transforming the residual block based on a predetermined transform kernel, regardless of whether at least one of the first flag information and the second flag information has a second value specifying that the transform kernel index information is able to be included in the bitstream,
wherein the transform kernel index information of the predetermined transform kernel used for the transforming the residual block is not included in the bitstream.
19 . The non-transitory computer-readable storage medium of claim 18 , wherein the program instructions stored therein, when executed by the at least one processor of the image encoding device, cause the image encoding device to perform the transforming the residual block by causing the image encoding device to perform at least: in an instance in which the prediction mode of the current block is the IBC mode and both the first flag information and the second flag information have a first value specifying that the transform kernel index information is not included in the bitstream, deriving a predetermined transform kernel based at least on a width of the current block and a height of the current block; and transforming the residual block based on the predetermined transform kernel, wherein the transform kernel index information of the predetermined transform kernel used for the transforming the residual block is not included in the bitstream.
20 . A non-transitory computer-readable storage medium comprising program instructions stored therein that, when executed by at least one processor of an apparatus, cause the apparatus to perform at least:
obtaining a bitstream generated by performing at least:
selecting a prediction mode of a current block;
generating a prediction block for the current block based on the selected prediction generating a residual block for the current block based on the prediction block;
selecting a transform kernel for transforming the residual block based on the prediction mode;
transforming the residual block based on the transform kernel to generate a transform coefficient block;
quantizing the transform coefficient block to generate a quantized transform coefficient block; and
encoding the quantized transform coefficient block to generate the bitstream,
wherein, in an instance in which the prediction mode of the current block is an intra block copy (IBC) mode which refers to a block located in the same picture as the current block and the block located in the same picture is encoded before the current block is encoded, the bitstream is encoded without including therein transform kernel index information of the transform kernel, regardless of the predetermined flag information being encoded in the bitstream,
wherein the predetermined flag information is configured to specify whether explicit signaling of transform kernel index information is performed via the bitstream,
wherein the transform kernel index information is configured to specify a combination of a horizontal transform kernel for the transform coefficient block and a vertical transform kernel for the transform coefficient block,
wherein a value of the transform kernel index information is derivable as a predetermined value, and
wherein, in an instance in which the prediction mode of the current block is a prediction mode other than the IBC mode, the transform kernel index information of the transform kernel is encoded into the bitstream based on the predetermined flag information,
wherein the program instructions stored in the non-transitory computer-readable storage medium, when executed by the at least one processor, further cause the apparatus to perform:
transmitting the bitstream towards at least one image decoding apparatus.
21 . The non-transitory computer-readable storage medium of claim 20 , wherein, in an instance in which the prediction mode of the current block is the IBC mode, the transforming the residual block is performed based on a predetermined transform kernel, and the transform kernel index information of the transform kernel used for the transforming the residual block is not included in the bitstream.
22 . The non-transitory computer-readable storage medium of claim 20 , wherein the bitstream further comprises:
first flag information specifying whether the transform kernel index information for a block encoded in an intra prediction mode is able to be included in the bitstream, and
second flag information specifying whether the transform kernel index information for a block encoded in an inter prediction mode is able to be included in the bitstream.
23 . The non-transitory computer-readable storage medium of claim 22 , wherein, in an instance in which the prediction mode of the current block is the IBC mode, the transforming the residual block is performed based on a predetermined transform kernel, and the transform kernel index information of the predetermined transform kernel used for the transforming the residual block is not included in the bitstream, regardless of whether at least one of the first flag information and the second flag information has a second value specifying that the transform kernel index information is able to be included in the bitstream.
24 . The non-transitory computer-readable storage medium of claim 22 , wherein, in an instance in which the prediction mode of the current block is the IBC mode and both the first flag information and the second flag information have a first value specifying that the transform kernel index information is not included in the bitstream:
the transforming the residual block is performed based on a predetermined transform kernel,
the predetermined transform kernel is derived based at least on a width of the current block and a height of the current block, and
transform kernel index information of the predetermined transform kernel used for the transforming the residual block is not included in the bitstream.