We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53732f0 commit 6f0ecbaCopy full SHA for 6f0ecba
src/pillow_avif/_avif.c
@@ -448,7 +448,11 @@ AvifEncoderNew(PyObject *self_, PyObject *args) {
448
init_max_threads();
449
}
450
451
- encoder->maxThreads = max_threads;
+ int is_aom_encode = strcmp(codec, "aom") == 0 ||
452
+ (strcmp(codec, "auto") == 0 &&
453
+ _codec_available("aom", AVIF_CODEC_FLAG_CAN_ENCODE));
454
+
455
+ encoder->maxThreads = is_aom_encode && max_threads > 64 ? 64 : max_threads;
456
#if AVIF_VERSION >= 1000000
457
if (enc_options.qmin != -1 && enc_options.qmax != -1) {
458
encoder->minQuantizer = enc_options.qmin;
0 commit comments