diff --git a/markdown/design/interlaced-video.md b/markdown/design/interlaced-video.md index 578e5ca558..bc0886d72f 100644 --- a/markdown/design/interlaced-video.md +++ b/markdown/design/interlaced-video.md @@ -100,3 +100,24 @@ For example in the following sequence, the third buffer would be mixed (yes, it is a strange pattern, but it can happen): AtAb AtBb BtCb CtDb DtDb + +### Alternate fields + +Since: 1.16 + +If the video info interlace mode is **"alternate"**, then each buffer +carries a single field of interlaced video. + +`GST_VIDEO_BUFFER_FLAG_TOP_FIELD` and `GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD` +indicate whether the buffer carries a top or bottom field. The order of +buffers/fields in the stream and the timestamps on the buffers indicate the +temporal order of the fields. + +Top and bottom fields are expected to alternate in this mode. + +Caps for this interlace mode must also carry a `format:Interlaced` caps feature +(`GST_CAPS_FEATURE_FORMAT_INTERLACED`) to ensure backwards compatibility for +the new mode. + +The frame rate in the caps still signals the frame rate, so the notional field +rate will be twice the frame rate from the caps (see `GST_VIDEO_INFO_FIELD_RATE_N`). diff --git a/markdown/design/mediatype-video-raw.md b/markdown/design/mediatype-video-raw.md index 59d6bf4829..8c59bde2e8 100644 --- a/markdown/design/mediatype-video-raw.md +++ b/markdown/design/mediatype-video-raw.md @@ -18,7 +18,8 @@ view. use the frame id to get access to the different views. - **interlace-mode**, `G_TYPE_STRING`: Default progressive. The interlace - mode. The following values are possible: + mode (also see the [interlaced video design docs](design/interlaced-video.md)). + The following values are possible: - *"progressive"*: all frames are progressive @@ -37,6 +38,13 @@ must be prepared for this. This mode requires multiple GstVideoMeta metadata to describe the fields. + - *"alternate"*: one field per buffer, with buffer flags indicating + whether the field is the top field (`GST_VIDEO_BUFFER_FLAG_TOP_FIELD`) or + bottom field (`GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD`). Top and bottom fields + are expected to alternate in this mode. Caps for this interlace mode must + also carry a `format:Interlaced` caps feature (`GST_CAPS_FEATURE_FORMAT_INTERLACED`) + to ensure backwards compatibility for the new mode (Since: 1.16) + - **chroma-site**, `G_TYPE_STRING`: Default `GST_VIDEO_CHROMA_SITE_UNKNOWN`. The chroma siting of the video frames.