Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[x264] make threads configurable #3366

Open
metalefty opened this issue Dec 26, 2024 · 1 comment
Open

[x264] make threads configurable #3366

metalefty opened this issue Dec 26, 2024 · 1 comment

Comments

@metalefty
Copy link
Member

At the moment, the number of threads is hardcoded to 1. I should have made this configurable via gfx.toml. In a use case of an enterprise user, the server host lacks GPU but much more CPU cores are available than an ordinary desktop. This is very informative to me.

In most cases, 1-core is enough for the encoding but it's a good thing to make it configurable for flexibility.

x264_param_default_preset(&(xe->x264_params),
xg->x264_param[ct].preset,
xg->x264_param[ct].tune);
xe->x264_params.i_threads = 1;
xe->x264_params.i_width = (width + 15) & ~15;
xe->x264_params.i_height = (height + 15) & ~15;
xe->x264_params.i_fps_num = xg->x264_param[ct].fps_num;
xe->x264_params.i_fps_den = xg->x264_param[ct].fps_den;

@metalefty
Copy link
Member Author

I'm not sure if the number of OpenH264's threads is configurable but I would like to make it configurable as well if possible.

metalefty added a commit to metalefty/xrdp that referenced this issue Dec 26, 2024
metalefty added a commit to metalefty/xrdp that referenced this issue Dec 27, 2024
Closes: neutrinolabs#3366
(cherry picked from commit e6f5e3b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant