亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mathevrc.c

?? 完整的EVRC壓縮解壓縮算法源碼,附帶一個簡單的例子程序。
?? C
?? 第 1 頁 / 共 5 頁
字號:
/**********************************************************************
Each of the companies; Lucent, Motorola, Nokia, and Qualcomm (hereinafter 
referred to individually as "Source" or collectively as "Sources") do 
hereby state:

To the extent to which the Source(s) may legally and freely do so, the 
Source(s), upon submission of a Contribution, grant(s) a free, 
irrevocable, non-exclusive, license to the Third Generation Partnership 
Project 2 (3GPP2) and its Organizational Partners: ARIB, CCSA, TIA, TTA, 
and TTC, under the Source's copyright or copyright license rights in the 
Contribution, to, in whole or in part, copy, make derivative works, 
perform, display and distribute the Contribution and derivative works 
thereof consistent with 3GPP2's and each Organizational Partner's 
policies and procedures, with the right to (i) sublicense the foregoing 
rights consistent with 3GPP2's and each Organizational Partner's  policies 
and procedures and (ii) copyright and sell, if applicable) in 3GPP2's name 
or each Organizational Partner's name any 3GPP2 or transposed Publication 
even though this Publication may contain the Contribution or a derivative 
work thereof.  The Contribution shall disclose any known limitations on 
the Source's rights to license as herein provided.

When a Contribution is submitted by the Source(s) to assist the 
formulating groups of 3GPP2 or any of its Organizational Partners, it 
is proposed to the Committee as a basis for discussion and is not to 
be construed as a binding proposal on the Source(s).  The Source(s) 
specifically reserve(s) the right to amend or modify the material 
contained in the Contribution. Nothing contained in the Contribution 
shall, except as herein expressly provided, be construed as conferring 
by implication, estoppel or otherwise, any license or right under (i) 
any existing or later issuing patent, whether or not the use of 
information in the document necessarily employs an invention of any 
existing or later issued patent, (ii) any copyright, (iii) any 
trademark, or (iv) any other intellectual property right.

With respect to the Software necessary for the practice of any or 
all Normative portions of the Enhanced Variable Rate Codec (EVRC) as 
it exists on the date of submittal of this form, should the EVRC be 
approved as a Specification or Report by 3GPP2, or as a transposed 
Standard by any of the 3GPP2's Organizational Partners, the Source(s) 
state(s) that a worldwide license to reproduce, use and distribute the 
Software, the license rights to which are held by the Source(s), will 
be made available to applicants under terms and conditions that are 
reasonable and non-discriminatory, which may include monetary compensation, 
and only to the extent necessary for the practice of any or all of the 
Normative portions of the EVRC or the field of use of practice of the 
EVRC Specification, Report, or Standard.  The statement contained above 
is irrevocable and shall be binding upon the Source(s).  In the event 
the rights of the Source(s) in and to copyright or copyright license 
rights subject to such commitment are assigned or transferred, the 
Source(s) shall notify the assignee or transferee of the existence of 
such commitments.
*******************************************************************/
 
/*======================================================================*/
/*     Enhanced Variable Rate Codec - Bit-Exact C Specification         */
/*     Copyright (C) 1997-1998 Telecommunications Industry Association. */
/*     All rights reserved.                                             */
/*----------------------------------------------------------------------*/
/* Note:  Reproduction and use of this software for the design and      */
/*     development of North American Wideband CDMA Digital              */
/*     Cellular Telephony Standards is authorized by the TIA.           */
/*     The TIA does not authorize the use of this software for any      */
/*     other purpose.                                                   */
/*                                                                      */
/*     The availability of this software does not provide any license   */
/*     by implication, estoppel, or otherwise under any patent rights   */
/*     of TIA member companies or others covering any use of the        */
/*     contents herein.                                                 */
/*                                                                      */
/*     Any copies of this software or derivative works must include     */
/*     this and all other proprietary notices.                          */
/*======================================================================*/
/***************************************************************************
 *
 *   File Name:  mathevrc.c
 *
 *   Purpose:  Contains functions which implement the primitive
 *     arithmetic operations.
 *
 *      The functions in this file are listed below.  Some of them are
 *      defined in terms of other basic operations.  One of the
 *      routines, saturate() is static.  This is not a basic
 *      operation, and is not referenced outside the scope of this
 *      file.
 *
 *
 *       abs_s()
 *       add()
 *       clearOverflow()
 *       divide_s()
 *       extract_h()
 *       extract_l()
 *       isOverflow()
 *       L_abs()
 *       L_add()
 *       L_deposit_h()
 *       L_deposit_l()
 *       L_mac()
 *       L_msu()
 *       L_mult()
 *       L_negate()
 *       L_shift_r()
 *       L_shl()
 *       L_shr()
 *       L_sub()
 *       mac_r()
 *       msu_r()
 *       mult()
 *       mult_r()
 *       negate()
 *       norm_l()
 *       norm_s()
 *       popOverflow()
 *       round32()
 *       saturate()
 *       setOverflow()
 *       shift_r()
 *       shl()
 *       shr()
 *       sub()
 *
 **************************************************************************/

/*_________________________________________________________________________
 |                                                                         |
 |                            Include Files                                |
 |_________________________________________________________________________|
*/

#include "typedefs.h"
#include "mathevrc.h"
//#include <math.h>

/***************************************************************************
 *
 *   FUNCTION NAME: saturate
 *
 *   PURPOSE:
 *
 *     Limit the 32 bit input to the range of a 16 bit word.
 *
 *
 *   INPUTS:
 *
 *     L_var1
 *                     32 bit long signed integer (Longword) whose value
 *                     falls in the range
 *                     0x8000 0000 <= L_var1 <= 0x7fff ffff.
 *
 *   OUTPUTS:
 *
 *     none
 *
 *   RETURN VALUE:
 *
 *     swOut
 *                     16 bit short signed integer (Shortword) whose value
 *                     falls in the range
 *                     0xffff 8000 <= swOut <= 0x0000 7fff.
 *
 *   KEYWORDS: saturation, limiting, limit, saturate, 16 bits
 *
 *************************************************************************/

static Shortword saturate(Longword L_var1)
{
	Shortword swOut;

	if (L_var1 > SW_MAX)
	{
		swOut = SW_MAX;
		giOverflow = 1;
	}
	else if (L_var1 < SW_MIN)
	{
		swOut = SW_MIN;
		giOverflow = 1;
	}
	else
		swOut = (Shortword) L_var1;		/* automatic type conversion */
	return (swOut);
}

/***************************************************************************
 *
 *   FUNCTION NAME: L_saturate
 *
 *   PURPOSE:
 *
 *     Limit the input double (possibly exceeding 32 bit dynamic
 *     range) having to the 32 output wordsize.
 *
 *   INPUTS:
 *
 *     dVar1
 *                     A double whose range is 
 *                     0x8 0000 0000 <= L_var1 <= 0x7 ffff ffff.
 *                     i.e. a 33 bit number. Not modified.
 *
 *   OUTPUTS:
 *
 *     none
 *
 *   RETURN VALUE:
 *
 *     L_Out
 *                     32 bit long integer (Longword) where the DSP's
 *                     rules of saturation are followed:
 *                     for: 0x8000 0000 <= dVal1 <= 0x7fff ffff 
 *                      input == output, no saturation
 *                     for: 0x8000 0000 > dVal1 output 0x8000 0000
 *                     for: dVal1 > 0x7fff ffff output 0x7fff ffff
 *
 *   KEYWORDS: saturation, limiting, limit, saturate, 32 bits
 *
 *************************************************************************/

Longword L_saturate(double dVar1)
{
    OP_COUNT(4);        /* Complexity Count -- LT 6/96 */

    if (dVar1 > (double) LW_MAX)
	{
		dVar1 = (double) LW_MAX;
		giOverflow = 1;
	}
	else if (dVar1 < (double) LW_MIN)
	{
		dVar1 = (double) LW_MIN;
		giOverflow = 1;
	}

	return ((long) dVar1);
}

/***************************************************************************
 *
 *   FUNCTION NAME: abs_s
 *
 *   PURPOSE:
 *
 *     Take the absolute value of the 16 bit input.  An input of
 *     -0x8000 results in a return value of 0x7fff.
 *
 *   INPUTS:
 *
 *     var1
 *                     16 bit short signed integer (Shortword) whose value
 *                     falls in the range 0xffff 8000 <= var1 <= 0x0000 7fff.
 *
 *   OUTPUTS:
 *
 *     none
 *
 *   RETURN VALUE:
 *
 *     swOut
 *                     16 bit short signed integer (Shortword) whose value
 *                     falls in the range
 *                     0x0000 0000 <= swOut <= 0x0000 7fff.
 *
 *   IMPLEMENTATION:
 *
 *     Take the absolute value of the 16 bit input.  An input of
 *     -0x8000 results in a return value of 0x7fff.
 *
 *   KEYWORDS: absolute value, abs
 *
 *************************************************************************/

Shortword abs_s(Shortword var1)
{
	Shortword swOut;

    OP_COUNT(1);        /* Complexity Count -- LT 6/96 */

    if (var1 == SW_MIN)
	{
		swOut = SW_MAX;
		giOverflow = 1;
	}
	else
	{
		if (var1 < 0)
			swOut = -var1;
		else
			swOut = var1;
	}
	return (swOut);
}

/***************************************************************************
 *
 *   FUNCTION NAME: add
 *
 *   PURPOSE:
 *
 *     Perform the addition of the two 16 bit input variable with
 *     saturation.
 *
 *   INPUTS:
 *
 *     var1
 *                     16 bit short signed integer (Shortword) whose value
 *                     falls in the range 0xffff 8000 <= var1 <= 0x0000 7fff.
 *     var2
 *                     16 bit short signed integer (Shortword) whose value
 *                     falls in the range 0xffff 8000 <= var2 <= 0x0000 7fff.
 *
 *   OUTPUTS:
 *
 *     none
 *
 *   RETURN VALUE:
 *
 *     swOut
 *                     16 bit short signed integer (Shortword) whose value
 *                     falls in the range
 *                     0xffff 8000 <= swOut <= 0x0000 7fff.
 *
 *   IMPLEMENTATION:
 *
 *     Perform the addition of the two 16 bit input variable with
 *     saturation.
 *
 *     swOut = var1 + var2
 *
 *     swOut is set to 0x7fff if the operation results in an
 *     overflow.  swOut is set to 0x8000 if the operation results
 *     in an underflow.
 *
 *   KEYWORDS: add, addition
 *
 *************************************************************************/

Shortword add(Shortword var1, Shortword var2)
{
	Longword L_sum;
	Shortword swOut;

    OP_COUNT(1);        /* Complexity Count -- LT 6/96 */

	L_sum = (Longword) var1 + var2;
	swOut = saturate(L_sum);
	return (swOut);
}

/****************************************************************************
 *
 *     FUNCTION NAME: clearOverflow
 *
 *     PURPOSE:
 *
 *        Clear the overflow flag
 *
 *     INPUTS:
 *
 *       none
 *
 *
 *     OUTPUTS:             global overflow flag is cleared
 *                          previous value stored in giOldOverflow
 *
 *     RETURN VALUE:        previous value of overflow
 *                          
 *
 *     KEYWORDS: saturation, limit, overflow
 *
 ***************************************************************************/

int clearOverflow(void)
{

    OP_COUNT(1);        /* Complexity Count -- LT 6/96 */

	giOldOverflow = giOverflow;
	giOverflow = 0;
	return (giOldOverflow);
}

/***************************************************************************
 *
 *   FUNCTION NAME: divide_s
 *
 *   PURPOSE:
 *
 *     Divide var1 by var2.  Note that both must be positive, and
 *     var1 >=  var2.  The output is set to 0 if invalid input is
 *     provided.
 *
 *   INPUTS:
 *
 *     var1
 *                     16 bit short signed integer (Shortword) whose value
 *                     falls in the range 0xffff 8000 <= var1 <= 0x0000 7fff.
 *     var2
 *                     16 bit short signed integer (Shortword) whose value
 *                     falls in the range 0xffff 8000 <= var2 <= 0x0000 7fff.
 *
 *   OUTPUTS:
 *
 *     none
 *
 *   RETURN VALUE:
 *
 *     swOut
 *                     16 bit short signed integer (Shortword) whose value
 *                     falls in the range
 *                     0xffff 8000 <= swOut <= 0x0000 7fff.
 *
 *   IMPLEMENTATION:
 *
 *     In the case where var1==var2 the function returns 0x7fff.  The output
 *     is undefined for invalid inputs.  This implementation returns zero
 *     and issues a warning via stdio if invalid input is presented.
 *
 *   KEYWORDS: divide
 *
 *************************************************************************/

Shortword divide_s(Shortword var1, Shortword var2)
{
	Longword L_div;
	Shortword swOut;


    OP_COUNT(18);        /* Complexity Count -- LT 6/96 */

    if (var1 < 0 || var2 < 0 || var1 > var2)
	{
		/* undefined output for invalid input into divide_s */
		return (0);
	}

	if (var1 == var2)
	{
		giOverflow = 1;
		return (0x7fff);
	}

	L_div = ((0x00008000L * (Longword) var1) / (Longword) var2);
	swOut = saturate(L_div);
	return (swOut);
}

/***************************************************************************
 *
 *   FUNCTION NAME: extract_h
 *
 *   PURPOSE:
 *
 *     Extract the 16 MS bits of a 32 bit Longword.  Return the 16 bit
 *     number as a Shortword.  This is used as a "truncation" of a fractional
 *     number.
 *
 *   INPUTS:
 *
 *     L_var1

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩视频一区二区三区在线播放| 午夜一区二区三区视频| 国产一区二区三区精品视频| 欧美成人video| 国产激情偷乱视频一区二区三区| 亚洲国产成人自拍| 色综合久久天天| 午夜视频一区在线观看| 日韩美女在线视频| 国产精品一线二线三线| 国产精品久久看| 欧美视频一区在线| 久久精品久久综合| 国产精品麻豆欧美日韩ww| 91久久精品国产91性色tv | 日本道色综合久久| 亚洲成人自拍网| 亚洲精品在线免费播放| 成人国产精品视频| 亚洲成人免费av| 久久夜色精品国产欧美乱极品| 波多野结衣中文字幕一区 | 国产一区二区h| 中文字幕巨乱亚洲| 欧美日韩国产在线观看| 久久国产精品第一页| 1000精品久久久久久久久| 欧美精品三级日韩久久| 国产 日韩 欧美大片| 亚洲午夜久久久久| 久久精品亚洲一区二区三区浴池| 色先锋久久av资源部| 国内成人免费视频| 亚洲在线视频网站| 中文无字幕一区二区三区| 欧美日韩免费一区二区三区视频| 国产福利视频一区二区三区| 亚洲成人精品一区二区| 国产精品美日韩| 亚洲自拍都市欧美小说| 久久先锋影音av鲁色资源| 欧美日韩精品三区| 色呦呦日韩精品| 国产高清精品在线| 美女精品一区二区| 亚洲制服欧美中文字幕中文字幕| 久久一区二区三区国产精品| 91超碰这里只有精品国产| 97精品国产露脸对白| 国产在线精品视频| 首页欧美精品中文字幕| 亚洲免费色视频| 国产精品私房写真福利视频| 日韩精品一区在线| 4438成人网| 色8久久精品久久久久久蜜| 国产成人免费视频网站 | 亚洲国产精品久久人人爱| 久久精品免视看| 精品国产区一区| 欧美精品v日韩精品v韩国精品v| 一本到三区不卡视频| 成人av免费在线播放| 国产麻豆成人精品| 国产成人激情av| 大陆成人av片| 国产成人在线视频网站| 国产精品亚洲一区二区三区妖精| 久久精工是国产品牌吗| 蜜桃视频一区二区三区| 日本不卡视频一二三区| 日韩不卡在线观看日韩不卡视频| 午夜一区二区三区视频| 亚洲成人av一区二区| 亚洲成人av一区| 日本不卡不码高清免费观看| 丝袜美腿亚洲一区二区图片| 天天操天天色综合| 天使萌一区二区三区免费观看| 首页国产丝袜综合| 久久精品999| 国产精品 欧美精品| caoporn国产一区二区| 一本大道久久a久久精二百| 欧美午夜影院一区| 69堂精品视频| 精品免费一区二区三区| 久久久噜噜噜久噜久久综合| 国产精品无遮挡| 亚洲美女淫视频| 天天色天天操综合| 久久精品国产精品青草| 国产91露脸合集magnet| 91农村精品一区二区在线| 欧美视频在线一区二区三区 | 国产乱码精品一区二区三区忘忧草 | 精品国产免费一区二区三区香蕉| 欧美成人三级电影在线| 久久午夜色播影院免费高清| 国产精品久久久久一区二区三区| 亚洲色图制服诱惑 | 国产欧美精品一区二区三区四区| 国产精品丝袜在线| 亚洲一区在线观看视频| 欧美aⅴ一区二区三区视频| 久久99热这里只有精品| 国产精品88888| 在线免费观看日本欧美| 欧美岛国在线观看| 国产精品成人网| 日韩在线a电影| 成人网在线免费视频| 精品视频1区2区3区| 久久婷婷一区二区三区| 亚洲精品日产精品乱码不卡| 秋霞影院一区二区| 91丨porny丨国产| 日韩美女在线视频| 1000部国产精品成人观看| 麻豆精品一二三| 91亚洲精品乱码久久久久久蜜桃| 欧美另类久久久品| 中文字幕制服丝袜一区二区三区| 亚瑟在线精品视频| 成人免费av在线| 日韩欧美一二三区| 99久久久免费精品国产一区二区| 在线不卡的av| 亚洲人亚洲人成电影网站色| 免费成人在线观看| 欧美性生交片4| 国产精品女主播av| 久久成人免费网站| 欧美剧在线免费观看网站| 国产精品欧美一级免费| 精品一区在线看| 欧美三区在线观看| 亚洲欧美日韩电影| 国产精品1区二区.| 日韩精品一区二区三区在线播放| 亚洲免费资源在线播放| 国产福利精品导航| 精品久久久久久久人人人人传媒| 亚洲国产精品久久一线不卡| 一本到不卡免费一区二区| 国产精品你懂的| 国产在线播放一区| 精品裸体舞一区二区三区| 日韩国产高清影视| 欧美色网站导航| 一区二区三区在线播放| 91丨九色丨蝌蚪富婆spa| 国产精品水嫩水嫩| 国产成人自拍网| 亚洲精品一区二区三区在线观看| 日韩 欧美一区二区三区| 欧美日韩卡一卡二| 亚洲高清一区二区三区| 欧美午夜精品一区二区蜜桃| 亚洲精品成a人| 国产日韩影视精品| 国产高清精品久久久久| 欧美激情一区二区在线| 国产精一区二区三区| 久久精品亚洲一区二区三区浴池 | 国产成人免费在线| 久久久www免费人成精品| 国产综合久久久久影院| 久久一留热品黄| 成人黄色电影在线| 伊人一区二区三区| 精品视频在线看| 奇米一区二区三区| 精品少妇一区二区三区日产乱码 | 国产精品一区专区| 国产欧美日韩另类一区| 成人在线一区二区三区| 国产精品免费丝袜| 色激情天天射综合网| 亚洲一区二区在线免费看| 欧美日韩夫妻久久| 蜜臀精品一区二区三区在线观看 | 看片的网站亚洲| 精品日本一线二线三线不卡| 国内精品视频666| 国产情人综合久久777777| 不卡欧美aaaaa| 一区二区成人在线| 日韩一级完整毛片| 国产成人免费视频网站| 亚洲精品v日韩精品| 日韩一区二区三区精品视频| 国内外成人在线| 亚洲欧美怡红院| 91精品国产综合久久久蜜臀图片| 精品在线一区二区三区| 亚洲欧美一区二区三区孕妇| 51精品视频一区二区三区| 国产九色精品成人porny| 亚洲蜜臀av乱码久久精品蜜桃|