Skip to content
Snippets Groups Projects
Commit bbd294d1 authored by François Cartegnie's avatar François Cartegnie :fingers_crossed: Committed by Steve Lhomme
Browse files

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)
parent 7df26860
No related branches found
No related tags found
1 merge request!6086codec: x265: handle X265_MAX_FRAME_THREADS on newer CPU
Pipeline #517565 passed with stage
in 12 minutes and 30 seconds
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment