-
Notifications
You must be signed in to change notification settings - Fork 503
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
Add v4 effects from the port of mpv-prescalers #806
Conversation
Thank you for your contribution! I will primarily review this pull request, which will become a new feature in v1.0. If you don't want to maintain two versions, feel free to close #805, as there are no plans to add new features to v0.10. Close #554 according to #803 (comment) |
Do you have any more information which might help to trigger it? Every NNEDI3 works for me on AMD hardware with 5c007a1 build of Magpie. |
I have managed to trigger it on Intel hardware. I'll try investigating. |
This should hopefully fix NNEDI3. |
The names of these effects should be consistent with other effects, such as "RAVU_Lite_R3". The old RAVU_Lite_R3 should be deleted. |
I have modified scripts to generate shaders with names in that format. But I also suggests simplifying build system for effects with wildcards as it will remove or at least reduce the need to modify project files when adding new effects. The main downside of this approach is that it will be impossible to modify project files from Visual Studio and they would need to be modified manually as text files. Feel free to remove that part if that approach is undesirable. |
As far as I know, MSBuild still has bugs with wildcard support, and it is not recommended to use them. Since it is rare to add a large number of effects at the same time, the current solution is still acceptable. Of course, as more and more effects are added, it may eventually become unsuitable to put them in the project file. |
This reverts commit 01c1aff.
Ok. Reverted. |
Two suggestions:
|
Actually, I believe RGB version makes more sense for Magpie than for mpv, for the following reasons:
|
@bjin Thank you for your explanation! The test pattern is very helpful, and now I can see the clear difference. Although I can’t tell them apart with my naked eye in real-world scenarios, it’s better to keep them for different situations. |
It's also possible to notice some differences on some real content: image.
Of course it could be debated if that rather subtle difference is worth performance penalty. It also might be quite interesting to add something like CfL to this comparison but porting and integrating it probably won't be easy. I have added some information about where to find generation scripts to the top comment. Would this be enough? |
Very nice, thank you! |
I think this PR is ready to be merged, thank you for your excellent work! I will do some more testing and make sure nothing is missed. |
Thank you for reviews and all the help with bringing it to this point! |
I tested each effect under the same conditions, and this is a table that records their performance.
|
@hauuau I did another look and find that I used the same boolean An easy way to fix this is to define another boolean mix macro like: #define bmix(a, b, c) ((c) ? (b) : (a)) |
@bjin Thank you for the investigation. When one input is nan, the result of @hauuau I noticed that the NNEDI3 effects are not sorted correctly in the user interface. Please use |
@bjin Thank you for bringing attention to possible problems in RAVU and explaining the difference between lerp and mix! @Blinue Thank you for performance data! I have added SORT_NAME to NNEDI3. |
This document states that functions in hlsl are always inlined, so there is no overhead for calling them. I think your fix is appropriate. This PR is ready to be merged, and I’m happy to do so. Do you have any more changes to make? |
I can't think of anything to add or change at this time. If something comes to mind later I'll make a separate PR. |
Awesome! Thank you for your creative work and your responsiveness to the code review. Please don’t hesitate to share more ideas with us if you have any. @bjin Thank you also for creating these excellent algorithms and providing a lot of help during the porting process! |
This is generated effects from the port of mpv-prescalers adapted to MagpieFX v4.
The source code for generation is in the source-magpie-v4 branch