bv16strct.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*****************************************************************************/
  2. /* BroadVoice(R)16 (BV16) Fixed-Point ANSI-C Source Code */
  3. /* Revision Date: November 13, 2009 */
  4. /* Version 1.1 */
  5. /*****************************************************************************/
  6. /*****************************************************************************/
  7. /* Copyright 2000-2009 Broadcom Corporation */
  8. /* */
  9. /* This software is provided under the GNU Lesser General Public License, */
  10. /* version 2.1, as published by the Free Software Foundation ("LGPL"). */
  11. /* This program is distributed in the hope that it will be useful, but */
  12. /* WITHOUT ANY SUPPORT OR WARRANTY; without even the implied warranty of */
  13. /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LGPL for */
  14. /* more details. A copy of the LGPL is available at */
  15. /* http://www.broadcom.com/licenses/LGPLv2.1.php, */
  16. /* or by writing to the Free Software Foundation, Inc., */
  17. /* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  18. /*****************************************************************************/
  19. /*****************************************************************************
  20. bv16strct.h : BV16 data structures
  21. $Log$
  22. ******************************************************************************/
  23. #ifndef BV16STRCT_H
  24. #define BV16STRCT_H
  25. struct BV16_Decoder_State {
  26. Word16 stsym[LPCO];
  27. Word16 ltsym[LTMOFF];
  28. Word16 xq[XQOFF];
  29. Word16 lsppm[LPCO*LSPPORDER];
  30. Word16 lgpm[LGPORDER];
  31. Word16 lsplast[LPCO];
  32. Word32 prevlg[2];
  33. Word32 lmax;
  34. Word32 lmin;
  35. Word32 lmean;
  36. Word32 x1;
  37. Word32 level;
  38. Word16 pp_last;
  39. Word16 cfecount;
  40. Word16 ngfae;
  41. Word16 bq_last[3];
  42. Word16 nggalgc;
  43. Word16 estl_alpha_min;
  44. UWord32 idum;
  45. Word16 per; /* Q15 */
  46. Word32 E;
  47. Word16 atplc[LPCO+1];
  48. Word16 ma_a;
  49. Word16 b_prv[2];
  50. Word16 pp_prv;
  51. };
  52. struct BV16_Encoder_State {
  53. Word32 prevlg[2];
  54. Word32 lmax;
  55. Word32 lmin;
  56. Word32 lmean;
  57. Word32 x1;
  58. Word32 level;
  59. Word16 x[XOFF]; /* Signal memory */
  60. Word16 xwd[XDOFF]; /* Memory of DECF:1 decimated version of xw() */
  61. Word16 xwd_exp; /* or block floating-point in coarptch.c */
  62. Word16 dq[XOFF]; /* Q0 - Quantized short-term pred error */
  63. Word16 dfm_h[DFO]; /* Decimated xwd() filter memory */
  64. Word16 dfm_l[DFO];
  65. Word16 stwpm[LPCO]; /* Q0 - Short-term weighting all-pole filter memory */
  66. Word16 stsym[LPCO]; /* Q0 - Short-term synthesis filter memory */
  67. Word16 stnfz[NSTORDER]; /* Q0 - Short-term noise feedback filter memory - zero section */
  68. Word16 stnfp[NSTORDER]; /* Q0 - Short-term noise feedback filter memory - pole section */
  69. Word16 ltnfm[MAXPP1]; /* Q0 - Long-term noise feedback filter memory */
  70. Word16 lsplast[LPCO];
  71. Word16 lsppm[LPCO*LSPPORDER]; /* Q15 - LSP Predictor Memory */
  72. Word16 lgpm[LGPORDER]; /* Q11 - Log-Gain Predictor Memory */
  73. Word16 cpplast; /* Pitch period pf the previous frame */
  74. Word16 hpfzm[HPO];
  75. Word16 hpfpm[2*HPO];
  76. Word16 old_A[1+LPCO]; /* Q12 - LPC of previous frame */
  77. };
  78. struct BV16_Bit_Stream {
  79. Word16 lspidx[2];
  80. Word16 ppidx;
  81. Word16 bqidx;
  82. Word16 gidx;
  83. Word16 qvidx[FRSZ/VDIM];
  84. };
  85. #endif /* BV16STRCT_H */