go/src/image/jpeg
Nigel Tao 9088883cf4 image/jpeg: initialize dct_test constants at compile time
Doing so is slightly more accurate than calculating at run time (because
of float64 rounding errors): https://go.dev/play/p/hrOzHDLjd5K

Having these more accurate values isn't necessary for tests to pass, but
it's helpful if doing printf-debugging or stepping through the code.

Change-Id: I07a65678936e4db05b11f9d8d952b32b2acd51a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/624716
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Nigel Tao <nigeltao@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-11-06 21:57:39 +00:00
..
dct_test.go image/jpeg: initialize dct_test constants at compile time 2024-11-06 21:57:39 +00:00
fdct.go
fuzz_test.go image/jpeg, image/png: replace Fatal with Error in tests 2023-08-03 15:56:27 +00:00
huffman.go image: use built-in clear to simplify code 2024-03-11 17:08:05 +00:00
idct.go
reader.go image: add available godoc link 2023-10-19 12:02:45 +00:00
reader_test.go image/jpeg: ignore garbage bytes before a RST marker 2024-04-25 00:46:29 +00:00
scan.go image/jpeg: ignore garbage bytes before a RST marker 2024-04-25 00:46:29 +00:00
writer.go image/jpeg: add more theHuffmanSpec comments 2024-11-03 17:18:11 +00:00
writer_test.go