summaryrefslogtreecommitdiffstats
path: root/video/out/dither.c
Commit message (Collapse)AuthorAgeFilesLines
* Change GPL/LGPL dual-licensed files to LGPLwm42016-01-191-12/+7
| | | | | | | | | | | Do this to make the license situation less confusing. This change should be of no consequence, since LGPL is compatible with GPL anyway, and making it LGPL-only does not restrict the use with GPL code. Additionally, the wording implies that this is allowed, and that we can just remove the GPL part.
* mpv_talloc.h: rename from talloc.hDmitrij D. Czarkoff2016-01-111-1/+1
| | | | This change helps avoiding conflict with talloc.h from libtalloc.
* Update license headersMarcin Kurczewski2015-04-131-25/+25
| | | | Signed-off-by: wm4 <wm4@nowhere>
* malloc+memset(0) to callocBruno George de Moraes2014-09-051-3/+2
| | | | Signed-off-by: wm4 <wm4@nowhere>
* dither: don't use long doublewm42013-07-051-2/+2
| | | | | | | | | | This fixes compilation with broken libcs, like on Cygwin. C99 absolutely requires long double and associated functions like expl, even if long double is double. But newlib (used by cygwin) omits declaration for these if long double is equivalent to double. The extra precision is not needed here, so remove it to make life easier for the single person using mpv with cygwin.
* gl_video: improve ditheringwm42013-05-261-0/+239
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.