Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvenc support for 10-bit modes with HEVC #1308

Closed
totaam opened this issue Sep 16, 2016 · 2 comments
Closed

nvenc support for 10-bit modes with HEVC #1308

totaam opened this issue Sep 16, 2016 · 2 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Sep 16, 2016

Follow up from #1260 (nvenc 7) and #909 (10-bit colour).

According to NVIDIA VIDEO CODEC SDK: HEVC 10-bit encoding (..) require Pascal generation GPUs.

According to the docs:

  • NV_ENC_BUFFER_FORMAT_YUV420_10BIT 10 bit Semi-Planar YUV [Y plane followed by interleaved UV plane]. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data.
  • NV_ENC_BUFFER_FORMAT_YUV444_10BIT 10 bit Planar YUV444 [Y plane followed by U and V planes]. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data.
  • NV_ENC_BUFFER_FORMAT_ARGB10 10 bit Packed A2R10G10B10. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data.
  • NV_ENC_BUFFER_FORMAT_ABGR10 10 bit Packed A2B10G10R10. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data.

The "each pixel of size 2 bytes" looks wrong to me (probably true for YUV formats only): this conflicts with "A2B10G10R10" / "A2R10G10B10". It looks like plain 32-bit data (2 alpha + 3*10 bit) we get from X11, which would be nice.
Another way would be to use nvenc via ffmpeg (ie: added support for 10 bit HEVC encoding), meh.

@totaam
Copy link
Collaborator Author

totaam commented Feb 20, 2017

See also #1347, #1317, #1823.

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2020

As per NvEncodeAPI Data structures: NV_ENC_BUFFER_FORMAT_ABGR10 : 10 bit Packed A2B10G10R10. This is a word-ordered format where a pixel is represented by a 32-bit word with R in the lowest 10 bits, G in the next 10 bits, B in the 10 bits after that and A in the highest 2 bits.

Done in r26968.

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

No branches or pull requests

1 participant