⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bandlimited.h

📁 video linux conference
💻 H
📖 第 1 页 / 共 3 页
字号:
/***************************************************************************** * bandlimited.h : bandlimited interpolation resampler ***************************************************************************** * Copyright (C) 2002 VideoLAN * $Id: bandlimited.h 10101 2005-03-02 16:47:31Z robux4 $ * * Authors: Gildas Bazin <gbazin@netcourrier.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *  * 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., 59 Temple Place - Suite 330, Boston, MA  02111, USA. *****************************************************************************//* Conversion constants */#define Nhc       8#define Npc      (1<<Nhc)/* Description of constants: * * Npc - is the number of look-up values available for the lowpass filter *    between the beginning of its impulse response and the "cutoff time" *    of the filter.  The cutoff time is defined as the reciprocal of the *    lowpass-filter cut off frequence in Hz.  For example, if the *    lowpass filter were a sinc function, Npc would be the index of the *    impulse-response lookup-table corresponding to the first zero- *    crossing of the sinc function.  (The inverse first zero-crossing *    time of a sinc function equals its nominal cutoff frequency in Hz.) *    Npc must be a power of 2 due to the details of the current *    implementation. The default value of 512 is sufficiently high that *    using linear interpolation to fill in between the table entries *    gives approximately 16-bit accuracy in filter coefficients. * * Nhc - is log base 2 of Npc. */#define SMALL_FILTER_NMULT ((int16_t)13)#define SMALL_FILTER_SCALE 13128 /* Unity-gain scale factor */#define SMALL_FILTER_NWING 1536 /* Filter table length */static float SMALL_FILTER_FLOAT_IMP[] /* Impulse response */ = {0.900000,0.899980,0.899920,0.899821,0.899681,0.899502,0.899283,0.899024,0.898726,0.898388,0.898010,0.897592,0.897135,0.896638,0.896102,0.895526,0.894911,0.894256,0.893562,0.892829,0.892056,0.891244,0.890394,0.889504,0.888575,0.887608,0.886602,0.885557,0.884474,0.883352,0.882192,0.880993,0.879756,0.878482,0.877169,0.875818,0.874430,0.873004,0.871541,0.870040,0.868502,0.866927,0.865315,0.863667,0.861981,0.860259,0.858501,0.856707,0.854876,0.853010,0.851108,0.849170,0.847197,0.845189,0.843146,0.841067,0.838954,0.836807,0.834625,0.832409,0.830160,0.827876,0.825559,0.823209,0.820825,0.818408,0.815959,0.813477,0.810963,0.808417,0.805839,0.803229,0.800588,0.797916,0.795213,0.792479,0.789714,0.786919,0.784095,0.781240,0.778356,0.775442,0.772500,0.769529,0.766529,0.763501,0.760444,0.757361,0.754249,0.751110,0.747945,0.744753,0.741534,0.738289,0.735018,0.731721,0.728400,0.725053,0.721681,0.718285,0.714865,0.711420,0.707953,0.704461,0.700947,0.697410,0.693851,0.690269,0.686665,0.683040,0.679394,0.675727,0.672039,0.668331,0.664602,0.660854,0.657087,0.653300,0.649495,0.645671,0.641829,0.637969,0.634091,0.630197,0.626285,0.622357,0.618412,0.614452,0.610476,0.606485,0.602478,0.598457,0.594422,0.590373,0.586310,0.582234,0.578144,0.574042,0.569928,0.565801,0.561663,0.557514,0.553353,0.549182,0.545001,0.540809,0.536607,0.532397,0.528177,0.523948,0.519711,0.515466,0.511214,0.506954,0.502686,0.498413,0.494132,0.489846,0.485554,0.481256,0.476954,0.472646,0.468335,0.464019,0.459699,0.455377,0.451050,0.446722,0.442390,0.438057,0.433722,0.429385,0.425048,0.420709,0.416370,0.412031,0.407692,0.403354,0.399016,0.394679,0.390344,0.386011,0.381680,0.377351,0.373025,0.368702,0.364382,0.360066,0.355754,0.351446,0.347143,0.342844,0.338551,0.334264,0.329982,0.325706,0.321437,0.317174,0.312918,0.308670,0.304429,0.300197,0.295972,0.291756,0.287548,0.283350,0.279161,0.274982,0.270812,0.266653,0.262504,0.258366,0.254239,0.250123,0.246018,0.241926,0.237846,0.233777,0.229722,0.225679,0.221650,0.217634,0.213632,0.209643,0.205669,0.201709,0.197764,0.193833,0.189918,0.186018,0.182134,0.178265,0.174413,0.170577,0.166758,0.162955,0.159169,0.155401,0.151650,0.147916,0.144201,0.140503,0.136824,0.133163,0.129521,0.125898,0.122294,0.118710,0.115145,0.111599,0.108073,0.104568,0.101083,0.097618,0.094174,0.090750,0.087348,0.083966,0.080606,0.077268,0.073951,0.070656,0.067383,0.064132,0.060903,0.057697,0.054513,0.051352,0.048214,0.045099,0.042006,0.038938,0.035892,0.032870,0.029872,0.026898,0.023947,0.021021,0.018118,0.015240,0.012386,0.009557,0.006752,0.003972,0.001217,-0.001514,-0.004219,-0.006900,-0.009555,-0.012186,-0.014790,-0.017370,-0.019924,-0.022453,-0.024956,-0.027433,-0.029885,-0.032310,-0.034710,-0.037085,-0.039433,-0.041755,-0.044051,-0.046321,-0.048565,-0.050782,-0.052974,-0.055139,-0.057278,-0.059391,-0.061477,-0.063537,-0.065570,-0.067577,-0.069558,-0.071513,-0.073440,-0.075342,-0.077217,-0.079065,-0.080887,-0.082683,-0.084452,-0.086195,-0.087911,-0.089601,-0.091265,-0.092902,-0.094513,-0.096097,-0.097656,-0.099188,-0.100693,-0.102173,-0.103626,-0.105053,-0.106454,-0.107830,-0.109179,-0.110502,-0.111799,-0.113070,-0.114316,-0.115536,-0.116730,-0.117899,-0.119042,-0.120159,-0.121251,-0.122318,-0.123360,-0.124376,-0.125368,-0.126334,-0.127275,-0.128192,-0.129083,-0.129950,-0.130793,-0.131611,-0.132404,-0.133174,-0.133919,-0.134640,-0.135337,-0.136010,-0.136659,-0.137284,-0.137886,-0.138465,-0.139020,-0.139552,-0.140061,-0.140547,-0.141010,-0.141451,-0.141868,-0.142263,-0.142636,-0.142987,-0.143316,-0.143622,-0.143907,-0.144170,-0.144412,-0.144632,-0.144830,-0.145008,-0.145165,-0.145301,-0.145416,-0.145511,-0.145585,-0.145639,-0.145673,-0.145687,-0.145681,-0.145656,-0.145611,-0.145547,-0.145464,-0.145361,-0.145240,-0.145100,-0.144942,-0.144766,-0.144571,-0.144358,-0.144127,-0.143879,-0.143613,-0.143330,-0.143030,-0.142713,-0.142379,-0.142028,-0.141661,-0.141278,-0.140878,-0.140463,-0.140032,-0.139585,-0.139123,-0.138646,-0.138153,-0.137646,-0.137124,-0.136588,-0.136037,-0.135473,-0.134894,-0.134302,-0.133696,-0.133076,-0.132444,-0.131798,-0.131140,-0.130469,-0.129785,-0.129089,-0.128381,-0.127662,-0.126930,-0.126187,-0.125433,-0.124668,-0.123891,-0.123104,-0.122306,-0.121498,-0.120680,-0.119851,-0.119013,-0.118165,-0.117308,-0.116441,-0.115565,-0.114681,-0.113788,-0.112886,-0.111976,-0.111057,-0.110131,-0.109197,-0.108255,-0.107306,-0.106350,-0.105386,-0.104416,-0.103439,-0.102455,-0.101466,-0.100470,-0.099468,-0.098460,-0.097447,-0.096428,-0.095404,-0.094375,-0.093341,-0.092303,-0.091260,-0.090212,-0.089161,-0.088105,-0.087046,-0.085982,-0.084916,-0.083846,-0.082773,-0.081697,-0.080618,-0.079536,-0.078452,-0.077366,-0.076277,-0.075187,-0.074095,-0.073001,-0.071905,-0.070808,-0.069710,-0.068611,-0.067512,-0.066411,-0.065310,-0.064209,-0.063107,-0.062005,-0.060903,-0.059802,-0.058701,-0.057600,-0.056500,-0.055401,-0.054303,-0.053206,-0.052110,-0.051015,-0.049922,-0.048831,-0.047741,-0.046654,-0.045568,-0.044485,-0.043403,-0.042325,-0.041249,-0.040175,-0.039105,-0.038037,-0.036973,-0.035912,-0.034854,-0.033799,-0.032749,-0.031701,-0.030658,-0.029619,-0.028583,-0.027552,-0.026525,-0.025502,-0.024484,-0.023471,-0.022462,-0.021458,-0.020459,-0.019464,-0.018475,-0.017491,-0.016513,-0.015539,-0.014572,-0.013610,-0.012653,-0.011702,-0.010757,-0.009818,-0.008885,-0.007958,-0.007038,-0.006123,-0.005215,-0.004313,-0.003418,-0.002530,-0.001648,-0.000772,0.000096,0.000958,0.001813,0.002660,0.003501,0.004335,0.005161,0.005980,0.006792,0.007597,0.008394,0.009183,0.009965,0.010740,0.011507,0.012266,0.013018,0.013762,0.014498,0.015226,0.015946,0.016658,0.017363,0.018059,0.018747,0.019428,0.020100,0.020764,0.021420,0.022067,0.022707,0.023338,0.023961,0.024575,0.025181,0.025779,0.026369,0.026950,0.027523,0.028087,0.028643,0.029191,0.029730,0.030260,0.030782,0.031296,0.031801,0.032297,0.032785,0.033265,0.033736,0.034199,0.034653,0.035098,0.035536,0.035964,0.036384,0.036796,0.037199,0.037594,0.037980,0.038358,0.038727,0.039088,0.039441,0.039785,0.040121,0.040448,0.040768,0.041078,0.041381,0.041675,0.041961,0.042239,0.042509,0.042770,0.043024,0.043269,0.043506,0.043735,0.043956,0.044169,0.044375,0.044572,0.044761,0.044943,0.045116,0.045282,0.045440,0.045591,0.045734,0.045869,0.045996,0.046117,0.046229,0.046334,0.046432,0.046522,0.046605,0.046681,0.046750,0.046811,0.046865,0.046913,0.046953,0.046986,0.047012,0.047032,0.047044,0.047050,0.047049,0.047042,0.047028,0.047007,0.046980,0.046946,0.046907,0.046860,0.046808,0.046749,0.046684,0.046613,0.046536,0.046453,0.046365,0.046270,0.046169,0.046063,0.045951,0.045834,0.045711,0.045583,0.045449,0.045310,0.045165,0.045016,0.044861,0.044701,0.044536,0.044366,0.044192,0.044012,0.043828,0.043639,0.043445,0.043247,0.043045,0.042838,0.042626,0.042411,0.042191,0.041967,0.041738,0.041506,0.041270,0.041030,0.040786,0.040539,0.040288,0.040033,0.039774,0.039513,0.039247,0.038979,0.038707,0.038432,0.038154,0.037872,0.037588,0.037301,0.037011,0.036718,0.036422,0.036124,0.035823,0.035520,0.035214,0.034906,0.034595,0.034282,0.033967,0.033650,0.033330,0.033009,0.032686,0.032361,0.032034,0.031705,0.031375,0.031043,0.030709,0.030374,0.030037,0.029700,0.029360,0.029020,0.028678,0.028336,0.027992,0.027647,0.027301,0.026955,0.026607,0.026259,0.025910,0.025561,0.025210,0.024860,0.024508,0.024157,0.023805,0.023453,0.023100,0.022748,0.022395,0.022042,0.021689,0.021336,0.020983,0.020630,0.020278,0.019926,0.019573,0.019222,0.018870,0.018520,0.018169,0.017819,0.017470,0.017121,0.016773,0.016426,0.016080,0.015734,0.015389,0.015045,0.014702,0.014360,0.014019,0.013679,0.013341,0.013003,0.012667,0.012332,0.011998,0.011665,0.011334,0.011004,0.010676,0.010349,0.010024,0.009700,0.009377,0.009057,0.008738,0.008421,0.008105,0.007791,0.007479,0.007169,0.006861,0.006554,0.006249,0.005947,0.005646,0.005347,0.005051,0.004756,0.004464,0.004173,0.003885,0.003599,0.003315,0.003033,0.002753,0.002476,0.002201,0.001928,0.001658,0.001390,0.001124,0.000861,0.000600,0.000341,0.000085,-0.000169,-0.000420,-0.000669,-0.000915,-0.001159,-0.001400,-0.001639,-0.001875,-0.002109,-0.002340,-0.002568,-0.002794,-0.003017,-0.003238,-0.003456,-0.003671,-0.003884,-0.004094,-0.004301,-0.004506,-0.004708,-0.004907,-0.005104,-0.005298,-0.005489,-0.005678,-0.005863,-0.006046,-0.006227,-0.006405,-0.006579,-0.006752,-0.006921,-0.007088,-0.007252,-0.007413,-0.007572,-0.007728,-0.007881,-0.008031,-0.008179,-0.008324,-0.008466,-0.008606,-0.008743,-0.008877,-0.009008,-0.009137,-0.009263,-0.009387,-0.009507,-0.009626,-0.009741,-0.009854,-0.009964,-0.010071,-0.010176,-0.010278,-0.010378,-0.010475,-0.010569,-0.010661,-0.010751,-0.010837,-0.010922,-0.011003,-0.011082,-0.011159,-0.011233,-0.011305,-0.011374,-0.011441,-0.011505,-0.011567,-0.011626,-0.011683,-0.011738,-0.011790,-0.011840,-0.011887,-0.011932,-0.011975,-0.012016,-0.012054,-0.012090,-0.012124,-0.012156,-0.012185,-0.012212,-0.012237,-0.012260,-0.012281,-0.012299,-0.012316,-0.012330,-0.012342,-0.012352,-0.012361,-0.012367,-0.012371,-0.012373,-0.012374,-0.012372,-0.012368,-0.012363,-0.012356,-0.012346,-0.012335,-0.012323,-0.012308,-0.012292,-0.012274,-0.012254,-0.012232,-0.012209,-0.012184,-0.012157,-0.012129,-0.012099,-0.012068,-0.012035,-0.012001,-0.011965,-0.011927,-0.011888,-0.011848,-0.011806,-0.011763,-0.011718,-0.011672,-0.011625,-0.011576,-0.011527,-0.011475,-0.011423,-0.011369,-0.011314,-0.011258,-0.011201,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -