Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

video_asm.h

Go to the documentation of this file.
00001 #ifndef VIDEO_ASM_H 00002 #define VIDEO_ASM_H 00003 00004 /* interface to C */ 00005 00006 #ifdef __cplusplus 00007 extern "C" { 00008 #endif 00009 00010 /* Fast assambly routines for common operations on video: adding 00011 buffers, substracting, taking diffs, etc. 00012 All operations are performed bytewise, the void * are just used 00013 to keep the compiler happy. 00014 00015 The functions ending in '_mmx' use MMX instructions, acting on 4 or even 00016 8 bytes at a time. It follows that 'n' should be a multiple of 8. The 00017 '_smx' function use the Saturated version of the MMX instructions. 00018 00019 Definitions: 00020 'diff': c = (a - b) / 2 00021 'intg': c += (a * 2); 00022 00023 'add': a += b 00024 'plus': c = a + b 00025 'sub': a -= b 00026 'minus': c = a - b 00027 00028 The '128' version of the functions assume the data in the buffers has a 00029 virtual null point at 128, and compensate for this. 00030 */ 00031 00032 void calc_diff128 (int n, void *dst, void *src_new, void *src_old); 00033 00034 void calc_intg128 (int n, void *dst, void *delta); 00035 00036 /* Basic operators */ 00037 /* Add 'src' to 'dst' */ 00038 void calc_add (int n, void *dst, void *src); 00039 void calc_add_mmx(int n, void *dst, void *src); 00040 void calc_add_smx(int n, void *dst, void *src); 00041 00042 /* Add 'src' to 'dst', with offset 128 */ 00043 void calc_add128_mmx(int n, void *dst, void *src); 00044 00045 /* Add 'src1' to 'src2', storing the result in 'dst' */ 00046 void calc_plus (int n, void *dst, void *src1, void *src2); 00047 void calc_plus_mmx(int n, void *dst, void *src1, void *src2); 00048 void calc_plus_smx(int n, void *dst, void *src1, void *src2); 00049 00050 #ifdef __cplusplus 00051 } 00052 #endif 00053 00054 #endif

Generated on Wed Dec 13 23:38:46 2006 for CamStream by doxygen 1.3.7