use crate::silk::vq_wmat_ec::LTP_ORDER;
use crate::silk::{MAX_LPC_ORDER, MAX_NB_SUBFR, MAX_SHAPE_LPC_ORDER};
#[derive(Clone, Debug, PartialEq)]
pub struct EncoderControlFlp {
pub gains: [f32; MAX_NB_SUBFR],
pub pred_coef: [[f32; MAX_LPC_ORDER]; 2],
pub ltp_coef: [f32; MAX_NB_SUBFR * LTP_ORDER],
pub ltp_scale: f32,
pub pitch_l: [i32; MAX_NB_SUBFR],
pub ar: [f32; MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER],
pub lf_ma_shp: [f32; MAX_NB_SUBFR],
pub lf_ar_shp: [f32; MAX_NB_SUBFR],
pub tilt: [f32; MAX_NB_SUBFR],
pub harm_shape_gain: [f32; MAX_NB_SUBFR],
pub lambda: f32,
pub input_quality: f32,
pub coding_quality: f32,
pub pred_gain: f32,
pub lt_pred_cod_gain: f32,
pub res_nrg: [f32; MAX_NB_SUBFR],
pub gains_unq_q16: [i32; MAX_NB_SUBFR],
pub last_gain_index_prev: i8,
}
impl Default for EncoderControlFlp {
fn default() -> Self {
Self {
gains: [0.0; MAX_NB_SUBFR],
pred_coef: [[0.0; MAX_LPC_ORDER]; 2],
ltp_coef: [0.0; MAX_NB_SUBFR * LTP_ORDER],
ltp_scale: 0.0,
pitch_l: [0; MAX_NB_SUBFR],
ar: [0.0; MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER],
lf_ma_shp: [0.0; MAX_NB_SUBFR],
lf_ar_shp: [0.0; MAX_NB_SUBFR],
tilt: [0.0; MAX_NB_SUBFR],
harm_shape_gain: [0.0; MAX_NB_SUBFR],
lambda: 0.0,
input_quality: 0.0,
coding_quality: 0.0,
pred_gain: 0.0,
lt_pred_cod_gain: 0.0,
res_nrg: [0.0; MAX_NB_SUBFR],
gains_unq_q16: [0; MAX_NB_SUBFR],
last_gain_index_prev: 0,
}
}
}