char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Aleksander Grygierui: Constants refactor (#26908)e21152dc9

char/aliceai-t5-moe
1.1 KiB32 linesraw
1/** Image handling constants */
2
3export const IMAGE = {
4	/** JPEG quality used when transcoding HEIC images. */
5	HEIC_JPEG_QUALITY: 0.85,
6	/** Unit conversion: pixels per megapixel. */
7	MEGAPIXELS_TO_PIXELS: 1_000_000
8} as const;
9
10/**
11 * JPEG and EXIF binary format constants for orientation parsing.
12 */
13export const EXIF = {
14	/** APP1 segment marker byte, carries the EXIF payload */
15	APP1_MARKER: 0xe1,
16	/** "Exif" signature opening the APP1 payload, big endian uint32 */
17	EXIF_SIGNATURE: 0x45786966,
18	/** Size in bytes of one IFD directory entry */
19	IFD_ENTRY_SIZE: 12,
20	/** JPEG start of image marker */
21	JPEG_SOI_MARKER: 0xffd8,
22	/** EXIF tag id holding the orientation value */
23	ORIENTATION_TAG: 0x0112,
24	/** Bytes of file prefix to scan, the APP1 EXIF segment sits near the start */
25	SCAN_BYTE_LIMIT: 128 * 1024,
26	/** Start of scan marker byte, compressed data begins and no EXIF follows */
27	SOS_MARKER: 0xda,
28	/** TIFF byte order mark for little endian ("II") */
29	TIFF_LITTLE_ENDIAN: 0x4949,
30	/** TIFF magic number following the byte order mark */
31	TIFF_MAGIC: 42
32} as const;