File: ccvt_8h-source.html

package info (click to toggle)
camstream 0.27%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 12,320 kB
  • ctags: 5,393
  • sloc: cpp: 17,031; sh: 8,154; asm: 455; ansic: 440; makefile: 343
file content (129 lines) | stat: -rw-r--r-- 13,637 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<html>
<head>
<title>Camstream: CamStream API documentation</title>
<link rel="stylesheet" href="../../tech.css" type="text/css">
</head>
<body>

<!-- Generated by Doxygen 1.3.7 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>ccvt.h</h1><a href="ccvt_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/*  CCVT: ColourConVerT: simple library for converting colourspaces</span>
00002 <span class="comment">    Copyright (C) 2002 Nemosoft Unv.</span>
00003 <span class="comment"></span>
00004 <span class="comment">    This program is free software; you can redistribute it and/or modify</span>
00005 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
00006 <span class="comment">    the Free Software Foundation; either version 2 of the License, or</span>
00007 <span class="comment">    (at your option) any later version.</span>
00008 <span class="comment"></span>
00009 <span class="comment">    This program is distributed in the hope that it will be useful,</span>
00010 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
00011 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
00012 <span class="comment">    GNU General Public License for more details.</span>
00013 <span class="comment"></span>
00014 <span class="comment">    You should have received a copy of the GNU General Public License</span>
00015 <span class="comment">    along with this program; if not, write to the Free Software</span>
00016 <span class="comment">    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
00017 <span class="comment"></span>
00018 <span class="comment">    For questions, remarks, patches, etc. for this program, the author can be</span>
00019 <span class="comment">    reached at nemosoft@smcc.demon.nl.</span>
00020 <span class="comment">*/</span>
00021 
00022 <span class="comment">/*</span>
00023 <span class="comment"> $Log: ccvt_8h-source.html,v $
00023 <span class="comment"> Revision 1.2  2006/12/17 03:51:12  nemosoft
00023 <span class="comment"> New generated API
00023 <span class="comment"></span>
00024 <span class="comment"> Revision 1.11  2006/06/12 20:52:50  nemosoft</span>
00025 <span class="comment"> Fixing end-of-buffer overrun in bgr24/32 conversion routines</span>
00026 <span class="comment"></span>
00027 <span class="comment"> Revision 1.10  2003/10/24 16:55:18  nemosoft</span>
00028 <span class="comment"> removed erronous log messages</span>
00029 <span class="comment"></span>
00030 <span class="comment"> Revision 1.9  2002/11/03 22:46:25  nemosoft</span>
00031 <span class="comment"> Adding various RGB to RGB functions.</span>
00032 <span class="comment"> Adding proper copyright header too.</span>
00033 <span class="comment"></span>
00034 <span class="comment"> Revision 1.8  2002/04/14 01:00:27  nemosoft</span>
00035 <span class="comment"> Finishing touches: adding const, adding libs for 'show'</span>
00036 <span class="comment">*/</span>
00037 
00038 
00039 <span class="preprocessor">#ifndef CCVT_H</span>
00040 <span class="preprocessor"></span><span class="preprocessor">#define CCVT_H</span>
00041 <span class="preprocessor"></span>
00042 <span class="preprocessor">#ifdef __cplusplus</span>
00043 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
00044 <span class="preprocessor">#endif</span>
00045 <span class="preprocessor"></span>
00046 <span class="comment">/* Colour ConVerT: going from one colour space to another.</span>
00047 <span class="comment">   ** NOTE: the set of available functions is far from complete! **</span>
00048 <span class="comment"></span>
00049 <span class="comment">   Format descriptions:</span>
00050 <span class="comment">   420i = "4:2:0 interlaced"</span>
00051 <span class="comment">           YYYY UU YYYY UU   even lines</span>
00052 <span class="comment">           YYYY VV YYYY VV   odd lines</span>
00053 <span class="comment">           U/V data is subsampled by 2 both in horizontal</span>
00054 <span class="comment">           and vertical directions, and intermixed with the Y values.</span>
00055 <span class="comment"></span>
00056 <span class="comment">   420p = "4:2:0 planar"</span>
00057 <span class="comment">           YYYYYYYY      N lines</span>
00058 <span class="comment">           UUUU          N/2 lines</span>
00059 <span class="comment">           VVVV          N/2 lines</span>
00060 <span class="comment">           U/V is again subsampled, but all the Ys, Us and Vs are placed</span>
00061 <span class="comment">           together in separate buffers. The buffers may be placed in</span>
00062 <span class="comment">           one piece of contiguous memory though, with Y buffer first,</span>
00063 <span class="comment">           followed by U, followed by V.</span>
00064 <span class="comment"></span>
00065 <span class="comment">   yuyv = "4:2:2 interlaced"</span>
00066 <span class="comment">           YUYV YUYV YUYV ...   N lines</span>
00067 <span class="comment">           The U/V data is subsampled by 2 in horizontal direction only.</span>
00068 <span class="comment"></span>
00069 <span class="comment">   bgr24 = 3 bytes per pixel, in the order Blue Green Red (whoever came up</span>
00070 <span class="comment">           with that idea...)</span>
00071 <span class="comment">   rgb24 = 3 bytes per pixel, in the order Red Green Blue (which is sensible)</span>
00072 <span class="comment">   rgb32 = 4 bytes per pixel, in the order Red Green Blue Alpha, with</span>
00073 <span class="comment">           Alpha really being a filler byte (0)</span>
00074 <span class="comment">   bgr32 = last but not least, 4 bytes per pixel, in the order Blue Green Red</span>
00075 <span class="comment">           Alpha, Alpha again a filler byte (0)</span>
00076 <span class="comment"> */</span>
00077 
00078 <span class="comment">/* 4:2:0 YUV planar to RGB/BGR     */</span>
00079 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a0">ccvt_420p_bgr24</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dst);
00080 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a1">ccvt_420p_rgb24</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dst);
00081 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a2">ccvt_420p_bgr32</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dst);
00082 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a3">ccvt_420p_rgb32</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dst);
00083 
00084 <span class="comment">/* 4:2:2 YUYV interlaced to RGB/BGR */</span>
00085 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a4">ccvt_yuyv_rgb32</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dst);
00086 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a5">ccvt_yuyv_bgr32</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dst);
00087 
00088 <span class="comment">/* 4:2:2 YUYV interlaced to 4:2:0 YUV planar */</span>
00089 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a6">ccvt_yuyv_420p</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dsty, <span class="keywordtype">void</span> *dstu, <span class="keywordtype">void</span> *dstv);
00090 
00091 <span class="comment">/* RGB/BGR to 4:2:0 YUV interlaced */</span>
00092 
00093 <span class="comment">/* RGB/BGR to 4:2:0 YUV planar     */</span>
00094 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a7">ccvt_rgb24_420p</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dsty, <span class="keywordtype">void</span> *dstu, <span class="keywordtype">void</span> *dstv);
00095 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a8">ccvt_bgr24_420p</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dsty, <span class="keywordtype">void</span> *dstu, <span class="keywordtype">void</span> *dstv);
00096 
00097 <span class="comment">/* RGB/BGR to RGB/BGR */</span>
00098 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a9">ccvt_bgr24_bgr32</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> src, <span class="keywordtype">void</span> *<span class="keyword">const</span> dst);
00099 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a10">ccvt_bgr24_rgb32</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> src, <span class="keywordtype">void</span> *<span class="keyword">const</span> dst);
00100 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a11">ccvt_bgr32_bgr24</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> src, <span class="keywordtype">void</span> *<span class="keyword">const</span> dst);
00101 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a12">ccvt_bgr32_rgb24</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> src, <span class="keywordtype">void</span> *<span class="keyword">const</span> dst);
00102 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a13">ccvt_rgb24_bgr32</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> src, <span class="keywordtype">void</span> *<span class="keyword">const</span> dst);
00103 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a14">ccvt_rgb24_rgb32</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> src, <span class="keywordtype">void</span> *<span class="keyword">const</span> dst);
00104 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a15">ccvt_rgb32_bgr24</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> src, <span class="keywordtype">void</span> *<span class="keyword">const</span> dst);
00105 <span class="keywordtype">void</span> <a class="code" href="ccvt_8h.html#a16">ccvt_rgb32_rgb24</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> src, <span class="keywordtype">void</span> *<span class="keyword">const</span> dst);
00106 
00107 
00108 <span class="preprocessor">#ifdef __cplusplus</span>
00109 <span class="preprocessor"></span>}
00110 <span class="preprocessor">#endif</span>
00111 <span class="preprocessor"></span>
00112 <span class="preprocessor">#endif</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Wed Dec 13 23:38:46 2006 for CamStream by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
</body>
</html>