[packages/vlc] - added x265 patch (based on ffmpeg change); don't disable x265 on x32
qboosh
qboosh at pld-linux.org
Mon Sep 16 21:03:36 CEST 2024
commit f6dfb70e9a745ef8405fa6711ac56bf7650101c6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Sep 16 21:06:28 2024 +0200
- added x265 patch (based on ffmpeg change); don't disable x265 on x32
vlc-x265.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
vlc.spec | 5 ++---
2 files changed, 47 insertions(+), 3 deletions(-)
---
diff --git a/vlc.spec b/vlc.spec
index 987651f..68dfe24 100644
--- a/vlc.spec
+++ b/vlc.spec
@@ -64,9 +64,6 @@
# CrystalHD library requires SSE2 instructions
%undefine with_crystalhd
%endif
-%ifarch x32
-%undefine with_x265
-%endif
Summary: VLC - a multimedia player and stream server
Summary(pl.UTF-8): VLC - odtwarzacz multimedialny oraz serwer strumieni
Name: vlc
@@ -90,6 +87,7 @@ Patch10: %{name}-libplacebo-5.patch
Patch11: opencv4.patch
Patch12: ffmpeg6.patch
Patch13: %{name}-taglib2.patch
+Patch14: %{name}-x265.patch
URL: http://www.videolan.org/vlc/
%{?with_decklink:BuildRequires: Blackmagic_DeckLink_SDK}
# 1.0 for X11 or GLESv1, 1.1 for GLESv2
@@ -430,6 +428,7 @@ Akcje klienta VLC dla Solid.
%patch11 -p1
%patch12 -p1
%patch13 -p1
+%patch14 -p1
%build
%{__libtoolize}
diff --git a/vlc-x265.patch b/vlc-x265.patch
new file mode 100644
index 0000000..c869f66
--- /dev/null
+++ b/vlc-x265.patch
@@ -0,0 +1,45 @@
+--- vlc-3.0.21/modules/codec/x265.c.orig 2024-06-05 17:56:07.000000000 +0200
++++ vlc-3.0.21/modules/codec/x265.c 2024-09-16 21:05:07.038413367 +0200
+@@ -67,7 +67,12 @@ struct encoder_sys_t
+ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
+ {
+ encoder_sys_t *p_sys = p_enc->p_sys;
+- x265_picture pic;
++ x265_picture pic, *pic_out;
++#if X265_BUILD >= 210
++ x265_picture pic_l[MAX_SCALABLE_LAYERS];
++ x265_picture *pic_lp[MAX_SCALABLE_LAYERS];
++ for (int i = 0; i < MAX_SCALABLE_LAYERS; i++) pic_lp[i] = &pic_l[i];
++#endif
+
+ x265_picture_init(&p_sys->param, &pic);
+
+@@ -88,8 +93,15 @@ static block_t *Encode(encoder_t *p_enc,
+
+ x265_nal *nal;
+ uint32_t i_nal = 0;
++#if X265_BUILD >= 210
++ x265_encoder_encode(p_sys->h, &nal, &i_nal,
++ likely(p_pict) ? &pic : NULL, pic_lp);
++ pic_out = pic_lp[0];
++#else
+ x265_encoder_encode(p_sys->h, &nal, &i_nal,
+ likely(p_pict) ? &pic : NULL, &pic);
++ pic_out = &pic;
++#endif
+
+ if (!i_nal)
+ return NULL;
+@@ -110,10 +122,10 @@ static block_t *Encode(encoder_t *p_enc,
+ p_enc->fmt_in.video.i_frame_rate_base /
+ p_enc->fmt_in.video.i_frame_rate;
+
+- p_block->i_pts = p_sys->initial_date + pic.poc * p_block->i_length;
++ p_block->i_pts = p_sys->initial_date + pic_out->poc * p_block->i_length;
+ p_block->i_dts = p_sys->initial_date + p_sys->dts++ * p_block->i_length;
+
+- switch (pic.sliceType)
++ switch (pic_out->sliceType)
+ {
+ case X265_TYPE_I:
+ case X265_TYPE_IDR:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/vlc.git/commitdiff/f6dfb70e9a745ef8405fa6711ac56bf7650101c6
More information about the pld-cvs-commit
mailing list