Class SbCodec

  • All Implemented Interfaces:
    Codebook
    Direct Known Subclasses:
    SbDecoder, SbEncoder

    public class SbCodec
    extends NbCodec
    Sideband Codec. This class contains all the basic structures needed by the Sideband encoder and decoder.
    Version:
    $Revision: 1.2 $
    Author:
    Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
    • Field Detail

      • SB_FRAME_SIZE

        public static final int[] SB_FRAME_SIZE
        The Sideband Frame Size gives the size in bits of a Sideband frame for a given sideband submode.
      • SB_SUBMODES

        public static final int SB_SUBMODES
        The Sideband Submodes gives the number of submodes possible for the Sideband codec.
        See Also:
        Constant Field Values
      • SB_SUBMODE_BITS

        public static final int SB_SUBMODE_BITS
        The Sideband Submodes Bits gives the number bits used to encode the Sideband Submode
        See Also:
        Constant Field Values
      • QMF_ORDER

        public static final int QMF_ORDER
        Quadratic Mirror Filter Order
        See Also:
        Constant Field Values
      • fullFrameSize

        protected int fullFrameSize
      • foldingGain

        protected float foldingGain
      • high

        protected float[] high
      • y0

        protected float[] y0
      • y1

        protected float[] y1
      • x0d

        protected float[] x0d
      • g0_mem

        protected float[] g0_mem
      • g1_mem

        protected float[] g1_mem
    • Constructor Detail

      • SbCodec

        public SbCodec()
    • Method Detail

      • wbinit

        public void wbinit()
        Wideband initialisation
      • uwbinit

        public void uwbinit()
        Ultra-wideband initialisation
      • init

        protected void init​(int frameSize,
                            int subframeSize,
                            int lpcSize,
                            int bufSize,
                            float foldingGain)
        Initialisation
        Parameters:
        frameSize -
        subframeSize -
        lpcSize -
        bufSize -
        foldingGain -
      • buildWbSubModes

        protected static SubMode[] buildWbSubModes()
        Build wideband submodes.
        Returns:
        the wideband submodes.
      • buildUwbSubModes

        protected static SubMode[] buildUwbSubModes()
        Build ultra-wideband submodes.
        Returns:
        the ultra-wideband submodes.
      • getFrameSize

        public int getFrameSize()
        Returns the size of a frame (ex: 160 samples for a narrowband frame, 320 for wideband and 640 for ultra-wideband).
        Overrides:
        getFrameSize in class NbCodec
        Returns:
        the size of a frame (number of audio samples in a frame).
      • getDtx

        public boolean getDtx()
        Returns whether or not we are using Discontinuous Transmission encoding.
        Overrides:
        getDtx in class NbCodec
        Returns:
        whether or not we are using Discontinuous Transmission encoding.
      • getExc

        public float[] getExc()
        Returns the excitation array.
        Overrides:
        getExc in class NbCodec
        Returns:
        the excitation array.
      • getInnov

        public float[] getInnov()
        Returns the innovation array.
        Overrides:
        getInnov in class NbCodec
        Returns:
        the innovation array.