History

ffv1enc_vulkan: disable autodetection of async_depth

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.

Lynne committed 1 year ago

Commit bb87d191 parent 85d81dc1 file · +1 −6Browse files

Unified · Split

libavcodec/ffv1enc_vulkan.c+1−6
@@ -1631,11 +1631,6 @@ static av_cold int vulkan_encode_ffv1_init(AVCodecContext *avctx) · 1630 unmodified lines
16311631 max_heap_size = max_heap_size - (max_heap_size >> 3);
16321632 }
16331633
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−
16391634 av_log(avctx, AV_LOG_INFO, "Async buffers: %zuMiB per context, %zuMiB total, depth: %i\n",
16401635 maxsize / (1024*1024),
16411636 (fv->async_depth * maxsize) / (1024*1024),
@@ -1820,7 +1815,7 @@ static const AVOption vulkan_encode_ffv1_options[] = { · 178 unmodified lines
18201815 { .i64 = 0 }, 0, 1, VE },
18211816
18221817 { "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 },
18241819
18251820 { NULL }
18261821 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t