[vlc-commits] [Git][videolan/vlc][master] codec: x265: handle X265_MAX_FRAME_THREADS on newer CPU
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Sep 25 12:53:17 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
bbd294d1 by François Cartegnie at 2024-09-25T12:41:05+00:00
codec: x265: handle X265_MAX_FRAME_THREADS on newer CPU
libx265 will bail out when hitting the limit
x265 [error]: frameNumThreads (--frame-threads) must be [0 .. X265_MAX_FRAME_THREADS)
- - - - -
1 changed file:
- modules/codec/x265.c
Changes:
=====================================
modules/codec/x265.c
=====================================
@@ -36,6 +36,10 @@
#include <x265.h>
+#ifndef X265_MAX_FRAME_THREADS
+# define X265_MAX_FRAME_THREADS 16
+#endif
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
@@ -153,6 +157,8 @@ static int Open (vlc_object_t *p_this)
x265_param_default(param);
param->frameNumThreads = vlc_GetCPUCount();
+ if(param->frameNumThreads > X265_MAX_FRAME_THREADS)
+ param->frameNumThreads = X265_MAX_FRAME_THREADS;
param->bEnableWavefront = 0; // buggy in x265, use frame threading for now
param->maxCUSize = 16; /* use smaller macroblock */
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bbd294d1e46b86653873ec88d49e9a15cbaae68f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/bbd294d1e46b86653873ec88d49e9a15cbaae68f
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list