[FFmpeg-devel] [PATCH v4] libsvtav1: Add logical_processors option

Moritz Barsnick barsnick at gmx.net
Wed Mar 10 19:29:08 EET 2021


On Wed, Mar 10, 2021 at 00:12:34 -0600, Christopher Degawa wrote:
> + at item logical_processors
> +Number of logical processors to run the encoder on, threads are managed by the OS scheduler.
> +Used for limiting the size of memory buffers and threads for a target logical processor count.
> +Does not set thread affinity or total threads, but instead sets t * logical_processors amount of threads
> +with t being the amount of threads libsvtav1 sets per cpu (0 - ncpus).

You should restrict the line length here, just for consistency with the
rest of this document. (It doesn't affect the formatting of the output
documents, obviously.)

> +    unsigned logical_processors;

The libsvtav1 API defines this as uint32_t, so I believe you should
mirror that.

> +      AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  INT_MAX, VE },

Probably UINT_MAX, though I doubt that such a number of processors will
be reached. ;-) I don't know whether there's another natural limit
within libsvtav1.

Cheers,
Moritz


More information about the ffmpeg-devel mailing list