falahati / NvAPIWrapper

NvAPIWrapper is a .Net wrapper for NVIDIA public API, capable of managing all aspects of a display setup using NVIDIA GPUs
GNU Lesser General Public License v3.0
313 stars 55 forks source link

YCbCr output color format #38

Closed bgr closed 3 years ago

bgr commented 3 years ago

Hi, I've tried out the wrapper and from what I saw it doesn't seem to have a notion of YCbCr color format. I currently have YCbCr420 set in NVidia Control Panel, but the tool still returns RGB. Is this a limitation of NVidia's API itself or the wrapper?

falahati commented 3 years ago

What API are you using and what are you trying to do?

bgr commented 3 years ago

Now I see there's ColorDataFormat.cs that indeed mentions YUV420 and other modes, I had mistakenly looked at ColorFormat.cs and used display.DisplayDevice.DefaultColorData instead of CurrentColorData.

I'm trying to find a way to change resolution, color format, refresh rate and HDR on/off programmatically (can be from command line, doesn't need to be a library), and your wrapper is the closest thing to it I've found. Is it possible to set all that using this wrapper?

falahati commented 3 years ago

I have an app that should do this: https://github.com/falahati/HeliosDisplayManagement

You can take a look at the code and see if it helps. Never tried it with YUV420 tho. For HDR, we have #19 pull request that should help you.

bgr commented 3 years ago

Great! Thanks for the quick reply.

falahati commented 3 years ago

NP, Following commits might be of interest too: https://github.com/falahati/NvAPIWrapper/commit/d89a956bd9050c36cd2efed93e2f63309f642830 https://github.com/falahati/NvAPIWrapper/commit/76ce0a9b1e6713ba2e53449ef12f3f06a3c0430f https://github.com/falahati/NvAPIWrapper/commit/12ffff93be364841629ccaa9a5832cfc1ff614b1