mpv tweaks, from brad:
- SEPARATE_BUILD is set by the Meson module - Bring in some --version logging patches and two vo_gpu_next bug fixes
This commit is contained in:
parent
40c5921bb8
commit
171f87652f
@ -3,7 +3,7 @@ COMMENT = movie player based on MPlayer/mplayer2
|
||||
GH_ACCOUNT = mpv-player
|
||||
GH_PROJECT = mpv
|
||||
GH_TAGNAME = v0.35.0
|
||||
REVISION = 1
|
||||
REVISION = 2
|
||||
|
||||
SHARED_LIBS += mpv 1.0 # 2.0
|
||||
|
||||
@ -51,8 +51,6 @@ RUN_DEPENDS = devel/desktop-file-utils \
|
||||
www/yt-dlp \
|
||||
x11/gtk+3,-guic
|
||||
|
||||
SEPARATE_BUILD = Yes
|
||||
|
||||
CONFIGURE_ARGS = -Dlua=lua${MODLUA_DEP_VERSION} \
|
||||
-Dcdda=enabled \
|
||||
-Ddvdnav=enabled \
|
||||
|
23
multimedia/mpv/patches/patch-common_av_log_c
Normal file
23
multimedia/mpv/patches/patch-common_av_log_c
Normal file
@ -0,0 +1,23 @@
|
||||
- common/av_log: move general FFmpeg version before library versions
|
||||
8bbe39a8587ebc2f6c51063d004f517ac4df9646
|
||||
|
||||
Index: common/av_log.c
|
||||
--- common/av_log.c.orig
|
||||
+++ common/av_log.c
|
||||
@@ -193,6 +193,7 @@ void check_library_versions(struct mp_log *log, int v)
|
||||
{"libswresample", LIBSWRESAMPLE_VERSION_INT, swresample_version()},
|
||||
};
|
||||
|
||||
+ mp_msg(log, v, "FFmpeg version: %s\n", av_version_info());
|
||||
mp_msg(log, v, "FFmpeg library versions:\n");
|
||||
|
||||
for (int n = 0; n < MP_ARRAY_SIZE(libs); n++) {
|
||||
@@ -209,8 +210,6 @@ void check_library_versions(struct mp_log *log, int v)
|
||||
abort();
|
||||
}
|
||||
}
|
||||
-
|
||||
- mp_msg(log, v, "FFmpeg version: %s\n", av_version_info());
|
||||
}
|
||||
|
||||
#undef V
|
28
multimedia/mpv/patches/patch-player_main_c
Normal file
28
multimedia/mpv/patches/patch-player_main_c
Normal file
@ -0,0 +1,28 @@
|
||||
- player/main: log libplacebo version if built with it
|
||||
0f0520aeca367613d313dbf2e936ea2cacdb35c9
|
||||
|
||||
Index: player/main.c
|
||||
--- player/main.c.orig
|
||||
+++ player/main.c
|
||||
@@ -25,6 +25,11 @@
|
||||
#include <locale.h>
|
||||
|
||||
#include "config.h"
|
||||
+
|
||||
+#if HAVE_LIBPLACEBO
|
||||
+#include <libplacebo/config.h>
|
||||
+#endif
|
||||
+
|
||||
#include "mpv_talloc.h"
|
||||
|
||||
#include "misc/dispatch.h"
|
||||
@@ -144,6 +149,9 @@ void mp_print_version(struct mp_log *log, int always)
|
||||
int v = always ? MSGL_INFO : MSGL_V;
|
||||
mp_msg(log, v, "%s %s\n built on %s\n",
|
||||
mpv_version, mpv_copyright, mpv_builddate);
|
||||
+#if HAVE_LIBPLACEBO
|
||||
+ mp_msg(log, v, "libplacebo version: %s\n", PL_VERSION);
|
||||
+#endif
|
||||
check_library_versions(log, v);
|
||||
mp_msg(log, v, "\n");
|
||||
// Only in verbose mode.
|
61
multimedia/mpv/patches/patch-video_out_vo_gpu_next_c
Normal file
61
multimedia/mpv/patches/patch-video_out_vo_gpu_next_c
Normal file
@ -0,0 +1,61 @@
|
||||
- vo_gpu_next: fix undefined behavior on alpha-first formats
|
||||
8327ac3e6d1686dd753b0ee23f135ebaa13af1b6
|
||||
- vo_gpu_next: don't flush cache on OSD update
|
||||
e97e0e4d9214ac232581cd77712e5988637ceb36
|
||||
|
||||
Index: video/out/vo_gpu_next.c
|
||||
--- video/out/vo_gpu_next.c.orig
|
||||
+++ video/out/vo_gpu_next.c
|
||||
@@ -344,7 +344,9 @@ static int plane_data_from_imgfmt(struct pl_plane_data
|
||||
if ((desc.flags & MP_IMGFLAG_TYPE_FLOAT) && (desc.flags & MP_IMGFLAG_YUV))
|
||||
return 0; // Floating-point YUV (currently) unsupported
|
||||
|
||||
+ bool has_bits = false;
|
||||
bool any_padded = false;
|
||||
+
|
||||
for (int p = 0; p < desc.num_planes; p++) {
|
||||
struct pl_plane_data *data = &out_data[p];
|
||||
struct mp_imgfmt_comp_desc sorted[MP_NUM_COMPONENTS];
|
||||
@@ -390,8 +392,9 @@ static int plane_data_from_imgfmt(struct pl_plane_data
|
||||
.bit_shift = MPMAX(sorted[c].pad, 0),
|
||||
};
|
||||
|
||||
- if (p == 0 && c == 0) {
|
||||
+ if (!has_bits) {
|
||||
*out_bits = bits;
|
||||
+ has_bits = true;
|
||||
} else {
|
||||
if (!pl_bit_encoding_equal(out_bits, &bits)) {
|
||||
// Bit encoding differs between components/planes,
|
||||
@@ -979,6 +982,15 @@ static void draw_frame(struct vo *vo, struct vo_frame
|
||||
image->num_overlays = 0;
|
||||
fp->osd_sync = 0;
|
||||
}
|
||||
+
|
||||
+ // Update the frame signature to include the current OSD sync
|
||||
+ // value, in order to disambiguate between identical frames with
|
||||
+ // modified OSD. Shift the OSD sync value by a lot to avoid
|
||||
+ // collisions with low signature values.
|
||||
+ //
|
||||
+ // This is safe to do because `pl_frame_mix.signature` lives in
|
||||
+ // temporary memory that is only valid for this `pl_queue_update`.
|
||||
+ ((uint64_t *) mix.signatures)[i] ^= fp->osd_sync << 48;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1060,7 +1072,6 @@ static void resize(struct vo *vo)
|
||||
osd_res_equals(p->osd_res, osd))
|
||||
return;
|
||||
|
||||
- pl_renderer_flush_cache(p->rr);
|
||||
p->osd_sync++;
|
||||
p->osd_res = osd;
|
||||
p->src = src;
|
||||
@@ -1241,7 +1252,6 @@ static int control(struct vo *vo, uint32_t request, vo
|
||||
return VO_TRUE;
|
||||
|
||||
case VOCTRL_OSD_CHANGED:
|
||||
- pl_renderer_flush_cache(p->rr);
|
||||
p->osd_sync++;
|
||||
return VO_TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user