The issue is that this could consume gigabytes of VRAM at higher resolutions for not that much of a speedup. Automatic detection was not a good idea as we can't know how much VRAM is actually free. Just remove it.
Unified · Split
| @@ -1631,11 +1631,6 @@ static av_cold int vulkan_encode_ffv1_init(AVCodecContext *avctx) · 1630 unmodified lines | ||
| 1631 | 1631 | max_heap_size = max_heap_size - (max_heap_size >> 3); |
| 1632 | 1632 | } |
| 1633 | 1633 | |
| 1634 | − if (!fv->async_depth) { | |
| 1635 | − fv->async_depth = FFMIN(fv->qf->num, FFMAX(max_heap_size / maxsize, 1)); | |
| 1636 | − fv->async_depth = FFMAX(fv->async_depth, 1); | |
| 1637 | − } | |
| 1638 | − | |
| 1639 | 1634 | av_log(avctx, AV_LOG_INFO, "Async buffers: %zuMiB per context, %zuMiB total, depth: %i\n", |
| 1640 | 1635 | maxsize / (1024*1024), |
| 1641 | 1636 | (fv->async_depth * maxsize) / (1024*1024), |
| @@ -1820,7 +1815,7 @@ static const AVOption vulkan_encode_ffv1_options[] = { · 178 unmodified lines | ||
| 1820 | 1815 | { .i64 = 0 }, 0, 1, VE }, |
| 1821 | 1816 | |
| 1822 | 1817 | { "async_depth", "Internal parallelization depth", OFFSET(async_depth), AV_OPT_TYPE_INT, |
| 1823 | − { .i64 = 0 }, 0, INT_MAX, VE }, | |
| 1818 | + { .i64 = 1 }, 1, INT_MAX, VE }, | |
| 1824 | 1819 | |
| 1825 | 1820 | { NULL } |
| 1826 | 1821 | }; |