Remove videoparser patches

This commit is contained in:
Sreerenj Balachandran 2016-01-19 10:40:54 +02:00 committed by Víctor Manuel Jáquez Leal
parent ef36e88f25
commit c2aff6e32c
12 changed files with 1 additions and 403 deletions

View file

@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AUTOMAKE_OPTIONS = foreign
SUBDIRS = debian.upstream gst-libs gst tests docs patches
SUBDIRS = debian.upstream gst-libs gst tests docs
# Extra clean files so that maintainer-clean removes *everything*
MAINTAINERCLEANFILES = \

View file

@ -143,14 +143,6 @@ AC_ARG_WITH([glapi],
[build with the specified OpenGL APIs @<:@default=default_glapi@:>@]),
[GLAPI="$with_glapi"], [GLAPI=default_glapi])
dnl Check for PATCH
AC_ARG_VAR([PATCH], [Path to patch program, if any])
AC_PATH_PROG([PATCH], [patch])
if test -z "$PATCH" -a "$enable_builtin_videoparsers" = "yes"; then
AC_MSG_ERROR([patch is needed to apply patches for built videoparsers
sources])
fi
dnl Check for basic libraries
AC_CHECK_LIB(m, tan)
@ -1106,8 +1098,6 @@ debian.upstream/libgstvaapi-x11.install.in
gst-libs/gst/vaapi/Makefile
gst/Makefile
gst/vaapi/Makefile
patches/Makefile
patches/videoparsers/Makefile
tests/Makefile
])
AC_OUTPUT

View file

@ -1,3 +0,0 @@
SUBDIRS = videoparsers
-include $(top_srcdir)/git.mk

View file

@ -1,38 +0,0 @@
From e412ece68af9b1a4ce7309774b38ec548a2d709f Mon Sep 17 00:00:00 2001
From: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Date: Mon, 28 Apr 2014 17:44:03 +0200
Subject: [PATCH 1/6] plugins: compile the built-in video parsers as
"vaapiparse" element.
The built-in video parsers elements are built into a single DSO named
libgstvaapi_parse.so. The various video parsers could be accessed as
vaapiparse_CODEC.
---
gst/vaapi/gsth264parse.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gst/vaapi/gsth264parse.c b/gst/vaapi/gsth264parse.c
index 915c2d7..96901e0 100644
--- a/gst/vaapi/gsth264parse.c
+++ b/gst/vaapi/gsth264parse.c
@@ -26,6 +26,7 @@
# include "config.h"
#endif
+#include "gstvaapiparse.h"
#include <gst/base/base.h>
#include <gst/pbutils/pbutils.h>
#include <gst/video/video.h>
@@ -122,7 +123,8 @@ gst_h264_parse_class_init (GstH264ParseClass * klass)
GstBaseParseClass *parse_class = GST_BASE_PARSE_CLASS (klass);
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
- GST_DEBUG_CATEGORY_INIT (h264_parse_debug, "h264parse", 0, "h264 parser");
+ GST_DEBUG_CATEGORY_INIT (h264_parse_debug, "vaapiparse_h264", 0,
+ "h264 parser");
gobject_class->finalize = gst_h264_parse_finalize;
gobject_class->set_property = gst_h264_parse_set_property;
--
2.5.1

View file

@ -1,55 +0,0 @@
From 48233a9eeb20d19fbc3f5550d8fecb4271be1822 Mon Sep 17 00:00:00 2001
From: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Date: Wed, 26 Aug 2015 06:50:41 +0300
Subject: [PATCH 2/6] h264parse: fix build with older GStreamer 1.x stacks
---
gst/vaapi/gsth264parse.c | 9 +++++++++
gst/vaapi/gsth264parse.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/gst/vaapi/gsth264parse.c b/gst/vaapi/gsth264parse.c
index 96901e0..f472a5e 100644
--- a/gst/vaapi/gsth264parse.c
+++ b/gst/vaapi/gsth264parse.c
@@ -165,8 +165,12 @@ gst_h264_parse_init (GstH264Parse * h264parse)
{
h264parse->frame_out = gst_adapter_new ();
gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (h264parse), FALSE);
+#if GST_CHECK_VERSION(1,3,0)
GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h264parse));
+#endif
+#if GST_CHECK_VERSION(1,5,0)
GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (h264parse));
+#endif
}
@@ -2216,8 +2220,13 @@ gst_h264_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
GST_TAG_VIDEO_CODEC, caps);
gst_caps_unref (caps);
+#if GST_CHECK_VERSION(1,5,0)
gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
gst_tag_list_unref (taglist);
+#else
+ gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (h264parse),
+ gst_event_new_tag (taglist));
+#endif
/* also signals the end of first-frame processing */
h264parse->sent_codec_tag = TRUE;
diff --git a/gst/vaapi/gsth264parse.h b/gst/vaapi/gsth264parse.h
index 58d818c..617e616 100644
--- a/gst/vaapi/gsth264parse.h
+++ b/gst/vaapi/gsth264parse.h
@@ -27,6 +27,7 @@
#include <gst/gst.h>
#include <gst/base/gstbaseparse.h>
+#include <gst/base/gstadapter.h>
#include <gst/codecparsers/gsth264parser.h>
#include <gst/video/video.h>
--
2.5.1

View file

@ -1,44 +0,0 @@
From 56df8be6dff017d32218bb3111e6ae6ff1316dec Mon Sep 17 00:00:00 2001
From: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Date: Tue, 26 May 2015 09:33:57 +0300
Subject: [PATCH 3/6] h264parse: default to byte-stream/nalu format (Annex B).
Always default to stream-format=byte-stream,alignment=nalu if avcC
format was not detected. This is the natural stream format specified
in the standard (Annex.B): a series of NAL units prefixed with the
usual start code.
https://bugzilla.gnome.org/show_bug.cgi?id=732167
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
---
gst/vaapi/gsth264parse.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gst/vaapi/gsth264parse.c b/gst/vaapi/gsth264parse.c
index f472a5e..f1ed269 100644
--- a/gst/vaapi/gsth264parse.c
+++ b/gst/vaapi/gsth264parse.c
@@ -405,7 +405,8 @@ gst_h264_parse_negotiate (GstH264Parse * h264parse, gint in_format,
if (!format)
format = GST_H264_PARSE_FORMAT_BYTE;
if (!align)
- align = GST_H264_PARSE_ALIGN_AU;
+ align = format == GST_H264_PARSE_FORMAT_BYTE ? GST_H264_PARSE_ALIGN_NAL :
+ GST_H264_PARSE_ALIGN_AU;
GST_DEBUG_OBJECT (h264parse, "selected format %s, alignment %s",
gst_h264_parse_get_string (h264parse, TRUE, format),
@@ -2452,6 +2453,8 @@ gst_h264_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
/* bytestream caps sanity checks */
if (format == GST_H264_PARSE_FORMAT_BYTE) {
+ if (align == GST_H264_PARSE_ALIGN_NONE)
+ align = GST_H264_PARSE_ALIGN_NAL;
/* should have SPS/PSS in-band (and/or oob in streamheader field) */
if (codec_data_value != NULL)
goto bytestream_caps_with_codec_data;
--
2.5.1

View file

@ -1,106 +0,0 @@
From dbdc05803a63c4d530ea0c2932af2b35df5467b3 Mon Sep 17 00:00:00 2001
From: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date: Tue, 21 Jul 2015 12:13:18 +0300
Subject: [PATCH 4/6] h264parse: Disable 3D video support for GStreamer < 1.5
All API/ABI changes for S3D/MVC are added in 1.5, backporting
them to older verison is not recommended.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
---
gst/vaapi/gsth264parse.c | 11 ++++++++++-
gst/vaapi/gsth264parse.h | 2 ++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/gst/vaapi/gsth264parse.c b/gst/vaapi/gsth264parse.c
index f1ed269..7ed6db8 100644
--- a/gst/vaapi/gsth264parse.c
+++ b/gst/vaapi/gsth264parse.c
@@ -218,9 +218,11 @@ gst_h264_parse_reset_stream_info (GstH264Parse * h264parse)
h264parse->have_pps = FALSE;
h264parse->have_sps = FALSE;
+#if GST_CHECK_VERSION(1,5,0)
h264parse->multiview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
h264parse->multiview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
h264parse->first_in_bundle = TRUE;
+#endif
h264parse->align = GST_H264_PARSE_ALIGN_NONE;
h264parse->format = GST_H264_PARSE_FORMAT_NONE;
@@ -571,6 +573,7 @@ gst_h264_parse_process_sei (GstH264Parse * h264parse, GstH264NalUnit * nalu)
/* Additional messages that are not innerly useful to the
* element but for debugging purposes */
case GST_H264_SEI_STEREO_VIDEO_INFO:{
+#if GST_CHECK_VERSION(1,5,0)
GstVideoMultiviewMode mview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
GstVideoMultiviewFlags mview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
@@ -602,9 +605,11 @@ gst_h264_parse_process_sei (GstH264Parse * h264parse, GstH264NalUnit * nalu)
/* output caps need to be changed */
gst_h264_parse_update_src_caps (h264parse, NULL);
}
+#endif
break;
}
case GST_H264_SEI_FRAME_PACKING:{
+#if GST_CHECK_VERSION(1,5,0)
GstVideoMultiviewMode mview_mode = GST_VIDEO_MULTIVIEW_MODE_NONE;
GstVideoMultiviewFlags mview_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE;
@@ -693,6 +698,7 @@ gst_h264_parse_process_sei (GstH264Parse * h264parse, GstH264NalUnit * nalu)
/* output caps need to be changed */
gst_h264_parse_update_src_caps (h264parse, NULL);
}
+#endif
break;
}
}
@@ -1762,9 +1768,11 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
gint width, height;
GstClockTime latency;
+#if GST_CHECK_VERSION(1,5,0)
const gchar *caps_mview_mode = NULL;
GstVideoMultiviewMode mview_mode = h264parse->multiview_mode;
GstVideoMultiviewFlags mview_flags = h264parse->multiview_flags;
+#endif
fps_num = h264parse->fps_num;
fps_den = h264parse->fps_den;
@@ -1796,6 +1804,7 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
}
}
+#if GST_CHECK_VERSION(1,5,0)
/* Pass through or set output stereo/multiview config */
if (s && gst_structure_has_field (s, "multiview-mode")) {
caps_mview_mode = gst_structure_get_string (s, "multiview-mode");
@@ -1814,7 +1823,7 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps)
GST_TYPE_VIDEO_MULTIVIEW_FLAGSET, mview_flags,
GST_FLAG_SET_MASK_EXACT, NULL);
}
-
+#endif
gst_caps_set_simple (caps, "width", G_TYPE_INT, width,
"height", G_TYPE_INT, height, NULL);
diff --git a/gst/vaapi/gsth264parse.h b/gst/vaapi/gsth264parse.h
index 617e616..1b89d31 100644
--- a/gst/vaapi/gsth264parse.h
+++ b/gst/vaapi/gsth264parse.h
@@ -124,10 +124,12 @@ struct _GstH264Parse
GstClockTime pending_key_unit_ts;
GstEvent *force_key_unit_event;
+#if GST_CHECK_VERSION(1,5,0)
/* Stereo / multiview info */
GstVideoMultiviewMode multiview_mode;
GstVideoMultiviewFlags multiview_flags;
gboolean first_in_bundle;
+#endif
};
struct _GstH264ParseClass
--
2.5.1

View file

@ -1,43 +0,0 @@
From 90251ef253564e7e53c754205cb506e863a93a6c Mon Sep 17 00:00:00 2001
From: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date: Thu, 26 Nov 2015 19:13:43 +0200
Subject: [PATCH] videoparsers: h264: Disable passthorugh mode enabling
Enabling passthorugh mode for optimization is cauing multiple
issues while parsing MVC streams. Specifically if streams have
two separate layers (base-view and non-base-view).
Proper fixes needed in many places:
(handle prefix nal unit, handle non-base-view slice nal extension,
fix the picture_start detection for multi-layer-mvc streams etc)
https://bugzilla.gnome.org/show_bug.cgi?id=758656
---
gst/vaapi/gsth264parse.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gst/vaapi/gsth264parse.c b/gst/vaapi/gsth264parse.c
index 915c2d7..445a791 100644
--- a/gst/vaapi/gsth264parse.c
+++ b/gst/vaapi/gsth264parse.c
@@ -2356,6 +2356,9 @@ gst_h264_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
}
}
+ /* Fixme: setting passthrough mode for MVC streams causing multiple
+ * issues. Disabing passthourgh mode for now */
+#if 0
/* If SPS/PPS and a keyframe have been parsed, and we're not converting,
* we might switch to passthrough mode now on the basis that we've seen
* the SEI packets and know optional caps params (such as multiview).
@@ -2367,6 +2370,7 @@ gst_h264_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
gst_base_parse_set_passthrough (parse, TRUE);
}
}
+#endif
gst_h264_parse_reset_frame (h264parse);
--
2.5.0

View file

@ -1,32 +0,0 @@
From 06ab8f433c02590b63e8afdf394a2a1caf570fad Mon Sep 17 00:00:00 2001
From: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Date: Thu, 16 Apr 2015 18:04:53 +0300
Subject: [PATCH 5/6] h265parse: include gstvaapiparse.h
---
gst/vaapi/gsth265parse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gst/vaapi/gsth265parse.c b/gst/vaapi/gsth265parse.c
index d649681..5f65ab6 100644
--- a/gst/vaapi/gsth265parse.c
+++ b/gst/vaapi/gsth265parse.c
@@ -22,6 +22,7 @@
# include "config.h"
#endif
+#include "gstvaapiparse.h"
#include <gst/base/base.h>
#include <gst/pbutils/pbutils.h>
#include <gst/video/video.h>
@@ -100,7 +101,7 @@ gst_h265_parse_class_init (GstH265ParseClass * klass)
GstBaseParseClass *parse_class = GST_BASE_PARSE_CLASS (klass);
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
- GST_DEBUG_CATEGORY_INIT (h265_parse_debug, "h265parse", 0, "h265 parser");
+ GST_DEBUG_CATEGORY_INIT (h265_parse_debug, "vaapiparse_h265", 0, "h265 parser");
gobject_class->finalize = gst_h265_parse_finalize;
gobject_class->set_property = gst_h265_parse_set_property;
--
2.5.1

View file

@ -1,48 +0,0 @@
From aaf9569d096392d73f45bcf9973d58b90a7ecd27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
<victorx.jaquez@intel.com>
Date: Mon, 14 Sep 2015 19:11:59 +0200
Subject: [PATCH 6/6] h265parse: fix build with GStreamer < 1.5
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
---
gst/vaapi/gsth265parse.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gst/vaapi/gsth265parse.c b/gst/vaapi/gsth265parse.c
index 5f65ab6..35b0812 100644
--- a/gst/vaapi/gsth265parse.c
+++ b/gst/vaapi/gsth265parse.c
@@ -141,8 +141,12 @@ gst_h265_parse_init (GstH265Parse * h265parse)
{
h265parse->frame_out = gst_adapter_new ();
gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (h265parse), FALSE);
+#if GST_CHECK_VERSION(1,3,0)
GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h265parse));
+#endif
+#if GST_CHECK_VERSION(1,5,0)
GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (h265parse));
+#endif
}
@@ -1774,8 +1778,14 @@ gst_h265_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
GST_TAG_VIDEO_CODEC, caps);
gst_caps_unref (caps);
+#if GST_CHECK_VERSION(1,5,0)
gst_base_parse_merge_tags (parse, taglist, GST_TAG_MERGE_REPLACE);
gst_tag_list_unref (taglist);
+#else
+ gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (h265parse),
+ gst_event_new_tag (taglist));
+#endif
+
/* also signals the end of first-frame processing */
h265parse->sent_codec_tag = TRUE;
--
2.5.1

View file

@ -1,9 +0,0 @@
include series.frag
EXTRA_DIST = \
series.frag \
$(videoparsers_patches_base) \
$(videoparsers_patches_1_4p) \
$(NULL)
-include $(top_srcdir)/git.mk

View file

@ -1,14 +0,0 @@
# sources.frag - Generated list of patches for videoparsers (-*- makefile -*-)
videoparsers_patches_base = \
0001-plugins-compile-the-built-in-video-parsers-as-vaapip.patch \
0002-h264parse-fix-build-with-older-GStreamer-1.x-stacks.patch \
0003-h264parse-default-to-byte-stream-nalu-format-Annex-B.patch \
0004-h264parse-Disable-3D-video-support-for-GStreamer-1.5.patch \
0005-videoparsers-h264-Disable-passthorugh-mode-enabling.patch \
$(NULL)
videoparsers_patches_1_4p = \
0006-h265parse-include-gstvaapiparse.h.patch \
0007-h265parse-fix-build-with-GStreamer-1.5.patch \
$(NULL)