Pergunta

I'm trying to get x264 encoder to use multiple CPU cores.
I'm changing i_threads value in the x264_param_t structure. I've tried to set it to different values from 1 to 6 and I don't see any change in performance.

I'm using https://github.com/halfninja/android-ffmpeg-x264 project with these flags:
./configure --cross-prefix=arm-linux-androideabi- --enable-pic --host=arm-linux

Is multithreaded encoding supported on ARM? Will it give me significant boost in performance on a 4 core CPU?

Foi útil?

Solução

Turns out threading support was not enabled in my x264 Android build.
By default x264 configure script doesn't find pthreads library, because Android NDK doesn't include it as a standalone library.
As a workaround I've created an empty libpthreads.a to enable POSIX threads support in my build.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top