[vlc-commits] [Git][videolan/vlc][3.0.x] codec: x265: handle X265_MAX_FRAME_THREADS on newer CPU
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Oct 15 07:56:07 UTC 2024
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
4cbeec24 by François Cartegnie at 2024-10-15T07:33:27+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)
(cherry picked from commit bbd294d1e46b86653873ec88d49e9a15cbaae68f)
- - - - -
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
*****************************************************************************/
@@ -156,6 +160,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/4cbeec2436cfb6718d72ae5cd0e8a74971dc2c03
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/4cbeec2436cfb6718d72ae5cd0e8a74971dc2c03
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