Debian Codegraph @

mednafen/tremor/window.c

raw symbols SCIP
1 /********************************************************************
2 * *
3 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
4 * *
5 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
6 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
7 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 * *
9 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
10 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
11 * *
12 ********************************************************************
13
14 function: window functions
15
16 ********************************************************************/
17
18 #include <stdlib.h>
19 #include <math.h>
20 #include "misc.h"cxx . . $ `<file>/mednafen/tremor/misc.h`/
21 #include "window.h"cxx . . $ `<file>/mednafen/tremor/window.h`/
22 #include "window_lookup.h"cxx . . $ `<file>/mednafen/tremor/window_lookup.h`/
23
24 const void *_vorbis_windowcxx . . $ _vorbis_window(67b6191fc2d12f59).(int type, int left){
25
26 switch(type){
27 case 0:
28
29 switch(left){
30 case 32:
31 return vwin64cxx . . $ vwin64.;
32 case 64:
33 return vwin128cxx . . $ vwin128.;
34 case 128:
35 return vwin256cxx . . $ vwin256.;
36 case 256:
37 return vwin512cxx . . $ vwin512.;
38 case 512:
39 return vwin1024cxx . . $ vwin1024.;
40 case 1024:
41 return vwin2048cxx . . $ vwin2048.;
42 case 2048:
43 return vwin4096cxx . . $ vwin4096.;
44 case 4096:
45 return vwin8192cxx . . $ vwin8192.;
46 default:
47 return(0);
48 }
49 break;
50 default:
51 return(0);
52 }
53 }
54
55 void _vorbis_apply_windowcxx . . $ _vorbis_apply_window(8d42a4f87b1249b5).(ogg_int32_tcxx . . $ ogg_int32_t# *d,const void *window_p[2],
56 long *blocksizes,
57 int lW,int W,int nW){
58
59 LOOKUP_Tcxx . . $ `mednafen/tremor/misc.h:25:11`! *window[2]={window_p[0],window_p[1]};
60 long n=blocksizes[W];
61 long ln=blocksizes[lW];
62 long rn=blocksizes[nW];
63
64 long leftbegin=n/4-ln/4;
65 long leftend=leftbegin+ln/2;
66
67 long rightbegin=n/2+n/4-rn/4;
68 long rightend=rightbegin+rn/2;
69
70 int i,p;
71
72 for(i=0;i<leftbegin;i++)
73 d[i]=0;
74
75 for(p=0;i<leftend;i++,p++)
76 d[i]=MULT31cxx . . $ MULT31(9b79fb6aee4c0440).(d[i],window[lW][p]);
77
78 for(i=rightbegin,p=rn/2-1;i<rightend;i++,p--)
79 d[i]=MULT31cxx . . $ MULT31(9b79fb6aee4c0440).(d[i],window[nW][p]);
80
81 for(;i<n;i++)
82 d[i]=0;
83 }