Complete rewrite of the MMX loop filter.
[xiph/unicode.git] / oggds / common.h
blobb12b44753e94ea9f23987f78202aaef6ccf57a9f
1 /*******************************************************************************
2 * *
3 * This file is part of the Ogg Vorbis DirectShow filter collection *
4 * *
5 * Copyright (c) 2001, Tobias Waldvogel *
6 * All rights reserved. *
7 * *
8 * Redistribution and use in source and binary forms, with or without *
9 * modification, are permitted provided that the following conditions are met: *
10 * *
11 * - Redistributions of source code must retain the above copyright notice, *
12 * this list of conditions and the following disclaimer. *
13 * *
14 * - Redistributions in binary form must reproduce the above copyright notice, *
15 * this list of conditions and the following disclaimer in the documentation *
16 * and/or other materials provided with the distribution. *
17 * *
18 * - The names of the contributors may not be used to endorse or promote *
19 * products derived from this software without specific prior written *
20 * permission. *
21 * *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE *
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF *
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN *
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) *
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
32 * POSSIBILITY OF SUCH DAMAGE. *
33 * *
34 *******************************************************************************/
36 #ifndef __COMMON__
37 #define __COMMON__
39 #include <streams.h>
40 #include <limits.h>
41 #include <winbase.h>
42 #include "OggDS.h"
43 #include <ogg/ogg.h>
44 #include <vorbis/codec.h>
45 #include <vorbis/vorbisenc.h>
46 #include "OggStream/OggStream.h"
47 //#include "debug.h"
49 #define SIZEOF_ARRAY(ar) (sizeof(ar)/sizeof((ar)[0]))
51 bool StringToReferenceTime(char* sTime, REFERENCE_TIME* rtTime);
52 void CopyOggPacket(ogg_packet* dop, ogg_packet* sop);
53 int GetLCIDFromComment(vorbis_comment* pvc);
55 typedef struct tagLCID_REC
57 char *caption;
58 unsigned __int16 id;
59 } LCID_REC;
61 static const LCID_REC aLCID[] =
63 { "Afrikaans", 0x0036 },
64 { "Albanian", 0x001c },
65 { "Arabic", 0x0001 },
66 { "Basque", 0x002d },
67 { "Belarusian", 0x0023 },
68 { "Bulgarian", 0x0002 },
69 { "Catalan", 0x0003 },
70 { "Chinese", 0x0004 },
71 { "Croatian", 0x001a },
72 { "Czech", 0x0005 },
73 { "Danish", 0x0006 },
74 { "Dutch", 0x0013 },
75 { "English", 0x0009 },
76 { "Estonian", 0x0025 },
77 { "Faeroese", 0x0038 },
78 { "Farsi", 0x0029 },
79 { "Finnish", 0x000b },
80 { "French", 0x000c },
81 { "German", 0x0007 },
82 { "Greek", 0x0008 },
83 { "Hebrew", 0x000d },
84 { "Hungarian", 0x000e },
85 { "Icelandic", 0x000f },
86 { "Indonesian", 0x0021 },
87 { "Italian", 0x0010 },
88 { "Japanese", 0x0011 },
89 { "Korean", 0x0012 },
90 { "Latvian", 0x0026 },
91 { "Lithuanian", 0x0027 },
92 { "Malay", 0x003e },
93 { "Norwegian", 0x0014 },
94 { "Polish", 0x0015 },
95 { "Portuguese", 0x0016 },
96 { "Romanian", 0x0018 },
97 { "Russian", 0x0019 },
98 { "Serbian", 0x001a },
99 { "Slovak", 0x001b },
100 { "Slovenian", 0x0024 },
101 { "Spanish", 0x000a },
102 { "Swahili", 0x0041 },
103 { "Swedish", 0x001d },
104 { "Thai", 0x001e },
105 { "Turkish", 0x001f },
106 { "Ukrainian", 0x0022 }
109 typedef struct
111 char* caption;
112 char* tag;
113 unsigned __int32 id;
114 } tSpeaker;
116 static const tSpeaker arSpeakers[] =
118 { "Front Left", "FL", 0x00000001 },
119 { "Front Right", "FR", 0x00000002 },
120 { "Front Center", "FC", 0x00000004 },
121 { "Low Frequency", "LF", 0x00000008 },
122 { "Back Left", "BL", 0x00000010 },
123 { "Back Right", "BR", 0x00000020 },
124 { "Front Left of Center", "FLC", 0x00000040 },
125 { "Front Right of Center", "FRC", 0x00000080 },
126 { "Back Center", "BC", 0x00000100 },
127 { "Side Left", "SL", 0x00000200 },
128 { "Side Right", "SR", 0x00000400 },
129 { "Top Center", "TC", 0x00000800 },
130 { "Top Front Left", "TFL", 0x00001000 },
131 { "Top Front Center", "TFC", 0x00002000 },
132 { "Top Front Right", "TFR", 0x00004000 },
133 { "Top Back Left", "TBL", 0x00008000 },
134 { "Top Back Center", "TBC", 0x00010000 },
135 { "Top Back Right", "TBR", 0x00020000 }
139 #endif