Class ExrCompressInfo
- All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
struct ExrCompressInfo {
void const * src;
size_t src_size;
void * dst;
size_t dst_capacity;
size_t * out_size;
uint32_t compression;
int32_t compression_level;
int32_t width;
int32_t num_lines;
uint32_t num_channels;
ExrChannelInfo const * channels;
ExrMemoryPool scratch;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Struct
Struct.StructValidationNested classes/interfaces inherited from interface Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionExrCompressInfo(ByteBuffer container) Creates aExrCompressInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExrCompressInfocalloc()Returns a newExrCompressInfoinstance allocated withmemCalloc.static ExrCompressInfo.Buffercalloc(int capacity) Returns a newExrCompressInfo.Bufferinstance allocated withmemCalloc.static ExrCompressInfo.Buffercalloc(int capacity, MemoryStack stack) Returns a newExrCompressInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ExrCompressInfocalloc(MemoryStack stack) Returns a newExrCompressInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.channels()channels(ExrChannelInfo.Buffer value) Sets the address of the specifiedExrChannelInfo.Bufferto thechannelsfield.intcompression(int value) Sets the specified value to thecompressionfield.intcompression_level(int value) Sets the specified value to thecompression_levelfield.static ExrCompressInfocreate()Returns a newExrCompressInfoinstance allocated withBufferUtils.static ExrCompressInfo.Buffercreate(int capacity) Returns a newExrCompressInfo.Bufferinstance allocated withBufferUtils.static ExrCompressInfocreate(long address) Returns a newExrCompressInfoinstance for the specified memory address.static ExrCompressInfo.Buffercreate(long address, int capacity) Create aExrCompressInfo.Bufferinstance at the specified memory.static @Nullable ExrCompressInfocreateSafe(long address) static @Nullable ExrCompressInfo.BuffercreateSafe(long address, int capacity) dst()dst(ByteBuffer value) Sets the address of the specifiedByteBufferto thedstfield.longstatic ExrCompressInfomalloc()Returns a newExrCompressInfoinstance allocated withmemAlloc.static ExrCompressInfo.Buffermalloc(int capacity) Returns a newExrCompressInfo.Bufferinstance allocated withmemAlloc.static ExrCompressInfo.Buffermalloc(int capacity, MemoryStack stack) Returns a newExrCompressInfo.Bufferinstance allocated on the specifiedMemoryStack.static ExrCompressInfomalloc(MemoryStack stack) Returns a newExrCompressInfoinstance allocated on the specifiedMemoryStack.static ExrChannelInfo.Buffernchannels(long struct) Unsafe version ofchannels().static voidnchannels(long struct, ExrChannelInfo.Buffer value) Unsafe version ofchannels.static intncompression(long struct) Unsafe version ofcompression().static voidncompression(long struct, int value) Unsafe version ofcompression.static intncompression_level(long struct) Unsafe version ofcompression_level().static voidncompression_level(long struct, int value) Unsafe version ofcompression_level.static ByteBufferndst(long struct) Unsafe version ofdst.static voidndst(long struct, ByteBuffer value) Unsafe version ofdst.static longndst_capacity(long struct) Unsafe version ofdst_capacity().static voidndst_capacity(long struct, long value) Sets the specified value to thedst_capacityfield of the specifiedstruct.static intnnum_channels(long struct) Unsafe version ofnum_channels().static voidnnum_channels(long struct, int value) Sets the specified value to thenum_channelsfield of the specifiedstruct.static intnnum_lines(long struct) Unsafe version ofnum_lines().static voidnnum_lines(long struct, int value) Unsafe version ofnum_lines.static PointerBuffernout_size(long struct) Unsafe version ofout_size.static voidnout_size(long struct, PointerBuffer value) Unsafe version ofout_size.static longnscratch(long struct) Unsafe version ofscratch().static voidnscratch(long struct, long value) Unsafe version ofscratch.static ByteBuffernsrc(long struct) Unsafe version ofsrc.static voidnsrc(long struct, ByteBuffer value) Unsafe version ofsrc.static longnsrc_size(long struct) Unsafe version ofsrc_size().static voidnsrc_size(long struct, long value) Sets the specified value to thesrc_sizefield of the specifiedstruct.intintnum_lines(int value) Sets the specified value to thenum_linesfield.static intnwidth(long struct) Unsafe version ofwidth().static voidnwidth(long struct, int value) Unsafe version ofwidth.out_size()out_size(PointerBuffer value) Sets the address of the specifiedPointerBufferto theout_sizefield.longscratch()scratch(long value) Sets the specified value to thescratchfield.set(ByteBuffer src, ByteBuffer dst, PointerBuffer out_size, int compression, int compression_level, int width, int num_lines, ExrChannelInfo.Buffer channels, long scratch) Initializes this struct with the specified values.set(ExrCompressInfo src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).src()src(ByteBuffer value) Sets the address of the specifiedByteBufferto thesrcfield.longsrc_size()static voidvalidate(long struct) Validates pointer members that should not beNULL.intwidth()width(int value) Sets the specified value to thewidthfield.Methods inherited from class Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
SRC
public static final int SRCThe struct member offsets. -
SRC_SIZE
public static final int SRC_SIZEThe struct member offsets. -
DST
public static final int DSTThe struct member offsets. -
DST_CAPACITY
public static final int DST_CAPACITYThe struct member offsets. -
OUT_SIZE
public static final int OUT_SIZEThe struct member offsets. -
COMPRESSION
public static final int COMPRESSIONThe struct member offsets. -
COMPRESSION_LEVEL
public static final int COMPRESSION_LEVELThe struct member offsets. -
WIDTH
public static final int WIDTHThe struct member offsets. -
NUM_LINES
public static final int NUM_LINESThe struct member offsets. -
NUM_CHANNELS
public static final int NUM_CHANNELSThe struct member offsets. -
CHANNELS
public static final int CHANNELSThe struct member offsets. -
SCRATCH
public static final int SCRATCHThe struct member offsets.
-
-
Constructor Details
-
ExrCompressInfo
Creates aExrCompressInfoinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<ExrCompressInfo>
-
src
- Returns:
- a
ByteBufferview of the data pointed to by thesrcfield.
-
src_size
- Returns:
- the value of the
src_sizefield.
-
dst
- Returns:
- a
ByteBufferview of the data pointed to by thedstfield.
-
dst_capacity
- Returns:
- the value of the
dst_capacityfield.
-
out_size
- Returns:
- a
PointerBufferview of the data pointed to by theout_sizefield.
-
compression
- Returns:
- the value of the
compressionfield.
-
compression_level
- Returns:
- the value of the
compression_levelfield.
-
width
- Returns:
- the value of the
widthfield.
-
num_lines
- Returns:
- the value of the
num_linesfield.
-
num_channels
- Returns:
- the value of the
num_channelsfield.
-
channels
- Returns:
- a
ExrChannelInfo.Bufferview of the struct array pointed to by thechannelsfield.
-
scratch
- Returns:
- the value of the
scratchfield.
-
src
Sets the address of the specifiedByteBufferto thesrcfield. -
dst
Sets the address of the specifiedByteBufferto thedstfield. -
out_size
Sets the address of the specifiedPointerBufferto theout_sizefield. -
compression
Sets the specified value to thecompressionfield. -
compression_level
Sets the specified value to thecompression_levelfield. -
width
Sets the specified value to thewidthfield. -
num_lines
Sets the specified value to thenum_linesfield. -
channels
Sets the address of the specifiedExrChannelInfo.Bufferto thechannelsfield. -
scratch
Sets the specified value to thescratchfield. -
set
public ExrCompressInfo set(ByteBuffer src, ByteBuffer dst, PointerBuffer out_size, int compression, int compression_level, int width, int num_lines, ExrChannelInfo.Buffer channels, long scratch) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newExrCompressInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newExrCompressInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newExrCompressInfoinstance allocated withBufferUtils. -
create
Returns a newExrCompressInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newExrCompressInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newExrCompressInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newExrCompressInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aExrCompressInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newExrCompressInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newExrCompressInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newExrCompressInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newExrCompressInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsrc
Unsafe version ofsrc. -
nsrc_size
public static long nsrc_size(long struct) Unsafe version ofsrc_size(). -
ndst
Unsafe version ofdst. -
ndst_capacity
public static long ndst_capacity(long struct) Unsafe version ofdst_capacity(). -
nout_size
Unsafe version ofout_size. -
ncompression
public static int ncompression(long struct) Unsafe version ofcompression(). -
ncompression_level
public static int ncompression_level(long struct) Unsafe version ofcompression_level(). -
nwidth
public static int nwidth(long struct) Unsafe version ofwidth(). -
nnum_lines
public static int nnum_lines(long struct) Unsafe version ofnum_lines(). -
nnum_channels
public static int nnum_channels(long struct) Unsafe version ofnum_channels(). -
nchannels
Unsafe version ofchannels(). -
nscratch
public static long nscratch(long struct) Unsafe version ofscratch(). -
nsrc
Unsafe version ofsrc. -
nsrc_size
public static void nsrc_size(long struct, long value) Sets the specified value to thesrc_sizefield of the specifiedstruct. -
ndst
Unsafe version ofdst. -
ndst_capacity
public static void ndst_capacity(long struct, long value) Sets the specified value to thedst_capacityfield of the specifiedstruct. -
nout_size
Unsafe version ofout_size. -
ncompression
public static void ncompression(long struct, int value) Unsafe version ofcompression. -
ncompression_level
public static void ncompression_level(long struct, int value) Unsafe version ofcompression_level. -
nwidth
public static void nwidth(long struct, int value) Unsafe version ofwidth. -
nnum_lines
public static void nnum_lines(long struct, int value) Unsafe version ofnum_lines. -
nnum_channels
public static void nnum_channels(long struct, int value) Sets the specified value to thenum_channelsfield of the specifiedstruct. -
nchannels
Unsafe version ofchannels. -
nscratch
public static void nscratch(long struct, long value) Unsafe version ofscratch. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-