HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
exr_coding_channel_info_t Struct Reference

Struct for negotiating buffers when decoding/encoding chunks of data. More...

#include <openexr_coding.h>

Public Attributes

const char * channel_name
 
int32_t height
 
int32_t width
 
int32_t x_samples
 
int32_t y_samples
 
uint8_t p_linear
 
int8_t bytes_per_element
 
uint16_t data_type
 
int16_t user_bytes_per_element
 
uint16_t user_data_type
 
int32_t user_pixel_stride
 
int32_t user_line_stride
 
union {
   uint8_t *   decode_to_ptr
 
   const uint8_t *   encode_from_ptr
 
}; 
 

Detailed Description

Struct for negotiating buffers when decoding/encoding chunks of data.

This is generic and meant to negotiate exr data bi-directionally, in that the same structure is used for both decoding and encoding chunks for read and write, respectively.

The first half of the structure will be filled by the library, and the caller is expected to fill the second half appropriately.

Definition at line 43 of file openexr_coding.h.

Member Data Documentation

union { ... }

This data member has different requirements reading vs writing. When reading, if this is left as NULL, the channel will be skipped during read and not filled in. During a write operation, this pointer is considered const and not modified. To make this more clear, a union is used here.

int8_t exr_coding_channel_info_t::bytes_per_element

How many bytes per pixel this channel consumes (2 for float16, 4 for float32/uint32).

Definition at line 83 of file openexr_coding.h.

const char* exr_coding_channel_info_t::channel_name

Channel name.

This is provided as a convenient reference. Do not free, this refers to the internal data structure in the context.

Definition at line 56 of file openexr_coding.h.

uint16_t exr_coding_channel_info_t::data_type

Small form of exr_pixel_type_t enum (EXR_PIXEL_UINT/HALF/FLOAT).

Definition at line 86 of file openexr_coding.h.

uint8_t* exr_coding_channel_info_t::decode_to_ptr

Definition at line 132 of file openexr_coding.h.

const uint8_t* exr_coding_channel_info_t::encode_from_ptr

Definition at line 133 of file openexr_coding.h.

int32_t exr_coding_channel_info_t::height

Number of lines for this channel in this chunk.

May be 0 or less than overall image height based on sampling (i.e. when in 4:2:0 type sampling)

Definition at line 63 of file openexr_coding.h.

uint8_t exr_coding_channel_info_t::p_linear

Linear flag from channel definition (used by b44).

Definition at line 78 of file openexr_coding.h.

int16_t exr_coding_channel_info_t::user_bytes_per_element

How many bytes per pixel the input is or output should be (2 for float16, 4 for float32/uint32). Defaults to same size as input.

Definition at line 97 of file openexr_coding.h.

uint16_t exr_coding_channel_info_t::user_data_type

Small form of exr_pixel_type_t enum (EXR_PIXEL_UINT/HALF/FLOAT). Defaults to same type as input.

Definition at line 102 of file openexr_coding.h.

int32_t exr_coding_channel_info_t::user_line_stride

When lines > 1 for a chunk, this is the increment used to get from beginning of line to beginning of next line.

This is in bytes. Must be specified when the decode pointer is specified (and always for encode).

Definition at line 122 of file openexr_coding.h.

int32_t exr_coding_channel_info_t::user_pixel_stride

Increment to get to next pixel.

This is in bytes. Must be specified when the decode pointer is specified (and always for encode).

This is useful for implementing transcoding generically of planar or interleaved data. For planar data, where the layout is RRRRRGGGGGBBBBB, you can pass in 1 * bytes per component.

Definition at line 114 of file openexr_coding.h.

int32_t exr_coding_channel_info_t::width

Width in pixel count.

May be 0 or less than overall image width based on sampling (i.e. 4:2:2 will have some channels have fewer values).

Definition at line 70 of file openexr_coding.h.

int32_t exr_coding_channel_info_t::x_samples

Horizontal subsampling information.

Definition at line 73 of file openexr_coding.h.

int32_t exr_coding_channel_info_t::y_samples

Vertical subsampling information.

Definition at line 75 of file openexr_coding.h.


The documentation for this struct was generated from the following file: