[vlc-commits] [Git][videolan/vlc][master] 2 commits: video_filter: disable VQ Enhancer for other GPU manufacturers
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Sep 21 12:28:25 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
49381f47 by Steve Lhomme at 2024-09-21T12:16:15+00:00
video_filter: disable VQ Enhancer for other GPU manufacturers
InitDX11 crashes if the filter is enabled but an incompatible GPU is used.
- - - - -
de748458 by Steve Lhomme at 2024-09-21T12:16:15+00:00
hw/amf: keep the AMF version in the context
For FRC we may need to disable it before 1.4.34.
- - - - -
3 changed files:
- modules/hw/amf/amf_helper.c
- modules/hw/amf/amf_helper.h
- modules/video_filter/amf_vqenhancer.c
Changes:
=====================================
modules/hw/amf/amf_helper.c
=====================================
@@ -21,12 +21,12 @@ int vlc_AMFCreateContext(struct vlc_amf_context *c)
if (hLib == NULL)
return VLC_ENOTSUP;
- amf_uint64 version = 0;
+ c->Version = 0;
AMF_RESULT res;
AMFQueryVersion_Fn queryVersion = (AMFQueryVersion_Fn)GetProcAddress(hLib, AMF_QUERY_VERSION_FUNCTION_NAME);
if (unlikely(queryVersion == NULL))
goto error;
- res = queryVersion(&version);
+ res = queryVersion(&c->Version);
if (unlikely(res != AMF_OK))
goto error;
@@ -34,7 +34,7 @@ int vlc_AMFCreateContext(struct vlc_amf_context *c)
c->Context = NULL;
AMFInit_Fn init = (AMFInit_Fn)GetProcAddress(hLib, AMF_INIT_FUNCTION_NAME);
- res = init(version, &c->pFactory);
+ res = init(c->Version, &c->pFactory); // use the highest possible value for that DLL
if (unlikely(res != AMF_OK))
goto error;
=====================================
modules/hw/amf/amf_helper.h
=====================================
@@ -29,6 +29,7 @@ struct vlc_amf_context
{
AMT_TYPE(AMFFactory) *pFactory;
AMT_TYPE(AMFContext) *Context;
+ amf_uint64 Version;
void *Private;
};
=====================================
modules/video_filter/amf_vqenhancer.c
=====================================
@@ -158,6 +158,13 @@ static int D3D11CreateAMFVQE(filter_t *filter)
if (!video_format_IsSimilar(&filter->fmt_in.video, &filter->fmt_out.video))
return VLC_EGENERIC;
+ d3d11_decoder_device_t *dev_sys = GetD3D11OpaqueContext( filter->vctx_in );
+ if (dev_sys->d3d_dev.adapterDesc.VendorId != GPU_MANUFACTURER_AMD)
+ {
+ msg_Err(filter, "AMF filter only supported with AMD GPUs");
+ return VLC_ENOTSUP;
+ }
+
struct filter_sys_t *sys = vlc_obj_calloc(VLC_OBJECT(filter), 1, sizeof(*sys));
if (unlikely(sys == NULL))
return VLC_ENOMEM;
@@ -180,8 +187,6 @@ static int D3D11CreateAMFVQE(filter_t *filter)
return VLC_EGENERIC;
}
- d3d11_decoder_device_t *dev_sys = GetD3D11OpaqueContext( filter->vctx_in );
-
int err = vlc_AMFCreateContext(&sys->amf);
if (err != VLC_SUCCESS)
return err;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ef1064d45d1d8e937a255c9442cc541d8fc4f6ba...de748458776f58f150edc06a4b9cac8c961dac20
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ef1064d45d1d8e937a255c9442cc541d8fc4f6ba...de748458776f58f150edc06a4b9cac8c961dac20
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list