xrif
A fast lossless compression system

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

Collaboration diagram for Pixel Differencing:

Functions

xrif_error_t xrif_difference_pixel (xrif_t handle)
 Difference the images using the previous pixel as a reference. More...
 
xrif_error_t xrif_undifference_pixel (xrif_t handle)
 Undifference the images using the previous pixel as a reference. More...
 

Function Documentation

◆ xrif_difference_pixel()

xrif_error_t xrif_difference_pixel ( xrif_t  handle)

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

Verify pixel differencing for uint16_t [test doc]

Verify pixel differencing for int32_t [test doc]

Verify pixel differencing for uint32_t [test doc]

Verify pixel differencing for int64_t [test doc]

Verify pixel differencing for uint64_t [test doc]

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

Definition at line 227 of file xrif_difference_pixel.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_INT8, and XRIF_TYPECODE_UINT8.

◆ xrif_undifference_pixel()

xrif_error_t xrif_undifference_pixel ( xrif_t  handle)

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

Verify pixel differencing for uint16_t [test doc]

Verify pixel differencing for int32_t [test doc]

Verify pixel differencing for uint32_t [test doc]

Verify pixel differencing for int64_t [test doc]

Verify pixel differencing for uint64_t [test doc]

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

Definition at line 413 of file xrif_difference_pixel.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_INT8, and XRIF_TYPECODE_UINT8.