-
Notifications
You must be signed in to change notification settings - Fork 113
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
SuperRes filter is great, but output-res option is not suitable for it #459
Comments
Hello @rigaya, I get similar error messages with the new filters. (The Upscaler feature supports any input resolution, and the following scaling factors: 4/3x (~1.33x), 1.5x, 2x, 3x and 4x. Trying to denoise, upscale with superres and artefact reduction I get the error messages below.
or
or
However, I noticed it seems as if it tries to upscale the 720x480 to 1922x1080 when using -2x1080 in the upsize settings. |
@quamt The line artifact showing up was due to spline16 bug in NVEnc 7.15, shall be fixed in NVEnc 7.16. I also think "A CUDA pitch is not within the acceptable range" problem is due to input resolution. as I have no problem with at least 720p and 1080p. The problem is that I could not find from the documents which is the acceptable range (or value). vpp-resize nvvfx-superres is using "Super Resolution" and not "Upscaler" from the MAXINE-VFX-SDK. As scaling factor is limited to 4/3x (~1.33x), 1.5x, 2x, 3x and 4x, NVEnc will try using these ratios to starting from the ratio near --output-res, and then resize to the exact --output-res value. Therefore, I think --output-res will be enough and adding another --output-scale option will be more confusing. |
@rigaya Then SuperRes is unfortunately not usable for me with NVEnc, because even a simple resize from a 720x400 (16:9) video fails :-( nvencc64.exe --avhw -i input.mkv -c hevc --profile main --level auto --preset quality --qvbr 28 --aq-temporal --aq-strength 0 --lookahead 32 --bref-mode middle --output-res 1920x1080 [-2x1080] --vpp-resize algo=nvvfx-superres,superres-mode=1,superres-strength=0.5 --audio-copy -o output.mkv
Magnifying a 1280x720p or 1920x1080p with SuperRes is relatively useless, but yes, I can also confirm that this works. Update: 640x480p ->1440x1080 works, too! |
The Super Resolution feature supports between 90p to 2160p as input resolutions. So it seems only Progressive material is supported. Testet 640x480p and it works. |
It seems the width must be a multiple of 128. |
yes looks like it! But this doesn't seem to be a limitation of the MAXINE-VFX-SDK (at least according to the documentation). |
@Alex-Balay Thanks, I've did some tests and can confirm width must be multiple of 128, and height seems to have no restriction. Below is result for --vpp-nvvfx-denoise, "Y" was fine, but "N" went into error.
|
@rigaya The fault lies with the SDK, I just tried it with the sample app and there are limitations here that were not mentioned. So, to make sense of this filter, NVEnc would first have to scale to the next smaller or larger supported width (divisible by 128) if a different width is detected and then apply the SuperRes filter. Of course only from my point of view, because I don't think anyone needs this filter for resizing 720p and 1080p content. |
No, try setting the output resolution to 2x height of the input. VideoEffectsApp.exe --in_file=000000244.png --out_file=000000244-1.png --effect=SuperRes --resolution=1152 --mode=1 --show where 000000244.png is 720x576 @rigaya NVEncFilterNvvfx.cpp
From API: |
@Alex-Balay oh, I had overlooked that, you're right! With the SDK it works. So the error lies with NVEnc :-( |
NVEnc 7.17 should input width which cannot be divided by 128. What I changed is very simple... MAXINE-VFX-SDK uses NvCVImage structure as filter input and it's memory can be allocated in 2 ways, one ways is to use NvCVImage C++ constructer and another is to use NvCVImage_Alloc function. NVEnc 7.17 switches to use NvCVImage_Alloc function instead of C++ constructer as same as in the sample code, and that seems to avoid the error. I was successfully able to resize 720x480 → 1920x1080. |
@rigaya Thank you! :-) |
Since many videos do not always have exact formats, the SuperRes filter usually does not work. Even if I calculate the size exactly according to the resize factor.
Example:
Input 720x404 --> --output-res=1440x808 --> Suitable ratio for nvvfx-superres not found!
Upscaling from 1280x720 to 1920x1080 (2x) works but I don't need that often.
Therefore, the following alternative option to --output-res would be better for SuperRes:
--output-scale
Examples:
--output-scale 1.5
--output-scale 2
--output-scale 3
--output-scale 4
The text was updated successfully, but these errors were encountered: