vq.h
上传用户:cxx_68
上传日期:2021-02-21
资源大小:161k
文件大小:3k
源码类别:

语音压缩

开发平台:

Visual C++

  1. /*
  2. 2.4 kbps MELP Proposed Federal Standard speech coder
  3. Fixed-point C code, version 1.0
  4. Copyright (c) 1998, Texas Instruments, Inc.  
  5. Texas Instruments has intellectual property rights on the MELP
  6. algorithm.  The Texas Instruments contact for licensing issues for
  7. commercial and non-government use is William Gordon, Director,
  8. Government Contracts, Texas Instruments Incorporated, Semiconductor
  9. Group (phone 972 480 7442).
  10. The fixed-point version of the voice codec Mixed Excitation Linear
  11. Prediction (MELP) is based on specifications on the C-language software
  12. simulation contained in GSM 06.06 which is protected by copyright and
  13. is the property of the European Telecommunications Standards Institute
  14. (ETSI). This standard is available from the ETSI publication office
  15. tel. +33 (0)4 92 94 42 58. ETSI has granted a license to United States
  16. Department of Defense to use the C-language software simulation contained
  17. in GSM 06.06 for the purposes of the development of a fixed-point
  18. version of the voice codec Mixed Excitation Linear Prediction (MELP).
  19. Requests for authorization to make other use of the GSM 06.06 or
  20. otherwise distribute or modify them need to be addressed to the ETSI
  21. Secretariat fax: +33 493 65 47 16.
  22. */
  23. /* 
  24.    vq.h     VQ include file.
  25.             (Search/decode/distortion/weighting functions for VQ)
  26.    Copyright (c) 1997 by Texas Instruments Incorporated.  All rights reserved.
  27. */
  28. #ifndef _vq_h_
  29. #define _vq_h_
  30. Shortword *vq_lspw(Shortword *w, Shortword *lsp, Shortword *a, 
  31.    Shortword p);
  32. Shortword vq_ms4(Shortword *cb, Shortword *u, Shortword *u_est, 
  33.  Shortword *levels, Shortword ma, Shortword stages, 
  34.  Shortword p, Shortword *w, Shortword *u_hat, 
  35.  Shortword *indices, Shortword max_inner);
  36. Shortword *vq_msd2(Shortword *cb, Shortword *u, Shortword *u_est, 
  37.    Shortword *a, Shortword *indices, Shortword *levels, 
  38.    Shortword stages, Shortword p, Shortword conversion,
  39.    Shortword diff_Q);
  40. Longword vq_enc(Shortword *cb,Shortword *u,Shortword levels,Shortword p, 
  41. Shortword *u_hat,Shortword *indices);
  42. void vq_fsw(Shortword *w_fs, Shortword num_harm, Shortword pitch);
  43. /* Structure definition */
  44. struct msvq_param {         /* Multistage VQ parameters */
  45.     Shortword num_stages;
  46.     Shortword *num_levels;
  47.     Shortword *num_bits;
  48.     Shortword dimension;
  49.     Shortword num_best;
  50.     Shortword *indices;
  51.     char *fname_cb;
  52.     Shortword *cb;
  53.     Shortword *cb_mean;
  54. };
  55. /* External function definitions */
  56. #define msvq_enc(u,w,u_hat,par)
  57.         vq_ms4(par.cb,u,par.cb_mean,par.num_levels,
  58.        par.num_best,par.num_stages,par.dimension,w,u_hat,
  59.        par.indices,MSVQ_MAXCNT)
  60. #define fsvq_enc(u,u_hat,par)
  61.     vq_enc(par.cb,u,*(par.num_levels),
  62.    par.dimension,u_hat,
  63.    par.indices)
  64. #endif