xrif
A fast lossless compression system

The first differencing method uses the first frame as the reference for all subsequent frames.

Collaboration diagram for First Differencing:

Functions

xrif_error_t xrif_difference_first (xrif_t handle)
 Difference the images using the first image as a reference. More...
 
xrif_error_t xrif_undifference_first (xrif_t handle)
 Undifference the images using the first image as a reference. More...
 

Function Documentation

◆ xrif_difference_first()

xrif_error_t xrif_difference_first ( xrif_t  handle)

Difference the images using the first image as a reference.

This function calls the type specific difference function for the type specified by handle->type_code.

Returns
XRIF_ERROR_NULLPTR if the handle is NULL
XRIF_ERROR_NOT_SETUP if the handle is not configured
XRIF_ERROR_INSUFFICIENT_SIZE if raw_buffer_size is not big enough given the configuration
XRIF_ERROR_NOTIMPL if differencing is not implemented for the type specified in xrif_handle::type_code
XRIF_NOERROR on success
Test:

Verify first differencing for int16_t [test doc]

Verify first differencing for uint16_t [test doc]

Verify first differencing for int32_t [test doc]

Verify first differencing for uint32_t [test doc]

Verify first differencing for int64_t [test doc]

Verify first differencing for uint64_t [test doc]

Parameters
[in,out]handle[in/out] the xrif handle

Definition at line 216 of file xrif_difference_first.c.

References xrif_handle::depth, xrif_handle::frames, xrif_handle::height, xrif_handle::raw_buffer, xrif_handle::raw_buffer_size, xrif_handle::type_code, xrif_handle::width, XRIF_ERROR_INSUFFICIENT_SIZE, XRIF_ERROR_NOT_SETUP, XRIF_ERROR_NULLPTR, XRIF_ERROR_PRINT, XRIF_TYPECODE_INT16, and XRIF_TYPECODE_UINT16.

◆ xrif_undifference_first()

xrif_error_t xrif_undifference_first ( xrif_t  handle)

Undifference the images using the first image as a reference.

This function calls the type specific undifference function for the type specified by handle->type_code.

Returns
XRIF_ERROR_NULLPTR if the handle is NULL
XRIF_ERROR_NOT_SETUP if the handle is not configured
XRIF_ERROR_INSUFFICIENT_SIZE if raw_buffer_size is not big enough given the configuration
XRIF_ERROR_NOTIMPL if undifferencing is not implemented for the type specified in xrif_handle::type_code
XRIF_NOERROR on success
Test:

Verify first differencing for int16_t [test doc]

Verify first differencing for uint16_t [test doc]

Verify first differencing for int32_t [test doc]

Verify first differencing for uint32_t [test doc]

Verify first differencing for int64_t [test doc]

Verify first differencing for uint64_t [test doc]

Parameters
[in,out]handle[in/out] the xrif handle

Definition at line 386 of file xrif_difference_first.c.

References xrif_handle::depth, xrif_handle::frames, xrif_handle::height, xrif_handle::raw_buffer, xrif_handle::raw_buffer_size, xrif_handle::type_code, xrif_handle::width, XRIF_ERROR_INSUFFICIENT_SIZE, XRIF_ERROR_NOT_SETUP, XRIF_ERROR_NULLPTR, XRIF_ERROR_PRINT, XRIF_TYPECODE_INT16, and XRIF_TYPECODE_UINT16.