mpv/DOCS/man
Bin Jin 27dc834f37 vo_opengl: implement NNEDI3 prescaler
Implement NNEDI3, a neural network based deinterlacer.

The shader is reimplemented in GLSL and supports both 8x4 and 8x6
sampling window now. This allows the shader to be licensed
under LGPL2.1 so that it can be used in mpv.

The current implementation supports uploading the NN weights (up to
51kb with placebo setting) in two different way, via uniform buffer
object or hard coding into shader source. UBO requires OpenGL 3.1,
which only guarantee 16kb per block. But I find that 64kb seems to be
a default setting for recent card/driver (which nnedi3 is targeting),
so I think we're fine here (with default nnedi3 setting the size of
weights is 9kb). Hard-coding into shader requires OpenGL 3.3, for the
"intBitsToFloat()" built-in function. This is necessary to precisely
represent these weights in GLSL. I tried several human readable
floating point number format (with really high precision as for
single precision float), but for some reason they are not working
nicely, bad pixels (with NaN value) could be produced with some
weights set.

We could also add support to upload these weights with texture, just
for compatibility reason (etc. upscaling a still image with a low end
graphics card). But as I tested, it's rather slow even with 1D
texture (we probably had to use 2D texture due to dimension size
limitation). Since there is always better choice to do NNEDI3
upscaling for still image (vapoursynth plugin), it's not implemented
in this commit. If this turns out to be a popular demand from the
user, it should be easy to add it later.

For those who wants to optimize the performance a bit further, the
bottleneck seems to be:
1. overhead to upload and access these weights, (in particular,
   the shader code will be regenerated for each frame, it's on CPU
   though).
2. "dot()" performance in the main loop.
3. "exp()" performance in the main loop, there are various fast
   implementation with some bit tricks (probably with the help of the
   intBitsToFloat function).

The code is tested with nvidia card and driver (355.11), on Linux.

Closes #2230
2015-11-05 17:38:20 +01:00
..
af.rst manpage: fix broken example 2015-09-27 19:21:37 +02:00
ao.rst docs: correct typo for 'ingore-chmap' 2015-08-22 11:50:33 +02:00
changes.rst manpage: move out the MPlayer comparison page 2015-02-05 22:12:11 +01:00
encode.rst manpage: Fix typo. oacopts -> ovcopts 2015-06-23 22:00:57 +02:00
input.rst command: add mistimed-frame-count property 2015-10-30 14:05:41 +01:00
ipc.rst ipc: add request_id to json 2015-07-03 22:26:54 +02:00
lua.rst subprocess, lua: export whether the process was killed by us 2015-06-27 21:08:55 +02:00
mpv.rst manpage: briefly mention libmpv 2015-10-30 09:49:16 +01:00
options.rst options: enable mpeg2 hw decoding by default if hw decoding is requested 2015-11-05 17:31:07 +01:00
osc.rst osc: time display configuration options 2015-06-19 21:33:44 +02:00
vf.rst video: replace vf_format outputlevels option with global option 2015-09-29 21:12:26 +02:00
vo.rst vo_opengl: implement NNEDI3 prescaler 2015-11-05 17:38:20 +01:00