Skip to content

obs-filters: RTX denoiser initialization fix and code cleanup#4458

Merged
jp9000 merged 2 commits into
obsproject:masterfrom
pkviet:nvafx-fix
Apr 5, 2021
Merged

obs-filters: RTX denoiser initialization fix and code cleanup#4458
jp9000 merged 2 commits into
obsproject:masterfrom
pkviet:nvafx-fix

Conversation

@pkviet

@pkviet pkviet commented Apr 4, 2021

Copy link
Copy Markdown
Member

Description

This fixes #4441 (first commit).
The second commit is a minor code cleanup:

  • sets defaults intensity of RTX denoiser to max.
  • adds an initialization check of nvafx.
  • splits nvafx initialization from channel allocation for better
    readability of the code.
  • moves the intensity update from the filter_audio process function
    to the plugin update function.
  • logs the error code in case nvafx returns an error when running.
    (useful for devs; I haven't translated the error codes which are
    available in the sdk).

Motivation and Context

  • Fixes an issue.
  • Code cleanup will make maintainance easier.

How Has This Been Tested?

Tested that the issue is fixed and that the plugin works fien after the code cleanup.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

This fixes issue obsproject#4441.
The issue occurs when adding the noise suppression filter for the
first time. Rnnoise or speex are the default noise suppression
methods. Line 344 returns which prevents initialization and
allocation for nvafx (rtx denoiser).
With the fix, initialization of nvafx occurs when swapping methods.
@RytoEX RytoEX added the kind/bug Categorizes issue or PR as related to a bug. label Apr 4, 2021
@RytoEX RytoEX added this to the OBS Studio 27.0 milestone Apr 4, 2021
@RytoEX RytoEX added the Seeking Testers Build artifacts on CI label Apr 4, 2021
@WizardCM WizardCM requested a review from derrod April 4, 2021 22:00
Comment thread plugins/obs-filters/noise-suppress-filter.c Outdated
@derrod

derrod commented Apr 5, 2021

Copy link
Copy Markdown
Member

Seems to fix it for me.

This minor code cleanup commit does the following:
- sets defaults intensity of RTX denoiser to max.
- adds an initialization check of nvafx.
- splits nvafx initialization from channel allocation for better
readibility of the code.
- moves the intensity update from the filter_audio process function
to the plugin update function.
- logs the error code in case nvafx returns an error when running.
(useful for devs; I haven't translated the error codes which are
available in the sdk).
@jp9000 jp9000 merged commit 38d17ac into obsproject:master Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. Seeking Testers Build artifacts on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

obs-filters: NVAFX filter errors out when first added

5 participants