From e284455272857f9c09315d917b3a49640b24de8b Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Wed, 6 Apr 2011 16:11:02 +0200 Subject: [PATCH 1/3] docs: Update interlaced video design document The RFF flag is to be reused for buffers in the telecine state to indicate that the buffer contains only unneeded repeated fields that are present in other buffers and as such this buffer can be dropped. --- docs/design/part-interlaced-video.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/design/part-interlaced-video.txt b/docs/design/part-interlaced-video.txt index caef5330e5..6593146173 100644 --- a/docs/design/part-interlaced-video.txt +++ b/docs/design/part-interlaced-video.txt @@ -77,9 +77,20 @@ Telecine If the caps have interlaced=true and interlacing-method=telecine then the buffers are in some form of telecine state. -The TFF, RFF and ONEFIELD flags have the same semantics as for the plain -interlaced state, however, for the telecine state require one additional flag to -be able to identify progressive buffers. +The TFF and ONEFIELD flags have the same semantics as for the plain interlaced +state. + +GST_VIDEO_BUFFER_RFF in the telecine state indicates that the buffer contains +only repeated fields that are present in other buffers and are as such +unneeded. For example, in a sequence of three telecined frames, we might have: + +AtAb AtBb BtBb + +In this situation, we only need the first and third buffers as the second +buffer contains fields present in the first and third. + +The telecine state require one additional flag to be able to identify +progressive buffers. GST_VIDEO_BUFFER_PROGRESSIVE means that the buffer containing two fields is a progressive frame. The implication is that if this flag is not set, the buffer From a29e55f9c4477e4c77218ca03536d3bbe3e6e518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 7 Apr 2011 10:06:53 +0200 Subject: [PATCH 2/3] video: Fix creation of grayscale caps The endianness was not set correctly before. Fixes bug #646923. --- gst-libs/gst/video/video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c index a423a7e8b9..a369387802 100644 --- a/gst-libs/gst/video/video.c +++ b/gst-libs/gst/video/video.c @@ -707,14 +707,14 @@ gst_video_format_new_caps_raw (GstVideoFormat format) break; } - if (bpp > 8) { + if (bpp <= 8) { caps = gst_caps_new_simple ("video/x-raw-gray", "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, NULL); } else { caps = gst_caps_new_simple ("video/x-raw-gray", "bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, - "endianness", G_TYPE_INT, G_BIG_ENDIAN, NULL); + "endianness", G_TYPE_INT, endianness, NULL); } return caps; From 96463bb8df2711994b42f92465f909b1d13217f3 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 6 Apr 2011 16:25:37 +0100 Subject: [PATCH 3/3] rtp: Remove unused variables https://bugzilla.gnome.org/show_bug.cgi?id=646924 --- gst-libs/gst/rtp/gstbasertpdepayload.c | 6 +----- gst-libs/gst/rtp/gstrtpbuffer.c | 6 ------ 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/gst-libs/gst/rtp/gstbasertpdepayload.c b/gst-libs/gst/rtp/gstbasertpdepayload.c index fdc861d205..58489b14da 100644 --- a/gst-libs/gst/rtp/gstbasertpdepayload.c +++ b/gst-libs/gst/rtp/gstbasertpdepayload.c @@ -271,7 +271,7 @@ gst_base_rtp_depayload_chain (GstPad * pad, GstBuffer * in) GstClockTime timestamp; guint16 seqnum; guint32 rtptime; - gboolean reset_seq, discont; + gboolean discont; gint gap; filter = GST_BASE_RTP_DEPAYLOAD (GST_OBJECT_PARENT (pad)); @@ -299,7 +299,6 @@ gst_base_rtp_depayload_chain (GstPad * pad, GstBuffer * in) seqnum = gst_rtp_buffer_get_seq (in); rtptime = gst_rtp_buffer_get_timestamp (in); - reset_seq = TRUE; discont = FALSE; GST_LOG_OBJECT (filter, "discont %d, seqnum %u, rtptime %u, timestamp %" @@ -547,11 +546,8 @@ static GstFlowReturn gst_base_rtp_depayload_prepare_push (GstBaseRTPDepayload * filter, gboolean do_ts, guint32 rtptime, gboolean is_list, gpointer obj) { - GstBaseRTPDepayloadPrivate *priv; HeaderData data; - priv = filter->priv; - data.depayload = filter; data.caps = GST_PAD_CAPS (filter->srcpad); data.rtptime = rtptime; diff --git a/gst-libs/gst/rtp/gstrtpbuffer.c b/gst-libs/gst/rtp/gstrtpbuffer.c index 149a9669ec..141b072364 100644 --- a/gst-libs/gst/rtp/gstrtpbuffer.c +++ b/gst-libs/gst/rtp/gstrtpbuffer.c @@ -1614,7 +1614,6 @@ gst_rtp_buffer_add_extension_onebyte_header (GstBuffer * buffer, guint8 id, guint8 *pdata; guint wordlen; gboolean has_bit; - guint bytelen; g_return_val_if_fail (id > 0 && id < 15, FALSE); g_return_val_if_fail (size >= 1 && size <= 16, FALSE); @@ -1623,8 +1622,6 @@ gst_rtp_buffer_add_extension_onebyte_header (GstBuffer * buffer, guint8 id, has_bit = gst_rtp_buffer_get_extension_data (buffer, &bits, (gpointer) & pdata, &wordlen); - bytelen = wordlen * 4; - if (has_bit) { gulong offset = 0; guint8 *nextext; @@ -1738,7 +1735,6 @@ gst_rtp_buffer_add_extension_twobytes_header (GstBuffer * buffer, guint8 *pdata; guint wordlen; gboolean has_bit; - guint bytelen; g_return_val_if_fail ((appbits & 0xF0) == 0, FALSE); g_return_val_if_fail (size < 256, FALSE); @@ -1747,8 +1743,6 @@ gst_rtp_buffer_add_extension_twobytes_header (GstBuffer * buffer, has_bit = gst_rtp_buffer_get_extension_data (buffer, &bits, (gpointer) & pdata, &wordlen); - bytelen = wordlen * 4; - if (has_bit) { gulong offset = 0; guint8 *nextext;