Interlaced video coding with leading pictures
A video coding mechanism is disclosed. The mechanism includes receiving a bitstream comprising a flag and a plurality of coded pictures including an intra random access point (IRAP) picture and one or more non-leading pictures associated with the IRAP picture. When the flag is set to a first value any leading pictures associated with the IRAP picture precede, in decoding order, all non-leading pictures associated with the IRAP picture. When the flag is set to a second value a non-leading picture precedes, in decoding order, an initial leading picture associated with the IRAP picture. The IRAP picture, any leading pictures associated with the IRAP picture, and the one or more non-leading pictures associated with the IRAP picture are decoded in decoding order based on the flag.
1. A method implemented by a decoder, the method comprising:
receiving a bitstream comprising a sequential field flag and a plurality of coded pictures including an intra random access point (IRAP) picture and one or more non-leading pictures associated with the IRAP picture;
determining that any leading pictures associated with the IRAP picture precede, in decoding order, all non-leading pictures associated with the IRAP picture when the sequential field flag is set to zero;
determining that at most one non-leading picture precedes, in decoding order, an initial leading picture associated with the IRAP picture and no non-leading pictures are positioned between the initial leading picture and a final leading picture in decoding order when the sequential field flag is set to one, wherein the sequential field flag is set to one when a coded video sequence includes pictures that represent fields, and wherein the sequential field flag is set to zero when the coded video sequence includes pictures that represent frames; and
applying a decoding process to the IRAP picture, any leading pictures associated with the IRAP picture, and the one or more non-leading pictures associated with the IRAP picture in decoding order based on whether the sequential field flag is set to one or zero.
2. The method of claim 1 , wherein the bitstream includes a sequence parameter set (SPS), and wherein the sequential field flag is obtained from the SPS.
3. The method of claim 1 , wherein the sequential field flag is designated field_seq_flag.
4. The method of claim 1 , wherein the IRAP picture includes a first field of a frame, and wherein a non-leading picture preceding the initial leading picture includes a second field of the frame.
5. The method of claim 4 , wherein decoding the IRAP picture and the one or more non-leading pictures includes interlacing the first field from the IRAP picture and the second field from the non-leading picture preceding the initial leading picture to create a single frame.
6. A method implemented by an encoder, the method comprising:
determining a coding order for a video sequence comprising plurality of pictures including an intra random access point (IRAP) picture and one or more non-leading pictures associated with the IRAP picture;
encoding a sequential field flag into a bitstream, wherein the sequential field flag is set to zero when any leading pictures associated with the IRAP picture precede, in coding order, all non-leading pictures associated with the IRAP picture, and wherein the sequential field flag is set to one when at most one non-leading picture precedes, in coding order, an initial leading picture associated with the IRAP picture, and no non-leading pictures are positioned between the initial leading picture and a final leading picture in coding order, wherein the sequential field flag is set to one when a coded video sequence includes pictures that represent fields, and wherein the sequential field flag is set to zero when the coded video sequence includes pictures that represent frames;
encoding the IRAP picture, any leading pictures associated with the IRAP picture, and the one or more non-leading pictures associated with the IRAP picture into the bitstream in coding order; and
storing the bitstream for communication toward a decoder.
7. The method of claim 6 , wherein the bitstream includes a sequence parameter set (SPS), and wherein the sequential field flag is encoded into the SPS.
8. The method of claim 6 , wherein the sequential field flag is designated field_seq_flag.
9. The method of claim 6 , wherein the IRAP picture includes a first field of a frame, and wherein a non-leading picture preceding the initial leading picture includes a second field of the frame.
10. The method of claim 9 , wherein the first field from the IRAP picture and the second field from the non-leading picture preceding the initial leading picture include alternating lines of video data that represent a single interlaced video frame.
11. A video coding device, comprising:
a memory storing instructions; and
one or more processors coupled to the memory and configured to execute the instructions to cause the video coding device to:
receive a bitstream comprising a sequential field flag and a plurality of coded pictures including an intra random access point (IRAP) picture and one or more non-leading pictures associated with the IRAP picture;
determine that any leading pictures associated with the IRAP picture precede, in decoding order, all non-leading pictures associated with the IRAP picture when the sequential field flag is set to zero;
determine that at most one non-leading picture precedes, in decoding order, an initial leading picture associated with the IRAP picture and no non-leading pictures are positioned between the initial leading picture and a final leading picture in decoding order when the sequential field flag is set to one, wherein the sequential field flag is set to one when a coded video sequence includes pictures that represent fields, and wherein the sequential field flag is set to zero when the coded video sequence includes pictures that represent frames; and
decode the IRAP picture, any leading pictures associated with the IRAP picture, and the one or more non-leading pictures associated with the IRAP picture in decoding order based on whether the sequential field flag is set to one or zero.
12. The video coding device of claim 11 , wherein the bitstream includes a sequence parameter set (SPS), wherein the sequential field flag is obtained from the SPS.
13. The video coding device of claim 11 , wherein the IRAP picture includes a first field of a frame, and wherein a non-leading picture preceding the initial leading picture includes a second field of the frame.
14. The video coding device of claim 13 , wherein the one or more processors are configured to decode the IRAP picture and the one or more non-leading pictures by interlacing the first field from the IRAP picture and the second field from the non-leading picture preceding the initial leading picture to create a single frame.