- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
packtau.c
资源名称:celp32c.rar [点击查看]
上传用户:tsjrly
上传日期:2021-02-19
资源大小:107k
文件大小:1k
源码类别:
语音压缩
开发平台:
C/C++
- /**************************************************************************
- *
- * ROUTINE
- * packtau (pack tau into binaru bit stream)
- *
- * FUNCTION
- * Input decimal value and number of binary bits,
- * program returns binary value packed in array.
- *
- * SYNOPSIS
- * subroutine packtau(value, bits, pdencode, array, pointer)
- *
- * formal
- *
- * data I/O
- * name type type function
- * -------------------------------------------------------------------
- * value int I decimal value
- * bits int I number of bits to convert to
- * (ie. 01001 for 5 bits, 1st 0 incl.)
- * pdencode int I pitch delay indexing table
- * array short O array to which one bit is assigned
- * for binary representation
- * pointer int * I/O points to appropriate element in
- * array
- *
- ***************************************************************************
- *
- * DESCRIPTION
- *
- * This program packs a decimal value into a binary value
- * to be decoded by unpacktau.c in CELP synthesizer sections.
- *
- ***************************************************************************
- *
- * CALLED BY
- *
- * celp
- *
- * CALLS
- *
- *
- *
- **************************************************************************/
- packtau(value, bits, pdencode, array, pointer)
- int value, pdencode[], bits, *pointer;
- short array[];
- {
- int i;
- /* *change index to permuted index */
- value = pdencode[value];
- /* insert in bitstream */
- for (i = 0; i < bits; (*pointer)++, i++)
- array[*pointer] = (value & 1 << i) >> i;
- }