Skip to content

Fix nvenc#4

Merged
jspanchu merged 2 commits into
wheelfrom
fix-nvenc
Jul 3, 2026
Merged

Fix nvenc#4
jspanchu merged 2 commits into
wheelfrom
fix-nvenc

Conversation

@jspanchu

@jspanchu jspanchu commented Jul 3, 2026

Copy link
Copy Markdown
Member

No description provided.

jspanchu added 2 commits July 3, 2026 18:44
- Fail AllocateInputBuffers/EncodeInternal with a logged error when
  GraphicsContext is unset or not an OpenGL render window, instead of
  dereferencing null.
- Align 4:2:0 encode dimensions down to even values; NVENC rejects odd
  luma sizes, which appear with fractional devicePixelRatio scaling.
- Check encode dimensions against codec min/max caps so failure is
  actionable instead of a bare NV_ENC_ERR_INVALID_PARAM.
- CheckAvailability: probe with an offscreen GL context and fix the
  SetWidth/SetHeight typo.
<< encodeWidth << "x" << encodeHeight << " exceed the NVENC limit of "
<< maxWidth << "x" << maxHeight
<< " for the chosen codec. Reduce the frame size or switch to a codec with "
"higher limits (ex: HEVC).");

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do not support hevc yet. but if folks are on hi-dpi 4k screens and window.devicePixelRatio > 1.0, then they will run into this.

@jspanchu

jspanchu commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Ran nvenc+opengl tests locally on windows + linux successfully.

@jspanchu jspanchu merged commit 31e6e60 into wheel Jul 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant