commit: 46e64ebcc05510bdb3933085515849ce8f6a41ff
parent 89ed7abb97ee470246f76837e54e499cf8f3fe85
Author: Michael Forney <mforney@mforney.org>
Date: Sat, 16 Sep 2017 23:57:37 -0700
mpv: Update to 0.27.0
Diffstat:
5 files changed, 328 insertions(+), 175 deletions(-)
diff --git a/pkg/mpv/config.h b/pkg/mpv/config.h
@@ -23,6 +23,7 @@
#define HAVE_LIBM 1
#define HAVE_MINGW 0
#define HAVE_POSIX 1
+#define HAVE_ANDROID 0
#define HAVE_POSIX_OR_MINGW 1
#define HAVE_UWP 0
#define HAVE_WIN32_DESKTOP 0
@@ -41,7 +42,9 @@
#define HAVE_NANOSLEEP 1
#define HAVE_POSIX_SPAWN 1
#define HAVE_WIN32_PIPES 0
+#define HAVE_GLOB_POSIX 1
#define HAVE_GLOB_WIN32 0
+#define HAVE_GLOB 1
#define HAVE_FCHMOD 1
#define HAVE_VT_H 1
#define HAVE_GBM_H 0
@@ -125,6 +128,8 @@
#define HAVE_LIBAVDEVICE 1
#define HAVE_AVUTIL_IMGCPY_UC 1
#define HAVE_AVUTIL_CONTENT_LIGHT_LEVEL 0
+#define HAVE_AVUTIL_ICC_PROFILE 0
+#define HAVE_AVUTIL_SPHERICAL 1
#define HAVE_VAAPI_HWACCEL 0
#define HAVE_VIDEOTOOLBOX_HWACCEL_NEW 0
#define HAVE_VIDEOTOOLBOX_HWACCEL_OLD 0
diff --git a/pkg/mpv/patch/0001-Add-generated-ebml-sources.patch b/pkg/mpv/patch/0001-Add-generated-ebml-sources.patch
@@ -1,4 +1,4 @@
-From 40fd44394eea4f9134436467ecd60b7b27eb76b3 Mon Sep 17 00:00:00 2001
+From e31e68e9600e2e2aff9191b3162ceaecc55f9910 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sat, 2 Jul 2016 17:32:27 -0700
Subject: [PATCH] Add generated ebml sources
@@ -8,18 +8,18 @@ These require python to generate.
$ python TOOLS/matroska.py --generate-header > demux/ebml_types.h
$ python TOOLS/matroska.py --generate-definitions > demux/ebml_defs.c
---
- demux/ebml_defs.c | 547 +++++++++++++++++++++++++++++++++++++++++++++++
- demux/ebml_types.h | 608 +++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 1155 insertions(+)
+ demux/ebml_defs.c | 568 +++++++++++++++++++++++++++++++++++++++++++++++
+ demux/ebml_types.h | 631 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 1199 insertions(+)
create mode 100644 demux/ebml_defs.c
create mode 100644 demux/ebml_types.h
diff --git a/demux/ebml_defs.c b/demux/ebml_defs.c
new file mode 100644
-index 000000000..5d80f7e21
+index 0000000000..ca45e862d8
--- /dev/null
+++ b/demux/ebml_defs.c
-@@ -0,0 +1,547 @@
+@@ -0,0 +1,568 @@
+// Generated by TOOLS/matroska.py, do not edit manually
+
+
@@ -242,6 +242,26 @@ index 000000000..5d80f7e21
+}};
+#undef N
+
++E("ProjectionPoseRoll", projection_pose_roll, EBML_TYPE_FLOAT)
++
++E("ProjectionPosePitch", projection_pose_pitch, EBML_TYPE_FLOAT)
++
++E("ProjectionPoseYaw", projection_pose_yaw, EBML_TYPE_FLOAT)
++
++E("ProjectionPrivate", projection_private, EBML_TYPE_BINARY)
++
++E("ProjectionType", projection_type, EBML_TYPE_UINT)
++
++#define N projection
++E_S("Projection", 5)
++F(MATROSKA_ID_PROJECTIONTYPE, projection_type, 0)
++F(MATROSKA_ID_PROJECTIONPRIVATE, projection_private, 0)
++F(MATROSKA_ID_PROJECTIONPOSEYAW, projection_pose_yaw, 0)
++F(MATROSKA_ID_PROJECTIONPOSEPITCH, projection_pose_pitch, 0)
++F(MATROSKA_ID_PROJECTIONPOSEROLL, projection_pose_roll, 0)
++}};
++#undef N
++
+E("LuminanceMin", luminance_min, EBML_TYPE_FLOAT)
+
+E("LuminanceMax", luminance_max, EBML_TYPE_FLOAT)
@@ -341,7 +361,7 @@ index 000000000..5d80f7e21
+E("FlagInterlaced", flag_interlaced, EBML_TYPE_UINT)
+
+#define N video
-+E_S("Video", 10)
++E_S("Video", 11)
+F(MATROSKA_ID_FLAGINTERLACED, flag_interlaced, 0)
+F(MATROSKA_ID_PIXELWIDTH, pixel_width, 0)
+F(MATROSKA_ID_PIXELHEIGHT, pixel_height, 0)
@@ -352,6 +372,7 @@ index 000000000..5d80f7e21
+F(MATROSKA_ID_COLOURSPACE, colour_space, 0)
+F(MATROSKA_ID_STEREOMODE, stereo_mode, 0)
+F(MATROSKA_ID_COLOUR, colour, 0)
++F(MATROSKA_ID_PROJECTION, projection, 0)
+}};
+#undef N
+
@@ -569,10 +590,10 @@ index 000000000..5d80f7e21
+#undef N
diff --git a/demux/ebml_types.h b/demux/ebml_types.h
new file mode 100644
-index 000000000..590c6bdcd
+index 0000000000..8622502d06
--- /dev/null
+++ b/demux/ebml_types.h
-@@ -0,0 +1,608 @@
+@@ -0,0 +1,631 @@
+// Generated by TOOLS/matroska.py, do not edit manually
+
+#define EBML_ID_EBML 0x1a45dfa3
@@ -669,6 +690,12 @@ index 000000000..590c6bdcd
+#define MATROSKA_ID_WHITEPOINTCHROMATICITYY 0x55d8
+#define MATROSKA_ID_LUMINANCEMAX 0x55d9
+#define MATROSKA_ID_LUMINANCEMIN 0x55da
++#define MATROSKA_ID_PROJECTION 0x7670
++#define MATROSKA_ID_PROJECTIONTYPE 0x7671
++#define MATROSKA_ID_PROJECTIONPRIVATE 0x7672
++#define MATROSKA_ID_PROJECTIONPOSEYAW 0x7673
++#define MATROSKA_ID_PROJECTIONPOSEPITCH 0x7674
++#define MATROSKA_ID_PROJECTIONPOSEROLL 0x7675
+#define MATROSKA_ID_AUDIO 0xe1
+#define MATROSKA_ID_SAMPLINGFREQUENCY 0xb5
+#define MATROSKA_ID_OUTPUTSAMPLINGFREQUENCY 0x78b5
@@ -901,6 +928,20 @@ index 000000000..590c6bdcd
+ int n_bit_depth;
+};
+
++struct ebml_projection {
++ uint64_t projection_type;
++ bstr projection_private;
++ double projection_pose_yaw;
++ double projection_pose_pitch;
++ double projection_pose_roll;
++
++ int n_projection_type;
++ int n_projection_private;
++ int n_projection_pose_yaw;
++ int n_projection_pose_pitch;
++ int n_projection_pose_roll;
++};
++
+struct ebml_mastering_metadata {
+ double primary_r_chromaticity_x;
+ double primary_r_chromaticity_y;
@@ -958,16 +999,17 @@ index 000000000..590c6bdcd
+};
+
+struct ebml_video {
-+ uint64_t flag_interlaced;
-+ uint64_t pixel_width;
-+ uint64_t pixel_height;
-+ uint64_t display_width;
-+ uint64_t display_height;
-+ uint64_t display_unit;
-+ double frame_rate;
-+ bstr colour_space;
-+ uint64_t stereo_mode;
-+ struct ebml_colour colour;
++ uint64_t flag_interlaced;
++ uint64_t pixel_width;
++ uint64_t pixel_height;
++ uint64_t display_width;
++ uint64_t display_height;
++ uint64_t display_unit;
++ double frame_rate;
++ bstr colour_space;
++ uint64_t stereo_mode;
++ struct ebml_colour colour;
++ struct ebml_projection projection;
+
+ int n_flag_interlaced;
+ int n_pixel_width;
@@ -979,6 +1021,7 @@ index 000000000..590c6bdcd
+ int n_colour_space;
+ int n_stereo_mode;
+ int n_colour;
++ int n_projection;
+};
+
+struct ebml_track_entry {
@@ -1162,6 +1205,7 @@ index 000000000..590c6bdcd
+extern const struct ebml_elem_desc ebml_video_desc;
+extern const struct ebml_elem_desc ebml_colour_desc;
+extern const struct ebml_elem_desc ebml_mastering_metadata_desc;
++extern const struct ebml_elem_desc ebml_projection_desc;
+extern const struct ebml_elem_desc ebml_audio_desc;
+extern const struct ebml_elem_desc ebml_content_encodings_desc;
+extern const struct ebml_elem_desc ebml_content_encoding_desc;
@@ -1182,5 +1226,5 @@ index 000000000..590c6bdcd
+
+#define MAX_EBML_SUBELEMENTS 23
--
-2.11.1
+2.14.1
diff --git a/pkg/mpv/patch/0002-Add-generated-man-page.patch b/pkg/mpv/patch/0002-Add-generated-man-page.patch
@@ -1,4 +1,4 @@
-From 7490064f9224ff72e75df314d843a464d2d045b8 Mon Sep 17 00:00:00 2001
+From 8df10cc1adebc9c3551a043eeb20ccc0efd59227 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sat, 2 Jul 2016 21:08:15 -0700
Subject: [PATCH] Add generated man page
@@ -7,16 +7,16 @@ This requires python and rst2man to generate.
$ rst2man.py --strip-elements-with-class=contents DOCS/man/mpv.rst DOCS/man/mpv.1
---
- DOCS/man/mpv.1 | 15103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 15103 insertions(+)
+ DOCS/man/mpv.1 | 15201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 15201 insertions(+)
create mode 100644 DOCS/man/mpv.1
diff --git a/DOCS/man/mpv.1 b/DOCS/man/mpv.1
new file mode 100644
-index 0000000000..120af562b8
+index 0000000000..e698e6bdd4
--- /dev/null
+++ b/DOCS/man/mpv.1
-@@ -0,0 +1,15103 @@
+@@ -0,0 +1,15201 @@
+.\" Man page generated from reStructuredText.
+.
+.TH MPV 1 "" "" "multimedia"
@@ -601,7 +601,7 @@ index 0000000000..120af562b8
+_
+.TE
+.sp
-+Although some operations allow specifiying multiple \fB,\fP\-separated items, using
++Although some operations allow specifying multiple \fB,\fP\-separated items, using
+this is strongly discouraged and deprecated, except for \fB\-set\fP\&.
+.sp
+Without suffix, the action taken is normally \fB\-set\fP\&.
@@ -956,6 +956,11 @@ index 0000000000..120af562b8
+Play a Blu\-ray disc. Currently, this does not accept ISO files. Instead,
+you must mount the ISO file as filesystem, and point \fB\-\-bluray\-device\fP
+to the mounted directory directly.
++.sp
++\fBtitle\fP can be: \fBlongest\fP or \fBfirst\fP (selects the default
++playlist); \fBmpls/<number>\fP (selects <number>.mpls playlist);
++\fB<number>\fP (select playlist with the same index). You can list
++the available playlists with \fB\-\-msg\-level=bd=v\fP\&.
+.UNINDENT
+.UNINDENT
+.sp
@@ -1232,6 +1237,18 @@ index 0000000000..120af562b8
+Specify the edition (set of chapters) to use, where 0 is the first. If set
+to \fBauto\fP (the default), mpv will choose the first edition declared as a
+default, or if there is no default, the first edition defined.
++.TP
++.B \fB\-\-track\-auto\-selection=<yes|no>\fP
++Enable the default track auto\-selection (default: yes). Enabling this will
++make the player select streams according to \fB\-\-aid\fP, \fB\-\-alang\fP, and
++others. If it is disabled, no tracks are selected. In addition, the player
++will not exit if no tracks are selected, and wait instead (this wait mode
++is similar to pausing, but the pause option is not set).
++.sp
++This is useful with \fB\-\-lavfi\-complex\fP: you can start playback in this
++mode, and then set select tracks at runtime by setting the filter graph.
++Note that if \fB\-\-lavfi\-complex\fP is set before playback is started, the
++referenced tracks are always selected.
+.UNINDENT
+.SS Playback Control
+.INDENT 0.0
@@ -1474,11 +1491,7 @@ index 0000000000..120af562b8
+time trying to loop a file that doesn\(aqt exist. But it might be useful for
+playing webradios under very bad network conditions.
+.TP
-+.B \fB\-\-loop\fP
-+Currently a deprecated alias to \fB\-\-loop\-playlist\fP\&. After a deprecation
-+period, it will be undeprecated, but changed to alias \fB\-\-loop\-file\fP\&.
-+.TP
-+.B \fB\-\-loop\-file=<N|inf|no>\fP
++.B \fB\-\-loop\-file=<N|inf|no>\fP, \fB\-\-loop=<N|inf|no>\fP
+Loop a single file N times. \fBinf\fP means forever, \fBno\fP means normal
+playback. For compatibility, \fB\-\-loop\-file\fP and \fB\-\-loop\-file=yes\fP are
+also accepted, and are the same as \fB\-\-loop\-file=inf\fP\&.
@@ -1487,6 +1500,8 @@ index 0000000000..120af562b8
+just the file itself. If the playlist contains only a single file, the
+difference between the two option is that this option performs a seek on
+loop, instead of reloading the file.
++.sp
++\fB\-\-loop\fP is an alias for this option.
+.TP
+.B \fB\-\-ab\-loop\-a=<time>\fP, \fB\-\-ab\-loop\-b=<time>\fP
+Set loop points. If playback passes the \fBb\fP timestamp, it will seek to
@@ -1986,7 +2001,8 @@ index 0000000000..120af562b8
+The \fB\&...\-copy\fP modes (e.g. \fBdxva2\-copy\fP) allow you to use hardware
+decoding with any VO, backend or filter. Because these copy the decoded
+video back to system RAM, they\(aqre likely less efficient than the direct
-+modes (like e.g. \fBdxva2\fP).
++modes (like e.g. \fBdxva2\fP), and probably not more efficient than software
++decoding except for some codecs (e.g. HEVC).
+.sp
+\fBNOTE:\fP
+.INDENT 7.0
@@ -2000,15 +2016,19 @@ index 0000000000..120af562b8
+.INDENT 3.5
+.IP "Quality reduction with hardware decoding"
+.sp
-+Normally, hardware decoding does not reduce video quality (at least for
-+the codecs h264 and HEVC). However, due to restrictions in video output
-+APIs, there can be some loss, or blatantly incorrect results.
++In theory, hardware decoding does not reduce video quality (at least
++for the codecs h264 and HEVC). However, due to restrictions in video
++output APIs, as well as bugs in the actual hardware decoders, there can
++be some loss, or even blatantly incorrect results.
+.sp
+In some cases, RGB conversion is forced, which means the RGB conversion
+is performed by the hardware decoding API, instead of the OpenGL code
-+used by \fB\-\-vo=opengl\fP\&. This means certain obscure colorspaces may
-+not display correctly, not certain filtering (such as debanding)
-+cannot be applied in an ideal way.
++used by \fB\-\-vo=opengl\fP\&. This means certain colorspaces may not display
++correctly, and certain filtering (such as debanding) cannot be applied
++in an ideal way. This will also usually force the use of low quality
++chroma scalers instead of the one specified by \fB\-\-cscale\fP\&. In other
++cases, hardware decoding can also reduce the bit depth of the decoded
++image, which can introduce banding or precision loss for 10\-bit files.
+.sp
+\fBvdpau\fP is usually safe. If deinterlacing enabled (or the \fBvdpaupp\fP
+video filter is active in general), it forces RGB conversion. The latter
@@ -2017,14 +2037,15 @@ index 0000000000..120af562b8
+filter retrieves image data without RGB conversion and is safe (but
+precludes use of vdpau postprocessing).
+.sp
-+\fBvaapi\fP is safe if the \fBvaapi\-egl\fP backend is indicated in the logs.
-+If \fBvaapi\-glx\fP is indicated, and the video colorspace is either BT.601
-+or BT.709, a forced but correct RGB conversion is performed. Otherwise,
-+the result will be incorrect.
++\fBvaapi\fP is safe if the \fBvaapi\-egl\fP backend is indicated in the
++logs. If \fBvaapi\-glx\fP is indicated, and the video colorspace is either
++BT.601 or BT.709, a forced, low\-quality but correct RGB conversion is
++performed. Otherwise, the result will be totally incorrect.
+.sp
+\fBd3d11va\fP is usually safe (if used with ANGLE builds that support
+\fBEGL_KHR_stream path\fP \- otherwise, it converts to RGB), except that
-+10 bit input (HEVC main 10 profiles) will be rounded down to 8 bits.
++10 bit input (HEVC main 10 profiles) will be rounded down to 8 bits,
++which results in reduced quality.
+.sp
+\fBdxva2\fP is not safe. It appears to always use BT.601 for forced RGB
+conversion, but actual behavior depends on the GPU drivers. Some drivers
@@ -2036,17 +2057,30 @@ index 0000000000..120af562b8
+\fBrpi\fP always uses the hardware overlay renderer, even with
+\fB\-\-vo=opengl\fP\&.
+.sp
++\fBcuda\fP should be safe, but it has been reported to corrupt the
++timestamps causing glitched, flashing frames on some files. It can also
++sometimes cause massive framedrops for unknown reasons. Caution is
++advised.
++.sp
+\fBcrystalhd\fP is not safe. It always converts to 4:2:2 YUV, which
+may be lossy, depending on how chroma sub\-sampling is done during
+conversion. It also discards the top left pixel of each frame for
+some reason.
+.sp
+All other methods, in particular the copy\-back methods (like
-+\fBdxva2\-copy\fP etc.) are either fully safe, or not worse than software
-+decoding.
++\fBdxva2\-copy\fP etc.) should hopefully be safe, although they can still
++cause random decoding issues. At the very least, they shouldn\(aqt affect
++the colors of the image.
+.sp
-+In particular, \fBauto\-copy\fP will only select safe modes
-+(although potentially slower than other methods).
++In particular, \fBauto\-copy\fP will only select "safe" modes
++(although potentially slower than other methods), but there\(aqs still no
++guarantee the chosen hardware decoder will actually work correctly.
++.sp
++In general, it\(aqs very strongly advised to avoid hardware decoding
++unless \fBabsolutely\fP necessary, i.e. if your CPU is insufficient to
++decode the file in questions. If you run into any weird decoding issues,
++frame glitches or discoloration, and you have \fB\-\-hwdec\fP turned on,
++the first thing you should try is disabling it.
+.UNINDENT
+.UNINDENT
+.TP
@@ -2129,16 +2163,11 @@ index 0000000000..120af562b8
+.UNINDENT
+.UNINDENT
+.TP
-+.B \fB\-\-video\-aspect\-method=<hybrid|bitstream|container>\fP
++.B \fB\-\-video\-aspect\-method=<bitstream|container>\fP
+This sets the default video aspect determination method (if the aspect is
+_not_ overridden by the user with \fB\-\-video\-aspect\fP or others).
+.INDENT 7.0
+.TP
-+.B hybrid
-+Prefer the container aspect ratio. If the bitstream aspect
-+switches mid\-stream, switch to preferring the bitstream aspect.
-+This was the default in older mpv and mplayer2. Deprecated.
-+.TP
+.B container
+Strictly prefer the container aspect ratio. This is apparently
+the default behavior with VLC, at least with Matroska. Note that
@@ -2244,8 +2273,8 @@ index 0000000000..120af562b8
+.UNINDENT
+.UNINDENT
+.TP
-+.B \fB\-\-deinterlace=<yes|no|auto>\fP
-+Enable or disable interlacing (default: auto, which usually means no).
++.B \fB\-\-deinterlace=<yes|no>\fP
++Enable or disable interlacing (default: no).
+Interlaced video shows ugly comb\-like artifacts, which are visible on
+fast movement. Enabling this typically inserts the yadif video filter in
+order to deinterlace the video, or lets the video output apply deinterlacing
@@ -2254,32 +2283,11 @@ index 0000000000..120af562b8
+This behaves exactly like the \fBdeinterlace\fP input property (usually
+mapped to \fBd\fP).
+.sp
-+\fBauto\fP is a technicality. Strictly speaking, the default for this option
-+is deinterlacing disabled, but the \fBauto\fP case is needed if \fByadif\fP was
-+added to the filter chain manually with \fB\-\-vf\fP\&. Then the core shouldn\(aqt
-+disable deinterlacing just because the \fB\-\-deinterlace\fP was not set.
-+.TP
-+.B \fB\-\-field\-dominance=<auto|top|bottom>\fP
-+Set first field for interlaced content.
-+.INDENT 7.0
-+.TP
-+.B auto
-+(default) If the decoder does not export the appropriate
-+information, it falls back on \fBtop\fP (top field first).
-+.TP
-+.B top
-+top field first
-+.TP
-+.B bottom
-+bottom field first
-+.UNINDENT
-+.sp
-+\fBNOTE:\fP
-+.INDENT 7.0
-+.INDENT 3.5
-+Setting either \fBtop\fP or \fBbottom\fP will flag all frames as interlaced.
-+.UNINDENT
-+.UNINDENT
++Keep in mind that this \fBwill\fP conflict with manually inserted
++deinterlacing filters, unless you take care. (Since mpv 0.27.0, even the
++hardware deinterlace filters will conflict. Also since that version,
++\fB\-\-deinterlace=auto\fP was removed, which used to mean that the default
++interlacing option of possibly inserted video filters was used.)
+.TP
+.B \fB\-\-frames=<number>\fP
+Play/convert only first \fB<number>\fP video frames, then quit.
@@ -2357,6 +2365,29 @@ index 0000000000..120af562b8
+(default: 3). If this is a number, then fallback will be triggered if
+N frames fail to decode in a row. 1 is equivalent to \fByes\fP\&.
+.TP
++.B \fB\-\-vd\-lavc\-dr=<yes|no>\fP
++Enable direct rendering (default: no). If this is set to \fByes\fP, the
++video will be decoded directly to GPU video memory (or staging buffers).
++This can speed up video upload, and may help with large resolutions or
++slow hardware. This works only with the following VOs:
++.INDENT 7.0
++.INDENT 3.5
++.INDENT 0.0
++.IP \(bu 2
++\fBopengl\fP: requires at least OpenGL 4.4.
++.UNINDENT
++.UNINDENT
++.UNINDENT
++.sp
++(In particular, this can\(aqt be made work with \fBopengl\-cb\fP\&.)
++.sp
++Using video filters of any kind that write to the image data (or output
++newly allocated frames) will silently disable the DR code path.
++.sp
++There are some corner cases that will result in undefined behavior (crashes
++and other strange behavior) if this option is enabled. These are pending
++towards being fixed properly at a later point.
++.TP
+.B \fB\-\-vd\-lavc\-bitexact\fP
+Only use bit\-exact algorithms in all decoding steps (for codec testing).
+.TP
@@ -2845,21 +2876,20 @@ index 0000000000..120af562b8
+.TP
+.B \fB\-\-audio\-file\-auto=<no|exact|fuzzy|all>\fP, \fB\-\-no\-audio\-file\-auto\fP
+Load additional audio files matching the video filename. The parameter
-+specifies how external audio files are matched. \fBexact\fP is enabled by
-+default.
++specifies how external audio files are matched.
+.INDENT 7.0
+.TP
+.B no
-+Don\(aqt automatically load external audio files.
++Don\(aqt automatically load external audio files (default).
+.TP
+.B exact
-+Load the media filename with audio file extension (default).
++Load the media filename with audio file extension.
+.TP
+.B fuzzy
+Load all audio files containing media filename.
+.TP
+.B all
-+Load all audio files in the current and \fB\-\-audio\-file\-path\fP
++Load all audio files in the current and \fB\-\-audio\-file\-paths\fP
+directories.
+.UNINDENT
+.TP
@@ -3296,7 +3326,7 @@ index 0000000000..120af562b8
+Load all subs containing media filename.
+.TP
+.B all
-+Load all subs in the current and \fB\-\-sub\-file\-path\fP directories.
++Load all subs in the current and \fB\-\-sub\-file\-paths\fP directories.
+.UNINDENT
+.TP
+.B \fB\-\-sub\-codepage=<codepage>\fP
@@ -4089,6 +4119,10 @@ index 0000000000..120af562b8
+as having the same size as on none\-HiDPI resolutions. This is the default OS X
+behavior.
+.TP
++.B \fB\-\-native\-fs\fP, \fB\-\-no\-native\-fs\fP
++(OS X only)
++Uses the native fullscreen mechanism of the OS (default: yes).
++.TP
+.B \fB\-\-monitorpixelaspect=<ratio>\fP
+Set the aspect of a single pixel of your monitor or TV screen (default:
+1). A value of 1 means square pixels (correct for (almost?) all LCDs). See
@@ -4628,7 +4662,7 @@ index 0000000000..120af562b8
+Support depends on the VO in use.
+.TP
+.B \fB\-\-input\-media\-keys=<yes|no>\fP
-+(OS X only)
++(OS X and Windows only)
+Enable/disable media keys support. Enabled by default (except for libmpv).
+.TP
+.B \fB\-\-input\-right\-alt\-gr\fP, \fB\-\-no\-input\-right\-alt\-gr\fP
@@ -5923,7 +5957,8 @@ index 0000000000..120af562b8
+.TP
+.B \fB\-\-linear\-scaling\fP
+Scale in linear light. It should only be used with a
-+\fB\-\-opengl\-fbo\-format\fP that has at least 16 bit precision.
++\fB\-\-opengl\-fbo\-format\fP that has at least 16 bit precision. This option
++has no effect on HDR content.
+.TP
+.B \fB\-\-correct\-downscaling\fP
+When using convolution based filters, extend the filter size when
@@ -5951,7 +5986,8 @@ index 0000000000..120af562b8
+the \fB\-\-tscale\fP setting.
+.sp
+Note that this relies on vsync to work, see \fB\-\-opengl\-swapinterval\fP for
-+more information.
++more information. It should also only be used with an \fB\-\-opengl\-fbo\-format\fP
++that has at least 16 bit precision.
+.TP
+.B \fB\-\-interpolation\-threshold=<0..1,\-1>\fP
+Threshold below which frame ratio interpolation gets disabled (default:
@@ -6070,25 +6106,64 @@ index 0000000000..120af562b8
+.UNINDENT
+.UNINDENT
+.sp
-+Each block of metadata, along with the non\-metadata lines after it, defines
-+a single pass. Each pass can set the following metadata:
++Each section of metadata, along with the non\-metadata lines after it,
++defines a single block. There are currently two types of blocks, HOOKs and
++TEXTUREs.
++.sp
++A \fBTEXTURE\fP block can set the following options:
+.INDENT 7.0
+.TP
-+.B DESC <title>
-+User\-friendly description of the pass. This is the name used when
-+representing this shader in the list of passes for property
-+\fIvo\-passes\fP\&.
++.B TEXTURE <name> (required)
++The name of this texture. Hooks can then bind the texture under this
++name using BIND. This must be the first option of the texture block.
++.TP
++.B SIZE <width> [<height>] [<depth>] (required)
++The dimensions of the texture. The height and depth are optional. The
++type of texture (1D, 2D or 3D) depends on the number of components
++specified.
++.TP
++.B FORMAT <name> (required)
++The texture format for the samples. Supported texture formats are listed
++in debug logging when the \fBopengl\fP VO is initialized (look for
++\fBTexture formats:\fP). Usually, this follows OpenGL naming conventions.
++For example, \fBrgb16\fP provides 3 channels with normalized 16 bit
++components. One oddity are float formats: for example, \fBrgba16f\fP has
++16 bit internal precision, but the texture data is provided as 32 bit
++floats, and the driver converts the data on texture upload.
++.sp
++Although format names follow a common naming convention, not all of them
++are available on all hardware, drivers, GL versions, and so on.
++.TP
++.B FILTER <LINEAR|NEAREST>
++The min/magnification filter used when sampling from this texture.
++.TP
++.B BORDER <CLAMP|REPEAT|MIRROR>
++The border wrapping mode used when sampling from this texture.
++.UNINDENT
++.sp
++Following the metadata is a string of bytes in hexadecimal notation that
++define the raw texture data, corresponding to the format specified by
++\fIFORMAT\fP, on a single line with no extra whitespace.
++.sp
++A \fBHOOK\fP block can set the following options:
++.INDENT 7.0
+.TP
+.B HOOK <name> (required)
+The texture which to hook into. May occur multiple times within a
+metadata block, up to a predetermined limit. See below for a list of
+hookable textures.
+.TP
++.B DESC <title>
++User\-friendly description of the pass. This is the name used when
++representing this shader in the list of passes for property
++\fIvo\-passes\fP\&.
++.TP
+.B BIND <name>
-+Loads a texture and makes it available to the pass, and sets up macros
-+to enable accessing it. See below for a list of set macros. By default,
-+no textures are bound. The special name HOOKED can be used to refer to
-+the texture that triggered this pass.
++Loads a texture (either coming from mpv or from a \fBTEXTURE\fP block)
++and makes it available to the pass. When binding textures from mpv,
++this will also set up macros to facilitate accessing it properly. See
++below for a list. By default, no textures are bound. The special name
++HOOKED can be used to refer to the texture that triggered this pass.
+.TP
+.B SAVE <name>
+Gives the name of the texture to save the result of this pass into. By
@@ -6112,20 +6187,41 @@ index 0000000000..120af562b8
+hook point can still cause that hook point to be saved, which has some
+minor overhead)
+.TP
-+.B OFFSET ox oy
++.B OFFSET <ox> <oy>
+Indicates a pixel shift (offset) introduced by this pass. These pixel
+offsets will be accumulated and corrected during the next scaling pass
+(\fBcscale\fP or \fBscale\fP). The default values are 0 0 which correspond
+to no shift. Note that offsets are ignored when not overwriting the
+hooked texture.
+.TP
-+.B COMPONENTS n
++.B COMPONENTS <n>
+Specifies how many components of this pass\(aqs output are relevant and
+should be stored in the texture, up to 4 (rgba). By default, this value
+is equal to the number of components in HOOKED.
-+.UNINDENT
-+.sp
-+Each bound texture (via \fBBIND\fP) will make available the following
++.TP
++.B COMPUTE <bw> <bh> [<tw> <th>]
++Specifies that this shader should be treated as a compute shader, with
++the block size bw and bh. The compute shader will be dispatched with
++however many blocks are necessary to completely tile over the output.
++Within each block, there will bw tw*th threads, forming a single work
++group. In other words: tw and th specify the work group size, which can
++be different from the block size. So for example, a compute shader with
++bw, bh = 32 and tw, th = 8 running on a 500x500 texture would dispatch
++16x16 blocks (rounded up), each with 8x8 threads.
++.sp
++Compute shaders in mpv are treated a bit different from fragment
++shaders. Instead of defining a \fBvec4 hook\fP that produces an output
++sample, you directly define \fBvoid hook\fP which writes to a fixed
++writeonly image unit named \fBout_image\fP (this is bound by mpv) using
++\fIimageStore\fP\&. To help translate texture coordinates in the absence of
++vertices, mpv provides a special function \fBNAME_map(id)\fP to map from
++the texel space of the output image to the texture coordinates for all
++bound textures. In particular, \fBNAME_pos\fP is equivalent to
++\fBNAME_map(gl_GlobalInvocationID)\fP, although using this only really
++makes sense if (tw,th) == (bw,bh).
++.UNINDENT
++.sp
++Each bound mpv texture (via \fBBIND\fP) will make available the following
+definitions to that shader pass, where NAME is the name of the bound
+texture:
+.INDENT 7.0
@@ -6622,9 +6718,11 @@ index 0000000000..120af562b8
+.UNINDENT
+.UNINDENT
+.TP
-+.B \fB\-\-hdr\-tone\-mapping=<value>\fP
-+Specifies the algorithm used for tone\-mapping HDR images onto the target
-+display. Valid values are:
++.B \fB\-\-tone\-mapping=<value>\fP
++Specifies the algorithm used for tone\-mapping images onto the target
++display. This is relevant for both HDR\->SDR conversion as well as gamut
++reduction (e.g. playing back BT.2020 content on a standard gamut display).
++Valid values are:
+.INDENT 7.0
+.TP
+.B clip
@@ -6647,10 +6745,10 @@ index 0000000000..120af562b8
+.TP
+.B hable
+Similar to \fBreinhard\fP but preserves both dark and bright details
-+better (slightly sigmoidal), at the cost of slightly darkening
-+everything. Developed by John Hable for use in video games. Use this
-+when you care about detail preservation more than color/brightness
-+accuracy. This is roughly equivalent to
++better (slightly sigmoidal), at the cost of slightly darkening /
++desaturating everything. Developed by John Hable for use in video
++games. Use this when you care about detail preservation more than
++color/brightness accuracy. This is roughly equivalent to
+\fB\-\-hdr\-tone\-mapping=reinhard \-\-tone\-mapping\-param=0.24\fP\&.
+.TP
+.B gamma
@@ -6689,6 +6787,14 @@ index 0000000000..120af562b8
+Specifies the scale factor to use while stretching. Defaults to 1.0.
+.UNINDENT
+.TP
++.B \fB\-\-hdr\-compute\-peak\fP
++Compute the HDR peak per\-frame of relying on tagged metadata. These values
++are averaged over local regions as well as over several frames to prevent
++the value from jittering around too much. This option basically gives you
++dynamic, per\-scene tone mapping. Requires compute shaders, which is a
++fairly recent OpenGL feature, and will probably also perform horribly on
++some drivers, so enable at your own risk.
++.TP
+.B \fB\-\-tone\-mapping\-desaturate=<value>\fP
+Apply desaturation for highlights that exceed this level of brightness. The
+higher the parameter, the more color information will be preserved. This
@@ -6699,6 +6805,24 @@ index 0000000000..120af562b8
+The default of 2.0 is somewhat conservative and will mostly just apply to
+skies or directly sunlit surfaces. A setting of 0.0 disables this option.
+.TP
++.B \fB\-\-gamut\-warning\fP
++If enabled, mpv will mark all clipped/out\-of\-gamut pixels that exceed a
++given threshold (currently hard\-coded to 101%). The affected pixels will be
++inverted to make them stand out. Note: This option applies after the
++effects of all of mpv\(aqs color space transformation / tone mapping options,
++so it\(aqs a good idea to combine this with \fB\-\-tone\-mapping=clip\fP and use
++\fB\-\-target\-gamut\fP to set the gamut to simulate. For example,
++\fB\-\-target\-gamut=bt.709\fP would make mpv highlight all pixels that exceed the
++gamut of a standard gamut (sRGB) display. This option also does not work
++well with ICC profiles, since the 3DLUTs are always generated against the
++source color space and have chromatically\-accurate clipping built in.
++.TP
++.B \fB\-\-use\-embedded\-icc\-profile\fP
++Load the embedded ICC profile contained in media files such as PNG images.
++(Default: yes). Note that this option only works when also using a display
++ICC profile (\fB\-\-icc\-profile\fP or \fB\-\-icc\-profile\-auto\fP), and also
++requires LittleCMS 2 support.
++.TP
+.B \fB\-\-icc\-profile=<file>\fP
+Load an ICC profile and use it to transform video RGB to screen output.
+Needs LittleCMS 2 support compiled in. This option overrides the
@@ -7103,11 +7227,14 @@ index 0000000000..120af562b8
+video or audio outputs are not possible, but you can use filters to merge
+them into one.
+.sp
-+The complex filter cannot be changed yet during playback. It\(aqs also not
-+possible to change the tracks connected to the filter at runtime. Other
-+tracks, as long as they\(aqre not connected to the filter, and the
++It\(aqs not possible to change the tracks connected to the filter at runtime,
++unless you explicitly change the \fBlavfi\-complex\fP property and set new
++track assignments. When the graph is changed, the track selection is changed
++according to the used labels as well.
++.sp
++Other tracks, as long as they\(aqre not connected to the filter, and the
+corresponding output is not connected to the filter, can still be freely
-+changed.
++changed with the normal methods.
+.sp
+Note that the normal filter chains (\fB\-\-af\fP, \fB\-\-vf\fP) are applied between
+the complex graphs (e.g. \fBao\fP label) and the actual output.
@@ -7401,7 +7528,8 @@ index 0000000000..120af562b8
+.UNINDENT
+.TP
+.B \fBrsound\fP
-+Audio output to an RSound daemon
++Audio output to an RSound daemon. Use \fB\-\-audio\-device=rsound/<hostname>\fP
++to set the host name (with \fB<hostname>\fP replaced, without the \fB< >\fP).
+.sp
+\fBNOTE:\fP
+.INDENT 7.0
@@ -7875,7 +8003,7 @@ index 0000000000..120af562b8
+Don\(aqt allow deinterlacing (default for newer libva).
+.TP
+.B first\-field
-+Show only first field (going by \fB\-\-field\-dominance\fP).
++Show only first field.
+.TP
+.B bob
+bob deinterlacing (default for older libva).
@@ -9262,6 +9390,26 @@ index 0000000000..120af562b8
+Set the display aspect ratio of the video frame. This is a float,
+but values such as \fB[16:9]\fP can be passed too (\fB[...]\fP for quoting
+to prevent the option parser from interpreting the \fB:\fP character).
++.TP
++.B \fB<spherical\-type>\fP
++Type of the spherical projection:
++.INDENT 7.0
++.TP
++.B auto
++As indicated by the file (default)
++.TP
++.B none
++Normal video
++.TP
++.B equirect
++Equirectangular
++.TP
++.B unknown
++Unknown projection
++.UNINDENT
++.TP
++.B \fB<spherical\-yaw>\fP, \fB<spherical\-pitch>\fP, \fB<spherical\-roll>\fP
++Reference angle in degree, if spherical video is used.
+.UNINDENT
+.TP
+.B \fBnoformat[=fmt]\fP
@@ -9345,41 +9493,6 @@ index 0000000000..120af562b8
+.UNINDENT
+.UNINDENT
+.TP
-+.B \fBeq[=gamma:contrast:brightness:saturation:rg:gg:bg:weight]\fP
-+Software equalizer that uses lookup tables (slow), allowing gamma correction
-+in addition to simple brightness and contrast adjustment. The parameters are
-+given as floating point values.
-+.INDENT 7.0
-+.TP
-+.B \fB<0.1\-10>\fP
-+initial gamma value (default: 1.0)
-+.TP
-+.B \fB<\-2\-2>\fP
-+initial contrast, where negative values result in a negative image
-+(default: 1.0)
-+.TP
-+.B \fB<\-1\-1>\fP
-+initial brightness (default: 0.0)
-+.TP
-+.B \fB<0\-3>\fP
-+initial saturation (default: 1.0)
-+.TP
-+.B \fB<0.1\-10>\fP
-+gamma value for the red component (default: 1.0)
-+.TP
-+.B \fB<0.1\-10>\fP
-+gamma value for the green component (default: 1.0)
-+.TP
-+.B \fB<0.1\-10>\fP
-+gamma value for the blue component (default: 1.0)
-+.TP
-+.B \fB<0\-1>\fP
-+The weight parameter can be used to reduce the effect of a high gamma
-+value on bright image areas, e.g. keep them from getting overamplified
-+and just plain white. A value of 0.0 turns the gamma correction all
-+the way down while 1.0 leaves it at its full strength (default: 1.0).
-+.UNINDENT
-+.TP
+.B \fBpullup[=jl:jr:jt:jb:sb:mp]\fP
+Pulldown reversal (inverse telecine) filter, capable of handling mixed
+hard\-telecine, 24000/1001 fps progressive, and 30000/1001 fps progressive
@@ -9749,7 +9862,7 @@ index 0000000000..120af562b8
+Don\(aqt perform deinterlacing.
+.TP
+.B first\-field
-+Show only first field (going by \fB\-\-field\-dominance\fP).
++Show only first field.
+.TP
+.B bob
+bob deinterlacing (default).
@@ -9810,7 +9923,6 @@ index 0000000000..120af562b8
+.TP
+.B \fBdeint\-mode=<first\-field|bob|temporal|temporal\-spatial>\fP
+Select deinterlacing mode (default: temporal).
-+All modes respect \fB\-\-field\-dominance\fP\&.
+.sp
+Note that there\(aqs currently a mechanism that allows the \fBvdpau\fP VO to
+change the \fBdeint\-mode\fP of auto\-inserted \fBvdpaupp\fP filters. To avoid
@@ -10470,10 +10582,6 @@ index 0000000000..120af562b8
+events that have already been displayed, or are within a short prefetch
+range.
+.TP
-+.B \fBosd [<level>]\fP
-+Toggle OSD level. If \fB<level>\fP is specified, set the OSD mode
-+(see \fB\-\-osd\-level\fP for valid values).
-+.TP
+.B \fBprint\-text "<string>"\fP
+Print text to stdout. The string can contain properties (see
+\fI\%Property Expansion\fP).
@@ -12463,22 +12571,12 @@ index 0000000000..120af562b8
+.sp
+Option changes at runtime are affected by this as well.
+.TP
-+.B \fBdeinterlace\fP
-+While video is active, this behaves differently from the option. It will
-+never return the \fBauto\fP value (but the state as observed by the video
-+chain). If you set \fBauto\fP, the property will set this as the option value,
-+and will return the actual video chain state as observed instead of auto.
-+.TP
+.B \fBvideo\-aspect\fP
+While video is active, always returns the effective aspect ratio. Setting
+a special value (like \fBno\fP, values \fB<= 0\fP) will make the property
+set this as option, and return whatever actual aspect was derived from the
+option setting.
+.TP
-+.B \fBbrightness\fP (and other color options)
-+If \fB\-\-vo=xv\fP is used, these properties may return the adapter\(aqs current
-+values instead of the option values.
-+.TP
+.B \fBdisplay\-fps\fP
+If a VO is created, this will return either the actual display FPS, or
+an invalid value, instead of the option value.
@@ -15121,5 +15219,5 @@ index 0000000000..120af562b8
+.\" Generated by docutils manpage writer.
+.
--
-2.13.3
+2.14.1
diff --git a/pkg/mpv/rev b/pkg/mpv/rev
@@ -1 +1 @@
-10
+11
diff --git a/pkg/mpv/sources.txt b/pkg/mpv/sources.txt
@@ -1,6 +1,6 @@
-osdep/main-fn-win.c win32-desktop
osdep/main-fn-cocoa.c cocoa
-osdep/main-fn-unix.c
+osdep/main-fn-unix.c posix
+osdep/main-fn-win.c win32-desktop
osdep/terminal-unix.c posix
osdep/terminal-win.c win32-desktop
osdep/timer-win2.c os-win32
@@ -16,6 +16,7 @@ audio/chmap.c
audio/chmap_sel.c
audio/fmt-conversion.c
audio/format.c
+audio/aframe.c
audio/decode/ad_lavc.c
audio/decode/ad_spdif.c
audio/decode/dec_audio.c
@@ -197,7 +198,6 @@ video/filter/vf_buffer.c
video/filter/vf_crop.c
video/filter/vf_d3d11vpp.c d3d-hwaccel
video/filter/vf_dsize.c
-video/filter/vf_eq.c
video/filter/vf_expand.c
video/filter/vf_flip.c
video/filter/vf_format.c
@@ -237,8 +237,10 @@ video/out/opengl/context_w32.c gl-win32
video/out/opengl/context_x11.c gl-x11
video/out/opengl/context_x11egl.c egl-x11
video/out/opengl/cuda_dynamic.c cuda-hwaccel
+video/out/opengl/d3d11_helpers.c egl-angle-win32
video/out/opengl/egl_helpers.c egl-helpers
video/out/opengl/formats.c gl
+video/out/opengl/gl_utils.c gl
video/out/opengl/hwdec.c gl
video/out/opengl/hwdec_cuda.c cuda-hwaccel
video/out/opengl/hwdec_d3d11egl.c d3d-hwaccel
@@ -253,6 +255,9 @@ video/out/opengl/hwdec_vaglx.c vaapi-glx
video/out/opengl/hwdec_vdpau.c vdpau-gl-x11
video/out/opengl/lcms.c gl
video/out/opengl/osd.c gl
+video/out/opengl/ra.c gl
+video/out/opengl/ra_gl.c gl
+video/out/opengl/shader_cache.c gl
video/out/opengl/user_shaders.c gl
video/out/opengl/utils.c gl
video/out/opengl/video.c gl
@@ -290,18 +295,19 @@ osdep/threads.c
osdep/ar/HIDRemote.m apple-remote
osdep/macosx_application.m cocoa
osdep/macosx_events.m cocoa
+osdep/macosx_menubar.m cocoa
osdep/macosx_touchbar.m macos-touchbar
osdep/semaphore_osx.c
osdep/subprocess.c
osdep/path-macosx.m cocoa
osdep/path-unix.c
osdep/path-win.c win32-desktop
-osdep/path-win.c os-cygwin
osdep/path-uwp.c uwp
osdep/glob-win.c glob-win32
osdep/w32_keyboard.c os-win32
osdep/w32_keyboard.c os-cygwin
osdep/windows_utils.c os-win32
+osdep/windows_utils.c os-cygwin
osdep/mpv.rc win32-executable
osdep/win32/pthread.c win32-internal-pthreads
osdep/android/strnlen.c android