1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-21 15:27:00 +00:00
mpv/video/out/gpu
Bin Jin ca2f193671 vo_gpu: implement error diffusion for dithering
This is a straightforward parallel implementation of error diffusion
algorithms in compute shader. Basically we use single work group with
maximal possible size to process the whole image. After a shift
mapping we are able to process all pixels column by column.

A large ring buffer are allocated in shared memory to speed things up.
However the size of required shared memory depends linearly on the
height of video window (or screen height in fullscreen mode). In case
there is no enough shared memory, it will fallback to `--dither=fruit`.

The maximal allowed work group size is hardcoded as 1024. Ideally we
could query `GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS`. But for whatever
reason, it seems most high end card from nvidia and amd support only
the minimal required value, so I guess we can stick to it for now.
2019-06-16 11:19:44 +02:00
..
context.c vo_gpu: vulkan: Add back context_win for libplacebo 2019-04-21 23:55:22 +03:00
context.h vo: use a struct for vsync feedback stuff 2018-12-06 10:30:25 +01:00
d3d11_helpers.c vo_gpu: d3d11: implement tex_download() 2018-02-13 21:25:15 +11:00
d3d11_helpers.h vo_gpu: d3d11: implement tex_download() 2018-02-13 21:25:15 +11:00
error_diffusion.c vo_gpu: implement error diffusion for dithering 2019-06-16 11:19:44 +02:00
error_diffusion.h vo_gpu: implement error diffusion for dithering 2019-06-16 11:19:44 +02:00
hwdec.c hwdec: detach d3d and d3d9 hwaccel from angle 2018-01-25 20:57:45 -08:00
hwdec.h vo_gpu: hwdec: remove redundant fields 2017-12-01 05:57:41 +01:00
lcms.c lcms: allow infinite contrast 2019-03-09 12:55:44 +01:00
lcms.h
libmpv_gpu.c drm: rename plane options to better, invariant, names 2018-12-01 15:42:20 +02:00
libmpv_gpu.h client API: add a new way to pass X11 Display etc. to render API 2018-03-26 19:47:08 +02:00
osd.c vo_gpu: fix segfault when OSD tex creation fails 2019-04-21 23:55:22 +03:00
osd.h vo_gpu: simplify structs / names 2017-09-22 16:58:55 +02:00
ra.c client API: add a new way to pass X11 Display etc. to render API 2018-03-26 19:47:08 +02:00
ra.h vo_gpu: index desc namespaces by ra 2019-04-21 23:55:22 +03:00
shader_cache.c vo_gpu: index desc namespaces by ra 2019-04-21 23:55:22 +03:00
shader_cache.h vo_gpu: invalidate fbotex before drawing 2017-12-25 00:47:53 +01:00
spirv_shaderc.c vo_gpu: switch to optimization level performance 2018-09-01 16:14:22 +02:00
spirv.c spirv: remove --spirv-compiler=nvidia 2018-12-01 15:50:23 +02:00
spirv.h vo_gpu: vulkan: generalize SPIR-V compiler 2017-09-26 17:25:35 +02:00
user_shaders.c vo_gpu: allow user shader to fix texture offset 2019-06-06 20:01:56 +02:00
user_shaders.h vo_gpu: allow user shader to fix texture offset 2019-06-06 20:01:56 +02:00
utils.c vo_gpu: fix vec3 packing in UBOs/push_constants 2018-09-29 20:15:10 +02:00
utils.h vo_gpu: simplify structs / names 2017-09-22 16:58:55 +02:00
video_shaders.c vo_gpu: fix initial seeding of the peak detect ssbo 2019-02-18 01:54:06 +02:00
video_shaders.h vo_gpu: improve tone mapping desaturation 2019-02-18 01:54:06 +02:00
video.c vo_gpu: implement error diffusion for dithering 2019-06-16 11:19:44 +02:00
video.h vo_gpu: implement error diffusion for dithering 2019-06-16 11:19:44 +02:00