summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-02-20 09:15:05 -0600
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2018-02-20 11:01:46 -0600
commit1328b3b51984010eaf2bc3631bc20270452187e6 (patch)
treebcff72f1b1646c06e990d1b6dc83b76666f45fef
parentc0826fdc96d9fca6d0e203e8c23c2b400be5c31a (diff)
vaapipostproc: set discont flag at vpp deinterlacing
When deinterlacing with VPP the discont flag was not forwarded to the new created buffer. This patch sets the discont flag if input buffer has it.
-rw-r--r--gst/vaapi/gstvaapipostproc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
index deaf23ce..53888f53 100644
--- a/gst/vaapi/gstvaapipostproc.c
+++ b/gst/vaapi/gstvaapipostproc.c
@@ -617,7 +617,7 @@ gst_vaapipostproc_process_vpp (GstBaseTransform * trans, GstBuffer * inbuf,
GstBuffer *fieldbuf;
GstVaapiDeinterlaceMethod deint_method;
guint flags, deint_flags;
- gboolean tff, deint, deint_refs, deint_changed;
+ gboolean tff, deint, deint_refs, deint_changed, discont;
const GstVideoCropMeta *crop_meta;
GstVaapiRectangle *crop_rect = NULL;
GstVaapiRectangle tmp_rect;
@@ -641,6 +641,7 @@ gst_vaapipostproc_process_vpp (GstBaseTransform * trans, GstBuffer * inbuf,
timestamp = GST_BUFFER_TIMESTAMP (inbuf);
tff = GST_BUFFER_FLAG_IS_SET (inbuf, GST_VIDEO_BUFFER_FLAG_TFF);
+ discont = GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_DISCONT);
deint = should_deinterlace_buffer (postproc, inbuf);
/* Drop references if deinterlacing conditions changed */
@@ -723,6 +724,11 @@ gst_vaapipostproc_process_vpp (GstBaseTransform * trans, GstBuffer * inbuf,
GST_BUFFER_TIMESTAMP (fieldbuf) = timestamp;
GST_BUFFER_DURATION (fieldbuf) = postproc->field_duration;
+ if (discont) {
+ GST_BUFFER_FLAG_SET (fieldbuf, GST_BUFFER_FLAG_DISCONT);
+ discont = FALSE;
+ }
+
ret = gst_pad_push (trans->srcpad, fieldbuf);
if (ret != GST_FLOW_OK)
goto error_push_buffer;
@@ -773,6 +779,10 @@ gst_vaapipostproc_process_vpp (GstBaseTransform * trans, GstBuffer * inbuf,
else {
GST_BUFFER_TIMESTAMP (outbuf) = timestamp + postproc->field_duration;
GST_BUFFER_DURATION (outbuf) = postproc->field_duration;
+ if (discont) {
+ GST_BUFFER_FLAG_SET (fieldbuf, GST_BUFFER_FLAG_DISCONT);
+ discont = FALSE;
+ }
}
if (deint && deint_refs)