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
|
<html>
<head>
<title>Camstream: CamStream API documentation</title>
<link rel="stylesheet" href="../../tech.css" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.2.6 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
<hr><h1>video_asm.h</h1><a href="video_asm_h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="preprocessor">#ifndef VIDEO_ASM_H</font>
00002 <font class="preprocessor"></font><font class="preprocessor">#define VIDEO_ASM_H</font>
00003 <font class="preprocessor"></font>
00004 <font class="comment">/* interface to C */</font>
00005
00006 <font class="preprocessor">#ifdef __cplusplus</font>
00007 <font class="preprocessor"></font><font class="keyword">extern</font> <font class="stringliteral">"C"</font> {
00008 <font class="preprocessor">#endif</font>
00009 <font class="preprocessor"></font>
00010 <font class="comment">/* Fast assambly routines for common operations on video: adding</font>
00011 <font class="comment"> buffers, substracting, taking diffs, etc.</font>
00012 <font class="comment"> All operations are performed bytewise, the void * are just used</font>
00013 <font class="comment"> to keep the compiler happy.</font>
00014 <font class="comment"> </font>
00015 <font class="comment"> The functions ending in '_mmx' use MMX instructions, acting on 4 or even</font>
00016 <font class="comment"> 8 bytes at a time. It follows that 'n' should be a multiple of 8. The</font>
00017 <font class="comment"> '_smx' function use the Saturated version of the MMX instructions.</font>
00018 <font class="comment"> </font>
00019 <font class="comment"> Definitions:</font>
00020 <font class="comment"> 'diff': c = (a - b) / 2</font>
00021 <font class="comment"> 'intg': c += (a * 2);</font>
00022 <font class="comment"> </font>
00023 <font class="comment"> 'add': a += b</font>
00024 <font class="comment"> 'plus': c = a + b</font>
00025 <font class="comment"> 'sub': a -= b</font>
00026 <font class="comment"> 'minus': c = a - b</font>
00027 <font class="comment"></font>
00028 <font class="comment"> The '128' version of the functions assume the data in the buffers has a</font>
00029 <font class="comment"> virtual null point at 128, and compensate for this.</font>
00030 <font class="comment"> */</font>
00031
00032 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a0">calc_diff128</a> (<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *src_new, <font class="keywordtype">void</font> *src_old);
00033 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a1">calc_diff128_mmx</a>(<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *src_new, <font class="keywordtype">void</font> *src_old);
00034
00035 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a2">calc_intg128</a> (<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *delta);
00036 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a3">calc_intg128_smx</a>(<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *delta);
00037
00038 <font class="comment">/* Basic operators */</font>
00039 <font class="comment">/* Add 'src' to 'dst' */</font>
00040 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a4">calc_add</a> (<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *src);
00041 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a5">calc_add_mmx</a>(<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *src);
00042 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a6">calc_add_smx</a>(<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *src);
00043
00044 <font class="comment">/* Add 'src' to 'dst', with offset 128 */</font>
00045 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a7">calc_add128_mmx</a>(<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *src);
00046
00047 <font class="comment">/* Add 'src1' to 'src2', storing the result in 'dst' */</font>
00048 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a8">calc_plus</a> (<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *src1, <font class="keywordtype">void</font> *src2);
00049 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a9">calc_plus_mmx</a>(<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *src1, <font class="keywordtype">void</font> *src2);
00050 <font class="keywordtype">void</font> <a class="code" href="video_asm_h.html#a10">calc_plus_smx</a>(<font class="keywordtype">int</font> n, <font class="keywordtype">void</font> *dst, <font class="keywordtype">void</font> *src1, <font class="keywordtype">void</font> *src2);
00051
00052 <font class="preprocessor">#ifdef __cplusplus</font>
00053 <font class="preprocessor"></font>}
00054 <font class="preprocessor">#endif</font>
00055 <font class="preprocessor"></font>
00056 <font class="preprocessor">#endif</font>
</font></pre></div><hr><address><small>Generated at Sat May 18 02:56:55 2002 for Camstream by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.6 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
© 1997-2001</small></address>
</body>
</html>
|