This commit is contained in:
Peter Robinson 2018-04-29 18:13:16 +01:00
parent 6ee0030a74
commit d27c27d8fd
3 changed files with 7 additions and 80 deletions

View File

@ -1,70 +0,0 @@
From bc7e9742e04a6f96c9a77ba5397c3571b85a5e97 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 2 Nov 2017 20:56:10 +0100
Subject: [PATCH] libv4lconvert: We support more then 32 bit src fmts now, so
use 64 bit bitmasks
We support more then 32 bit src fmts now, so we can no longer re-use
struct v4l2_frmsizeenum.pixel_format to store a bitmask of all the
supported src-formats for a given frame-size.
This fixes a subtile bug where we would try to use SE401 as src fmt
instead of YUYV under certain circumstances.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1508706
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
lib/libv4lconvert/libv4lconvert-priv.h | 2 ++
lib/libv4lconvert/libv4lconvert.c | 9 ++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/libv4lconvert/libv4lconvert-priv.h b/lib/libv4lconvert/libv4lconvert-priv.h
index b77e3d34..b28f934c 100644
--- a/lib/libv4lconvert/libv4lconvert-priv.h
+++ b/lib/libv4lconvert/libv4lconvert-priv.h
@@ -66,6 +66,8 @@ struct v4lconvert_data {
int cinfo_initialized;
#endif // HAVE_JPEG
struct v4l2_frmsizeenum framesizes[V4LCONVERT_MAX_FRAMESIZES];
+ /* Bitmask of all supported src_formats which can do for a size */
+ int64_t framesize_supported_src_formats[V4LCONVERT_MAX_FRAMESIZES];
unsigned int no_framesizes;
int bandwidth;
int fps;
diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c
index f62aea1d..8bf3fab0 100644
--- a/lib/libv4lconvert/libv4lconvert.c
+++ b/lib/libv4lconvert/libv4lconvert.c
@@ -413,7 +413,8 @@ static int v4lconvert_do_try_format_uvc(struct v4lconvert_data *data,
for (i = 0; i < ARRAY_SIZE(supported_src_pixfmts); i++) {
/* is this format supported? */
- if (!(data->framesizes[best_framesize].pixel_format & (1 << i)))
+ if (!(data->framesize_supported_src_formats[best_framesize] &
+ (1ULL << i)))
continue;
/* Note the hardcoded use of discrete is based on this function
@@ -1520,9 +1521,7 @@ static void v4lconvert_get_framesizes(struct v4lconvert_data *data,
return;
}
data->framesizes[data->no_framesizes].type = frmsize.type;
- /* We use the pixel_format member to store a bitmask of all
- supported src_formats which can do this size */
- data->framesizes[data->no_framesizes].pixel_format = 1 << index;
+ data->framesize_supported_src_formats[data->no_framesizes] = 1ULL << index;
switch (frmsize.type) {
case V4L2_FRMSIZE_TYPE_DISCRETE:
@@ -1535,7 +1534,7 @@ static void v4lconvert_get_framesizes(struct v4lconvert_data *data,
}
data->no_framesizes++;
} else {
- data->framesizes[j].pixel_format |= 1 << index;
+ data->framesize_supported_src_formats[j] |= 1ULL << index;
}
}
}
--
2.14.3

View File

@ -1 +1 @@
SHA512 (v4l-utils-1.12.5.tar.bz2) = ed2e7545a728360b9684db68330885b498a3a5611f49b80e54da72109d9ba2aa75e85f89f085ff0a6f077b17c880101fa5b78c9dff8a0df2eac1866bd80a04ea
SHA512 (v4l-utils-1.14.2.tar.bz2) = 5c469479deb7065768e0254d1c80d9096caf05e445ceeabc7649f7158f02fb2d11ff2ad8c82debc1dbe6bbd7776cc5aa2febb52d5da0328d2b60b54af67c7a27

View File

@ -1,14 +1,12 @@
Name: v4l-utils
Version: 1.12.5
Release: 7%{?dist}
Version: 1.14.2
Release: 1%{?dist}
Summary: Utilities for video4linux and DVB devices
Group: Applications/System
# libdvbv5, dvbv5 utils, ir-keytable and v4l2-sysfs-path are GPLv2 only
License: GPLv2+ and GPLv2
URL: http://www.linuxtv.org/downloads/v4l-utils/
Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar.bz2
# rhbz1508706
Patch1: 0001-libv4lconvert-We-support-more-then-32-bit-src-fmts-n.patch
BuildRequires: alsa-lib-devel
BuildRequires: desktop-file-utils
@ -50,7 +48,6 @@ QT v4l2 test control and streaming test application.
%package -n libv4l
Summary: Collection of video4linux support libraries
Group: System Environment/Libraries
# Some of the decompression helpers are GPLv2, the rest is LGPLv2+
License: LGPLv2+ and GPLv2
URL: http://hansdegoede.livejournal.com/3636.html
@ -75,7 +72,6 @@ application transparent libv4lconvert conversion where necessary.
%package -n libdvbv5
Summary: Libraries to control, scan and zap on Digital TV channels
Group: Development/Libraries
License: GPLv2
%description -n libdvbv5
@ -83,7 +79,6 @@ Libraries to control, scan and zap on Digital TV channels
%package -n libv4l-devel
Summary: Development files for libv4l
Group: Development/Libraries
License: LGPLv2+
URL: http://hansdegoede.livejournal.com/3636.html
Requires: libv4l%{?_isa} = %{version}-%{release}
@ -95,7 +90,6 @@ developing applications that use libv4l.
%package -n libdvbv5-devel
Summary: Development files for libdvbv5
Group: Development/Libraries
License: GPLv2
Requires: libdvbv5%{?_isa} = %{version}-%{release}
@ -197,6 +191,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop
%changelog
* Sun Apr 29 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.14.2-1
- New upstream release 1.14.2
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild