History

avutil/hwcontext_amf: add device cache size

This change improves pipeline stability and reduces dynamic GPU surface allocations when using AMF with copy_frame = 1. This optimization has no negative effect.

Araz Iusubov committed 1 year ago

Commit cd332191 parent 0cc46f11 file · +3 −1Browse files

Unified · Split

libavutil/hwcontext_amf.c+3−1
@@ -496,8 +496,10 @@ static int amf_device_create(AVHWDeviceContext *device_ctx, · 495 unmodified lines
496496
497497
498498 ret = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx->context);
499− if (ret == AMF_OK)
499+ if (ret == AMF_OK) {
500+ AMF_ASSIGN_PROPERTY_INT64(ret, ctx->context, L"DeviceSurfaceCacheSize", 50 );
500501 return 0;
502+ }
501503 av_log(device_ctx, AV_LOG_ERROR, "CreateContext() failed with error %d.\n", ret);
502504 }
503505 amf_device_uninit(device_ctx);

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