Video codec allowing sub-picture or region wise random access and concept for video composition using the same
Video codec concepts which allows more effective video composition/merging and/or a more effective implementation of gradual decoding refresh are described along with concepts of allowing video composition/merging being more effective, for instance, in terms of complexity of the composition/merging task.
1. A method for decoding pictures from a data stream, the method comprising:
for a picture, decoding, from the data stream, a flag indicating whether NAL unit type varies between at least two subpictures of the picture;
when the flag is a first value, determining that NAL unit type is the same for all of the subpictures of the picture; and
when the flag is a second value that is different than the first value, decoding a first NAL unit type for a first subpicture of the picture and a second NAL unit type of a second subpicture of the picture, wherein the first NAL unit type is different than the second NAL unit type.
2. The method of claim 1 , wherein:
the first NAL unit type is random access, and
the second NAL unit type is not random access.
3. The method of claim 1 , wherein:
the flag is contained in a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS) of the data stream, and
each NAL unit type is associated with a slice of a sub-picture.
4. The method of claim 1 , further comprising:
when the flag is the second value, storing at least one of the subpictures in a buffer while decoding the subpictures; and
flushing the buffer after all of the subpictures of the picture are parsed or decoded.
5. The method of claim 1 , further comprising:
distinguishing between two NAL unit type subsets based on an integer-valued syntax element corresponding to the NAL unit type, wherein:
a first of the two NAL unit type subsets corresponds to random access, and
a second of the two NAL unit type subsets corresponds to not random access.
6. A decoder configured to:
for a picture, decode, from a data stream, a flag indicating whether NAL unit type varies between at least two subpictures of the picture;
when the flag is a first value, determine that NAL unit type is the same for all of the subpictures of the picture; and
when the flag is a second value that is different than the first value, decode a first NAL unit type for a first subpicture of the picture and a second NAL unit type of a second subpicture of the picture, wherein the first NAL unit type is different than the second NAL unit type.
7. The decoder of claim 6 , wherein:
the first NAL unit type is random access, and
the second NAL unit type is not random access.
8. The decoder of claim 6 , wherein:
the flag is contained in a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS) of the data stream, and
each NAL unit type is associated with a slice of a sub-picture.
9. The decoder of claim 6 , further configured to:
when the flag is the second value, store at least one of the subpictures in a buffer while decoding the subpictures; and
flush the buffer after all of the subpictures of the picture are parsed or decoded.
10. The decoder of claim 6 , further configured to:
distinguish between two NAL unit type subsets based on an integer-valued syntax element corresponding to the NAL unit type, wherein:
a first of the two NAL unit type subsets corresponds to random access, and
a second of the two NAL unit type subsets corresponds to not random access.
11. A non-transitory computer readable medium containing instructions, the instructions when executed cause at least one processor to:
for a picture, decode, from a data stream, a flag indicating whether NAL unit type varies between at least two subpictures of the picture;
when the flag is a first value, determine that NAL unit type is the same for all of the subpictures of the picture; and
when the flag is a second value that is different than the first value, decode a first NAL unit type for a first subpicture of the picture and a second NAL unit type of a second subpicture of the picture, wherein the first NAL unit type is different than the second NAL unit type.
12. The non-transitory computer readable medium of claim 11 , wherein:
the first NAL unit type is random access, and
the second NAL unit type is not random access.
13. The non-transitory computer readable medium of claim 11 , wherein:
the flag is contained in a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS) of the data stream, and
each NAL unit type is associated with a slice of a sub-picture.
14. The non-transitory computer readable medium of claim 11 , further containing instructions that when executed cause the at least one processor to:
when the flag is the second value, store at least one of the subpictures in a buffer while decoding the subpictures; and
flush the buffer after all of the subpictures of the picture are parsed or decoded.
15. The non-transitory computer readable medium of claim 11 , further containing instructions that when executed cause the at least one processor to:
distinguish between two NAL unit type subsets based on an integer-valued syntax element corresponding to the NAL unit type, wherein:
a first of the two NAL unit type subsets corresponds to random access, and
a second of the two NAL unit type subsets corresponds to not random access.
16. A method for encoding pictures into a data stream, the method comprising:
determining whether NAL unit type is the same for all of subpictures of a picture;
in response to the determination that NAL unit type is the same for all of the subpictures of the picture, encoding a flag with a first value; and
in response to the determination that NAL unit type is not the same for all of the subpictures of the picture:
encoding the flag with a second value, wherein the second value is different than the first value, and
encoding a first NAL unit type for a first subpicture of the picture and a second NAL unit type of a second subpicture of the picture, wherein the first NAL unit type is different than the second NAL unit type.
17. A encoder configured to:
determine whether NAL unit type is the same for all of subpictures of a picture;
in response to the determination the NAL unit type is the same for all of the subpictures of the picture, encode a flag with a first value; and
in response to the determination that NAL unit type is not the same for all of the subpictures of the picture:
encode the flag with second value, wherein the second value is different than the first value, and
encode a first NAL unit type for a first subpicture of the picture and a second NAL unit type of a second subpicture of the picture, wherein the first NAL unit type is different than the second NAL unit type.
18. A non-transitory computer readable medium containing instructions, the instructions when executed cause at least one processor to:
determine whether NAL unit type is the same for all of subpictures of a picture;
in response to the determination the NAL unit type is the same for all of the subpictures of the picture, encode a flag with a first value; and
in response to the determination that NAL unit type is not the same for all of the subpictures of the picture:
encode the flag with a second value, wherein the second value is different than the first value, and
encode a first NAL unit type for a first subpicture of the picture and a second NAL unit type of a second subpicture of the picture, wherein the first NAL unit type is different than the second NAL unit type.