-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
d3d11vpp: add GPU scale option for intel and nvidia GPUs #14155
base: master
Are you sure you want to change the base?
Conversation
Quate the comment from #11390
|
I have refacted the code to reuse d3d11vpp, also updatd the option name. There will be another change later to change SuperResolution to Scale to avoid potential copyright issue.
RTX video do support any resolution. Idealy, we should take the actual window size, and use them for the target height/width @kasper93 The GPU API are not quite the same for different venders, as you can see from my code for nvidia and intel, they may be similar, but not the same, it is hard to simplely provide API for user to set the GUID, and it just works. AMD has super res which called FSR, but it is not a GPU API, the usage is not the same as intel/nvidia, there are some glsl shades implemented the FSR for MPV. Also I have tried to use the intel auto HDR API, but failed, do we have examples for turning a SDR video to HDR video. |
I don't think they call their video hq scaler FSR in any documentation. Though indeed looking at it they did expose it through own interface, rather than rolling custom video processor in d3d11 video processing interface (to be confirmed if not available through it, not sure what browsers use). It could live in the same mpv filter (d3d11vpp), same as they integrated it in VLC. See: |
The AMF doc says it supports
FWIW I'm curious about whether it is possible to be implemented as a cross-platform filter with both d3d11 and vulkan backends. |
For AMD AMF stuff, it seems to be integrated in ffmpeg https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=11632 so we can skip this part and have it for free once it get merged. |
FFMPEG are being difficult again (https://www.phoronix.com/news/AMD-AMF-FFmpeg-Better-2024) so not really sure if it would get merged soon. |
Not sure if this is helpful, but was staring at how Chrome's Auto HDR works and is the original commit (there might be bug fixes after this commit): chromium/chromium@b2fae4c Here is another example: Aleksoid1978/VideoRenderer#128 |
Also needs fixes for gcc compilation and commits should be squashed into logical parts. |
is this helpful? |
@srk24 What is this NGX? Is it even supported anymore? |
NGX is off topic for the work in this PR. It's nvidia's umbrella for some AI based image/video processing scalers - none of which are usable via the d3d11 scaling mechanism covered by this PR. |
84df7ac
to
c59aa08
Compare
updated the easy parts.
update: Tasks 1, 2, and 3 all require extensive knowledge of MPV, which I currently lack. Therefore, I will keep the changes small:
|
Hey any update on TODOs? |
Hi, sorry for bothering you. ‘d3d11 crash 0xc0000005' Is there any other way to detect issues or logs? Thank you so much! |
The code has changed a lot since that version, it may be a memory leak or something like that. |
update: Therefore, I will keep the changes small:
|
using this build gives me this artifact on certain videos using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There is something wrong when converting the YUV420P formt to NV12. |
Download the artifacts for this pull request: |
@billxc do you mind updating the https://github.com/billxc/mpv/releases/tag/MPV-RTX-SuperRes-RC with your latest build ? |
58a042f
to
707694a
Compare
707694a
to
92fb1d7
Compare
I tried older build which use d3d11vpp but it always failed when converting YUV420P format. D3d11sr is fine but it crashed 2-3 mins aftrerward. Anyway to get d3d11vpp working without YUV420P |
I have poor knowledge for c & mpv, but hope this ft can be merged. I tried to read the code, does this code help to get the size of the vo? use dheight & dwidth. vo_direct3d.c like this? : RECT clientRect;
GetClientRect(vo_w32_hwnd(priv->vo), &clientRect);
int windowWidth = clientRect.right - clientRect.left;
int windowHeight = clientRect.bottom - clientRect.top; |
usage:
vf set d3d11vpp=scale=nvidia:scale-target
PS:
The pull requests is has not been rebased to one commit yet, as I still need some changes, and will rebase to one commit once ready for merge.