Renesas GR-PEACH OpenCV Development / gr-peach-opencv-project-sd-card_update

Fork of gr-peach-opencv-project-sd-card by the do

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers precomp.hpp Source File

precomp.hpp

00001 /*M///////////////////////////////////////////////////////////////////////////////////////
00002 //
00003 //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
00004 //
00005 //  By downloading, copying, installing or using the software you agree to this license.
00006 //  If you do not agree to this license, do not download, install,
00007 //  copy or use the software.
00008 //
00009 //
00010 //                          License Agreement
00011 //                For Open Source Computer Vision Library
00012 //
00013 // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
00014 // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
00015 // Third party copyrights are property of their respective owners.
00016 //
00017 // Redistribution and use in source and binary forms, with or without modification,
00018 // are permitted provided that the following conditions are met:
00019 //
00020 //   * Redistribution's of source code must retain the above copyright notice,
00021 //     this list of conditions and the following disclaimer.
00022 //
00023 //   * Redistribution's in binary form must reproduce the above copyright notice,
00024 //     this list of conditions and the following disclaimer in the documentation
00025 //     and/or other materials provided with the distribution.
00026 //
00027 //   * The name of the copyright holders may not be used to endorse or promote products
00028 //     derived from this software without specific prior written permission.
00029 //
00030 // This software is provided by the copyright holders and contributors "as is" and
00031 // any express or implied warranties, including, but not limited to, the implied
00032 // warranties of merchantability and fitness for a particular purpose are disclaimed.
00033 // In no event shall the Intel Corporation or contributors be liable for any direct,
00034 // indirect, incidental, special, exemplary, or consequential damages
00035 // (including, but not limited to, procurement of substitute goods or services;
00036 // loss of use, data, or profits; or business interruption) however caused
00037 // and on any theory of liability, whether in contract, strict liability,
00038 // or tort (including negligence or otherwise) arising in any way out of
00039 // the use of this software, even if advised of the possibility of such damage.
00040 //
00041 //M*/
00042 
00043 #ifndef __OPENCV_PRECOMP_H__
00044 #define __OPENCV_PRECOMP_H__
00045 
00046 #include "opencv2/imgproc.hpp"
00047 #include "opencv2/core/utility.hpp"
00048 
00049 #include "opencv2/imgproc/imgproc_c.h"
00050 #include "opencv2/core/private.hpp"
00051 #include "opencv2/core/ocl.hpp"
00052 #include "opencv2/core/hal/hal.hpp"
00053 
00054 #include <math.h>
00055 #include <assert.h>
00056 #include <string.h>
00057 #include <stdlib.h>
00058 #include <stdio.h>
00059 #include <limits.h>
00060 #include <float.h>
00061 
00062 #ifdef HAVE_TEGRA_OPTIMIZATION
00063 #include "opencv2/imgproc/imgproc_tegra.hpp"
00064 #else
00065 #define GET_OPTIMIZED(func) (func)
00066 #endif
00067 
00068 /* helper tables */
00069 extern const uchar icvSaturate8u_cv[];
00070 #define CV_FAST_CAST_8U(t)  (assert(-256 <= (t) && (t) <= 512), icvSaturate8u_cv[(t)+256])
00071 #define CV_CALC_MIN_8U(a,b) (a) -= CV_FAST_CAST_8U((a) - (b))
00072 #define CV_CALC_MAX_8U(a,b) (a) += CV_FAST_CAST_8U((b) - (a))
00073 
00074 // -256.f ... 511.f
00075 extern const float icv8x32fTab_cv[];
00076 #define CV_8TO32F(x)  icv8x32fTab_cv[(x)+256]
00077 
00078 // (-128.f)^2 ... (255.f)^2
00079 extern const float icv8x32fSqrTab[];
00080 #define CV_8TO32F_SQR(x)  icv8x32fSqrTab[(x)+128]
00081 
00082 #define  CV_COPY( dst, src, len, idx ) \
00083     for( (idx) = 0; (idx) < (len); (idx)++) (dst)[idx] = (src)[idx]
00084 
00085 #define  CV_SET( dst, val, len, idx )  \
00086     for( (idx) = 0; (idx) < (len); (idx)++) (dst)[idx] = (val)
00087 
00088 #undef   CV_CALC_MIN
00089 #define  CV_CALC_MIN(a, b) if((a) > (b)) (a) = (b)
00090 
00091 #undef   CV_CALC_MAX
00092 #define  CV_CALC_MAX(a, b) if((a) < (b)) (a) = (b)
00093 
00094 #include "_geom.h"
00095 #include "filterengine.hpp"
00096 
00097 #include "opencv2/core/sse_utils.hpp"
00098 
00099 #endif /*__OPENCV_CV_INTERNAL_H_*/
00100