As a result, these functions are not fast; their focus is on ease-of-use.
Typical use is a vector component with e.g. 2 bits subpixel precision that is stored in a floating point application buffer.
These functions are built upon the p_write_frame/field_comp_16() functions. They perform dynamic memory allocation using malloc()/free().
Most of the parameters are standard, the special ones are:
field | 0: frame, 1/2: field access. | |
abuf | the pointer to the application buffer | |
atype | type of the application buffer | |
offset | zero value for signed data pfspd data is always unsigned, this specifies the pfspd value that maps to zero for signed appl buffers. | |
gain | multiplication factor (may be negative) |
p = (unsigned short)((a * gain) + offset)
a = (p - offset) / (atype)gain
When the component has type P_16_REAL_FILE, float and double values are converted to and from an internal 16-bit float format.
Functions | |
pT_status | p_cce_read_comp (const char *filename, pT_header *header, int frame, int field, int comp, void *abuf, pT_buf_type atype, int offset, int gain, int width, int height, int stride) |
pT_status | p_cce_write_comp (const char *filename, pT_header *header, int frame, int field, int comp, const void *abuf, pT_buf_type atype, int offset, int gain, int width, int height, int stride) |
|
|
|
|