Update to 1.15.1

This commit is contained in:
Wim Taymans 2019-01-25 19:23:12 +01:00
parent 1e63196084
commit 39b7c14e67
4 changed files with 13 additions and 94 deletions

1
.gitignore vendored
View File

@ -61,3 +61,4 @@
/gst-plugins-base-1.14.2.tar.xz
/gst-plugins-base-1.14.3.tar.xz
/gst-plugins-base-1.14.4.tar.xz
/gst-plugins-base-1.15.1.tar.xz

View File

@ -1,88 +0,0 @@
From 1f4783ad00dd3a511efb3c3c0aadde7dc728d8aa Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Fri, 11 Jan 2019 16:37:40 +0100
Subject: [PATCH] video-converter: fix number of allocated lines
We make an allocator for temporary lines and then use this for all
the steps in the conversion that can do in-place processing.
Keep track of the number of lines each step needs and use this to
allocate the right number of lines.
Previously we would not always allocate enough lines and we would
end up with conversion errors as lines would be reused prematurely.
Fixes #350
---
gst-libs/gst/video/video-converter.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c
index 4faf75078..5935f126c 100644
--- a/gst-libs/gst/video/video-converter.c
+++ b/gst-libs/gst/video/video-converter.c
@@ -2070,20 +2070,18 @@ chain_pack (GstVideoConverter * convert, GstLineCache * prev, gint idx)
static void
setup_allocators (GstVideoConverter * convert)
{
- GstLineCache *cache;
+ GstLineCache *cache, *prev;
GstLineCacheAllocLineFunc alloc_line;
gboolean alloc_writable;
gpointer user_data;
GDestroyNotify notify;
- gint width, n_lines;
+ gint width;
gint i;
width = MAX (convert->in_maxwidth, convert->out_maxwidth);
width += convert->out_x;
for (i = 0; i < convert->conversion_runner->n_threads; i++) {
- n_lines = 1;
-
/* start with using dest lines if we can directly write into it */
if (convert->identity_pack) {
alloc_line = get_dest_line;
@@ -2101,12 +2099,24 @@ setup_allocators (GstVideoConverter * convert)
alloc_writable = convert->borderline != NULL;
}
+ /* First step, try to calculate how many temp lines we need. Go backwards,
+ * keep track of the maximum number of lines we need for each intermediate
+ * step. */
+ for (prev = cache = convert->pack_lines[i]; cache; cache = cache->prev) {
+ GST_DEBUG ("looking at cache %p, %d lines, %d backlog", cache,
+ cache->n_lines, cache->backlog);
+ prev->n_lines = MAX (prev->n_lines, cache->n_lines);
+ if (!cache->pass_alloc) {
+ GST_DEBUG ("cache %p, needs %d lines", prev, prev->n_lines);
+ prev = cache;
+ }
+ }
+
/* now walk backwards, we try to write into the dest lines directly
* and keep track if the source needs to be writable */
for (cache = convert->pack_lines[i]; cache; cache = cache->prev) {
gst_line_cache_set_alloc_line_func (cache, alloc_line, user_data, notify);
cache->alloc_writable = alloc_writable;
- n_lines = MAX (n_lines, cache->n_lines);
/* make sure only one cache frees the allocator */
notify = NULL;
@@ -2115,11 +2125,10 @@ setup_allocators (GstVideoConverter * convert)
/* can't pass allocator, make new temp line allocator */
user_data =
converter_alloc_new (sizeof (guint16) * width * 4,
- n_lines + cache->backlog, convert, NULL);
+ cache->n_lines + cache->backlog, convert, NULL);
notify = (GDestroyNotify) converter_alloc_free;
alloc_line = get_temp_line;
alloc_writable = FALSE;
- n_lines = cache->n_lines;
}
/* if someone writes to the input, we need a writable line from the
* previous cache */
--
2.19.2

View File

@ -5,8 +5,8 @@
#global shortcommit %(c=%{gitcommit}; echo ${c:0:5})
Name: gstreamer1-plugins-base
Version: 1.14.4
Release: 2%{?gitcommit:.git%{shortcommit}}%{?dist}
Version: 1.15.1
Release: 1%{?gitcommit:.git%{shortcommit}}%{?dist}
Summary: GStreamer streaming media framework base plugins
License: LGPLv2+
@ -19,8 +19,6 @@ Source0: gst-plugins-base-%{version}.tar.xz
Source0: http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-%{version}.tar.xz
%endif
Patch0: 0001-missing-plugins-Remove-the-mpegaudioversion-field.patch
# https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/350#note_102166
Patch1: 0001-video-converter-fix-number-of-allocated-lines.patch
BuildRequires: gcc-c++
BuildRequires: gstreamer1-devel >= %{version}
@ -107,7 +105,6 @@ for the GStreamer Base Plugins library.
%prep
%setup -q -n gst-plugins-base-%{version}
%patch0 -p1
%patch1 -p1
%build
# die rpath (method of modifying libtool fails here)
@ -252,8 +249,10 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-play-1.0
%{_libdir}/gstreamer-%{majorminor}/libgstaudiorate.so
%{_libdir}/gstreamer-%{majorminor}/libgstaudioresample.so
%{_libdir}/gstreamer-%{majorminor}/libgstaudiotestsrc.so
%{_libdir}/gstreamer-%{majorminor}/libgstcompositor.so
%{_libdir}/gstreamer-%{majorminor}/libgstencoding.so
%{_libdir}/gstreamer-%{majorminor}/libgstgio.so
%{_libdir}/gstreamer-%{majorminor}/libgstoverlaycomposition.so
%{_libdir}/gstreamer-%{majorminor}/libgstplayback.so
%{_libdir}/gstreamer-%{majorminor}/libgstpbtypes.so
%{_libdir}/gstreamer-%{majorminor}/libgstrawparse.so
@ -303,6 +302,7 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-play-1.0
%{_includedir}/gstreamer-%{majorminor}/gst/app/gstappsink.h
%{_includedir}/gstreamer-%{majorminor}/gst/app/gstappsrc.h
%dir %{_includedir}/gstreamer-%{majorminor}/gst/audio
%{_includedir}/gstreamer-%{majorminor}/gst/audio/audio-buffer.h
%{_includedir}/gstreamer-%{majorminor}/gst/audio/audio-channels.h
%{_includedir}/gstreamer-%{majorminor}/gst/audio/audio-channel-mixer.h
%{_includedir}/gstreamer-%{majorminor}/gst/audio/audio-converter.h
@ -366,6 +366,7 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-play-1.0
%{_includedir}/gstreamer-%{majorminor}/gst/rtp/gstrtpdefs.h
%{_includedir}/gstreamer-%{majorminor}/gst/rtp/gstrtp-enumtypes.h
%{_includedir}/gstreamer-%{majorminor}/gst/rtp/gstrtphdrext.h
%{_includedir}/gstreamer-%{majorminor}/gst/rtp/gstrtpmeta.h
%{_includedir}/gstreamer-%{majorminor}/gst/rtp/gstrtppayloads.h
%{_includedir}/gstreamer-%{majorminor}/gst/rtp/rtp.h
%{_includedir}/gstreamer-%{majorminor}/gst/rtp/rtp-prelude.h
@ -398,6 +399,7 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-play-1.0
%{_includedir}/gstreamer-%{majorminor}/gst/video/colorbalance.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/colorbalancechannel.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/gstvideoaffinetransformationmeta.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/gstvideoaggregator.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/gstvideodecoder.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/gstvideoencoder.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/gstvideofilter.h
@ -407,6 +409,7 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-play-1.0
%{_includedir}/gstreamer-%{majorminor}/gst/video/gstvideotimecode.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/gstvideoutils.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/navigation.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/video-anc.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/video-blend.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/video-overlay-composition.h
%{_includedir}/gstreamer-%{majorminor}/gst/video/video-chroma.h
@ -465,6 +468,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-play-1.0
%changelog
* Fri Jan 25 2019 Wim Taymans <wtaymans@redhat.com> - 1.15.1-1
- Update to 1.15.1
* Fri Jan 11 2019 Bastien Nocera <bnocera@redhat.com> - 1.14.4-2
+ gstreamer1-plugins-base-1.14.4-2
- Fix thumbnail colours for 10-bit MPEG-4 files

View File

@ -1 +1 @@
SHA512 (gst-plugins-base-1.14.4.tar.xz) = 42c59df9f2d848108f12afa0466acbcfa5ccda64e4d0d44608d4268abed20f2e036713de04e7d71feaed1868ad742c5bcb55ae0eef5dec8e19e053dc8541b8af
SHA512 (gst-plugins-base-1.15.1.tar.xz) = eabcd34ff0d03cb69dad09993fdb55ac841f591f9f0c6b0ae4c97c08fb67a8745b3450ac455fe8bb74795ca4805e1aff88487125eef21b5357ba8c1f1dd12bc2