Method and apparatus for encoding and decoding a video stream with subpictures
An encoding method comprising the encoding of information allowing the decoder to infer the splitting of CTBs located at the right, respectively the bottom of a subpicture, which width, respectively height, is not a multiple of the size of the CTBs, when the subpicture is not located at the right, respectively the bottom, of the image. Corresponding decoding methods for the generated bitstream are also proposed.
1 . A method of encoding video data comprising pictures into a bitstream, pictures being divided into subpictures each including one or more slices, the method comprising:
encoding, in a sequence parameter set of the bitstream, a first flag indicating whether information of a subpicture is present;
when a value of the first flag is 1, encoding, in the sequence parameter set of the bitstream, a second flag related to a constraint of subpictures;
when a value of the second flag is 0, encoding, for a given subpicture in a picture, a third flag and a fourth flag in the sequence parameter set of the bitstream, the third flag indicating whether in-loop filtering operations across subpicture boundaries is enabled and the fourth flag indicating whether the given subpicture is treated as a picture in decoding process excluding in-loop filtering operations,
wherein the third flag and the fourth flag are not encoded in the sequence parameter set of the bitstream when the value of the second flag is 1; and
encoding coding tree blocks composing the pictures into the bitstream, wherein information specifying a maximum height, in units of luma samples, of each encoded picture referring to the sequence parameter set is encoded in the sequence parameter set.
2 . The method of claim 1 , wherein the second flag is related to all the subpictures.
3 . The method of claim 1 , wherein subpictures are further identified with a subpicture identifier.
4 . The method of claim 3 , wherein subpicture identifiers defined in picture parameter sets must be identical in all the picture parameter sets.
5 . The method of claim 1 , wherein the second flag is associated with a particular profile.
6 . The method of claim 1 , wherein the method comprises:
when the value of the second flag is 1, all the subpictures have borders constrained as picture borders and there is no loop filtering across the subpicture boundaries.
7 . The method of claim 1 , wherein the method further comprises for at least one subpicture:
encoding in the bitstream an information indicating a conformance window for the subpicture.
8 . The method of claim 1 , wherein when the value of the second flag is 1, the value of the third flag is inferred to be 0 and the value of the fourth flag is inferred to be 1,
wherein the third flag, having the value of 0, indicates that the in-loop filtering operations are not performed across boundaries of the given subpicture, and
wherein the fourth flag, having the value of 1, indicates that the given subpicture is treated as a picture in the decoding process excluding in-loop filtering operations.
9 . The method of claim 1 , wherein the third flag is a loop filter across subpic enabled flag, and the fourth flag is a subpic treated as pic flag.
10 . The method of claim 1 , wherein when the value of the second flag is equal to 1, subpicture boundaries of the subpictures are treated as picture boundaries.
11 . A method of decoding a bitstream of video data comprising pictures, pictures being divided into subpictures each including one or more slices, the method comprising:
decoding, from a sequence parameter set of the bitstream, a first flag indicating whether information of a subpicture is present;
when a value of the first flag is 1, decoding, from the sequence parameter set of the bitstream, a second flag related to a constraint of subpictures;
when a value of the second flag is 0, decoding, for a given subpicture in a picture, a third flag and a fourth flag from the sequence parameter set of the bitstream, the third flag indicating whether in-loop filtering operations across subpicture boundaries is enabled, and the fourth flag indicating whether the given subpicture is treated as a picture in decoding process excluding in-loop filtering operations,
wherein the third flag and the fourth flag are not decoded from the sequence parameter set of the bitstream when the value of the second flag is 1; and
decoding the bitstream at least based on the first flag, wherein information specifying a maximum height, in units of luma samples, of each decoded picture referring to the sequence parameter set is decoded from the sequence parameter set.
12 . The method of claim 11 , wherein the method comprises:
when the value of the second flag is 1, all the subpictures have boundaries constrained as picture boundaries and there is no loop filtering across the subpicture boundaries.
13 . The method of claim 11 , wherein the second flag is related to all the subpictures.
14 . The method of claim 11 , wherein when the value of the second flag is 1, the value of the third flag is inferred to be 0 and the value of the fourth flag is inferred to be 1,
wherein the third flag, having the value of 0, indicates that the in-loop filtering operations are not performed across boundaries of the given subpicture, and
wherein the fourth flag, having the value of 1, indicates that the given subpicture is treated as a picture in the decoding process excluding in-loop filtering operations.
15 . The method of claim 11 , wherein the third flag is a loop filter across subpic enabled flag, and the fourth flag is a subpic treated as pic flag.
16 . The method of claim 11 , wherein when the value of the second flag is equal to 1, subpicture boundaries of the subpictures are treated as picture boundaries.
17 . A device for encoding video data comprising pictures into a bitstream, pictures being divided into subpictures each including one or more slices, the device comprising a processor configured to execute:
encoding, in a sequence parameter set of the bitstream, a first flag indicating whether information of a subpicture is present;
when a value of the first flag is 1, encoding, in the sequence parameter set of the bitstream, a second flag related to a constraint of subpictures;
when a value of the second flag is 0, encoding, for a given subpicture in a picture, a third flag and a fourth flag in the sequence parameter set of the bitstream, the third flag indicating whether in-loop filtering operations across subpicture boundaries is enabled and the fourth flag indicating whether the given subpicture is treated as a picture in decoding process excluding in-loop filtering operations,
wherein the third flag and the fourth flag are not encoded in the sequence parameter set of the bitstream when the value of the second flag is 1; and
encoding coding tree blocks composing the pictures into the bitstream, wherein information specifying a maximum height, in units of luma samples, of each encoded picture referring to the sequence parameter set is encoded in the sequence parameter set.
18 . A device for decoding a bitstream of video data comprising pictures, pictures being divided into subpictures each including one or more slices, the devices comprising a processor configured for:
decoding, from a sequence parameter set of the bitstream, a first flag indicating whether information of a subpicture is present;
when a value of the first flag is 1, decoding, from the sequence parameter set of the bitstream, a second flag related to a constraint of subpictures;
when a value of the second flag is 0, decoding, for a given subpicture in a picture, a third flag and a fourth flag from the sequence parameter set of the bitstream, the third flag indicating whether in-loop filtering operations across subpicture boundaries is enabled, and the fourth flag indicating whether the given subpicture is treated as a picture in decoding process excluding in-loop filtering operations,
wherein the third flag and the fourth flag are not decoded from the sequence parameter set of the bitstream when the value of the second flag is 1; and
decoding the bitstream at least based on the first flag, wherein information specifying a maximum height, in units of luma samples, of each decoded picture referring to the sequence parameter set is decoded from the sequence parameter set.
19 . A non-transitory computer-readable storage medium storing instructions of a computer program for implementing a method, the method comprising:
encoding, in a sequence parameter set of the bitstream, a first flag indicating whether information of a subpicture is present;
when a value of the first flag is 1, encoding, in the sequence parameter set of the bitstream, a second flag related to a constraint of subpictures;
when a value of the second flag is 0, encoding, for a given subpicture in a picture, a third flag and a fourth flag in the sequence parameter set of the bitstream, the third flag indicating whether in-loop filtering operations across subpicture boundaries is enabled and the fourth flag indicating whether the given subpicture is treated as a picture in decoding process excluding in-loop filtering operations,
wherein the third flag and the fourth flag are not encoded in the sequence parameter set of the bitstream when the value of the second flag is 1; and
encoding coding tree blocks composing the pictures into the bitstream, wherein information specifying a maximum height, in units of luma samples, of each encoded picture referring to the sequence parameter set is encoded in the sequence parameter set.
20 . A non-transitory computer-readable storage medium storing instructions of a computer program for implementing a method, the method comprising:
decoding, from a sequence parameter set of the bitstream, a first flag indicating whether information of a subpicture is present;
when a value of the first flag is 1, decoding, from the sequence parameter set of the bitstream, a second flag related to a constraint of subpictures;
when a value of the second flag is 0, decoding, for a given subpicture in a picture, a third flag and a fourth flag from the sequence parameter set of the bitstream, the third flag indicating whether in-loop filtering operations across subpicture boundaries is enabled, and the fourth flag indicating whether the given subpicture is treated as a picture in decoding process excluding in-loop filtering operations,
wherein the third flag and the fourth flag are not decoded from the sequence parameter set of the bitstream when the value of the second flag is 1; and
decoding the bitstream at least based on the first flag, wherein information specifying a maximum height, in units of luma samples, of each decoded picture referring to the sequence parameter set is decoded from the sequence parameter set.