xrif
A fast lossless compression system

The previous differencing method uses the previous frame as the reference.

Collaboration diagram for Previous Differencing:

Functions

xrif_error_t xrif_difference_previous (xrif_t handle)
 Difference the images using the previous image as a reference. More...
 
xrif_error_t xrif_undifference_previous (xrif_t handle)
 Undifference the images using the previous image as a reference. More...
 

Function Documentation

◆ xrif_difference_previous()

xrif_error_t xrif_difference_previous ( xrif_t  handle)

Difference the images using the previous 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 previous differencing for int16_t [test doc]

Verify previous differencing for uint16_t [test doc]

Verify previous differencing for int32_t [test doc]

Verify previous differencing for uint32_t [test doc]

Verify previous differencing for int64_t [test doc]

Verify previous differencing for uint64_t [test doc]

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

Definition at line 216 of file xrif_difference_previous.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_previous()

xrif_error_t xrif_undifference_previous ( xrif_t  handle)

Undifference the images using the previous 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 previous differencing for int16_t [test doc]

Verify previous differencing for uint16_t [test doc]

Verify previous differencing for int32_t [test doc]

Verify previous differencing for uint32_t [test doc]

Verify previous differencing for int64_t [test doc]

Verify previous differencing for uint64_t [test doc]

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

Definition at line 384 of file xrif_difference_previous.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.