summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-10-11 15:05:38 -0500
committerDudemanguy <random342@airmail.cc>2023-10-16 15:38:59 +0000
commit917bdf1b5c86312e9ee1edfaedb553f0dfe95dfc (patch)
tree6b8f89394a8f96c83aea09b6baf057cae339d971
parent39b9635305e84b57520be5e030d3dc3f241ba7df (diff)
downloadmpv-917bdf1b5c86312e9ee1edfaedb553f0dfe95dfc.tar.bz2
mpv-917bdf1b5c86312e9ee1edfaedb553f0dfe95dfc.tar.xz
dither: removed some unused code
Added in 58a7d81dc55835fb0f5cc6a3f14288d722f83c91. Nobody touched it since then, so it's probably useless. libplacebo has its own dithering stuff anyways.
-rw-r--r--video/out/dither.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/video/out/dither.c b/video/out/dither.c
index f8fba735d3..44558baeea 100644
--- a/video/out/dither.c
+++ b/video/out/dither.c
@@ -173,59 +173,3 @@ void mp_make_ordered_dither_matrix(unsigned char *m, int size)
m[x+y+offset[i]] = m[x+y] * 4 + (3-i) * 256/size/size;
}
}
-
-#if 0
-
-static int index_cmp(const void *a, const void *b)
-{
- unsigned int x = *(const unsigned int *)a;
- unsigned int y = *(const unsigned int *)b;
- return x < y ? -1 : x > y;
-}
-
-static void fsck(struct ctx *k)
-{
- qsort(k->unimat, k->size2, sizeof k->unimat[0], index_cmp);
- for (unsigned int c = 0; c < k->size2; c++)
- assert(k->unimat[c] == c);
-}
-
-uint16_t r[MAX_SIZE2];
-static void print(struct ctx *k)
-{
-#if 0
- puts("#include <stdint.h>");
- printf("static const int mp_dither_size = %d;\n", k->size);
- printf("static const int mp_dither_size2 = %d;\n", k->size2);
- printf("static const uint16_t mp_dither_matrix[] = {\n");
- for(unsigned int y = 0; y < k->size; y++) {
- printf("\t");
- for(unsigned int x = 0; x < k->size; x++)
- printf("%4u, ", k->unimat[XY(k, x, y)]);
- printf("\n");
- }
- puts("};");
-#else
- for(unsigned int y = 0; y < k->size; y++) {
- for(unsigned int x = 0; x < k->size; x++)
- r[XY(k, x, y)] = k->unimat[XY(k, x, y)];
- }
-#endif
-}
-
-#include "osdep/timer.h"
-int main(void)
-{
- mp_time_init();
- struct ctx *k = calloc(1,sizeof(struct ctx));
- int64_t s = mp_time_us();
- makegauss(k, 6);
- makeuniform(k);
- print(k);
- fsck(k);
- int64_t l = mp_time_us() - s;
- printf("time: %f ms\n", l / 1000.0);
- return 0;
-}
-
-#endif