|
CCSDS 124.0-B-1 C 1.0.0
CCSDS 124.0-B-1 Lossless Compression
|
CCSDS Section 4: Mask vector update equations. More...
Functions | |
| void | ccsds124_update_build (bitvector_t *build, const bitvector_t *input, const bitvector_t *prev_input, int new_mask_flag, size_t t) |
| Update build vector (CCSDS Equation 6). | |
| void | ccsds124_update_mask (bitvector_t *mask, const bitvector_t *input, const bitvector_t *prev_input, const bitvector_t *build_prev, int new_mask_flag) |
| Update mask vector (CCSDS Equation 7). | |
| void | ccsds124_compute_change (bitvector_t *change, const bitvector_t *mask, const bitvector_t *prev_mask, size_t t) |
| Compute change vector (CCSDS Equation 8). | |
CCSDS Section 4: Mask vector update equations.
These functions implement the core mask prediction logic that identifies which bits are predictable vs. unpredictable.
| void ccsds124_compute_change | ( | bitvector_t * | change, |
| const bitvector_t * | mask, | ||
| const bitvector_t * | prev_mask, | ||
| size_t | t | ||
| ) |
Compute change vector (CCSDS Equation 8).
Dₜ = Mₜ XOR Mₜ₋₁. The caller sets prev_mask = mask before calling at t=0 so that D₀ = 0 (no change at initialization).
| [out] | change | Change vector Dₜ |
| [in] | mask | Current mask Mₜ |
| [in] | prev_mask | Previous mask Mₜ₋₁ |
| [in] | t | Time index (unused, kept for API compatibility) |
Definition at line 125 of file mask.c.
References bitvector_xor().
Referenced by ccsds124_compress_packet().
| void ccsds124_update_build | ( | bitvector_t * | build, |
| const bitvector_t * | input, | ||
| const bitvector_t * | prev_input, | ||
| int | new_mask_flag, | ||
| size_t | t | ||
| ) |
Update build vector (CCSDS Equation 6).
The build vector accumulates XOR differences between consecutive packets to track which bits have changed.
| [out] | build | Updated build vector Bₜ |
| [in] | input | Current input Iₜ |
| [in] | prev_input | Previous input Iₜ₋₁ |
| [in] | new_mask_flag | ṗₜ flag (1 = reset build) |
| [in] | t | Time index (0 = first packet) |
Definition at line 43 of file mask.c.
References bitvector_init(), bitvector_or(), bitvector_xor(), bitvector_zero(), and bitvector::length.
Referenced by ccsds124_compress_packet().
| void ccsds124_update_mask | ( | bitvector_t * | mask, |
| const bitvector_t * | input, | ||
| const bitvector_t * | prev_input, | ||
| const bitvector_t * | build_prev, | ||
| int | new_mask_flag | ||
| ) |
Update mask vector (CCSDS Equation 7).
The mask vector identifies unpredictable bits (1 = unpredictable).
| [out] | mask | Updated mask vector Mₜ |
| [in] | input | Current input Iₜ |
| [in] | prev_input | Previous input Iₜ₋₁ |
| [in] | build_prev | Previous build vector Bₜ₋₁ |
| [in] | new_mask_flag | ṗₜ flag (1 = update from build) |
Definition at line 85 of file mask.c.
References bitvector_init(), bitvector_or(), bitvector_xor(), and bitvector::length.
Referenced by ccsds124_compress_packet().