Image encoding/decoding method and apparatus based on scan order information, and recording medium storing bitstream
An image encoding/decoding method and apparatus are provided. The image decoding method according to the present disclosure may comprise acquiring a first flag related to subpictures from a bitstream and determining a scan order of the subpictures based on the first flag indicating presence of information on the subpictures.
1 . An image decoding method performed by an image decoding apparatus, the image decoding method comprising:
acquiring a first flag related to subpictures from a bitstream,
wherein the first flag specifies whether or not the subpictures are present,
wherein the bitstream further includes information for specifying a number of subpictures, information for specifying whether or not all subpictures have a same width and a same height, and information for specifying a number of bits used to represent a subpicture identifier; and
determining a scan order of the subpictures based on the first flag indicating presence of information on the subpictures,
wherein the scan order of the subpictures is determined based on a second flag indicating whether the scan order of the subpictures is a raster scan order, and
wherein based on the second flag being acquired from a supplemental enhancement information (SEI) message, the second flag is present before a first video coding layer (VCL) network abstraction layer (NAL) unit in a coded video sequence (CVS).
2 . The image decoding method of claim 1 ,
wherein the second flag is acquired from the bitstream based on the first flag indicating the presence of the information on the subpictures.
3 . The image decoding method of claim 2 , wherein the second flag is acquired from at least one of a sequence parameter set (SPS), general constraints information (GCE), SEI message, or video usage information (VUI).
4 . The image decoding method of claim 2 , wherein the second flag is acquired based on a number of the subpictures exceeding 2.
5 . The image decoding method of claim 2 , wherein based on the number of the subpictures being equal to or smaller than 2, a value of the second flag is constrained to indicate a raster scan order.
6 . The image decoding method of claim 3 , wherein based on the second flag being acquired from the SEI message, the second flag indicates whether the scan order of the subpictures for consecutive CVSs is a raster scan order.
7 . The image decoding method of claim 1 , wherein the subpictures include a first subpicture and a second subpicture, and
wherein based on a top offset of a first coding tree unit (CTU) in the first subpicture being smaller than or equal to a top offset of a first CTU in the second subpicture and a left offset of the first CTU in the first subpicture being smaller than a left offset of the first CTU in the second subpicture, the scan order of the subpictures is determined as a raster scan order.
8 . The image decoding method of claim 7 , wherein based further on a left boundary and a top boundary of the first subpicture consisting of a boundary of a current picture including the subpictures or consisting of a boundary of a subpicture decoded after the second subpicture, the scan order of the subpictures is determined as the raster scan order.
9 . An image encoding method performed by an image encoding apparatus, the image encoding method comprising:
determining whether information on subpictures is present; and
based on the information on the subpictures being present, determining a scan order of the subpictures,
wherein a first flag indicating whether the information on the subpictures is present is encoded in a bitstream,
wherein the first flag specifies whether or not the subpictures are present,
wherein the bitstream further includes information for specifying a number of subpictures, information for specifying whether or not all subpictures have a same width and a same height, and information for specifying a number of bits used to represent a subpicture identifier; and
wherein the scan order of the subpictures is determined based on a second flag indicating whether the scan order of the subpictures is a raster scan order, and
wherein based on the second flag being acquired from a supplemental enhancement information (SEI) message, the second flag is present before a first video coding layer (VCL) network abstraction layer (NAL) unit in a coded video sequence (CVS).
10 . A non-transitory computer readable recording medium storing the bitstream generated by the image encoding method of claim 9 .
11 . A method for transmitting a bitstream generated by an image encoding method, the image encoding method comprising:
determining whether information on subpictures is present; and
based on the information on the subpictures being present, determining a scan order of the subpictures,
wherein a first flag indicating whether the information on the subpictures is present is encoded in a bitstream,
wherein the first flag specifies whether or not the subpictures are present,
wherein the bitstream further includes information for specifying a number of subpictures, information for specifying whether or not all subpictures have a same width and a same height, and information for specifying a number of bits used to represent a subpicture identifier; and
wherein the scan order of the subpictures is determined based on a second flag indicating whether the scan order of the subpictures is a raster scan order, and
wherein based on the second flag being acquired from a supplemental enhancement information (SEI) message, the second flag is present before a first video coding layer (VCL) network abstraction layer (NAL) unit in a coded video sequence (CVS).