TheSeriousJoker
TheSeriousJoker

Reputation: 123

Disabling thread pools in libx265

I am using libavcodec to encode a YUV to h265. libx265 creates its own thread-pool based on the number of cores available. I want to run h265 entirely on a single core for performance test. Is there a way to do it using av_opt_set. I have tried av_opt_set(encCtx->priv_data, "pools", "none", 0) and av_opt_set(encCtx->priv_data, "numa-pools", "none", 0); But no effect. I have set encCtx->thread_count as 1.

Upvotes: 2

Views: 1901

Answers (1)

TheSeriousJoker
TheSeriousJoker

Reputation: 123

Thanks. I found the answer. It has to be done using "av_opt_set(encCtx->priv_data, "x265-params", AVDICT, 0)", where AVDICT is "--pools=none, --numa-pools=none". Reference: "http://x265.readthedocs.io/en/default/cli.html"

Upvotes: 3

Related Questions