Skip to content

[H.264] make threads configurable #3366

@metalefty

Description

@metalefty

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions