dec_lag3.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. ********************************************************************************
  3. *
  4. * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
  5. * R99 Version 3.3.0
  6. * REL-4 Version 4.1.0
  7. *
  8. ********************************************************************************
  9. *
  10. * File : dec_lag3.h
  11. * Purpose : Decoding of fractional pitch lag with 1/3 resolution.
  12. * Extract the integer and fraction parts of the pitch lag from
  13. * the received adaptive codebook index.
  14. *
  15. ********************************************************************************
  16. */
  17. #ifndef dec_lag3_h
  18. #define dec_lag3_h "$Id $"
  19. /*
  20. ********************************************************************************
  21. * INCLUDE FILES
  22. ********************************************************************************
  23. */
  24. #include "typedef.h"
  25. /*
  26. ********************************************************************************
  27. * LOCAL VARIABLES AND TABLES
  28. ********************************************************************************
  29. */
  30. /*
  31. ********************************************************************************
  32. * DEFINITION OF DATA TYPES
  33. ********************************************************************************
  34. */
  35. /*
  36. ********************************************************************************
  37. * DECLARATION OF PROTOTYPES
  38. ********************************************************************************
  39. */
  40. /*************************************************************************
  41. * FUNCTION: Dec_lag3
  42. *
  43. * PURPOSE: Decoding of fractional pitch lag with 1/3 resolution.
  44. * Extract the integer and fraction parts of the pitch lag from
  45. * the received adaptive codebook index.
  46. *
  47. * See "Enc_lag3.c" for more details about the encoding procedure.
  48. *
  49. * The fractional lag in 1st and 3rd subframes is encoded with 8 bits
  50. * while that in 2nd and 4th subframes is relatively encoded with 4, 5
  51. * and 6 bits depending on the mode.
  52. *
  53. *************************************************************************/
  54. void Dec_lag3(Word16 index, /* i : received pitch index */
  55. Word16 T0_min, /* i : minimum of search range */
  56. Word16 T0_max, /* i : maximum of search range */
  57. Word16 i_subfr, /* i : subframe flag */
  58. Word16 T0_prev, /* i : integer pitch delay of last subframe
  59. used in 2nd and 4th subframes */
  60. Word16 * T0, /* o : integer part of pitch lag */
  61. Word16 * T0_frac, /* o : fractional part of pitch lag */
  62. Word16 flag4 /* i : flag for encoding with 4 bits */
  63. );
  64. #endif