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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? g711.h

?? 傳真通信V27 V29 V17 T38解調(diào)與解碼
?? H
字號:
/* * SpanDSP - a series of DSP components for telephony * * g711.h - In line A-law and u-law conversion routines * * Written by Steve Underwood <steveu@coppice.org> * * Copyright (C) 2001 Steve Underwood * * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: g711.h,v 1.6 2007/04/08 08:16:17 steveu Exp $ *//*! \file *//*! \page g711_page A-law and mu-law handlingLookup tables for A-law and u-law look attractive, until you consider the impacton the CPU cache. If it causes a substantial area of your processor cache to gethit too often, cache sloshing will severely slow things down. The main reasonthese routines are slow in C, is the lack of direct access to the CPU's "findthe first 1" instruction. A little in-line assembler fixes that, and theconversion routines can be faster than lookup tables, in most real world usage.A "find the first 1" instruction is available on most modern CPUs, and is amuch underused feature. If an assembly language method of bit searching is not available, these routinesrevert to a method that can be a little slow, so the cache thrashing might notseem so bad :(Feel free to submit patches to add fast "find the first 1" support for your ownfavourite processor.Look up tables are used for transcoding between A-law and u-law, since it isdifficult to achieve the precise transcoding procedure laid down in the G.711specification by other means.*/#if !defined(_SPANDSP_G711_H_)#define _SPANDSP_G711_H_#if defined(__cplusplus)extern "C"{#endif/* N.B. It is tempting to use look-up tables for A-law and u-law conversion. *      However, you should consider the cache footprint. * *      A 64K byte table for linear to x-law and a 512 byte table for x-law to *      linear sound like peanuts these days, and shouldn't an array lookup be *      real fast? No! When the cache sloshes as badly as this one will, a tight *      calculation may be better. The messiest part is normally finding the *      segment, but a little inline assembly can fix that on an i386, x86_64 and *      many other modern processors. */ /* * Mu-law is basically as follows: * *      Biased Linear Input Code        Compressed Code *      ------------------------        --------------- *      00000001wxyza                   000wxyz *      0000001wxyzab                   001wxyz *      000001wxyzabc                   010wxyz *      00001wxyzabcd                   011wxyz *      0001wxyzabcde                   100wxyz *      001wxyzabcdef                   101wxyz *      01wxyzabcdefg                   110wxyz *      1wxyzabcdefgh                   111wxyz * * Each biased linear code has a leading 1 which identifies the segment * number. The value of the segment number is equal to 7 minus the number * of leading 0's. The quantization interval is directly available as the * four bits wxyz.  * The trailing bits (a - h) are ignored. * * Ordinarily the complement of the resulting code word is used for * transmission, and so the code word is complemented before it is returned. * * For further information see John C. Bellamy's Digital Telephony, 1982, * John Wiley & Sons, pps 98-111 and 472-476. *///#define ULAW_ZEROTRAP                 /* turn on the trap as per the MIL-STD */#define ULAW_BIAS        0x84           /* Bias for linear code. *//*! \brief Encode a linear sample to u-law    \param linear The sample to encode.    \return The u-law value.*/static __inline__ uint8_t linear_to_ulaw(int linear){    uint8_t u_val;    int mask;    int seg;    /* Get the sign and the magnitude of the value. */    if (linear < 0)    {        linear = ULAW_BIAS - linear;        mask = 0x7F;    }    else    {        linear = ULAW_BIAS + linear;        mask = 0xFF;    }    seg = top_bit(linear | 0xFF) - 7;    /*     * Combine the sign, segment, quantization bits,     * and complement the code word.     */    if (seg >= 8)        u_val = (uint8_t) (0x7F ^ mask);    else        u_val = (uint8_t) (((seg << 4) | ((linear >> (seg + 3)) & 0xF)) ^ mask);#ifdef ULAW_ZEROTRAP    /* Optional ITU trap */    if (u_val == 0)        u_val = 0x02;#endif    return  u_val;}/*- End of function --------------------------------------------------------*//*! \brief Decode an u-law sample to a linear value.    \param ulaw The u-law sample to decode.    \return The linear value.*/static __inline__ int16_t ulaw_to_linear(uint8_t ulaw){    int t;        /* Complement to obtain normal u-law value. */    ulaw = ~ulaw;    /*     * Extract and bias the quantization bits. Then     * shift up by the segment number and subtract out the bias.     */    t = (((ulaw & 0x0F) << 3) + ULAW_BIAS) << (((int) ulaw & 0x70) >> 4);    return  (int16_t) ((ulaw & 0x80)  ?  (ULAW_BIAS - t)  :  (t - ULAW_BIAS));}/*- End of function --------------------------------------------------------*//* * A-law is basically as follows: * *      Linear Input Code        Compressed Code *      -----------------        --------------- *      0000000wxyza             000wxyz *      0000001wxyza             001wxyz *      000001wxyzab             010wxyz *      00001wxyzabc             011wxyz *      0001wxyzabcd             100wxyz *      001wxyzabcde             101wxyz *      01wxyzabcdef             110wxyz *      1wxyzabcdefg             111wxyz * * For further information see John C. Bellamy's Digital Telephony, 1982, * John Wiley & Sons, pps 98-111 and 472-476. */#define ALAW_AMI_MASK       0x55/*! \brief Encode a linear sample to A-law    \param linear The sample to encode.    \return The A-law value.*/static __inline__ uint8_t linear_to_alaw(int linear){    int mask;    int seg;        if (linear >= 0)    {        /* Sign (bit 7) bit = 1 */        mask = ALAW_AMI_MASK | 0x80;    }    else    {        /* Sign (bit 7) bit = 0 */        mask = ALAW_AMI_MASK;        linear = -linear - 8;    }    /* Convert the scaled magnitude to segment number. */    seg = top_bit(linear | 0xFF) - 7;    if (seg >= 8)    {        if (linear >= 0)        {            /* Out of range. Return maximum value. */            return (uint8_t) (0x7F ^ mask);        }        /* We must be just a tiny step below zero */        return (uint8_t) (0x00 ^ mask);    }    /* Combine the sign, segment, and quantization bits. */    return (uint8_t) (((seg << 4) | ((linear >> ((seg)  ?  (seg + 3)  :  4)) & 0x0F)) ^ mask);}/*- End of function --------------------------------------------------------*//*! \brief Decode an A-law sample to a linear value.    \param alaw The A-law sample to decode.    \return The linear value.*/static __inline__ int16_t alaw_to_linear(uint8_t alaw){    int i;    int seg;    alaw ^= ALAW_AMI_MASK;    i = ((alaw & 0x0F) << 4);    seg = (((int) alaw & 0x70) >> 4);    if (seg)        i = (i + 0x108) << (seg - 1);    else        i += 8;    return (int16_t) ((alaw & 0x80)  ?  i  :  -i);}/*- End of function --------------------------------------------------------*//*! \brief Transcode from A-law to u-law, using the procedure defined in G.711.    \param alaw The A-law sample to transcode.    \return The best matching u-law value.*/uint8_t alaw_to_ulaw(uint8_t alaw);/*! \brief Transcode from u-law to A-law, using the procedure defined in G.711.    \param alaw The u-law sample to transcode.    \return The best matching A-law value.*/uint8_t ulaw_to_alaw(uint8_t ulaw);#if defined(__cplusplus)}#endif#endif/*- End of file ------------------------------------------------------------*/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品影视天天线| 一区二区日韩av| 欧美国产禁国产网站cc| 亚洲在线视频免费观看| 国产毛片精品视频| 3d动漫精品啪啪1区2区免费| 国产精品久久久久久久久晋中| 丝袜美腿亚洲一区| 91丨九色丨国产丨porny| 久久免费偷拍视频| 国产精品久久久久影院亚瑟| 中文字幕电影一区| 奇米精品一区二区三区在线观看 | 亚洲成人一二三| 粉嫩久久99精品久久久久久夜| 91精品国产品国语在线不卡| 亚洲嫩草精品久久| 成人污污视频在线观看| 久久精品一区四区| 国产麻豆精品视频| 精品国产3级a| 久久激情五月激情| 日韩一区二区免费高清| 日韩电影免费在线| 老司机一区二区| 欧美日韩国产高清一区二区| 亚洲在线视频免费观看| 91麻豆精品一区二区三区| 国产精品久久久久aaaa| 大美女一区二区三区| 中文字幕不卡的av| 成人动漫在线一区| **欧美大码日韩| 99精品视频一区二区| 亚洲天堂成人网| 91在线视频观看| 一区二区三区久久| 欧美日韩免费电影| 日本午夜一区二区| 日韩午夜在线观看| 国产精品一区在线观看乱码| 欧美国产禁国产网站cc| 91浏览器在线视频| 午夜精品福利在线| 精品久久久久久亚洲综合网| 韩国女主播一区| 国产精品丝袜91| 在线亚洲一区观看| 男女性色大片免费观看一区二区 | 99久久精品免费看| 中文字幕一区视频| 欧美日韩一区二区在线观看| 美女一区二区视频| 久久一区二区三区四区| thepron国产精品| 亚洲国产精品人人做人人爽| 欧美一区二区三区小说| 丰满放荡岳乱妇91ww| 亚洲人吸女人奶水| 3d成人动漫网站| 粉嫩高潮美女一区二区三区| 亚洲人一二三区| 日韩精品中文字幕在线一区| 成人在线综合网站| 亚洲一区二区3| 久久网这里都是精品| 一本色道亚洲精品aⅴ| 日韩国产在线观看一区| 久久天天做天天爱综合色| 91麻豆精品在线观看| 捆绑调教美女网站视频一区| 中文字幕视频一区二区三区久| 69堂成人精品免费视频| 国产成人av在线影院| 午夜欧美在线一二页| 国产精品视频看| 日韩视频免费直播| 91视频在线观看| 极品瑜伽女神91| 亚洲午夜在线电影| 亚洲国产岛国毛片在线| 欧美一级欧美三级在线观看 | 最新久久zyz资源站| 欧美一区二区黄色| 色老汉一区二区三区| 国产精品一区二区你懂的| 亚洲国产日韩精品| 亚洲欧洲在线观看av| 欧美α欧美αv大片| 欧美午夜片在线看| av不卡在线观看| 国产成人亚洲综合a∨婷婷图片| 日韩中文字幕不卡| 亚洲一区二区三区在线看| 国产欧美一区二区精品秋霞影院 | 97se亚洲国产综合自在线| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲精选视频在线| 国产精品理论在线观看| 国产日韩欧美制服另类| 日韩美女在线视频| 日韩欧美激情四射| 制服丝袜日韩国产| 91精品午夜视频| 欧美日韩情趣电影| 欧美人成免费网站| 欧美色综合久久| 欧美日韩在线免费视频| 色悠久久久久综合欧美99| 99久久er热在这里只有精品66| 丁香六月综合激情| 成人亚洲一区二区一| 国产成人免费视频一区| 国产成人免费视频网站| 国产suv精品一区二区883| 国产成人av电影在线观看| 国产专区综合网| 国产激情一区二区三区四区| 国产乱国产乱300精品| 国产成人在线网站| 成人爽a毛片一区二区免费| 成人深夜在线观看| 91丨九色丨国产丨porny| 91福利国产成人精品照片| 欧美羞羞免费网站| 91精品国产综合久久久久| 日韩欧美国产午夜精品| 26uuuu精品一区二区| 国产欧美一区二区精品性| 中文字幕综合网| 亚洲午夜激情网站| 免费观看30秒视频久久| 国产一区二区三区高清播放| 成人黄色一级视频| 欧美性受xxxx黑人xyx| 日韩视频一区二区三区在线播放| 久久综合色一综合色88| 国产精品久久久久一区| 亚洲图片欧美综合| 久久精品国产**网站演员| 高清在线观看日韩| 日本高清不卡视频| 日韩欧美亚洲一区二区| 国产精品区一区二区三| 亚洲国产aⅴ成人精品无吗| 久久精品久久久精品美女| 成人免费视频免费观看| 欧美日韩国产色站一区二区三区| 欧美成人女星排名| 亚洲男同性视频| 久久www免费人成看片高清| 99久久国产综合色|国产精品| 在线电影院国产精品| 中文字幕 久热精品 视频在线| 亚洲国产精品自拍| 成人激情av网| 日韩欧美在线影院| ●精品国产综合乱码久久久久| 日韩avvvv在线播放| 99精品国产91久久久久久| 欧美一级理论片| 亚洲另类在线制服丝袜| 国产一区二区三区在线观看免费视频 | 国产精品福利在线播放| 国产精品污www在线观看| 一区二区三区四区中文字幕| 久久99最新地址| 色综合色狠狠天天综合色| 日韩欧美www| 夜夜嗨av一区二区三区中文字幕| 久久精品国产精品亚洲精品| 色天天综合久久久久综合片| 2021国产精品久久精品| 一区二区三区精密机械公司| 国产成人免费视频一区| 91精品国产高清一区二区三区蜜臀 | jlzzjlzz亚洲日本少妇| 夜夜夜精品看看| 国产精品一级黄| 欧美一级在线免费| 性感美女极品91精品| av在线不卡电影| 日本一区二区三区久久久久久久久不 | 欧美伦理视频网站| 亚洲欧美国产77777| 成人午夜电影久久影院| 久久久亚洲精华液精华液精华液| 日韩国产成人精品| 欧美日韩亚洲综合一区| 一区二区三区在线免费观看| 99精品视频一区二区| 中文字幕欧美一| 成人app下载| 国产精品拍天天在线| 成人精品在线视频观看| 中文字幕免费观看一区| 成人激情免费电影网址| 国产精品久久免费看| 99久久99久久久精品齐齐| 亚洲欧美一区二区视频|