Skip to main content

Module embed

Module embed 

Source
Expand description

Viterbi-based STC embedding.

Implements the forward (Viterbi) and backward (traceback) passes of the STC embedding algorithm. The encoder finds the minimum-cost stego bit sequence whose syndrome (under the H-hat matrix) matches the message.

Two internal paths:

  • Inline (n ≤ 1M): stores all back pointers in one pass — fastest.
  • Segmented (n > 1M): checkpoint/recompute approach — O(√n) memory, 2× compute. Enables 48 MP+ images on memory-constrained devices.

Structs§

EmbedResult
Result of STC embedding: the stego bit sequence and its total distortion cost.

Constants§

STC_PROGRESS_STEPS
Number of progress steps reported during STC Viterbi embedding.

Functions§

stc_embed
Embed a message into cover bits using the Viterbi-based STC algorithm.