nv-filters: Set NvVFX_Run to SYNC mode

The NvVFX_Run function can be run in SYNC or ASYNC mode; the SDK sample
uses SYNC. This defines the magic numbers in an enum and sets the
NvVFX_Run function to SYNC.

Signed-off-by: pkv <pkv@obsproject.com>
This commit is contained in:
pkv
2025-08-08 03:56:31 +02:00
committed by Ryan Foster
parent 94752762c7
commit ab55bb46ea

View File

@@ -618,7 +618,7 @@ fail:
//---------------------------------------------------------------------------//
// video processing functions //
enum nvvfx_run_mode { SYNC, ASYNC };
static bool process_texture(struct nvvfx_data *filter)
{
enum nvvfx_fx_id id = filter->filter_id;
@@ -648,7 +648,7 @@ static bool process_texture(struct nvvfx_data *filter)
/* 3. Run AIGS (AI Greenscreen) fx */
if (id != S_FX_BLUR) {
vfxErr = NvVFX_Run(filter->handle, 1);
vfxErr = NvVFX_Run(filter->handle, SYNC);
if (vfxErr != NVCV_SUCCESS) {
const char *errString = NvCV_GetErrorStringFromCode(vfxErr);
error("Error running the AIGS FX; error %i: %s", vfxErr, errString);
@@ -660,7 +660,7 @@ static bool process_texture(struct nvvfx_data *filter)
if (id != S_FX_AIGS) {
/* 4. BLUR FX */
/* 4a. Run BLUR FX except for AIGS */
vfxErr = NvVFX_Run(filter->handle_blur, 1);
vfxErr = NvVFX_Run(filter->handle_blur, SYNC);
if (vfxErr != NVCV_SUCCESS) {
const char *errString = NvCV_GetErrorStringFromCode(vfxErr);
error("Error running the BLUR FX; error %i: %s", vfxErr, errString);