wmops.c
资源名称:melpfix.rar [点击查看]
上传用户:cxx_68
上传日期:2021-02-21
资源大小:161k
文件大小:2k
源码类别:
语音压缩
开发平台:
Visual C++
- /*
- 2.4 kbps MELP Proposed Federal Standard speech coder
- Fixed-point C code, version 1.0
- Copyright (c) 1998, Texas Instruments, Inc.
- Texas Instruments has intellectual property rights on the MELP
- algorithm. The Texas Instruments contact for licensing issues for
- commercial and non-government use is William Gordon, Director,
- Government Contracts, Texas Instruments Incorporated, Semiconductor
- Group (phone 972 480 7442).
- The fixed-point version of the voice codec Mixed Excitation Linear
- Prediction (MELP) is based on specifications on the C-language software
- simulation contained in GSM 06.06 which is protected by copyright and
- is the property of the European Telecommunications Standards Institute
- (ETSI). This standard is available from the ETSI publication office
- tel. +33 (0)4 92 94 42 58. ETSI has granted a license to United States
- Department of Defense to use the C-language software simulation contained
- in GSM 06.06 for the purposes of the development of a fixed-point
- version of the voice codec Mixed Excitation Linear Prediction (MELP).
- Requests for authorization to make other use of the GSM 06.06 or
- otherwise distribute or modify them need to be addressed to the ETSI
- Secretariat fax: +33 493 65 47 16.
- */
- /*
- wmops_lib.c: dummy routines for weighted MOPS estimation.
- */
- /* compiler include files */
- #include <stdio.h>
- #include <math.h>
- #include "spbstd.h"
- #include "wmops.h"
- extern int complexity;
- /*
- Data Move: constant -> variable
- variable -> variable
- result of operation -> array variable
- arithmetic test on array variable
- */
- void data_move()
- {
- complexity += 1;
- }
- void L_data_move()
- {
- complexity += 2;
- }
- /*
- Logical operation: AND, OR, XOR, NOT
- */
- void logic()
- {
- complexity += 1;
- }
- void L_logic()
- {
- complexity += 2;
- }
- /*
- Arithmetic test: IF, WHILE, DO..WHILE
- */
- void compare_zero()
- {
- complexity += 2;
- }
- void compare_nonzero()
- {
- /* To perform a comparison between two short variables or a short variable
- and a non-zero constant, a subtract (sub) must be performed first. */
- complexity += 3;
- }
- void L_compare_nonzero()
- {
- /* To perform a comparison between two long variables or a long variable
- and a non-zero constant, a subtract (L_sub) must be performed first. */
- complexity += 4;
- }