Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gstreamer-plugins-bad for 
openSUSE:Factory checked in at 2022-09-07 11:05:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gstreamer-plugins-bad (Old)
 and      /work/SRC/openSUSE:Factory/.gstreamer-plugins-bad.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gstreamer-plugins-bad"

Wed Sep  7 11:05:15 2022 rev:131 rq:1000968 version:1.20.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/gstreamer-plugins-bad/gstreamer-plugins-bad.changes  
    2022-06-24 08:44:55.575113349 +0200
+++ 
/work/SRC/openSUSE:Factory/.gstreamer-plugins-bad.new.2083/gstreamer-plugins-bad.changes
    2022-09-07 11:05:16.440290216 +0200
@@ -1,0 +2,14 @@
+Mon Aug 29 10:48:21 UTC 2022 - Bj??rn Lie <bjorn....@gmail.com>
+
+- Build microdns support. Following this add pkgconfig(microdns)
+  BuildRequires and pass microdns=enabled to meson.
+
+-------------------------------------------------------------------
+Thu Aug 25 20:05:26 UTC 2022 - Bj??rn Lie <bjorn....@gmail.com>
+
+- Add va-allocator-fix.patch: va: allocator: Fix translation of
+  VADRMPRIMESurfaceDescriptor + va: allocator: Use always lseek to
+  get dmabuf size.
+  https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2657
+
+-------------------------------------------------------------------

New:
----
  va-allocator-fix.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gstreamer-plugins-bad.spec ++++++
--- /var/tmp/diff_new_pack.Rbbehp/_old  2022-09-07 11:05:17.196292138 +0200
+++ /var/tmp/diff_new_pack.Rbbehp/_new  2022-09-07 11:05:17.200292149 +0200
@@ -74,6 +74,8 @@
 Patch0:         fix-build-with-srt-1.3.4.patch
 # PATCH-FIX-OPENSUSE spandsp3.patch jeng...@inai.de -- Fix build against 
spandsp 3.x. Patch is not upstreamable in this form
 Patch2:         spandsp3.patch
+# PATCH-FIX-UPSTREAM va-allocator-fix.patch -- Fix translation of 
VADRMPRIMESurfaceDescriptor + Use always lseek to get dmabuf size
+Patch3:         va-allocator-fix.patch
 
 %if %{with fdk_aac}
 BuildRequires:  pkgconfig(fdk-aac) >= 0.1.4
@@ -144,6 +146,7 @@
 BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(lilv-0) >= 0.16
 BuildRequires:  pkgconfig(lrdf)
+BuildRequires:  pkgconfig(microdns)
 BuildRequires:  pkgconfig(mjpegtools)
 BuildRequires:  pkgconfig(neon)
 BuildRequires:  pkgconfig(nice) >= 0.1.14
@@ -649,6 +652,7 @@
 %if %{pkg_vcmp spandsp-devel >= 3}
 %patch2 -p1
 %endif
+%patch3 -p1
 
 %build
 %global optflags %{optflags} -fcommon
@@ -709,7 +713,7 @@
        -Diqa=disabled \
        -Dkate=disabled \
        -Dmagicleap=disabled \
-       -Dmicrodns=disabled \
+       -Dmicrodns=enabled \
        -Dopencv=disabled \
        -Dopenni2=disabled \
        -Dopensles=disabled \
@@ -834,6 +838,7 @@
 %{_libdir}/gstreamer-%{gst_branch}/libgstjpegformat.so
 %{_libdir}/gstreamer-%{gst_branch}/libgstkms.so
 %{_libdir}/gstreamer-%{gst_branch}/libgstladspa.so
+%{_libdir}/gstreamer-%{gst_branch}/libgstmicrodns.so
 %{_libdir}/gstreamer-%{gst_branch}/libgstmidi.so
 %{_libdir}/gstreamer-%{gst_branch}/libgstmpeg2enc.so
 %{_libdir}/gstreamer-%{gst_branch}/libgstmpegpsdemux.so

++++++ va-allocator-fix.patch ++++++
>From 9bcacb5ba47ba0632a6cc1b50de4f2bbb0ee7319 Mon Sep 17 00:00:00 2001
From: Nicolas Dufresne <nicolas.dufre...@collabora.com>
Date: Wed, 8 Jun 2022 09:02:52 -0400
Subject: [PATCH 1/2] va: allocator: Fix translation of
 VADRMPRIMESurfaceDescriptor

VADRMPRIMESurfaceDescriptor structure describes the offsets from the
point of view of the specific handle (DMABuf). While GstVideoInfo
(and the meta) describes offsets from the point of the view of the
GstBuffer, an aggregate of all the GstMemory (1 per handle).

This changes combined with [Mesa 
Fix](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813)
fixes decoding failure with AMD driver.

Fixes #1223

Part-of: 
<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2657>
---
 subprojects/gst-plugins-bad/sys/va/gstvaallocator.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Index: gst-plugins-bad-1.20.3/sys/va/gstvaallocator.c
===================================================================
--- gst-plugins-bad-1.20.3.orig/sys/va/gstvaallocator.c
+++ gst-plugins-bad-1.20.3/sys/va/gstvaallocator.c
@@ -513,6 +513,7 @@ gst_va_dmabuf_allocator_setup_buffer_ful
   VASurfaceID surface;
   guint32 i, fourcc, rt_format, export_flags;
   GDestroyNotify buffer_destroy = NULL;
+  gsize object_offset[4];
 
   g_return_val_if_fail (GST_IS_VA_DMABUF_ALLOCATOR (allocator), FALSE);
 
@@ -588,11 +589,19 @@ gst_va_dmabuf_allocator_setup_buffer_ful
 
   for (i = 0; i < desc.num_objects; i++) {
     gint fd = desc.objects[i].fd;
-    gsize size = desc.objects[i].size > 0 ?
-        desc.objects[i].size : _get_fd_size (fd);
+    /* don't rely on prime descriptor reported size since gallium drivers 
report
+     * different values */
+    gsize size = _get_fd_size (fd);
     GstMemory *mem = gst_dmabuf_allocator_alloc (allocator, fd, size);
     guint64 *drm_mod = g_new (guint64, 1);
 
+    if (size != desc.objects[i].size) {
+      GST_WARNING_OBJECT (self, "driver bug: fd size (%" G_GSIZE_FORMAT
+          ") differs from object descriptor size (%" G_GUINT32_FORMAT ")",
+          size, desc.objects[i].size);
+    }
+
+    object_offset[i] = gst_buffer_get_size (buffer);
     gst_buffer_append_memory (buffer, mem);
     buf->mems[i] = mem;
 
@@ -615,18 +624,22 @@ gst_va_dmabuf_allocator_setup_buffer_ful
         drm_mod, g_free);
 
     if (G_UNLIKELY (info))
-      GST_VIDEO_INFO_SIZE (info) += size;
+      GST_VIDEO_INFO_PLANE_OFFSET (info, i) = GST_VIDEO_INFO_SIZE (info);
 
     GST_LOG_OBJECT (self, "buffer %p: new dmabuf %d / surface %#x [%dx%d] "
         "size %" G_GSIZE_FORMAT " drm mod %#lx", buffer, fd, surface,
         GST_VIDEO_INFO_WIDTH (&self->info), GST_VIDEO_INFO_HEIGHT 
(&self->info),
-        GST_VIDEO_INFO_SIZE (&self->info), *drm_mod);
+        size, *drm_mod);
   }
 
   if (G_UNLIKELY (info)) {
+    GST_VIDEO_INFO_SIZE (info) = gst_buffer_get_size (buffer);
+
     for (i = 0; i < desc.num_layers; i++) {
       g_assert (desc.layers[i].num_planes == 1);
-      GST_VIDEO_INFO_PLANE_OFFSET (info, i) = desc.layers[i].offset[0];
+      GST_VIDEO_INFO_PLANE_OFFSET (info, i) =
+          object_offset[desc.layers[i].object_index[0]] +
+          desc.layers[i].offset[0];
       GST_VIDEO_INFO_PLANE_STRIDE (info, i) = desc.layers[i].pitch[0];
     }
   } else {

Reply via email to