-
Notifications
You must be signed in to change notification settings - Fork 2
/
TODO.txt
110 lines (86 loc) · 3.78 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
see also the TODO comments in the files themselves
flag to delete input files on success (-d?)
flag to copy file times and attributes (-k?)
use png2webp-eputs.c as base
change FILE|fp|png_get_io_ptr
posix: int fd
in: fstat (+ something acl or xattr or selinux security context?)
out: futimens(&stat.st_atim), fchown, fchmod (ditto)
see how coreutils cp -p or -a does it
dumb alternative like NOFOPENX to avoid having to do IO loops?
in: open, stat, fdopen, fread etc, fclose
out: open, fdopen, fwrite etc, fflush, futimens etc, fclose
windows: HANDLE
CreateFile[AW]
using W would mean wmain, wfprintf, etc, but no UTF-8 manifest
in/out: FILE_BASIC_INFO (timestamps + attributes (might need a mask?))
maybe other stuff like this gist:
https://gist.github.com/petrsnd/e94c6100c9f2c8c6df10
see how robocopy /copyall does it (how?)
others: who cares lol
negative cli flags? capitalize?
less gotos especially in p2w
try to minimize null frees without making a bigger exe
check WEBP_REDUCE_SIZE works with all #if in png2webp.c
endian-independent code without adding more swaps on little?
restrict const register static etc? or just rely on clang
e.g. static WebPConfig?
configure: LOSSYISERROR NOVLA DOFLUSH USEGETOPT
maybe just use autoconf
nmake? remake compile-msvc.bat ?
try to figure out how to use clang-cl on windows instead of msys2
it's in the native tools %path% now
make a separate build batch for it (or cmake?)
make sure NOTHREADS is !WEBP_USE_THREAD
add some flags to libpng configure. no phys and other useless stuff
after that, add a bunch of patches to the submodules
to make static builds even smaller
no config structs required just hardcode it
minimize static build by making strings match some library one where possible
parallelize more, multiple conversions at once?
needs no global pnglen, total rewrite of terminal output
maybe remove all global vars?
clang-tidy --checks='-*,cppcoreguidelines-avoid-non-const-global-variables'
no setjmp/longjmp ??
use custom struct with png_create_(read|write)_struct and png_get_error_ptr
LOSSYISERROR variant: work with RIFFxxxxWEBPVP8Lyyyy/ directly.
x > y && (x == y + 12 || (!(x % 2) && y % 2 && x == y + 13))
try to make close+unlink atomic, like a delete on close flag: FIO01-C
windows: FILE_DISPOSITION_INFO or ReOpenFile+FILE_FLAG_DELETE_ON_CLOSE
freebsd: funlinkat
other OSes: ???
maybe instead make a temporary file and copy or rename it on success?
postpones EEXIST until after encoding is done, as well as decoding as before
linux 3.11+ (not android): O_TMPFILE, linkat. how to do -f?
windows: FILE_RENAME_INFO
other OSes: ???
or just write to dynamic memory buffer then try to write all at once
rename to pngtowebp because of webp2? or just have png2webp2 a separate thing
support symlink/rename to webp(to|2)png, inverting -r ? p2w w2p?
webpwrite DOFLUSH?
look into other PNG interfaces, maybe make a simple custom one
libspng or lodepng? miniz or zlib-ng too?
maybe option to use libwebp imageio for input and output
just be a wrapper and nothing else
-DALWAYS_{BATCH|PIPE} (disable flag parsing, set verbose to always)
time_t stuff in exestamp.c?
sync old private dropbox version with git or delete it
versions for newer lossless image formats
jxl
webp2 once it's released. see rename comment
maybe for comparison, jxl's predecessors:
flif -> fuif -> jxl <- pik
maybe try heif/heic/avif encoders, probably not great for lossless:
heic: libheif with backends:
libde265? same author but only compatible with decoding?
libx265
avif:
frontends (try without backends too?):
libheif again
libavif official
backends:
libaom slow, official
rav1e fast, "safe" (lying), exe or lib? rust not c
netpbm interface version of pamtowebp and webptopam, get them to add it?
also make pamtorgbapam (like `pamtoavs|avstopam`)?
pamtorgbpam would basically be ppmtoppm