obs-StreamFX icon indicating copy to clipboard operation
obs-StreamFX copied to clipboard

Resolution Scaling for Hardware Encoders

Open Xaymar opened this issue 1 year ago • 0 comments

Discussion Thread

https://github.com/Xaymar/obs-StreamFX/discussions/847

Provide a summary of the Improvement

Users should be able to choose a different stream and recording resolution without incurring the multi-copy overhead when a Hardware Encoder on the same GPU as OBS Studio is used. The ideal solution is a drop-in class that can be called from any current and future encoder.

Completion Requirements

  • Easily integratable in future encoder implementations. A junior C/C++ developer should be able to integrate this change within 1 hour of starting.
    • This either means a separate class or direct integration into the common encoder factory.
  • Code should have enough comments to be understood, but not too many.
    • int a = 1; // Assigns 1 to a is pointless.
    • a *= std::max(b/c, log(d)) / log2(e); should definitely have a comment.
    • Multiple comments may be grouped into one block preceding the difficult section.
  • Code is licensed under GPLv2 or later.
  • Support for NV12->NV12, I420->I420, I444->I444 and RGB->RGB.
  • Scalers: Linear, Bicubic, Lanczos or Magic Kernel.
  • Zero-Copy should stay functional, and scaling should have no to very little impact.
  • Multi-GPU support should stay functional.
  • Encoders can run at an integer fraction of the OBS Studio framerate without causing problems with OBS Studio's fixed function sequential pipeline.

Xaymar avatar Aug 04 '22 16:08 Xaymar