Add upstream patches
This commit is contained in:
parent
7427329288
commit
dd9d939201
188
0004-Add-new-frame-and-field-mode-chroma-types.-Add-VdpDe.patch
Normal file
188
0004-Add-new-frame-and-field-mode-chroma-types.-Add-VdpDe.patch
Normal file
@ -0,0 +1,188 @@
|
||||
From 53eeb07f68d483fee86ad872884aee890d5aa393 Mon Sep 17 00:00:00 2001
|
||||
From: ManojGuptaBonda <mbonda@nvidia.com>
|
||||
Date: Tue, 20 Nov 2018 13:29:37 +0530
|
||||
Subject: [PATCH 4/5] Add new frame and field mode chroma types. Add
|
||||
VdpDecoderQueryProfileCapability API
|
||||
|
||||
Chroma types :
|
||||
VDP_CHROMA_TYPE_420
|
||||
VDP_CHROMA_TYPE_422
|
||||
VDP_CHROMA_TYPE_444
|
||||
|
||||
already exist, surfaces of these types could be transparently used with
|
||||
any VdpVideoDecoder. The implementation is free to internally convert
|
||||
the surface between frame/field(NV12/NV24) as required by
|
||||
VdpVideoDecoder operation. The interop API would allow registration of
|
||||
these surfaces for either field or frame based interop.
|
||||
|
||||
This change adds new enums for frame and field chroma types:
|
||||
VDP_CHROMA_TYPE_420_FIELD
|
||||
VDP_CHROMA_TYPE_422_FIELD
|
||||
VDP_CHROMA_TYPE_444_FIELD
|
||||
VDP_CHROMA_TYPE_420_FRAME
|
||||
VDP_CHROMA_TYPE_422_FRAME
|
||||
VDP_CHROMA_TYPE_444_FRAME
|
||||
|
||||
So that frame/field based video surfaces can be created and exposed via
|
||||
VDPAU OpenGL interop.
|
||||
|
||||
The new chroma types could only be used by a VdpVideoDecoder that
|
||||
supports output to field/frame surfaces respectively. Internal surface
|
||||
convertion is not allowed. The interop API would allow registration
|
||||
of these surfaces to field/frame based interop only. This will avoid
|
||||
implicit conversions and allocation of shadow surface.
|
||||
|
||||
Existing VdpDecoderQueryCapabilities() returns maxlevel, maxwidth,
|
||||
height and macro blocks for a given decoder profile. Since it is not
|
||||
possible to extend this API to return more capabilities, adding new API
|
||||
VdpDecoderQueryProfileCapability(). In this change, new API will be able
|
||||
to return supported picture structure along with other existing
|
||||
capabilities.
|
||||
|
||||
VdpDecoderQueryProfileCapability() can be extended in future to query
|
||||
newer capabilities exposed. VdpDecoderCapabilities defines the
|
||||
capabilities that can be queried.
|
||||
|
||||
This function returns queried capability of the requested profile on the
|
||||
underlying h/w. By design, only one capability can be queried at a time.
|
||||
|
||||
Signed-off-by: Manoj Bonda <mbonda@nvidia.com>
|
||||
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
|
||||
---
|
||||
include/vdpau/vdpau.h | 95 +++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 91 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/include/vdpau/vdpau.h b/include/vdpau/vdpau.h
|
||||
index 0bc5b60..a851ee8 100644
|
||||
--- a/include/vdpau/vdpau.h
|
||||
+++ b/include/vdpau/vdpau.h
|
||||
@@ -838,13 +838,66 @@ typedef int VdpBool;
|
||||
*/
|
||||
typedef uint32_t VdpChromaType;
|
||||
|
||||
-/** \hideinitializer \brief 4:2:0 chroma format. */
|
||||
+/** \hideinitializer \brief 4:2:0 chroma format. Undefined field/frame based
|
||||
+ * Video surfaces allocated with this chroma type have undefined
|
||||
+ * field/frame structure. The implementation is free to internally morph
|
||||
+ * the surface between frame/field(NV12/NV24) as required by
|
||||
+ * VdpVideoDecoder operation. Interop with OpenGL allows registration
|
||||
+ * of these surfaces for either field- or frame-based interop. But, an implicit
|
||||
+ * field/frame structure conversion may be performed.
|
||||
+ */
|
||||
#define VDP_CHROMA_TYPE_420 ((VdpChromaType)0)
|
||||
-/** \hideinitializer \brief 4:2:2 chroma format. */
|
||||
+/** \hideinitializer \brief 4:2:2 chroma format. Undefined field/frame based
|
||||
+ * Video surfaces allocated with this chroma type have undefined
|
||||
+ * field/frame structure. The implementation is free to internally morph
|
||||
+ * the surface between frame/field(NV12/NV24) as required by
|
||||
+ * VdpVideoDecoder operation. Interop with OpenGL allows registration
|
||||
+ * of these surfaces for either field- or frame-based interop. But, an implicit
|
||||
+ * field/frame structure conversion may be performed.
|
||||
+ */
|
||||
#define VDP_CHROMA_TYPE_422 ((VdpChromaType)1)
|
||||
-/** \hideinitializer \brief 4:4:4 chroma format. */
|
||||
+/** \hideinitializer \brief 4:4:4 chroma format. Undefined field/frame based
|
||||
+ * Video surfaces allocated with this chroma type have undefined
|
||||
+ * field/frame structure. The implementation is free to internally morph
|
||||
+ * the surface between frame/field(NV12/NV24) as required by
|
||||
+ * VdpVideoDecoder operation. Interop with OpenGL allows registration
|
||||
+ * of these surfaces for either field- or frame-based interop. But, an implicit
|
||||
+ * field/frame structure conversion may be performed.
|
||||
+ */
|
||||
#define VDP_CHROMA_TYPE_444 ((VdpChromaType)2)
|
||||
|
||||
+/** \hideinitializer \brief 4:2:0 chroma format. Field based.
|
||||
+ * Video surfaces allocated with this chroma type can only be
|
||||
+ * interoped with OpenGL if the matching field/frame structure is
|
||||
+ * specified in the OpenGL API */
|
||||
+#define VDP_CHROMA_TYPE_420_FIELD ((VdpChromaType)3)
|
||||
+/** \hideinitializer \brief 4:2:2 chroma format. Field based.
|
||||
+ * Video surfaces allocated with this chroma type can only be
|
||||
+ * interoped with OpenGL if the matching field/frame structure is
|
||||
+ * specified in the OpenGL API */
|
||||
+#define VDP_CHROMA_TYPE_422_FIELD ((VdpChromaType)4)
|
||||
+/** \hideinitializer \brief 4:4:4 chroma format. Field based.
|
||||
+ * Video surfaces allocated with this chroma type can only be
|
||||
+ * interoped with OpenGL if the matching field/frame structure is
|
||||
+ * specified in the OpenGL API */
|
||||
+#define VDP_CHROMA_TYPE_444_FIELD ((VdpChromaType)5)
|
||||
+
|
||||
+/** \hideinitializer \brief 4:2:0 chroma format. Frame based.
|
||||
+ * Video surfaces allocated with this chroma type can only be
|
||||
+ * interoped with OpenGL if the matching field/frame structure is
|
||||
+ * specified in the OpenGL API */
|
||||
+#define VDP_CHROMA_TYPE_420_FRAME ((VdpChromaType)6)
|
||||
+/** \hideinitializer \brief 4:2:2 chroma format. Frame based.
|
||||
+ * Video surfaces allocated with this chroma type can only be
|
||||
+ * interoped with OpenGL if the matching field/frame structure is
|
||||
+ * specified in the OpenGL API */
|
||||
+#define VDP_CHROMA_TYPE_422_FRAME ((VdpChromaType)7)
|
||||
+/** \hideinitializer \brief 4:4:4 chroma format. Frame based.
|
||||
+ * Video surfaces allocated with this chroma type can only be
|
||||
+ * interoped with OpenGL if the matching field/frame structure is
|
||||
+ * specified in the OpenGL API */
|
||||
+#define VDP_CHROMA_TYPE_444_FRAME ((VdpChromaType)8)
|
||||
+
|
||||
/**
|
||||
* \brief The set of all known YCbCr surface formats.
|
||||
*/
|
||||
@@ -2620,6 +2673,38 @@ typedef uint32_t VdpDecoderProfile;
|
||||
/** \hideinitializer */
|
||||
#define VDP_DECODER_LEVEL_HEVC_6_2 186
|
||||
|
||||
+typedef enum {
|
||||
+ VDP_VIDEO_SURFACE_FIELD_STRUCTURE = (1 << 0),
|
||||
+ VDP_VIDEO_SURFACE_FRAME_STRUCTURE = (1 << 1)
|
||||
+} VdpVideoSurfaceSupportedPictureStructure;
|
||||
+
|
||||
+typedef enum {
|
||||
+ VDP_DECODER_PROFILE_MAX_LEVEL = 0,
|
||||
+ VDP_DECODER_PROFILE_MAX_MACROBLOCKS = 1,
|
||||
+ VDP_DECODER_PROFILE_MAX_WIDTH = 2,
|
||||
+ VDP_DECODER_PROFILE_MAX_HEIGHT = 3,
|
||||
+ VDP_DECODER_PROFILE_SUPPORTED_PICTURE_STRUCTURE = 4
|
||||
+} VdpDecoderCapability;
|
||||
+
|
||||
+/**
|
||||
+ * \brief Query the supported value of the requested capability, for
|
||||
+ * the specified profile on the specified device.
|
||||
+ * \param[in] device The device to query.
|
||||
+ * \param[in] profile The decoder profile for which information is requested.
|
||||
+ * \param[in] capability The decoder profile capability for which the value
|
||||
+ * is requested.
|
||||
+ * \param[out] capability_value The value of the requested capability.
|
||||
+ * \return VdpStatus The completion status of the operation.
|
||||
+ */
|
||||
+
|
||||
+typedef VdpStatus VdpDecoderQueryProfileCapability(
|
||||
+ VdpDevice device,
|
||||
+ VdpDecoderProfile profile,
|
||||
+ /* output parameters follow */
|
||||
+ VdpDecoderCapability capability,
|
||||
+ void * capability_value
|
||||
+);
|
||||
+
|
||||
/**
|
||||
* \brief Query the implementation's VdpDecoder capabilities.
|
||||
* \param[in] device The device to query.
|
||||
@@ -4344,7 +4429,7 @@ typedef VdpStatus VdpPresentationQueueBlockUntilSurfaceIdle(
|
||||
* \brief The status of a surface within a presentation queue.
|
||||
*/
|
||||
typedef enum {
|
||||
- /** The surface is not queued or currently visible. */
|
||||
+ /** The surface is no queued or currently visible. */
|
||||
VDP_PRESENTATION_QUEUE_STATUS_IDLE,
|
||||
/** The surface is in the queue, and not currently visible. */
|
||||
VDP_PRESENTATION_QUEUE_STATUS_QUEUED,
|
||||
@@ -4587,6 +4672,8 @@ typedef uint32_t VdpFuncId;
|
||||
#define VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS ((VdpFuncId)65)
|
||||
/** \hideinitializer */
|
||||
#define VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER ((VdpFuncId)66)
|
||||
+/** \hideinitializer */
|
||||
+#define VDP_FUNC_ID_DECODER_QUERY_CAPABILITY ((VdpFuncId)67)
|
||||
|
||||
#define VDP_FUNC_ID_BASE_WINSYS 0x1000
|
||||
|
||||
--
|
||||
2.17.2
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
From 52a6ea26bae0c4b2c5bace65dd7cc09c8e677bda Mon Sep 17 00:00:00 2001
|
||||
From: Aaron Plattner <aplattner@nvidia.com>
|
||||
Date: Tue, 20 Nov 2018 11:10:36 -0800
|
||||
Subject: [PATCH 5/5] Fix typos from commit
|
||||
53eeb07f68d483fee86ad872884aee890d5aa393
|
||||
|
||||
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
|
||||
---
|
||||
include/vdpau/vdpau.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/vdpau/vdpau.h b/include/vdpau/vdpau.h
|
||||
index a851ee8..17695a9 100644
|
||||
--- a/include/vdpau/vdpau.h
|
||||
+++ b/include/vdpau/vdpau.h
|
||||
@@ -2701,7 +2701,7 @@ typedef VdpStatus VdpDecoderQueryProfileCapability(
|
||||
VdpDevice device,
|
||||
VdpDecoderProfile profile,
|
||||
/* output parameters follow */
|
||||
- VdpDecoderCapability capability,
|
||||
+ VdpDecoderCapability capability,
|
||||
void * capability_value
|
||||
);
|
||||
|
||||
@@ -4429,7 +4429,7 @@ typedef VdpStatus VdpPresentationQueueBlockUntilSurfaceIdle(
|
||||
* \brief The status of a surface within a presentation queue.
|
||||
*/
|
||||
typedef enum {
|
||||
- /** The surface is no queued or currently visible. */
|
||||
+ /** The surface is not queued or currently visible. */
|
||||
VDP_PRESENTATION_QUEUE_STATUS_IDLE,
|
||||
/** The surface is in the queue, and not currently visible. */
|
||||
VDP_PRESENTATION_QUEUE_STATUS_QUEUED,
|
||||
--
|
||||
2.17.2
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
Name: libvdpau
|
||||
Version: 1.1.1
|
||||
Release: 10%{?dist}
|
||||
Release: 11%{?dist}
|
||||
Summary: Wrapper library for the Video Decode and Presentation API
|
||||
License: MIT
|
||||
URL: http://freedesktop.org/wiki/Software/VDPAU
|
||||
Source0: http://cgit.freedesktop.org/vdpau/libvdpau/snapshot/%{name}-%{version}.tar.bz2
|
||||
URL: https://freedesktop.org/wiki/Software/VDPAU/
|
||||
Source0: https://gitlab.freedesktop.org/vdpau/libvdpau/uploads/5635163f040f2eea59b66d0181cf664b/libvdpau-%{version}.tar.bz2
|
||||
Patch0: 0001-mesa_dri2-Add-missing-include-of-config.h-to-define-.patch
|
||||
Patch1: 0002-util.h-Make-getenv_wrapper-static-inline.patch
|
||||
Patch2: 0003-Fix-doc-error-on-displayable-surface-types.patch
|
||||
Patch3: 0004-Add-new-frame-and-field-mode-chroma-types.-Add-VdpDe.patch
|
||||
Patch4: 0005-Fix-typos-from-commit-53eeb07f68d483fee86ad872884aee.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -65,6 +67,8 @@ applications that use %{name}.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
autoreconf -vif
|
||||
@ -72,7 +76,7 @@ autoreconf -vif
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install INSTALL="install -p"
|
||||
%make_install
|
||||
find %{buildroot} -name '*.la' -delete
|
||||
# Let %%doc macro create the correct location in the rpm file, creates a
|
||||
# versioned docdir in <= f19 and an unversioned docdir in >= f20.
|
||||
@ -103,6 +107,9 @@ mv doc/html-out html
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jan 08 2019 Nicolas Chauvet <kwizart@gmail.com> - 1.1.1-11
|
||||
- Apply patches from upstream
|
||||
|
||||
* Tue Jul 17 2018 Nicolas Chauvet <kwizart@gmail.com> - 1.1.1-10
|
||||
- Add missng cc
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user