0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/video
wm4 58a7d81dc5 gl_video: improve dithering
Use a different algorithm to generate the dithering matrix. This
looks much better than the previous ordered dither matrix with its
cross-hatch artifacts.

The matrix generation algorithm as well as its implementation was
contributed by Wessel Dankers aka Fruit. The code in dither.c is
his implementation, reformatted and with static global variables
removed by me.

The new matrix is uploaded as float texture - before this commit, it
was a normal integer fixed point matrix. This means dithering will
be disabled on systems without float textures.

The size of the dithering matrix can be configured, as the matrix is
generated at runtime. The generation of the matrix can take rather
long, and is already unacceptable with size 8. The default is at 6,
which takes about 100 ms on a Core2 Duo system with dither.c compiled
at -O2, which I consider just about acceptable.

The old ordered dithering is still available and can be selected by
putting the dither=ordered sub-option. The ordered dither matrix
generation code was moved to dither.c. This function was originally
written by Uoti Urpala.
2013-05-26 16:44:20 +02:00
..
decode dec_video: get rid of two global variables 2013-05-21 00:45:42 +02:00
filter vf_lavfi: allow setting avopts 2013-05-26 16:44:18 +02:00
out gl_video: improve dithering 2013-05-26 16:44:20 +02:00
csputils.c Silence some compiler warnings 2013-05-21 00:04:27 +02:00
csputils.h video: support YCgCo colorspace 2013-05-04 01:34:29 +02:00
fmt-conversion.c Fix compilation with Libav 2013-05-01 17:02:06 +02:00
fmt-conversion.h
image_writer.c Prefix CODEC_ID_ with AV_ 2013-03-13 23:51:30 +01:00
image_writer.h
img_format.c img_format: fix broken condition 2013-05-06 23:11:10 +02:00
img_format.h video: add XYZ support 2013-05-01 16:26:45 +02:00
img_fourcc.h core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
memcpy_pic.h vf_expand: support more image formats 2013-01-13 20:04:13 +01:00
mp_image_pool.c mp_image_pool: add pool to avoid frequent image reallocations 2013-01-13 17:39:32 +01:00
mp_image_pool.h mp_image_pool: add pool to avoid frequent image reallocations 2013-01-13 17:39:32 +01:00
mp_image.c mp_image: align image allocation height 2013-05-17 23:45:55 +02:00
mp_image.h mp_image: provide function to convert mp_image to AVFrame 2013-04-21 04:39:58 +02:00
sws_utils.c sws_utils: use libswscale for GBRP output if available 2013-01-27 13:30:53 +01:00
sws_utils.h sub: reimplement -spugauss as --sub-gauss 2012-11-25 23:40:07 +01:00
vfcap.h core: simplify OSD capability handling, remove VFCAP_OSD 2013-03-01 11:16:01 +01:00