View Single Post
Old 26th December 2014, 14:36   #100  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
Quote:
Originally Posted by Orf View Post
Shiandow, to be completely sure

For SuperRes:
NEDI-pre -> <Upscale>-I -> <Upscale>-II -> SuperRes-pre -> SuperRes -> [SuperRes-inf -> SuperRes] -> NEDI-pst
Upscale means 2x upscale in both directions ? Where did final scaling should happen and what algorithm is used (better to use) for it ? And how did MPC-HC knew that it should reallocate and resize output texture on steps 2 and 3 ?

And can you please draw the same scheme for MPDN NEDI ?
That version of SuperRes is more of a proof of concept, it worked well enough but MPDN's version is nicer. In that version I got around the problem of allocating a new texture by abuseing the alpha channel, I think either "Nedi-pre" or "Upscale-I" stores the original image in the alpha channel and "SuperRes-pre" / "SuperRes-inf" downscale the image and store the difference with the original in the alpha channel. I only did this for the luma channel since the others didn't fit. The more complete MPDN diagram is something like:

Code:
       /---------------------------------------\
       |                                       | 
       v                                       |
Initial Guess ---> Downscale ---> Diff ---> SuperRes
                                   ^           ^
                                   |           |
Original --------------------------+-----------/
For clarity I've left out the various colour conversions. Basically I do downscaling in linear light and everything else in L*a*b.

For the NEDI shaders the diagram is something like:

Code:
NEDI-pre -> NEDI-I -> NEDI-II -> NEDI-pst
but in MPDN I could allocate new textures and did it as follows (the part in parentheses is the size of the resulting image).

Code:
Input (w,h)--->NEDI-Hinterleave (2w,h)--->NEDI-Vinterleave(2w,2h)
   |                ^         |                   ^
   V                |         V                   |
NEDI-I (w,h)--------/       NEDI-II (2w,h)--------/
The NEDI-XInterleave shaders reshuffle the pixels of its two inputs resulting in an image that is either scaled 2x horizontally or 2x vertically. Doing it this way avoids some unnecessary calculations.
Shiandow is offline   Reply With Quote