j40

package module
v0.0.0-...-ca6f4d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AIO_PRIO_DELTA_MAX                   = 20
	BC_BASE_MAX                          = 99
	BC_DIM_MAX                           = 2048
	BC_SCALE_MAX                         = 99
	BC_STRING_MAX                        = 1000
	BIG_ENDIAN                           = 4321
	BUFSIZ                               = 8192
	BYTE_ORDER                           = 1234
	CHARCLASS_NAME_MAX                   = 2048
	CHAR_BIT                             = 8
	CHAR_MAX                             = 127
	CHAR_MIN                             = -128
	COLL_WEIGHTS_MAX                     = 255
	DELAYTIMER_MAX                       = 2147483647
	E2BIG                                = 7
	EACCES                               = 13
	EADDRINUSE                           = 98
	EADDRNOTAVAIL                        = 99
	EADV                                 = 68
	EAFNOSUPPORT                         = 97
	EAGAIN                               = 11
	EALREADY                             = 114
	EBADE                                = 52
	EBADF                                = 9
	EBADFD                               = 77
	EBADMSG                              = 74
	EBADR                                = 53
	EBADRQC                              = 56
	EBADSLT                              = 57
	EBFONT                               = 59
	EBUSY                                = 16
	ECANCELED                            = 125
	ECHILD                               = 10
	ECHRNG                               = 44
	ECOMM                                = 70
	ECONNABORTED                         = 103
	ECONNREFUSED                         = 111
	ECONNRESET                           = 104
	EDEADLK                              = 35
	EDEADLOCK                            = 35
	EDESTADDRREQ                         = 89
	EDOM                                 = 33
	EDOTDOT                              = 73
	EDQUOT                               = 122
	EEXIST                               = 17
	EFAULT                               = 14
	EFBIG                                = 27
	EHOSTDOWN                            = 112
	EHOSTUNREACH                         = 113
	EHWPOISON                            = 133
	EIDRM                                = 43
	EILSEQ                               = 84
	EINPROGRESS                          = 115
	EINTR                                = 4
	EINVAL                               = 22
	EIO                                  = 5
	EISCONN                              = 106
	EISDIR                               = 21
	EISNAM                               = 120
	EKEYEXPIRED                          = 127
	EKEYREJECTED                         = 129
	EKEYREVOKED                          = 128
	EL2HLT                               = 51
	EL2NSYNC                             = 45
	EL3HLT                               = 46
	EL3RST                               = 47
	ELIBACC                              = 79
	ELIBBAD                              = 80
	ELIBEXEC                             = 83
	ELIBMAX                              = 82
	ELIBSCN                              = 81
	ELNRNG                               = 48
	ELOOP                                = 40
	EMEDIUMTYPE                          = 124
	EMFILE                               = 24
	EMLINK                               = 31
	EMSGSIZE                             = 90
	EMULTIHOP                            = 72
	ENAMETOOLONG                         = 36
	ENAVAIL                              = 119
	ENETDOWN                             = 100
	ENETRESET                            = 102
	ENETUNREACH                          = 101
	ENFILE                               = 23
	ENOANO                               = 55
	ENOBUFS                              = 105
	ENOCSI                               = 50
	ENODATA                              = 61
	ENODEV                               = 19
	ENOENT                               = 2
	ENOEXEC                              = 8
	ENOKEY                               = 126
	ENOLCK                               = 37
	ENOLINK                              = 67
	ENOMEDIUM                            = 123
	ENOMEM                               = 12
	ENOMSG                               = 42
	ENONET                               = 64
	ENOPKG                               = 65
	ENOPROTOOPT                          = 92
	ENOSPC                               = 28
	ENOSR                                = 63
	ENOSTR                               = 60
	ENOSYS                               = 38
	ENOTBLK                              = 15
	ENOTCONN                             = 107
	ENOTDIR                              = 20
	ENOTEMPTY                            = 39
	ENOTNAM                              = 118
	ENOTRECOVERABLE                      = 131
	ENOTSOCK                             = 88
	ENOTSUP                              = 95
	ENOTTY                               = 25
	ENOTUNIQ                             = 76
	ENXIO                                = 6
	EOF                                  = -1
	EOPNOTSUPP                           = 95
	EOVERFLOW                            = 75
	EOWNERDEAD                           = 130
	EPERM                                = 1
	EPFNOSUPPORT                         = 96
	EPIPE                                = 32
	EPROTO                               = 71
	EPROTONOSUPPORT                      = 93
	EPROTOTYPE                           = 91
	ERANGE                               = 34
	EREMCHG                              = 78
	EREMOTE                              = 66
	EREMOTEIO                            = 121
	ERESTART                             = 85
	ERFKILL                              = 132
	EROFS                                = 30
	ESHUTDOWN                            = 108
	ESOCKTNOSUPPORT                      = 94
	ESPIPE                               = 29
	ESRCH                                = 3
	ESRMNT                               = 69
	ESTALE                               = 116
	ESTRPIPE                             = 86
	ETIME                                = 62
	ETIMEDOUT                            = 110
	ETOOMANYREFS                         = 109
	ETXTBSY                              = 26
	EUCLEAN                              = 117
	EUNATCH                              = 49
	EUSERS                               = 87
	EWOULDBLOCK                          = 11
	EXDEV                                = 18
	EXFULL                               = 54
	EXIT_FAILURE                         = 1
	EXIT_SUCCESS                         = 0
	EXPR_NEST_MAX                        = 32
	FD_SETSIZE                           = 1024
	FILENAME_MAX                         = 4096
	FOPEN_MAX                            = 16
	FP_ILOGB0                            = -2147483648
	FP_ILOGBNAN                          = -2147483648
	FP_INFINITE1                         = 1
	FP_NAN1                              = 0
	FP_NORMAL1                           = 4
	FP_SUBNORMAL1                        = 3
	FP_ZERO1                             = 2
	HOST_NAME_MAX                        = 64
	INT16_MAX                            = 32767
	INT16_MIN                            = -32768
	INT32_MAX                            = 2147483647
	INT32_MIN                            = -2147483648
	INT64_MAX                            = 9223372036854775807
	INT64_MIN                            = -9223372036854775808
	INT8_MAX                             = 127
	INT8_MIN                             = -128
	INTMAX_MAX                           = 9223372036854775807
	INTMAX_MIN                           = -9223372036854775808
	INTPTR_MAX                           = 9223372036854775807
	INTPTR_MIN                           = -9223372036854775808
	INT_FAST16_MAX                       = 9223372036854775807
	INT_FAST16_MIN                       = -9223372036854775808
	INT_FAST32_MAX                       = 9223372036854775807
	INT_FAST32_MIN                       = -9223372036854775808
	INT_FAST64_MAX                       = 9223372036854775807
	INT_FAST64_MIN                       = -9223372036854775808
	INT_FAST8_MAX                        = 127
	INT_FAST8_MIN                        = -128
	INT_LEAST16_MAX                      = 32767
	INT_LEAST16_MIN                      = -32768
	INT_LEAST32_MAX                      = 2147483647
	INT_LEAST32_MIN                      = -2147483648
	INT_LEAST64_MAX                      = 9223372036854775807
	INT_LEAST64_MIN                      = -9223372036854775808
	INT_LEAST8_MAX                       = 127
	INT_LEAST8_MIN                       = -128
	INT_MAX                              = 2147483647
	INT_MIN                              = -2147483648
	J40_API                              = 0
	J40_FILENAME                         = "j40.h"
	J40_IMPLEMENTATION                   = 0
	J40_RGBA                             = 0x1755
	J40_U8X4                             = 0x0f33
	J40_VERSION                          = 2270
	J40__CLANG_VER                       = 0
	J40__COEFFS_ALIGN                    = 64
	J40__ERRBUF_LEN                      = 256
	J40__EXPOSE_INTERNALS                = 0
	J40__GCC_VER                         = 786944
	J40__INITIAL_BUFSIZE                 = 0x10000
	J40__MAX_DIST_MULT                   = 2097152
	J40__PIXELS_ALIGN                    = 32
	J40__RECURSING                       = 9999
	J40__SQRT2                           = 1.4142135623730951
	LINE_MAX                             = 2048
	LITTLE_ENDIAN                        = 1234
	LLONG_MAX                            = 9223372036854775807
	LLONG_MIN                            = -9223372036854775808
	LOGIN_NAME_MAX                       = 256
	LONG_MAX                             = 9223372036854775807
	LONG_MIN                             = -9223372036854775808
	L_ctermid                            = 9
	L_tmpnam                             = 20
	MATH_ERREXCEPT                       = 2
	MATH_ERRNO                           = 1
	MAX_CANON                            = 255
	MAX_INPUT                            = 255
	MB_LEN_MAX                           = 16
	MQ_PRIO_MAX                          = 32768
	M_1_PI                               = 0.31830988618379067154
	M_2_PI                               = 0.63661977236758134308
	M_2_SQRTPI                           = 1.12837916709551257390
	M_E                                  = 2.7182818284590452354
	M_LN10                               = 2.30258509299404568402
	M_LN2                                = 0.69314718055994530942
	M_LOG10E                             = 0.43429448190325182765
	M_LOG2E                              = 1.4426950408889634074
	M_PI                                 = 3.14159265358979323846
	M_PI_2                               = 1.57079632679489661923
	M_PI_4                               = 0.78539816339744830962
	M_SQRT1_2                            = 0.70710678118654752440
	M_SQRT2                              = 1.41421356237309504880
	NAME_MAX                             = 255
	NGROUPS_MAX                          = 65536
	PATH_MAX                             = 4096
	PDP_ENDIAN                           = 3412
	PIPE_BUF                             = 4096
	PTHREAD_DESTRUCTOR_ITERATIONS        = 4
	PTHREAD_KEYS_MAX                     = 1024
	PTHREAD_STACK_MIN                    = 16384
	PTRDIFF_MAX                          = 9223372036854775807
	PTRDIFF_MIN                          = -9223372036854775808
	P_tmpdir                             = "/tmp"
	RAND_MAX                             = 2147483647
	RE_DUP_MAX                           = 32767
	RTSIG_MAX                            = 32
	SCHAR_MAX                            = 127
	SCHAR_MIN                            = -128
	SEEK_CUR                             = 1
	SEEK_END                             = 2
	SEEK_SET                             = 0
	SEM_VALUE_MAX                        = 2147483647
	SHRT_MAX                             = 32767
	SHRT_MIN                             = -32768
	SIG_ATOMIC_MAX                       = 2147483647
	SIG_ATOMIC_MIN                       = -2147483648
	SIZE_MAX                             = 18446744073709551615
	SSIZE_MAX                            = 9223372036854775807
	TMP_MAX                              = 238328
	TTY_NAME_MAX                         = 32
	UCHAR_MAX                            = 255
	UINT16_MAX                           = 65535
	UINT32_MAX                           = 4294967295
	UINT64_MAX                           = 18446744073709551615
	UINT8_MAX                            = 255
	UINTMAX_MAX                          = 18446744073709551615
	UINTPTR_MAX                          = 18446744073709551615
	UINT_FAST16_MAX                      = 18446744073709551615
	UINT_FAST32_MAX                      = 18446744073709551615
	UINT_FAST64_MAX                      = 18446744073709551615
	UINT_FAST8_MAX                       = 255
	UINT_LEAST16_MAX                     = 65535
	UINT_LEAST32_MAX                     = 4294967295
	UINT_LEAST64_MAX                     = 18446744073709551615
	UINT_LEAST8_MAX                      = 255
	UINT_MAX                             = 4294967295
	ULLONG_MAX                           = 18446744073709551615
	ULONG_MAX                            = 18446744073709551615
	USHRT_MAX                            = 65535
	WCHAR_MAX                            = 2147483647
	WCHAR_MIN                            = -2147483648
	WCONTINUED                           = 8
	WEXITED                              = 4
	WINT_MAX                             = 4294967295
	WINT_MIN                             = 0
	WNOHANG                              = 1
	WNOWAIT                              = 0x01000000
	WSTOPPED                             = 2
	WUNTRACED                            = 2
	XATTR_LIST_MAX                       = 65536
	XATTR_NAME_MAX                       = 255
	XATTR_SIZE_MAX                       = 65536
	X_ALLOCA_H                           = 1
	X_ANSI_STDDEF_H                      = 0
	X_ASM_GENERIC_ERRNO_BASE_H           = 0
	X_ASM_GENERIC_ERRNO_H                = 0
	X_ATFILE_SOURCE                      = 1
	X_BITS_ATOMIC_WIDE_COUNTER_H         = 0
	X_BITS_BYTESWAP_H                    = 1
	X_BITS_ENDIANNESS_H                  = 1
	X_BITS_ENDIAN_H                      = 1
	X_BITS_ERRNO_H                       = 1
	X_BITS_FLOATN_COMMON_H               = 0
	X_BITS_FLOATN_H                      = 0
	X_BITS_LIBM_SIMD_DECL_STUBS_H        = 1
	X_BITS_POSIX1_LIM_H                  = 1
	X_BITS_POSIX2_LIM_H                  = 1
	X_BITS_PTHREADTYPES_ARCH_H           = 1
	X_BITS_PTHREADTYPES_COMMON_H         = 1
	X_BITS_STDINT_INTN_H                 = 1
	X_BITS_STDINT_UINTN_H                = 1
	X_BITS_STDIO_LIM_H                   = 1
	X_BITS_TIME64_H                      = 1
	X_BITS_TYPESIZES_H                   = 1
	X_BITS_TYPES_H                       = 1
	X_BITS_TYPES_LOCALE_T_H              = 1
	X_BITS_TYPES___LOCALE_T_H            = 1
	X_BITS_UINTN_IDENTITY_H              = 1
	X_BITS_WCHAR_H                       = 1
	X_BSD_PTRDIFF_T_                     = 0
	X_BSD_SIZE_T_                        = 0
	X_BSD_SIZE_T_DEFINED_                = 0
	X_DEFAULT_SOURCE                     = 1
	X_ENDIAN_H                           = 1
	X_ERRNO_H                            = 1
	X_FEATURES_H                         = 1
	X_FILE_OFFSET_BITS                   = 64
	X_GCC_LIMITS_H_                      = 0
	X_GCC_MAX_ALIGN_T                    = 0
	X_GCC_PTRDIFF_T                      = 0
	X_GCC_SIZE_T                         = 0
	X_GCC_WCHAR_T                        = 0
	X_GCC_WRAP_STDINT_H                  = 0
	X_IOFBF                              = 0
	X_IOLBF                              = 1
	X_IONBF                              = 2
	X_IO_EOF_SEEN                        = 0x0010
	X_IO_ERR_SEEN                        = 0x0020
	X_IO_USER_LOCK                       = 0x8000
	X_LIBC_LIMITS_H_                     = 1
	X_LIMITS_H___                        = 0
	X_LINUX_LIMITS_H                     = 0
	X_LP64                               = 1
	X_MATH_H                             = 1
	X_POSIX2_BC_BASE_MAX                 = 99
	X_POSIX2_BC_DIM_MAX                  = 2048
	X_POSIX2_BC_SCALE_MAX                = 99
	X_POSIX2_BC_STRING_MAX               = 1000
	X_POSIX2_CHARCLASS_NAME_MAX          = 14
	X_POSIX2_COLL_WEIGHTS_MAX            = 2
	X_POSIX2_EXPR_NEST_MAX               = 32
	X_POSIX2_LINE_MAX                    = 2048
	X_POSIX2_RE_DUP_MAX                  = 255
	X_POSIX_AIO_LISTIO_MAX               = 2
	X_POSIX_AIO_MAX                      = 1
	X_POSIX_ARG_MAX                      = 4096
	X_POSIX_CHILD_MAX                    = 25
	X_POSIX_CLOCKRES_MIN                 = 20000000
	X_POSIX_C_SOURCE                     = 200809
	X_POSIX_DELAYTIMER_MAX               = 32
	X_POSIX_HOST_NAME_MAX                = 255
	X_POSIX_LINK_MAX                     = 8
	X_POSIX_LOGIN_NAME_MAX               = 9
	X_POSIX_MAX_CANON                    = 255
	X_POSIX_MAX_INPUT                    = 255
	X_POSIX_MQ_OPEN_MAX                  = 8
	X_POSIX_MQ_PRIO_MAX                  = 32
	X_POSIX_NAME_MAX                     = 14
	X_POSIX_NGROUPS_MAX                  = 8
	X_POSIX_OPEN_MAX                     = 20
	X_POSIX_PATH_MAX                     = 256
	X_POSIX_PIPE_BUF                     = 512
	X_POSIX_RE_DUP_MAX                   = 255
	X_POSIX_RTSIG_MAX                    = 8
	X_POSIX_SEM_NSEMS_MAX                = 256
	X_POSIX_SEM_VALUE_MAX                = 32767
	X_POSIX_SIGQUEUE_MAX                 = 32
	X_POSIX_SOURCE                       = 1
	X_POSIX_SSIZE_MAX                    = 32767
	X_POSIX_STREAM_MAX                   = 8
	X_POSIX_SYMLINK_MAX                  = 255
	X_POSIX_SYMLOOP_MAX                  = 8
	X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
	X_POSIX_THREAD_KEYS_MAX              = 128
	X_POSIX_THREAD_THREADS_MAX           = 64
	X_POSIX_TIMER_MAX                    = 32
	X_POSIX_TTY_NAME_MAX                 = 9
	X_POSIX_TZNAME_MAX                   = 6
	X_PTRDIFF_T                          = 0
	X_PTRDIFF_T_                         = 0
	X_PTRDIFF_T_DECLARED                 = 0
	X_RWLOCK_INTERNAL_H                  = 0
	X_SIZET_                             = 0
	X_SIZE_T                             = 0
	X_SIZE_T_                            = 0
	X_SIZE_T_DECLARED                    = 0
	X_SIZE_T_DEFINED                     = 0
	X_SIZE_T_DEFINED_                    = 0
	X_STDC_PREDEF_H                      = 1
	X_STDDEF_H                           = 0
	X_STDDEF_H_                          = 0
	X_STDINT_H                           = 1
	X_STDIO_H                            = 1
	X_STDLIB_H                           = 1
	X_STRINGS_H                          = 1
	X_STRING_H                           = 1
	X_STRUCT_TIMESPEC                    = 1
	X_SYS_CDEFS_H                        = 1
	X_SYS_SELECT_H                       = 1
	X_SYS_SIZE_T_H                       = 0
	X_SYS_TYPES_H                        = 1
	X_THREAD_MUTEX_INTERNAL_H            = 1
	X_THREAD_SHARED_TYPES_H              = 1
	X_T_PTRDIFF                          = 0
	X_T_PTRDIFF_                         = 0
	X_T_SIZE                             = 0
	X_T_SIZE_                            = 0
	X_T_WCHAR                            = 0
	X_T_WCHAR_                           = 0
	X_VA_LIST_DEFINED                    = 0
	X_WCHAR_T                            = 0
	X_WCHAR_T_                           = 0
	X_WCHAR_T_DECLARED                   = 0
	X_WCHAR_T_DEFINED                    = 0
	X_WCHAR_T_DEFINED_                   = 0
	X_WCHAR_T_H                          = 0
	Linux                                = 1
	Math_errhandling                     = 3
	Unix                                 = 1
)
View Source
const (
	FP_NAN       = 0
	FP_INFINITE  = 1
	FP_ZERO      = 2
	FP_SUBNORMAL = 3
	FP_NORMAL    = 4
)

All floating-point numbers can be put in one of these categories.

View Source
const (
	J40__DIST_BITS      = 12
	J40__ANS_INIT_STATE = 1245184
)
View Source
const (
	J40__CHROMA_WHITE = 0
	J40__CHROMA_RED   = 1
	J40__CHROMA_GREEN = 2
	J40__CHROMA_BLUE  = 3
)
View Source
const (
	J40__NUM_DCT_SELECT = 27
	J40__NUM_DCT_PARAMS = 17
	J40__NUM_ORDERS     = 13
)
View Source
const (
	J40__BLEND_REPLACE = 0
	J40__BLEND_ADD     = 1
	J40__BLEND_BLEND   = 2
	J40__BLEND_MUL_ADD = 3
	J40__BLEND_MUL     = 4
)
View Source
const (
	J40__ORIGIN_NONE           = 0
	J40__ORIGIN_NEXT           = 1
	J40__ORIGIN_from_file      = 2
	J40__ORIGIN_from_memory    = 3
	J40__ORIGIN_output_format  = 4
	J40__ORIGIN_next_frame     = 5
	J40__ORIGIN_current_frame  = 6
	J40__ORIGIN_frame_pixels   = 7
	J40__ORIGIN_error_string   = 8
	J40__ORIGIN_free           = 9
	J40__ORIGIN_MAX            = 10
	J40__ORIGIN_LAST_ALT_MAGIC = 3
)
View Source
const (
	J40__PLANE_U8  = 32
	J40__PLANE_U16 = 33
	J40__PLANE_I16 = 65
	J40__PLANE_U32 = 34
	J40__PLANE_I32 = 66
	J40__PLANE_F32 = 98
)
View Source
const (
	J40__PLANE_CLEAR = 1

	J40__PLANE_FORCE_PAD = 2
)
View Source
const (
	J40__CONTAINER_CONFIRMED = 1

	J40__SEEN_JXLL = 2
	J40__SEEN_JXLI = 4
	J40__SEEN_JXLC = 8
	J40__SEEN_JXLP = 16

	J40__NO_MORE_CODESTREAM_BOX = 32

	J40__IMPLIED_LAST_MAP_ENTRY = 64

	J40__NO_MORE_BOX = 128
)
View Source
const (
	J40__EC_ALPHA          = 0
	J40__EC_DEPTH          = 1
	J40__EC_SPOT_COLOUR    = 2
	J40__EC_SELECTION_MASK = 3
	J40__EC_BLACK          = 4
	J40__EC_CFA            = 5
	J40__EC_THERMAL        = 6
	J40__EC_NON_OPTIONAL   = 15
	J40__EC_OPTIONAL       = 16
)
View Source
const (
	J40__ORIENT_TL = 1
	J40__ORIENT_TR = 2
	J40__ORIENT_BR = 3
	J40__ORIENT_BL = 4
	J40__ORIENT_LT = 5
	J40__ORIENT_RT = 6
	J40__ORIENT_RB = 7
	J40__ORIENT_LB = 8
)
View Source
const (
	J40__CS_CHROMA = 99
	J40__CS_GREY   = 103
	J40__CS_XYB    = 120
)
View Source
const (
	J40__TF_709     = -1
	J40__TF_UNKNOWN = -2
	J40__TF_LINEAR  = -8
	J40__TF_SRGB    = -13
	J40__TF_PQ      = -16
	J40__TF_DCI     = -17
	J40__TF_HLG     = -18
	J40__GAMMA_MAX  = 10000000
)
View Source
const (
	J40__INTENT_PERC = 0
	J40__INTENT_REL  = 1
	J40__INTENT_SAT  = 2
	J40__INTENT_ABS  = 3
)
View Source
const (
	J40__TR_RCT     = 0
	J40__TR_PALETTE = 1
	J40__TR_SQUEEZE = 2
)
View Source
const (
	J40__DQ_ENC_LIBRARY = 0
	J40__DQ_ENC_HORNUSS = 1
	J40__DQ_ENC_DCT2    = 2
	J40__DQ_ENC_DCT4    = 3

	J40__DQ_ENC_DCT4X8 = 4
	J40__DQ_ENC_AFV    = 5
	J40__DQ_ENC_DCT    = 6

	J40__DQ_ENC_RAW = 7
)
View Source
const (
	J40__FRAME_REGULAR          = 0
	J40__FRAME_LF               = 1
	J40__FRAME_REFONLY          = 2
	J40__FRAME_REGULAR_SKIPPROG = 3
)
View Source
const (
	J40__MAX_PASSES = 11
)
View Source
const (
	J40__MAX_TABLE_GROWTH = 2
)
View Source
const (
	J40__MAX_TYPICAL_FAST_LEN = 7
)
View Source
const (
	J40__NUM_PRED = 14
)

Variables

View Source
var AFV_BASIS = [256]float32{}/* 256 elements not displayed */
View Source
var BT2100 = [3][2]float32{{0.708, 0.292}, {0.170, 0.797}, {0.131, 0.046}}
View Source
var BUFFER_INIT = J40__buffer_st{}
View Source
var CAPI = map[string]struct{}{
	"j40__abs16":                         {},
	"j40__abs32":                         {},
	"j40__abs64":                         {},
	"j40__adapt_view_f32":                {},
	"j40__add16":                         {},
	"j40__add32":                         {},
	"j40__add64":                         {},
	"j40__add_fallback16":                {},
	"j40__add_fallback32":                {},
	"j40__add_fallback64":                {},
	"j40__add_thresholds":                {},
	"j40__alloc_aligned":                 {},
	"j40__alloc_aligned_fallback":        {},
	"j40__aux_inverse_dct11":             {},
	"j40__bits_read":                     {},
	"j40__ceil_div32":                    {},
	"j40__ceil_div64":                    {},
	"j40__ceil_lg32":                     {},
	"j40__ceil_lg64":                     {},
	"j40__clamp_add16":                   {},
	"j40__clamp_add32":                   {},
	"j40__clamp_add64":                   {},
	"j40__clamp_mul16":                   {},
	"j40__clamp_mul32":                   {},
	"j40__clamp_mul64":                   {},
	"j40__copy_view_f32":                 {},
	"j40__dct2":                          {},
	"j40__dequant_lf":                    {},
	"j40__floor_avg16":                   {},
	"j40__floor_avg32":                   {},
	"j40__floor_avg64":                   {},
	"j40__floor_lg32":                    {},
	"j40__floor_lg64":                    {},
	"j40__forward_dct4":                  {},
	"j40__forward_dct_core":              {},
	"j40__forward_dct_unscaled_view":     {},
	"j40__free_aligned":                  {},
	"j40__free_aligned_fallback":         {},
	"j40__group_info":                    {},
	"j40__init_neighbors16":              {},
	"j40__init_neighbors32":              {},
	"j40__inverse_dct4":                  {},
	"j40__inverse_dct_core":              {},
	"j40__inverse_dct_view":              {},
	"j40__make_view_f32":                 {},
	"j40__max16":                         {},
	"j40__max32":                         {},
	"j40__max64":                         {},
	"j40__maxf":                          {},
	"j40__min16":                         {},
	"j40__min32":                         {},
	"j40__min64":                         {},
	"j40__minf":                          {},
	"j40__mul16":                         {},
	"j40__mul32":                         {},
	"j40__mul64":                         {},
	"j40__mul_fallback16":                {},
	"j40__mul_fallback32":                {},
	"j40__mul_fallback64":                {},
	"j40__oddeven_columns_to_halves_f32": {},
	"j40__oddeven_rows_to_halves_f32":    {},
	"j40__print_view_f32":                {},
	"j40__reshape_view_f32":              {},
	"j40__sub16":                         {},
	"j40__sub32":                         {},
	"j40__sub64":                         {},
	"j40__sub_fallback16":                {},
	"j40__sub_fallback32":                {},
	"j40__sub_fallback64":                {},
	"j40__surely_nonzero":                {},
	"j40__transpose_view_f32":            {},
	"j40__u32be":                         {},
	"j40__unpack_signed":                 {},
	"j40__unpack_signed64":               {},
	"j40_current_frame":                  {},
	"j40_error":                          {},
	"j40_error_string":                   {},
	"j40_frame_pixels_u8x4":              {},
	"j40_free":                           {},
	"j40_from_file":                      {},
	"j40_from_memory":                    {},
	"j40_next_frame":                     {},
	"j40_output_format":                  {},
	"j40_row_u8x4":                       {},
}
View Source
var DCI = [2]float32{0.314, 0.351}
View Source
var DEFAULT_BLKCTX = [39]Uint8_t{
	Uint8_t(0), Uint8_t(1), Uint8_t(2), Uint8_t(2), Uint8_t(3), Uint8_t(3), Uint8_t(4), Uint8_t(5), Uint8_t(6), Uint8_t(6), Uint8_t(6), Uint8_t(6), Uint8_t(6),
	Uint8_t(7), Uint8_t(8), Uint8_t(9), Uint8_t(9), Uint8_t(10), Uint8_t(11), Uint8_t(12), Uint8_t(13), Uint8_t(14), Uint8_t(14), Uint8_t(14), Uint8_t(14), Uint8_t(14),
	Uint8_t(7), Uint8_t(8), Uint8_t(9), Uint8_t(9), Uint8_t(10), Uint8_t(11), Uint8_t(12), Uint8_t(13), Uint8_t(14), Uint8_t(14), Uint8_t(14), Uint8_t(14), Uint8_t(14),
}
View Source
var E = [2]float32{float32(float32(1)) / 3., float32(float32(1)) / 3.}
View Source
var ERROR_PIXELS = J40_pixels_u8x4{Width: 21, Height: 7, Stride_bytes: 21 * 4, Data: 0}
View Source
var ERROR_PIXELS_DATA = [588]Uint8_t{}/* 588 elements not displayed */
View Source
var FLIP_FOR_AFV = [2][4]Int8_t{{int8(0), int8(1), int8(2), int8(3)}, {int8(7), int8(6), int8(5), int8(4)}}
View Source
var FREQS = [12]float32{
	0.000000000, 0.373436417, 0.320380100, 0.379332596, 0.066671353, 0.259756761,
	0.530035651, 0.789731061, 0.149436598, 0.559318823, 0.669198646, 0.999999917,
}
View Source
var FTYP_BOX = [20]Uint8_t{
	Uint8_t(0x00), Uint8_t(0x00), Uint8_t(0x00), Uint8_t(0x14), Uint8_t(0x66), Uint8_t(0x74), Uint8_t(0x79), Uint8_t(0x70), Uint8_t(0x6a), Uint8_t(0x78), Uint8_t(0x6c), Uint8_t(0x20),
	Uint8_t(0x00), Uint8_t(0x00), Uint8_t(0x00), Uint8_t(0x00), Uint8_t(0x6a), Uint8_t(0x78), Uint8_t(0x6c), Uint8_t(0x20),
}
View Source
var HOW = [7]How{{}, {Requires8x8: int8(1), Nparams: int8(3), Nscaled: int8(3)}, {Requires8x8: int8(1), Nparams: int8(6), Nscaled: int8(6)}, {Requires8x8: int8(1), Nparams: int8(2), Nscaled: int8(2), Ndctparams: int8(1)}, {Requires8x8: int8(1), Nparams: int8(1), Ndctparams: int8(1)}, {Requires8x8: int8(1), Nparams: int8(9), Nscaled: int8(6), Ndctparams: int8(2)}, {Requires8x8: int8(1), Ndctparams: int8(1)}}
View Source
var INV_SQRT2 float32 = float32(1.0) / 1.414214562373095
View Source
var JXL_BOX = [12]Uint8_t{
	Uint8_t(0x00), Uint8_t(0x00), Uint8_t(0x00), Uint8_t(0x0c), Uint8_t(0x4a), Uint8_t(0x58), Uint8_t(0x4c), Uint8_t(0x20), Uint8_t(0x0d), Uint8_t(0x0a), Uint8_t(0x87), Uint8_t(0x0a),
}
View Source
var L0TABLE = [16]Int32_t{
	0x00002, 0x40002, 0x30002, 0x20003, 0x00002, 0x40002, 0x30002, 0x10004,
	0x00002, 0x40002, 0x30002, 0x20003, 0x00002, 0x40002, 0x30002, 0x50004,
}
View Source
var L1ZIGZAG = [18]Uint8_t{Uint8_t(1), Uint8_t(2), Uint8_t(3), Uint8_t(4), Uint8_t(0), Uint8_t(5), Uint8_t(17), Uint8_t(6), Uint8_t(16), Uint8_t(7), Uint8_t(8), Uint8_t(9), Uint8_t(10), Uint8_t(11), Uint8_t(12), Uint8_t(13), Uint8_t(14), Uint8_t(15)}
View Source
var MAP = [64]Int8_t{
	int8(0), int8(0), int8(2), int8(2), int8(4), int8(4), int8(4), int8(4),
	int8(0), int8(1), int8(2), int8(2), int8(4), int8(4), int8(4), int8(4),
	int8(2), int8(2), int8(3), int8(3), int8(4), int8(4), int8(4), int8(4),
	int8(2), int8(2), int8(3), int8(3), int8(4), int8(4), int8(4), int8(4),
	int8(4), int8(4), int8(4), int8(4), int8(5), int8(5), int8(5), int8(5),
	int8(4), int8(4), int8(4), int8(4), int8(5), int8(5), int8(5), int8(5),
	int8(4), int8(4), int8(4), int8(4), int8(5), int8(5), int8(5), int8(5),
	int8(4), int8(4), int8(4), int8(4), int8(5), int8(5), int8(5), int8(5),
}
View Source
var MAP1 = [64]Int8_t{
	int8(60), int8(32), int8(62), int8(33), int8(48), int8(34), int8(49), int8(35),
	int8(0), int8(1), int8(2), int8(3), int8(4), int8(5), int8(6), int8(7),
	int8(61), int8(36), int8(63), int8(37), int8(50), int8(38), int8(51), int8(39),
	int8(8), int8(9), int8(10), int8(11), int8(12), int8(13), int8(14), int8(15),
	int8(52), int8(40), int8(53), int8(41), int8(54), int8(42), int8(55), int8(43),
	int8(16), int8(17), int8(18), int8(19), int8(20), int8(21), int8(22), int8(23),
	int8(56), int8(44), int8(57), int8(45), int8(58), int8(46), int8(59), int8(47),
	int8(24), int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31),
}
View Source
var NKERNELS int32 = 12
View Source
var OPSIN_INV_MAT = [3][3]float32{
	{11.031566901960783, -9.866943921568629, -0.16462299647058826},
	{-3.254147380392157, 4.418770392156863, -0.16462299647058826},
	{-3.6588512862745097, 2.7129230470588235, 1.9459282392156863},
}
View Source
var P3 = [3][2]float32{{0.680, 0.320}, {0.265, 0.690}, {0.150, 0.060}}
View Source
var PERMUTATIONS = [6][3]Uint8_t{{Uint8_t(0), Uint8_t(1), Uint8_t(2)}, {Uint8_t(1), Uint8_t(2), Uint8_t(0)}, {Uint8_t(2), Uint8_t(0), Uint8_t(1)}, {Uint8_t(0), Uint8_t(2), Uint8_t(1)}, {Uint8_t(1), Uint8_t(0), Uint8_t(2)}, {Uint8_t(2), Uint8_t(1), Uint8_t(0)}}
View Source
var PERMUTATIONS1 = [6][3]Uint8_t{{Uint8_t(0), Uint8_t(1), Uint8_t(2)}, {Uint8_t(1), Uint8_t(2), Uint8_t(0)}, {Uint8_t(2), Uint8_t(0), Uint8_t(1)}, {Uint8_t(0), Uint8_t(2), Uint8_t(1)}, {Uint8_t(1), Uint8_t(0), Uint8_t(2)}, {Uint8_t(2), Uint8_t(1), Uint8_t(0)}}
View Source
var QM_SCALE = [8]float32{1.5625, 1.25, 1.0, 0.8, 0.64, 0.512, 0.4096, 0.32768}
View Source
var REV5 = [32]Uint8_t{
	Uint8_t(0), Uint8_t(16), Uint8_t(8), Uint8_t(24), Uint8_t(4), Uint8_t(20), Uint8_t(12), Uint8_t(28), Uint8_t(2), Uint8_t(18), Uint8_t(10), Uint8_t(26), Uint8_t(6), Uint8_t(22), Uint8_t(14), Uint8_t(30),
	Uint8_t(1), Uint8_t(17), Uint8_t(9), Uint8_t(25), Uint8_t(5), Uint8_t(21), Uint8_t(13), Uint8_t(29), Uint8_t(3), Uint8_t(19), Uint8_t(11), Uint8_t(27), Uint8_t(7), Uint8_t(23), Uint8_t(15), Uint8_t(31),
}
View Source
var SPECIAL_DISTANCES = [120]Uint8_t{}/* 120 elements not displayed */
View Source
var SRGB_CHROMA = [4][2]float32{
	{0.3127, 0.3290}, {0.639998686, 0.330010138},
	{0.300003784, 0.600003357}, {0.150002046, 0.059997204},
}
View Source
var TABLE = [20]Int32_t{
	0xa0003, -16, 0x70003, 0x30004, 0x60003, 0x80003, 0x90003, 0x50004,
	0xa0003, 0x40004, 0x70003, 0x10004, 0x60003, 0x80003, 0x90003, 0x20004,
	0x00011, 0xb0022, 0xc0003, 0xd0043,
}
View Source
var TEMPLATES = [5]struct {
	Maxlen   Int8_t
	Sortfrom Int8_t
	Sortto   Int8_t
	Len      [8]Int8_t
	Symref   [8]Int8_t
}{
	{Maxlen: int8(3), Sortfrom: int8(2), Sortto: int8(4), Len: [8]Int8_t{int8(1), int8(2), int8(1), int8(3), int8(1), int8(2), int8(1), int8(3)}, Symref: [8]Int8_t{int8(0), int8(1), int8(0), int8(2), int8(0), int8(1), int8(0), int8(3)}},
	{},
	{Maxlen: int8(1), Sortto: int8(2), Len: [8]Int8_t{0: int8(1), 1: int8(1)}, Symref: [8]Int8_t{0: int8(0), 1: int8(1)}},
	{Maxlen: int8(2), Sortfrom: int8(1), Sortto: int8(3), Len: [8]Int8_t{0: int8(1), 1: int8(2), 2: int8(1), 3: int8(2)}, Symref: [8]Int8_t{0: int8(0), 1: int8(1), 2: int8(0), 3: int8(2)}},
	{Maxlen: int8(2), Sortto: int8(4), Len: [8]Int8_t{0: int8(2), 1: int8(2), 2: int8(2), 3: int8(2)}, Symref: [8]Int8_t{0: int8(0), 1: int8(1), 2: int8(2), 3: int8(3)}}}
View Source
var TWICE_COEFF_FREQ_CTX = [64]Int8_t{
	int8(-1), int8(0), int8(2), int8(4), int8(6), int8(8), int8(10), int8(12), int8(14), int8(16), int8(18), int8(20), int8(22), int8(24), int8(26), int8(28),
	int8(30), int8(30), int8(32), int8(32), int8(34), int8(34), int8(36), int8(36), int8(38), int8(38), int8(40), int8(40), int8(42), int8(42), int8(44), int8(44),
	int8(46), int8(46), int8(46), int8(46), int8(48), int8(48), int8(48), int8(48), int8(50), int8(50), int8(50), int8(50), int8(52), int8(52), int8(52), int8(52),
	int8(54), int8(54), int8(54), int8(54), int8(56), int8(56), int8(56), int8(56), int8(58), int8(58), int8(58), int8(58), int8(60), int8(60), int8(60), int8(60),
}
View Source
var TWICE_COEFF_NNZ_CTX = [64]Int16_t{
	int16(0), int16(0), int16(62), int16(124), int16(124), int16(186), int16(186), int16(186), int16(186), int16(246), int16(246), int16(246), int16(246), int16(304), int16(304), int16(304),
	int16(304), int16(304), int16(304), int16(304), int16(304), int16(360), int16(360), int16(360), int16(360), int16(360), int16(360), int16(360), int16(360), int16(360), int16(360), int16(360),
	int16(360), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412),
	int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412), int16(412),
}
View Source
var W0 float32 = 0.05226273532324128
View Source
var W1 float32 = 0.20345139757231578
View Source
var W2 float32 = 0.0334829185968739
View Source
var YXB2XYB = [3]Int32_t{1, 0, 2}
View Source
var YXB2XYB1 = [3]Int32_t{1, 0, 2}
View Source
var ZERO = [4]int32{0, 0, 0, 0}
View Source
var ZERO1 = [4]int64{int64(0), int64(0), int64(0), int64(0)}

Functions

func J40__adapt_view_f32

func J40__adapt_view_f32(tls *libc.TLS, outv uintptr, logw Int32_t, logh Int32_t)

func J40__add16

func J40__add16(tls *libc.TLS, x Int16_t, y Int16_t, out uintptr) int32

func J40__add32

func J40__add32(tls *libc.TLS, x Int32_t, y Int32_t, out uintptr) int32

func J40__add64

func J40__add64(tls *libc.TLS, x Int64_t, y Int64_t, out uintptr) int32

func J40__add_fallback16

func J40__add_fallback16(tls *libc.TLS, x Int16_t, y Int16_t, out uintptr) int32

func J40__add_fallback32

func J40__add_fallback32(tls *libc.TLS, x Int32_t, y Int32_t, out uintptr) int32

func J40__add_fallback64

func J40__add_fallback64(tls *libc.TLS, x Int64_t, y Int64_t, out uintptr) int32

func J40__add_thresholds

func J40__add_thresholds(tls *libc.TLS, plane uintptr, in uintptr, lf_thr uintptr, nb_lf_thr Int32_t)

func J40__alloc_aligned

func J40__alloc_aligned(tls *libc.TLS, sz Size_t, align Size_t, outmisalign uintptr) uintptr

#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 J40_ALWAYS_INLINE void *j40__alloc_aligned(size_t sz, size_t align, size_t *outmisalign) { void *ptr = NULL; *outmisalign = 0; return posix_memalign(&ptr, align, sz) ? NULL : ptr; } J40_ALWAYS_INLINE void j40__free_aligned(void *ptr, size_t align, size_t misalign) { (void) align; (void) misalign; free(ptr); // important: do not use j40_free! } #elif defined _ISOC11_SOURCE J40_ALWAYS_INLINE void *j40__alloc_aligned(size_t sz, size_t align, size_t *outmisalign) { if (sz > SIZE_MAX / align * align) return NULL; // overflow *outmisalign = 0; return aligned_alloc(align, (sz + align - 1) / align * align); } J40_ALWAYS_INLINE void j40__free_aligned(void *ptr, size_t align, size_t misalign) { (void) align; (void) misalign; free(ptr); // important: do not use j40_free! } #else

func J40__alloc_aligned_fallback

func J40__alloc_aligned_fallback(tls *libc.TLS, sz Size_t, align Size_t, outmisalign uintptr) uintptr

a fallback implementation; the caller should store the misalign amount [0, align) separately. used when the platform doesn't provide aligned malloc at all, or the platform implementation is not necessarily better; e.g. MSVC _aligned_malloc has the same amount of overhead as of Win10

func J40__aux_inverse_dct11

func J40__aux_inverse_dct11(tls *libc.TLS, out uintptr, in uintptr, x Int32_t, y Int32_t, S2 Int32_t)

a single iteration of AuxIDCT2x2

func J40__ceil_lg32

func J40__ceil_lg32(tls *libc.TLS, x Uint32_t) int32

func J40__ceil_lg64

func J40__ceil_lg64(tls *libc.TLS, x Uint64_t) int32

func J40__copy_view_f32

func J40__copy_view_f32(tls *libc.TLS, outv uintptr, inv J40__view_f32)

func J40__dct2

func J40__dct2(tls *libc.TLS, out uintptr, in uintptr, t Int32_t, rep1 Int32_t, rep2 Int32_t)

func J40__dequant_lf

func J40__dequant_lf(tls *libc.TLS, in uintptr, mult float32, out uintptr)

func J40__floor_lg32

func J40__floor_lg32(tls *libc.TLS, x Uint32_t) int32

both requires x to be > 0

func J40__floor_lg64

func J40__floor_lg64(tls *libc.TLS, x Uint64_t) int32

both requires x to be > 0

func J40__forward_dct4

func J40__forward_dct4(tls *libc.TLS, out uintptr, in uintptr, t Int32_t, rep1 Int32_t, rep2 Int32_t)

func J40__forward_dct_core

func J40__forward_dct_core(tls *libc.TLS, out uintptr, in uintptr, t Int32_t, rep1 Int32_t, rep2 Int32_t, half_forward_dct uintptr)

func J40__forward_dct_unscaled_view

func J40__forward_dct_unscaled_view(tls *libc.TLS, outv uintptr, inv uintptr)

func J40__free_aligned

func J40__free_aligned(tls *libc.TLS, ptr uintptr, align Size_t, misalign Size_t)

func J40__free_aligned_fallback

func J40__free_aligned_fallback(tls *libc.TLS, ptr uintptr, align Size_t, misalign Size_t)

func J40__inverse_dct4

func J40__inverse_dct4(tls *libc.TLS, out uintptr, in uintptr, t Int32_t, rep1 Int32_t, rep2 Int32_t)

func J40__inverse_dct_core

func J40__inverse_dct_core(tls *libc.TLS, out uintptr, in uintptr, t Int32_t, rep1 Int32_t, rep2 Int32_t, half_inverse_dct uintptr)

func J40__inverse_dct_view

func J40__inverse_dct_view(tls *libc.TLS, outv uintptr, inv uintptr)

func J40__maxf

func J40__maxf(tls *libc.TLS, x float32, y float32) float32

func J40__minf

func J40__minf(tls *libc.TLS, x float32, y float32) float32

func J40__mul16

func J40__mul16(tls *libc.TLS, x Int16_t, y Int16_t, out uintptr) int32

func J40__mul32

func J40__mul32(tls *libc.TLS, x Int32_t, y Int32_t, out uintptr) int32

func J40__mul64

func J40__mul64(tls *libc.TLS, x Int64_t, y Int64_t, out uintptr) int32

func J40__mul_fallback16

func J40__mul_fallback16(tls *libc.TLS, x Int16_t, y Int16_t, out uintptr) int32

func J40__mul_fallback32

func J40__mul_fallback32(tls *libc.TLS, x Int32_t, y Int32_t, out uintptr) int32

func J40__mul_fallback64

func J40__mul_fallback64(tls *libc.TLS, x Int64_t, y Int64_t, out uintptr) int32

func J40__oddeven_columns_to_halves_f32

func J40__oddeven_columns_to_halves_f32(tls *libc.TLS, outv uintptr, inv J40__view_f32)

shuffles columns 01234567 into 02461357 and so on

func J40__oddeven_rows_to_halves_f32

func J40__oddeven_rows_to_halves_f32(tls *libc.TLS, outv uintptr, inv J40__view_f32)

shuffles rows 01234567 into 02461357 and so on

func J40__print_view_f32

func J40__print_view_f32(tls *libc.TLS, v J40__view_f32, name uintptr, file uintptr, line Int32_t)

func J40__reshape_view_f32

func J40__reshape_view_f32(tls *libc.TLS, outv uintptr, logw Int32_t, logh Int32_t)

func J40__sub16

func J40__sub16(tls *libc.TLS, x Int16_t, y Int16_t, out uintptr) int32

func J40__sub32

func J40__sub32(tls *libc.TLS, x Int32_t, y Int32_t, out uintptr) int32

func J40__sub64

func J40__sub64(tls *libc.TLS, x Int64_t, y Int64_t, out uintptr) int32

func J40__sub_fallback16

func J40__sub_fallback16(tls *libc.TLS, x Int16_t, y Int16_t, out uintptr) int32

func J40__sub_fallback32

func J40__sub_fallback32(tls *libc.TLS, x Int32_t, y Int32_t, out uintptr) int32

func J40__sub_fallback64

func J40__sub_fallback64(tls *libc.TLS, x Int64_t, y Int64_t, out uintptr) int32

func J40__surely_nonzero

func J40__surely_nonzero(tls *libc.TLS, x float32) int32

used to guard against division by zero

func J40__transpose_view_f32

func J40__transpose_view_f32(tls *libc.TLS, outv uintptr, inv J40__view_f32)

func J40_error_string

func J40_error_string(tls *libc.TLS, image uintptr) uintptr

func J40_free

func J40_free(tls *libc.TLS, image uintptr)

func J40_next_frame

func J40_next_frame(tls *libc.TLS, image uintptr) int32

func J40_row_u8x4

func J40_row_u8x4(tls *libc.TLS, pixels J40_pixels_u8x4, y Int32_t) uintptr

Types

type Blkcnt_t

type Blkcnt_t = X__blkcnt64_t

Types from the Large File Support interface.

type Blksize_t

type Blksize_t = X__blksize_t

type Caddr_t

type Caddr_t = X__caddr_t

type Clock_t

type Clock_t = X__clock_t

Returned by `clock'.

type Clockid_t

type Clockid_t = X__clockid_t

Clock ID used in clock and timer functions.

type Daddr_t

type Daddr_t = X__daddr_t

type Dev_t

type Dev_t = X__dev_t

type Div_t

type Div_t = struct {
	Quot int32
	Rem  int32
}

Returned by `div'.

type Double_t

type Double_t = float64

type Drand48_data

type Drand48_data = struct {
	X__x     [3]uint16
	X__old_x [3]uint16
	X__c     uint16
	X__init  uint16
	X__a     uint64
}

Data structure for communication with thread safe versions. This

type is to be regarded as opaque.  It's only exported because users
have to allocate objects of this type.

type FILE

type FILE = X_IO_FILE

The opaque type of streams. This is the definition used elsewhere.

type Fd_mask

type Fd_mask = X__fd_mask

Sometimes the fd_set member is assumed to have this type.

type Fd_set

type Fd_set = struct{ X__fds_bits [16]X__fd_mask }

fd_set for select and pselect.

type Float_t

type Float_t = float32

Define the following typedefs.

    float_t	floating-point type at least as wide as `float' used
		to evaluate `float' expressions
    double_t	floating-point type at least as wide as `double' used
		to evaluate `double' expressions

type Fpos_t

type Fpos_t = X__fpos64_t

The type of the second argument to `fgetpos' and `fsetpos'.

type Fsblkcnt_t

type Fsblkcnt_t = X__fsblkcnt64_t

type Fsfilcnt_t

type Fsfilcnt_t = X__fsfilcnt64_t

type Fsid_t

type Fsid_t = X__fsid_t

type Gid_t

type Gid_t = X__gid_t

type How

type How = struct {
	Requires8x8 Int8_t
	Nparams     Int8_t
	Nscaled     Int8_t
	Ndctparams  Int8_t
}

type Id_t

type Id_t = X__id_t

type Ino_t

type Ino_t = X__ino64_t

type Int16_t

type Int16_t = X__int16_t

func J40__abs16

func J40__abs16(tls *libc.TLS, x Int16_t) Int16_t

func J40__clamp_add16

func J40__clamp_add16(tls *libc.TLS, x Int16_t, y Int16_t) Int16_t

func J40__clamp_mul16

func J40__clamp_mul16(tls *libc.TLS, x Int16_t, y Int16_t) Int16_t

func J40__floor_avg16

func J40__floor_avg16(tls *libc.TLS, x Int16_t, y Int16_t) Int16_t

same to `(a + b) >> 1` but doesn't overflow, useful for tight loops with autovectorization https://devblogs.microsoft.com/oldnewthing/20220207-00/?p=106223

func J40__max16

func J40__max16(tls *libc.TLS, x Int16_t, y Int16_t) Int16_t

func J40__min16

func J40__min16(tls *libc.TLS, x Int16_t, y Int16_t) Int16_t

type Int32_t

type Int32_t = X__int32_t
var MASK Int32_t = 0xfffff
var NBITS Int32_t = 64

func J40__abs32

func J40__abs32(tls *libc.TLS, x Int32_t) Int32_t

func J40__ceil_div32

func J40__ceil_div32(tls *libc.TLS, x Int32_t, y Int32_t) Int32_t

equivalent to ceil(x / y)

func J40__clamp_add32

func J40__clamp_add32(tls *libc.TLS, x Int32_t, y Int32_t) Int32_t

func J40__clamp_mul32

func J40__clamp_mul32(tls *libc.TLS, x Int32_t, y Int32_t) Int32_t

func J40__floor_avg32

func J40__floor_avg32(tls *libc.TLS, x Int32_t, y Int32_t) Int32_t

same to `(a + b) >> 1` but doesn't overflow, useful for tight loops with autovectorization https://devblogs.microsoft.com/oldnewthing/20220207-00/?p=106223

func J40__max32

func J40__max32(tls *libc.TLS, x Int32_t, y Int32_t) Int32_t

func J40__min32

func J40__min32(tls *libc.TLS, x Int32_t, y Int32_t) Int32_t

func J40__unpack_signed

func J40__unpack_signed(tls *libc.TLS, x Int32_t) Int32_t

type Int64_t

type Int64_t = X__int64_t

func J40__abs64

func J40__abs64(tls *libc.TLS, x Int64_t) Int64_t

func J40__bits_read

func J40__bits_read(tls *libc.TLS, st uintptr) Int64_t

diagnostic only, doesn't check for overflow or anything

func J40__ceil_div64

func J40__ceil_div64(tls *libc.TLS, x Int64_t, y Int64_t) Int64_t

func J40__clamp_add64

func J40__clamp_add64(tls *libc.TLS, x Int64_t, y Int64_t) Int64_t

func J40__clamp_mul64

func J40__clamp_mul64(tls *libc.TLS, x Int64_t, y Int64_t) Int64_t

func J40__floor_avg64

func J40__floor_avg64(tls *libc.TLS, x Int64_t, y Int64_t) Int64_t

same to `(a + b) >> 1` but doesn't overflow, useful for tight loops with autovectorization https://devblogs.microsoft.com/oldnewthing/20220207-00/?p=106223

func J40__max64

func J40__max64(tls *libc.TLS, x Int64_t, y Int64_t) Int64_t

func J40__min64

func J40__min64(tls *libc.TLS, x Int64_t, y Int64_t) Int64_t

func J40__unpack_signed64

func J40__unpack_signed64(tls *libc.TLS, x Int64_t) Int64_t

type Int8_t

type Int8_t = X__int8_t

type Int_fast16_t

type Int_fast16_t = int64

type Int_fast32_t

type Int_fast32_t = int64

type Int_fast64_t

type Int_fast64_t = int64

type Int_fast8_t

type Int_fast8_t = int8

Signed.

type Int_least16_t

type Int_least16_t = X__int_least16_t

type Int_least32_t

type Int_least32_t = X__int_least32_t

type Int_least64_t

type Int_least64_t = X__int_least64_t

type Int_least8_t

type Int_least8_t = X__int_least8_t

Signed.

type Intmax_t

type Intmax_t = X__intmax_t

Largest integral types.

type Intptr_t

type Intptr_t = int64

Types for `void *' pointers.

type J40__alias_bucket

type J40__alias_bucket = struct {
	Cutoff         Int16_t
	Offset_or_next Int16_t
	Symbol         Int16_t
}

the alias table of size N is conceptually an array of N buckets with probability 1/N each, where each bucket corresponds to at most two symbols distinguished by the cutoff point. this is done by rearranging symbols so that every symbol boundary falls into distinct buckets. so it allows *any* distribution of N symbols to be decoded in a constant time after the setup. the table is not unique though, so the spec needs to specify the exact construction algorithm.

input range: 0         cutoff               bucket_size
             +-----------|----------------------------+

output symbol: | i | symbol | <- bucket i

              +-----------|----------------------------+
output range: 0     cutoff|offset    offset+bucket_size

type J40__bits_st

type J40__bits_st = J40__bits_st1

bit and logical buffer. this is most frequently accessed and thus available without indirection.

the bit buffer (`nbits` least significant bits of `bits`) is the least significant bits available for decoding, and the logical buffer [ptr, end) corresponds to subsequent bits. the logical buffer is guaranteed to be all in the codestream (which is not always true if the file uses a container).

when the bit buffer has been exhausted the next byte from the logical buffer is consumed and appended at the *top* of the bit buffer. when the logical buffer has been exhausted higher layers (first backing buffer, then container, and finally source) should be consulted.

type J40__bits_st1

type J40__bits_st1 = struct {
	Nbits Int32_t

	Bits Uint64_t
	Ptr  uintptr
	End  uintptr
	// contains filtered or unexported fields
}

bit and logical buffer. this is most frequently accessed and thus available without indirection.

the bit buffer (`nbits` least significant bits of `bits`) is the least significant bits available for decoding, and the logical buffer [ptr, end) corresponds to subsequent bits. the logical buffer is guaranteed to be all in the codestream (which is not always true if the file uses a container).

when the bit buffer has been exhausted the next byte from the logical buffer is consumed and appended at the *top* of the bit buffer. when the logical buffer has been exhausted higher layers (first backing buffer, then container, and finally source) should be consulted.

type J40__blend_info

type J40__blend_info = struct {
	Mode          Int8_t
	Alpha_chan    Int8_t
	Clamp         Int8_t
	Src_ref_frame Int8_t
}

type J40__buffer_st

type J40__buffer_st = J40__buffer_st1

type J40__buffer_st1

type J40__buffer_st1 = struct {
	Buf           uintptr
	Size          Int64_t
	Capacity      Int64_t
	Next_codeoff  Int64_t
	Codeoff_limit Int64_t
	Checkpoint    J40__bits_st
}

a common context ("state") for all internal functions. this bears a strong similarity with `struct j40__inner` type in the API layer which would be introduced much later. there are multiple reasons for this split: - `j40__st` is designed to be in the stack, so it doesn't take up much stack space. - `j40__st` allows for partial initialization of subsystems, which makes testing much easier. - `j40__st` only holds things relevant to decoding, while `j40__inner` has API contexts. - there can be multiple `j40__st` for multi-threaded decoding.

type J40__code_cluster

type J40__code_cluster = struct {
	Config J40__hybrid_int_config
	// contains filtered or unexported fields
}

type J40__code_spec

type J40__code_spec = struct {
	Num_dist        Int32_t
	Lz77_enabled    int32
	Use_prefix_code int32
	Min_symbol      Int32_t
	Min_length      Int32_t
	Log_alpha_size  Int32_t
	Num_clusters    Int32_t

	Cluster_map   uintptr
	Lz_len_config J40__hybrid_int_config
	Clusters      uintptr
	// contains filtered or unexported fields
}

type J40__code_st

type J40__code_st = struct {
	Spec        uintptr
	Num_to_copy Int32_t
	Copy_pos    Int32_t
	Num_decoded Int32_t
	Window_cap  Int32_t
	Window      uintptr
	Ans_state   Uint32_t
	// contains filtered or unexported fields
}

type J40__container_st

type J40__container_st = J40__container_st1

type J40__container_st1

type J40__container_st1 = struct {
	Flags uint32

	Map     uintptr
	Nmap    Int32_t
	Map_cap Int32_t
	// contains filtered or unexported fields
}

a common context ("state") for all internal functions. this bears a strong similarity with `struct j40__inner` type in the API layer which would be introduced much later. there are multiple reasons for this split: - `j40__st` is designed to be in the stack, so it doesn't take up much stack space. - `j40__st` allows for partial initialization of subsystems, which makes testing much easier. - `j40__st` only holds things relevant to decoding, while `j40__inner` has API contexts. - there can be multiple `j40__st` for multi-threaded decoding.

type J40__dct_params

type J40__dct_params = struct {
	Log_rows    Int8_t
	Log_columns Int8_t
	Def_offset  Int8_t
	Def_mode    Int8_t
	Def_n       Int8_t
	Def_m       Int8_t
}

type J40__dct_select

type J40__dct_select = struct {
	Log_rows    Int8_t
	Log_columns Int8_t
	Param_idx   Int8_t
	Order_idx   Int8_t
}

type J40__dq_matrix

type J40__dq_matrix = struct {
	Mode   uint32
	N      Int16_t
	M      Int16_t
	Params uintptr
}

type J40__ec_info

type J40__ec_info = struct {
	Type      uint32
	Bpp       Int32_t
	Exp_bits  Int32_t
	Dim_shift Int32_t
	Name_len  Int32_t

	Name uintptr
	Data struct {
		Alpha_associated int32
		// contains filtered or unexported fields
	}
	// contains filtered or unexported fields
}

type J40__frame_st

type J40__frame_st = J40__frame_st1

type J40__frame_st1

type J40__frame_st1 = struct {
	Is_last              int32
	Type                 uint32
	Is_modular           int32
	Has_noise            int32
	Has_patches          int32
	Has_splines          int32
	Use_lf_frame         int32
	Skip_adapt_lf_smooth int32
	Do_ycbcr             int32
	Jpeg_upsampling      Int32_t
	Log_upsampling       Int32_t

	Ec_log_upsampling uintptr
	Group_size_shift  Int32_t
	X_qm_scale        Int32_t
	B_qm_scale        Int32_t
	Num_passes        Int32_t
	Shift             [11]Int8_t
	Log_ds            [12]Int8_t

	Lf_level Int32_t
	X0       Int32_t
	Y0       Int32_t
	Width    Int32_t
	Height   Int32_t

	Num_groups            Int64_t
	Num_groups_per_row    Int64_t
	Num_lf_groups         Int64_t
	Num_lf_groups_per_row Int64_t
	Duration              Int64_t
	Timecode              Int64_t
	Blend_info            J40__blend_info

	Ec_blend_info  uintptr
	Save_as_ref    Int32_t
	Save_before_ct int32
	Name_len       Int32_t

	Name uintptr
	Gab  struct {
		Enabled int32
		Weights [3][2]float32
	}
	Epf struct {
		Iters             Int32_t
		Sharp_lut         [8]float32
		Channel_scale     [3]float32
		Quant_mul         float32
		Pass0_sigma_scale float32
		Pass2_sigma_scale float32
		Border_sad_mul    float32
		Sigma_for_modular float32
	}
	M_lf_scaled [3]float32

	Global_tree     uintptr
	Global_codespec J40__code_spec
	Gmodular        J40__modular
	Num_gm_channels Int32_t
	Global_scale    Int32_t
	Quant_lf        Int32_t
	Lf_thr          [3][15]Int32_t
	Qf_thr          [15]Int32_t
	Nb_lf_thr       [3]Int32_t
	Nb_qf_thr       Int32_t

	Block_ctx_map     uintptr
	Block_ctx_size    Int32_t
	Nb_block_ctx      Int32_t
	Inv_colour_factor float32
	X_factor_lf       Int32_t
	B_factor_lf       Int32_t
	Base_corr_x       float32
	Base_corr_b       float32
	Dct_select_used   Int32_t
	Dct_select_loaded Int32_t
	Order_used        Int32_t
	Order_loaded      Int32_t

	Dq_matrix      [17]J40__dq_matrix
	Num_hf_presets Int32_t

	Orders         [11][13][3]uintptr
	Coeff_codespec [11]J40__code_spec
	// contains filtered or unexported fields
}

a common context ("state") for all internal functions. this bears a strong similarity with `struct j40__inner` type in the API layer which would be introduced much later. there are multiple reasons for this split: - `j40__st` is designed to be in the stack, so it doesn't take up much stack space. - `j40__st` allows for partial initialization of subsystems, which makes testing much easier. - `j40__st` only holds things relevant to decoding, while `j40__inner` has API contexts. - there can be multiple `j40__st` for multi-threaded decoding.

type J40__group_info1

type J40__group_info1 = struct {
	Ggidx    Int64_t
	Gx_in_gg Int32_t
	Gy_in_gg Int32_t
	Gw       Int32_t
	Gh       Int32_t
}

func J40__group_info

func J40__group_info(tls *libc.TLS, f uintptr, gidx Int64_t) J40__group_info1

type J40__hybrid_int_config

type J40__hybrid_int_config = struct {
	Split_exp    Int8_t
	Msb_in_token Int8_t
	Lsb_in_token Int8_t

	Max_token Int32_t
	// contains filtered or unexported fields
}

token < 2^split_exp is interpreted as is. otherwise (token - 2^split_exp) is split into NNHHHLLL where config determines H/L lengths. then MMMMM = u(NN + split_exp - H/L lengths) is read; the decoded value is 1HHHMMMMMLLL.

type J40__image_st

type J40__image_st = J40__image_st1

type J40__image_st1

type J40__image_st1 = struct {
	Width          Int32_t
	Height         Int32_t
	Orientation    uint32
	Intr_width     Int32_t
	Intr_height    Int32_t
	Bpp            int32
	Exp_bits       int32
	Anim_tps_num   Int32_t
	Anim_tps_denom Int32_t

	Anim_nloops         Int64_t
	Anim_have_timecodes int32

	Icc                   uintptr
	Iccsize               Size_t
	Cspace                uint32
	Cpoints               [4][2]float32
	Gamma_or_tf           int32
	Render_intent         uint32
	Intensity_target      float32
	Min_nits              float32
	Linear_below          float32
	Modular_16bit_buffers int32
	Num_extra_channels    int32
	Ec_info               uintptr
	Xyb_encoded           int32
	Opsin_inv_mat         [3][3]float32
	Opsin_bias            [3]float32
	Quant_bias            [3]float32
	Quant_bias_num        float32
	Want_icc              int32
	// contains filtered or unexported fields
}

a common context ("state") for all internal functions. this bears a strong similarity with `struct j40__inner` type in the API layer which would be introduced much later. there are multiple reasons for this split: - `j40__st` is designed to be in the stack, so it doesn't take up much stack space. - `j40__st` allows for partial initialization of subsystems, which makes testing much easier. - `j40__st` only holds things relevant to decoding, while `j40__inner` has API contexts. - there can be multiple `j40__st` for multi-threaded decoding.

type J40__inner

type J40__inner = J40__inner1

an API-level twin of `j40__st`; see `j40__st` documentation for the rationale for split.

type J40__inner1

type J40__inner1 = struct {
	Magic        Uint32_t
	Origin       J40__origin
	Err          J40_err
	Saved_errno  int32
	Cannot_retry int32
	Errbuf       [256]int8
	State        int32
	Bits         struct {
		Nbits Int32_t

		Bits Uint64_t
		Ptr  uintptr
		End  uintptr
		// contains filtered or unexported fields
	}
	Source struct {
		Read_func     J40_source_read_func
		Seek_func     J40_source_seek_func
		Free_func     J40_source_free_func
		Data          uintptr
		Fileoff       Int64_t
		Fileoff_limit Int64_t
	}
	Container struct {
		Flags uint32

		Map     uintptr
		Nmap    Int32_t
		Map_cap Int32_t
		// contains filtered or unexported fields
	}
	Buffer struct {
		Buf           uintptr
		Size          Int64_t
		Capacity      Int64_t
		Next_codeoff  Int64_t
		Codeoff_limit Int64_t
		Checkpoint    J40__bits_st
	}
	Image struct {
		Width          Int32_t
		Height         Int32_t
		Orientation    uint32
		Intr_width     Int32_t
		Intr_height    Int32_t
		Bpp            int32
		Exp_bits       int32
		Anim_tps_num   Int32_t
		Anim_tps_denom Int32_t

		Anim_nloops         Int64_t
		Anim_have_timecodes int32

		Icc                   uintptr
		Iccsize               Size_t
		Cspace                uint32
		Cpoints               [4][2]float32
		Gamma_or_tf           int32
		Render_intent         uint32
		Intensity_target      float32
		Min_nits              float32
		Linear_below          float32
		Modular_16bit_buffers int32
		Num_extra_channels    int32
		Ec_info               uintptr
		Xyb_encoded           int32
		Opsin_inv_mat         [3][3]float32
		Opsin_bias            [3]float32
		Quant_bias            [3]float32
		Quant_bias_num        float32
		Want_icc              int32
		// contains filtered or unexported fields
	}
	Frame struct {
		Is_last              int32
		Type                 uint32
		Is_modular           int32
		Has_noise            int32
		Has_patches          int32
		Has_splines          int32
		Use_lf_frame         int32
		Skip_adapt_lf_smooth int32
		Do_ycbcr             int32
		Jpeg_upsampling      Int32_t
		Log_upsampling       Int32_t

		Ec_log_upsampling uintptr
		Group_size_shift  Int32_t
		X_qm_scale        Int32_t
		B_qm_scale        Int32_t
		Num_passes        Int32_t
		Shift             [11]Int8_t
		Log_ds            [12]Int8_t

		Lf_level Int32_t
		X0       Int32_t
		Y0       Int32_t
		Width    Int32_t
		Height   Int32_t

		Num_groups            Int64_t
		Num_groups_per_row    Int64_t
		Num_lf_groups         Int64_t
		Num_lf_groups_per_row Int64_t
		Duration              Int64_t
		Timecode              Int64_t
		Blend_info            J40__blend_info

		Ec_blend_info  uintptr
		Save_as_ref    Int32_t
		Save_before_ct int32
		Name_len       Int32_t

		Name uintptr
		Gab  struct {
			Enabled int32
			Weights [3][2]float32
		}
		Epf struct {
			Iters             Int32_t
			Sharp_lut         [8]float32
			Channel_scale     [3]float32
			Quant_mul         float32
			Pass0_sigma_scale float32
			Pass2_sigma_scale float32
			Border_sad_mul    float32
			Sigma_for_modular float32
		}
		M_lf_scaled [3]float32

		Global_tree     uintptr
		Global_codespec J40__code_spec
		Gmodular        J40__modular
		Num_gm_channels Int32_t
		Global_scale    Int32_t
		Quant_lf        Int32_t
		Lf_thr          [3][15]Int32_t
		Qf_thr          [15]Int32_t
		Nb_lf_thr       [3]Int32_t
		Nb_qf_thr       Int32_t

		Block_ctx_map     uintptr
		Block_ctx_size    Int32_t
		Nb_block_ctx      Int32_t
		Inv_colour_factor float32
		X_factor_lf       Int32_t
		B_factor_lf       Int32_t
		Base_corr_x       float32
		Base_corr_b       float32
		Dct_select_used   Int32_t
		Dct_select_loaded Int32_t
		Order_used        Int32_t
		Order_loaded      Int32_t

		Dq_matrix      [17]J40__dq_matrix
		Num_hf_presets Int32_t

		Orders         [11][13][3]uintptr
		Coeff_codespec [11]J40__code_spec
		// contains filtered or unexported fields
	}
	Lf_groups uintptr
	Toc       J40__toc
	Rendered  int32

	Rendered_rgba J40__plane
	// contains filtered or unexported fields
}

type J40__lf_group_st

type J40__lf_group_st = J40__lf_group_st1

type J40__lf_group_st1

type J40__lf_group_st1 = struct {
	Idx          Int64_t
	Left         Int32_t
	Top          Int32_t
	Width        Int32_t
	Height       Int32_t
	Width8       Int32_t
	Height8      Int32_t
	Width64      Int32_t
	Height64     Int32_t
	Gidx         Int64_t
	Grows        Int64_t
	Gcolumns     Int64_t
	Gstride      Int64_t
	Xfromy       J40__plane
	Bfromy       J40__plane
	Sharpness    J40__plane
	Nb_varblocks Int32_t

	Blocks          J40__plane
	Varblocks       uintptr
	Llfcoeffs       [3]uintptr
	Coeffs          [3]uintptr
	Coeffs_misalign [3]Uint8_t

	Lfindices J40__plane
	Loaded    int32
	// contains filtered or unexported fields
}

a common context ("state") for all internal functions. this bears a strong similarity with `struct j40__inner` type in the API layer which would be introduced much later. there are multiple reasons for this split: - `j40__st` is designed to be in the stack, so it doesn't take up much stack space. - `j40__st` allows for partial initialization of subsystems, which makes testing much easier. - `j40__st` only holds things relevant to decoding, while `j40__inner` has API contexts. - there can be multiple `j40__st` for multi-threaded decoding.

type J40__limits

type J40__limits = J40__limits1

type J40__limits1

type J40__limits1 = struct {
	Pixels                      Int64_t
	Width                       Int32_t
	Height                      Int32_t
	Icc_output_size             Uint64_t
	Bpp                         Int32_t
	Ec_black_allowed            int32
	Num_extra_channels          Int32_t
	Needs_modular_16bit_buffers int32
	Nb_transforms               Int32_t
	Nb_channels_tr              Int32_t
	Tree_depth                  Int32_t

	Zf_pixels Int64_t
	// contains filtered or unexported fields
}

a common context ("state") for all internal functions. this bears a strong similarity with `struct j40__inner` type in the API layer which would be introduced much later. there are multiple reasons for this split: - `j40__st` is designed to be in the stack, so it doesn't take up much stack space. - `j40__st` allows for partial initialization of subsystems, which makes testing much easier. - `j40__st` only holds things relevant to decoding, while `j40__inner` has API contexts. - there can be multiple `j40__st` for multi-threaded decoding.

type J40__map

type J40__map = struct {
	Codeoff Int64_t
	Fileoff Int64_t
}

type J40__modular

type J40__modular = struct {
	Use_global_tree int32
	Wp              J40__wp_params

	Nb_transforms Int32_t

	Transform        uintptr
	Tree             uintptr
	Codespec         J40__code_spec
	Code             J40__code_st
	Num_channels     Int32_t
	Nb_meta_channels Int32_t
	Channel          uintptr
	Dist_mult        Int32_t
	// contains filtered or unexported fields
}

type J40__neighbors16

type J40__neighbors16 = struct {
	W   Int16_t
	N   Int16_t
	Nw  Int16_t
	Ne  Int16_t
	Nn  Int16_t
	Nee Int16_t
	Ww  Int16_t
	Nww Int16_t
}

func J40__init_neighbors16

func J40__init_neighbors16(tls *libc.TLS, plane uintptr, x Int32_t, y Int32_t) J40__neighbors16

type J40__neighbors32

type J40__neighbors32 = struct {
	W   Int32_t
	N   Int32_t
	Nw  Int32_t
	Ne  Int32_t
	Nn  Int32_t
	Nee Int32_t
	Ww  Int32_t
	Nww Int32_t
}

func J40__init_neighbors32

func J40__init_neighbors32(tls *libc.TLS, plane uintptr, x Int32_t, y Int32_t) J40__neighbors32

type J40__plane

type J40__plane = struct {
	Type         Uint8_t
	Misalign     Uint8_t
	Vshift       Int8_t
	Hshift       Int8_t
	Width        Int32_t
	Height       Int32_t
	Stride_bytes Int32_t
	Pixels       Uintptr_t
}

type J40__section

type J40__section = struct {
	Idx     Int64_t
	Codeoff Int64_t
	Size    Int32_t
	Pass    Int32_t
}

type J40__section_st

type J40__section_st = struct {
	Parent uintptr
	St     J40__st
	Buffer J40__buffer_st
}

type J40__source_st

type J40__source_st = J40__source_st1

type J40__source_st1

type J40__source_st1 = struct {
	Read_func     J40_source_read_func
	Seek_func     J40_source_seek_func
	Free_func     J40_source_free_func
	Data          uintptr
	Fileoff       Int64_t
	Fileoff_limit Int64_t
}

a common context ("state") for all internal functions. this bears a strong similarity with `struct j40__inner` type in the API layer which would be introduced much later. there are multiple reasons for this split: - `j40__st` is designed to be in the stack, so it doesn't take up much stack space. - `j40__st` allows for partial initialization of subsystems, which makes testing much easier. - `j40__st` only holds things relevant to decoding, while `j40__inner` has API contexts. - there can be multiple `j40__st` for multi-threaded decoding.

type J40__st

type J40__st = struct {
	Err          J40_err
	Saved_errno  int32
	Cannot_retry int32

	Bits      J40__bits_st1
	Source    uintptr
	Container uintptr
	Buffer    uintptr
	Image     uintptr
	Frame     uintptr
	Lf_group  uintptr
	Limits    uintptr
	// contains filtered or unexported fields
}

a common context ("state") for all internal functions. this bears a strong similarity with `struct j40__inner` type in the API layer which would be introduced much later. there are multiple reasons for this split: - `j40__st` is designed to be in the stack, so it doesn't take up much stack space. - `j40__st` allows for partial initialization of subsystems, which makes testing much easier. - `j40__st` only holds things relevant to decoding, while `j40__inner` has API contexts. - there can be multiple `j40__st` for multi-threaded decoding.

type J40__toc

type J40__toc = struct {
	Single_size Int32_t

	Lf_global_codeoff Int64_t
	Hf_global_codeoff Int64_t
	Lf_global_size    Int32_t
	Hf_global_size    Int32_t
	Nsections         Int64_t
	Nsections_read    Int64_t
	Sections          uintptr
	End_codeoff       Int64_t
	// contains filtered or unexported fields
}

type J40__transform

type J40__transform = struct {
	Tr uint32
	// contains filtered or unexported fields
}

type J40__tree_node

type J40__tree_node = struct {
	Branch struct {
		Prop     Int32_t
		Value    Int32_t
		Leftoff  Int32_t
		Rightoff Int32_t
	}
}

type J40__varblock

type J40__varblock = struct {
	Coeffoff_qfidx Int32_t
	Hfmul          struct{ M1 Int32_t }
}

type J40__view_f32

type J40__view_f32 = struct {
	Logw Int32_t
	Logh Int32_t
	Ptr  uintptr
}

func J40__make_view_f32

func J40__make_view_f32(tls *libc.TLS, logw Int32_t, logh Int32_t, ptr uintptr) J40__view_f32

type J40__wp32

type J40__wp32 = struct {
	Width  Int32_t
	Params J40__wp_params

	Errors    uintptr
	Pred      [5]Int32_t
	Trueerrw  Int32_t
	Trueerrn  Int32_t
	Trueerrnw Int32_t
	Trueerrne Int32_t
	// contains filtered or unexported fields
}

type J40__wp64

type J40__wp64 = struct {
	Width  Int32_t
	Params J40__wp_params

	Errors    uintptr
	Pred      [5]Int64_t
	Trueerrw  Int64_t
	Trueerrn  Int64_t
	Trueerrnw Int64_t
	Trueerrne Int64_t
	// contains filtered or unexported fields
}

type J40__wp_params

type J40__wp_params = struct {
	P1 Int8_t
	P2 Int8_t
	P3 [5]Int8_t
	W  [4]Int8_t
}

type J40_err

type J40_err = Uint32_t

an internal error type. non-zero indicates a different error condition. user callbacks can also emit error codes, which should not exceed `J40_MIN_RESERVED_ERR`. it can be interpreted as a four-letter code, but such encoding is not guaranteed.

func J40_error

func J40_error(tls *libc.TLS, image uintptr) J40_err

func J40_from_file

func J40_from_file(tls *libc.TLS, image uintptr, path uintptr) J40_err

func J40_from_memory

func J40_from_memory(tls *libc.TLS, image uintptr, buf uintptr, size Size_t, freefunc J40_memory_free_func) J40_err

func J40_output_format

func J40_output_format(tls *libc.TLS, image uintptr, channel Int32_t, format Int32_t) J40_err

type J40_frame

type J40_frame = struct {
	Magic    Uint32_t
	Reserved Uint32_t
	Inner    uintptr
}

func J40_current_frame

func J40_current_frame(tls *libc.TLS, image uintptr) J40_frame

type J40_image

type J40_image = struct {
	Magic Uint32_t

	U struct{ Inner uintptr }
	// contains filtered or unexported fields
}

type J40_memory_free_func

type J40_memory_free_func = uintptr

type J40_pixels_u8x4

type J40_pixels_u8x4 = struct {
	Width        Int32_t
	Height       Int32_t
	Stride_bytes Int32_t

	Data uintptr
	// contains filtered or unexported fields
}

J40__DEFINE_PIXELS(uint8_t, u8); // j40_pixels_u8, j40_frame_pixels_u8, j40_row_u8 J40__DEFINE_PIXELS(uint16_t, u16); // j40_pixels_u16, j40_frame_pixels_u16, j40_row_u16 J40__DEFINE_PIXELS(uint32_t, u32); // j40_pixels_u32, j40_frame_pixels_u32, j40_row_u32 J40__DEFINE_PIXELS(uint64_t, u64); // j40_pixels_u64, j40_frame_pixels_u64, j40_row_u64 J40__DEFINE_PIXELS(float, f32); // j40_pixels_f32, j40_frame_pixels_f32, j40_row_f32 J40__DEFINE_PIXELS(j40_u8x3, u8x3); // j40_pixels_u8x3, j40_frame_pixels_u8x3, j40_row_u8x3 J40__DEFINE_PIXELS(j40_u16x3, u16x3); // j40_pixels_u16x3, j40_frame_pixels_u16x3, j40_row_u16x3 J40__DEFINE_PIXELS(j40_u32x3, u32x3); // j40_pixels_u32x3, j40_frame_pixels_u32x3, j40_row_u32x3 J40__DEFINE_PIXELS(j40_f32x3, f32x3); // j40_pixels_f32x3, j40_frame_pixels_f32x3, j40_row_f32x3

func J40_frame_pixels_u8x4

func J40_frame_pixels_u8x4(tls *libc.TLS, frame uintptr, channel Int32_t) J40_pixels_u8x4

type J40_source_free_func

type J40_source_free_func = uintptr

type J40_source_read_func

type J40_source_read_func = uintptr

type J40_source_seek_func

type J40_source_seek_func = uintptr

type J40_u8x4

type J40_u8x4 = [4]Uint8_t

type Key_t

type Key_t = X__key_t

type Ldiv_t

type Ldiv_t = struct {
	Quot int64
	Rem  int64
}

Returned by `ldiv'.

type Lldiv_t

type Lldiv_t = struct {
	Quot int64
	Rem  int64
}

Returned by `lldiv'.

type Locale_t

type Locale_t = X__locale_t

type Loff_t

type Loff_t = X__loff_t

type Max_align_t

type Max_align_t = struct {
	X__max_align_ll int64
	X__max_align_ld float64
}

Type whose alignment is supported in every context and is at least

as great as that of any standard type not using alignment
specifiers.

type Mode_t

type Mode_t = X__mode_t
type Nlink_t = X__nlink_t

type Off_t

type Off_t = X__off64_t

type Pid_t

type Pid_t = X__pid_t

type Pthread_attr_t

type Pthread_attr_t = Pthread_attr_t1

type Pthread_attr_t1

type Pthread_attr_t1 = struct {
	X__size [56]int8
	// contains filtered or unexported fields
}

type Pthread_barrier_t

type Pthread_barrier_t = struct {
	X__size [32]int8
	// contains filtered or unexported fields
}

POSIX barriers data type. The structure of the type is

deliberately not exposed.

type Pthread_barrierattr_t

type Pthread_barrierattr_t = struct {
	X__size [4]int8
	// contains filtered or unexported fields
}

type Pthread_cond_t

type Pthread_cond_t = struct{ X__data X__pthread_cond_s }

type Pthread_condattr_t

type Pthread_condattr_t = struct {
	X__size [4]int8
	// contains filtered or unexported fields
}

Data structure for condition variable handling. The structure of

the attribute type is not exposed on purpose.

type Pthread_key_t

type Pthread_key_t = uint32

Keys for thread-specific data

type Pthread_mutex_t

type Pthread_mutex_t = struct{ X__data X__pthread_mutex_s }

type Pthread_mutexattr_t

type Pthread_mutexattr_t = struct {
	X__size [4]int8
	// contains filtered or unexported fields
}

Data structures for mutex handling. The structure of the attribute

type is not exposed on purpose.

type Pthread_once_t

type Pthread_once_t = int32

Once-only execution

type Pthread_rwlock_t

type Pthread_rwlock_t = struct{ X__data X__pthread_rwlock_arch_t }

Data structure for reader-writer lock variable handling. The

structure of the attribute type is deliberately not exposed.

type Pthread_rwlockattr_t

type Pthread_rwlockattr_t = struct {
	X__size [8]int8
	// contains filtered or unexported fields
}

type Pthread_spinlock_t

type Pthread_spinlock_t = int32

POSIX spinlock data type.

type Pthread_t

type Pthread_t = uint64

Thread identifiers. The structure of the attribute type is not

exposed on purpose.

type Ptrdiff_t

type Ptrdiff_t = int64

type Quad_t

type Quad_t = X__quad_t

type Random_data

type Random_data = struct {
	Fptr      uintptr
	Rptr      uintptr
	State     uintptr
	Rand_type int32
	Rand_deg  int32
	Rand_sep  int32

	End_ptr uintptr
	// contains filtered or unexported fields
}

type Register_t

type Register_t = int32

type Reloc

type Reloc = struct {
	Next    Int64_t
	Section J40__section
}

interleaved linked lists for each LF group; for each LF group `gg` there are three cases:

  • no relocated section if `relocs[gg].next == 0` (initial state).
  • a single relocated section `relocs[gg].section` if `relocs[gg].next < 0`.
  • 2+ relocated sections `relocs[i].section`, where `k` starts at `gg` and continues through `next` until it's negative.

type Sigset_t

type Sigset_t = X__sigset_t

A set of signals to be blocked, unblocked, or waited for.

type Size_t

type Size_t = uint64

type Ssize_t

type Ssize_t = X__ssize_t

type Suseconds_t

type Suseconds_t = X__suseconds_t

type Time_t

type Time_t = X__time_t

Returned by `time'.

type Timer_t

type Timer_t = X__timer_t

Timer ID returned by `timer_create'.

type Timespec

type Timespec = struct {
	Tv_sec  X__time_t
	Tv_nsec X__syscall_slong_t
}

POSIX.1b structure for a time value. This is like a `struct timeval' but

has nanoseconds instead of microseconds.

type Timeval

type Timeval = struct {
	Tv_sec  X__time_t
	Tv_usec X__suseconds_t
}

A time value that is accurate to the nearest

microsecond but also has a range of years.

type U_char

type U_char = X__u_char

type U_int

type U_int = X__u_int

type U_int16_t

type U_int16_t = X__uint16_t

type U_int32_t

type U_int32_t = X__uint32_t

type U_int64_t

type U_int64_t = X__uint64_t

type U_int8_t

type U_int8_t = X__uint8_t

These were defined by ISO C without the first `_'.

type U_long

type U_long = X__u_long

type U_quad_t

type U_quad_t = X__u_quad_t

type U_short

type U_short = X__u_short

type Uid_t

type Uid_t = X__uid_t

type Uint

type Uint = uint32

type Uint16_t

type Uint16_t = X__uint16_t

type Uint32_t

type Uint32_t = X__uint32_t

func J40__u32be

func J40__u32be(tls *libc.TLS, p uintptr) Uint32_t

type Uint64_t

type Uint64_t = X__uint64_t

type Uint8_t

type Uint8_t = X__uint8_t

type Uint_fast16_t

type Uint_fast16_t = uint64

type Uint_fast32_t

type Uint_fast32_t = uint64

type Uint_fast64_t

type Uint_fast64_t = uint64

type Uint_fast8_t

type Uint_fast8_t = uint8

Unsigned.

type Uint_least16_t

type Uint_least16_t = X__uint_least16_t

type Uint_least32_t

type Uint_least32_t = X__uint_least32_t

type Uint_least64_t

type Uint_least64_t = X__uint_least64_t

type Uint_least8_t

type Uint_least8_t = X__uint_least8_t

Unsigned.

type Uintmax_t

type Uintmax_t = X__uintmax_t

type Uintptr_t

type Uintptr_t = uint64

type Ulong

type Ulong = uint64

Old compatibility names for C types.

type Ushort

type Ushort = uint16

type Va_list

type Va_list = X__gnuc_va_list

type Wchar_t

type Wchar_t = int32

type X_G_fpos64_t

type X_G_fpos64_t = struct {
	X__pos   X__off64_t
	X__state X__mbstate_t
}

The tag name of this struct is _G_fpos64_t to preserve historic

C++ mangled names for functions taking fpos_t and/or fpos64_t
arguments.  That name should not be used in new code.

type X_G_fpos_t

type X_G_fpos_t = struct {
	X__pos   X__off_t
	X__state X__mbstate_t
}

The tag name of this struct is _G_fpos_t to preserve historic

C++ mangled names for functions taking fpos_t arguments.
That name should not be used in new code.

type X_IO_FILE

type X_IO_FILE = struct {
	X_flags int32

	X_IO_read_ptr    uintptr
	X_IO_read_end    uintptr
	X_IO_read_base   uintptr
	X_IO_write_base  uintptr
	X_IO_write_ptr   uintptr
	X_IO_write_end   uintptr
	X_IO_buf_base    uintptr
	X_IO_buf_end     uintptr
	X_IO_save_base   uintptr
	X_IO_backup_base uintptr
	X_IO_save_end    uintptr
	X_markers        uintptr
	X_chain          uintptr
	X_fileno         int32
	X_flags2         int32
	X_old_offset     X__off_t
	X_cur_column     uint16
	X_vtable_offset  int8
	X_shortbuf       [1]int8

	X_lock         uintptr
	X_offset       X__off64_t
	X_codecvt      uintptr
	X_wide_data    uintptr
	X_freeres_list uintptr
	X_freeres_buf  uintptr
	X__pad5        Size_t
	X_mode         int32
	X_unused2      [20]int8
	// contains filtered or unexported fields
}

type X__FILE

type X__FILE = X_IO_FILE

type X__atomic_wide_counter

type X__atomic_wide_counter = struct{ X__value64 uint64 }

Counter that is monotonically increasing (by less than 2**31 per

increment), with a single writer, and an arbitrary number of
readers.

type X__blkcnt64_t

type X__blkcnt64_t = int64

type X__blkcnt_t

type X__blkcnt_t = int64

Type to count number of disk blocks.

type X__blksize_t

type X__blksize_t = int64

Type to represent block size.

type X__builtin_va_list

type X__builtin_va_list = uintptr

type X__caddr_t

type X__caddr_t = uintptr

type X__clock_t

type X__clock_t = int64

type X__clockid_t

type X__clockid_t = int32

Clock ID used in clock and timer functions.

type X__compar_fn_t

type X__compar_fn_t = uintptr

Shorthand for type of comparison functions.

type X__daddr_t

type X__daddr_t = int32

type X__dev_t

type X__dev_t = uint64

type X__fd_mask

type X__fd_mask = int64

The fd_set member is required to be an array of longs.

type X__float128

type X__float128 = float64

type X__fpos64_t

type X__fpos64_t = X_G_fpos64_t

The tag name of this struct is _G_fpos64_t to preserve historic

C++ mangled names for functions taking fpos_t and/or fpos64_t
arguments.  That name should not be used in new code.

type X__fpos_t

type X__fpos_t = X_G_fpos_t

The tag name of this struct is _G_fpos_t to preserve historic

C++ mangled names for functions taking fpos_t arguments.
That name should not be used in new code.

type X__fsblkcnt64_t

type X__fsblkcnt64_t = uint64

type X__fsblkcnt_t

type X__fsblkcnt_t = uint64

Type to count file system blocks.

type X__fsfilcnt64_t

type X__fsfilcnt64_t = uint64

type X__fsfilcnt_t

type X__fsfilcnt_t = uint64

Type to count file system nodes.

type X__fsid_t

type X__fsid_t = struct{ X__val [2]int32 }

type X__fsword_t

type X__fsword_t = int64

Type of miscellaneous file system fields.

type X__gid_t

type X__gid_t = uint32

type X__gnuc_va_list

type X__gnuc_va_list = X__builtin_va_list

type X__id_t

type X__id_t = uint32

type X__ino64_t

type X__ino64_t = uint64

type X__ino_t

type X__ino_t = uint64

type X__int128_t

type X__int128_t = struct {
	Lo int64
	Hi int64
}

type X__int16_t

type X__int16_t = int16

type X__int32_t

type X__int32_t = int32

type X__int64_t

type X__int64_t = int64

type X__int8_t

type X__int8_t = int8

Fixed-size types, underlying types depend on word size and compiler.

type X__int_least16_t

type X__int_least16_t = X__int16_t

type X__int_least32_t

type X__int_least32_t = X__int32_t

type X__int_least64_t

type X__int_least64_t = X__int64_t

type X__int_least8_t

type X__int_least8_t = X__int8_t

Smallest types with at least a given width.

type X__intmax_t

type X__intmax_t = int64

Largest integral types.

type X__intptr_t

type X__intptr_t = int64

Duplicates info from stdint.h but this is used in unistd.h.

type X__key_t

type X__key_t = int32

type X__locale_struct

type X__locale_struct = struct {
	X__locales       [13]uintptr
	X__ctype_b       uintptr
	X__ctype_tolower uintptr
	X__ctype_toupper uintptr
	X__names         [13]uintptr
}

type X__locale_t

type X__locale_t = uintptr

type X__loff_t

type X__loff_t = X__off64_t

These few don't really vary by system, they always correspond

to one of the other defined types.

type X__mbstate_t

type X__mbstate_t = struct {
	X__count int32
	X__value struct{ X__wch uint32 }
}

Conversion state information.

type X__mode_t

type X__mode_t = uint32
type X__nlink_t = uint64

type X__off64_t

type X__off64_t = int64

type X__off_t

type X__off_t = int64

type X__once_flag

type X__once_flag = struct{ X__data int32 }

type X__pid_t

type X__pid_t = int32

type X__pthread_cond_s

type X__pthread_cond_s = struct {
	X__wseq         X__atomic_wide_counter
	X__g1_start     X__atomic_wide_counter
	X__g_refs       [2]uint32
	X__g_size       [2]uint32
	X__g1_orig_size uint32
	X__wrefs        uint32
	X__g_signals    [2]uint32
}

type X__pthread_internal_list

type X__pthread_internal_list = struct {
	X__prev uintptr
	X__next uintptr
}

type X__pthread_internal_slist

type X__pthread_internal_slist = struct{ X__next uintptr }

type X__pthread_list_t

type X__pthread_list_t = X__pthread_internal_list

type X__pthread_mutex_s

type X__pthread_mutex_s = struct {
	X__lock    int32
	X__count   uint32
	X__owner   int32
	X__nusers  uint32
	X__kind    int32
	X__spins   int16
	X__elision int16
	X__list    X__pthread_list_t
}

type X__pthread_rwlock_arch_t

type X__pthread_rwlock_arch_t = struct {
	X__readers       uint32
	X__writers       uint32
	X__wrphase_futex uint32
	X__writers_futex uint32
	X__pad3          uint32
	X__pad4          uint32
	X__cur_writer    int32
	X__shared        int32
	X__rwelision     int8
	X__pad1          [7]uint8
	X__pad2          uint64
	X__flags         uint32
	// contains filtered or unexported fields
}

type X__pthread_slist_t

type X__pthread_slist_t = X__pthread_internal_slist

type X__quad_t

type X__quad_t = int64

quad_t is also 64 bits.

type X__rlim64_t

type X__rlim64_t = uint64

type X__rlim_t

type X__rlim_t = uint64

type X__sig_atomic_t

type X__sig_atomic_t = int32

C99: An integer type that can be accessed as an atomic entity,

even in the presence of asynchronous interrupts.
It is not currently necessary for this to be machine-specific.

type X__sigset_t

type X__sigset_t = struct{ X__val [16]uint64 }

type X__socklen_t

type X__socklen_t = uint32

Duplicate info from sys/socket.h.

type X__ssize_t

type X__ssize_t = int64

type X__suseconds64_t

type X__suseconds64_t = int64

type X__suseconds_t

type X__suseconds_t = int64

type X__syscall_slong_t

type X__syscall_slong_t = int64

Signed long type used in system calls.

type X__syscall_ulong_t

type X__syscall_ulong_t = uint64

Unsigned long type used in system calls.

type X__thrd_t

type X__thrd_t = uint64

type X__time_t

type X__time_t = int64

type X__timer_t

type X__timer_t = uintptr

Timer ID returned by `timer_create'.

type X__tss_t

type X__tss_t = uint32

type X__u_char

type X__u_char = uint8

Convenience types.

type X__u_int

type X__u_int = uint32

type X__u_long

type X__u_long = uint64

type X__u_quad_t

type X__u_quad_t = uint64

type X__u_short

type X__u_short = uint16

type X__uid_t

type X__uid_t = uint32

type X__uint128_t

type X__uint128_t = struct {
	Lo uint64
	Hi uint64
}

type X__uint16_t

type X__uint16_t = uint16

type X__uint32_t

type X__uint32_t = uint32

type X__uint64_t

type X__uint64_t = uint64

type X__uint8_t

type X__uint8_t = uint8

type X__uint_least16_t

type X__uint_least16_t = X__uint16_t

type X__uint_least32_t

type X__uint_least32_t = X__uint32_t

type X__uint_least64_t

type X__uint_least64_t = X__uint64_t

type X__uint_least8_t

type X__uint_least8_t = X__uint8_t

type X__uintmax_t

type X__uintmax_t = uint64

type X__useconds_t

type X__useconds_t = uint32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL