You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
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.
This commit is contained in:
committed by
Dmitrii Ovchinnikov
parent
0cc46f1f59
commit
cd33219558
@ -496,8 +496,10 @@ static int amf_device_create(AVHWDeviceContext *device_ctx,
|
|||||||
|
|
||||||
|
|
||||||
ret = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx->context);
|
ret = ctx->factory->pVtbl->CreateContext(ctx->factory, &ctx->context);
|
||||||
if (ret == AMF_OK)
|
if (ret == AMF_OK) {
|
||||||
|
AMF_ASSIGN_PROPERTY_INT64(ret, ctx->context, L"DeviceSurfaceCacheSize", 50 );
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
av_log(device_ctx, AV_LOG_ERROR, "CreateContext() failed with error %d.\n", ret);
|
av_log(device_ctx, AV_LOG_ERROR, "CreateContext() failed with error %d.\n", ret);
|
||||||
}
|
}
|
||||||
amf_device_uninit(device_ctx);
|
amf_device_uninit(device_ctx);
|
||||||
|
Reference in New Issue
Block a user