rvoip-codec-core 0.3.8

G.711 and optional G.729/Opus/AMR audio codec implementations for RVOIP
Documentation
//! Homing-frame patterns for AMR-WB, from the TS 26.173 reference.
//!
//! A homing frame is the specification's own way of driving a codec to a
//! known state mid-stream: feed the encoder a frame of `0x0008` samples and
//! it emits exactly the pattern below, then resets. The decoder does the
//! mirror. Conformance sequences open with them, which is why the wideband
//! encoder vectors cannot be reproduced without this.
//!
//! Generated by `tools/gen_homing_tables.py`.

/// Parameters in the first subframe of each mode, for the partial test.
///
/// A decoder already in its homed state checks only these: the rest of the
/// frame carries the *next* frame's content once homing has taken effect.
pub const PRMS_FIRST_SUBFRAME: [usize; 9] = [63, 81, 100, 108, 116, 128, 136, 152, 156];

/// The parameter pattern each mode's decoder homing frame carries.
///
/// Rows are padded to the longest mode; only the leading `PRMS_*` entries of
/// each are meaningful.
pub const DHF: [[i16; 32]; 9] = [
    [
        3168, 29954, 29213, 16121, 64, 13440, 30624, 16430, 19008, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    ],
    [
        3168, 31665, 9943, 9123, 15599, 4358, 20248, 2048, 17040, 27787, 16816, 13888, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    ],
    [
        3168, 31665, 9943, 9128, 3647, 8129, 30930, 27926, 18880, 12319, 496, 1042, 4061, 20446,
        25629, 28069, 13948, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    ],
    [
        3168, 31665, 9943, 9131, 24815, 655, 26616, 26764, 7238, 19136, 6144, 88, 4158, 25733,
        30567, 30494, 221, 20321, 17823, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    ],
    [
        3168, 31665, 9943, 9131, 24815, 700, 3824, 7271, 26400, 9528, 6594, 26112, 108, 2068,
        12867, 16317, 23035, 24632, 7528, 1752, 6759, 24576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    ],
    [
        3168, 31665, 9943, 9135, 14787, 14423, 30477, 24927, 25345, 30154, 916, 5728, 18978, 2048,
        528, 16449, 2436, 3581, 23527, 29479, 8237, 16810, 27091, 19052, 0, 0, 0, 0, 0, 0, 0, 0,
    ],
    [
        3168, 31665, 9943, 9129, 8637, 31807, 24646, 736, 28643, 2977, 2566, 25564, 12930, 13960,
        2048, 834, 3270, 4100, 26920, 16237, 31227, 17667, 15059, 20589, 30249, 29123, 0, 0, 0, 0,
        0, 0,
    ],
    [
        3168, 31665, 9943, 9132, 16748, 3202, 28179, 16317, 30590, 15857, 19960, 8818, 21711,
        21538, 4260, 16690, 20224, 3666, 4194, 9497, 16320, 15388, 5755, 31551, 14080, 3574, 15932,
        50, 23392, 26053, 31216, 0,
    ],
    [
        3168, 31665, 9943, 9134, 24776, 5857, 18475, 28535, 29662, 14321, 16725, 4396, 29353,
        10003, 17068, 20504, 720, 0, 8465, 12581, 28863, 24774, 9709, 26043, 7941, 27649, 13965,
        15236, 18026, 22047, 16681, 3968,
    ],
];