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
|
/*=============================================================================
** Lynkeos
** $Id: processing_core.h 585 2018-09-08 21:30:37Z j-etienne $
**-----------------------------------------------------------------------------
**
** Created by Jean-Etienne LAMIAUD on Fri Dec 05 2003.
** Copyright (c) 2003-2013. Jean-Etienne LAMIAUD
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
**-----------------------------------------------------------------------------
*/
/*!
* @header
* @abstract Common processing definitions
*/
#ifndef __PROCESSING_CORE_H
#define __PROCESSING_CORE_H
#include <math.h>
#ifdef __sun__
#define _Complex_I (__extension__ 1.0iF)
#else
#include <complex.h>
#endif
/* Types used in all processing routines */
/*! \page options Compilation options
* The preprocessor variable "DOUBLE_PIXELS" causes the application to be built
* with double precision for all its internal calculations, if it is defined.
* Otherwise, the default is to use single precision.
*
* For 8 bit images (webcam)
* the double precision is needed if the list of images to process exceeds
* 16384 elements (if you need this let me know ;o). For 12 bit images (DSLR)
* the double precision is useful for processing more than 1024 images... And
* at last, for 16 bits images (astronomical CCD) the double precision is
* useful because the the limit is only 64 images.
*
* Whatever precision Lynkeos is compiled with, it opens Lynkeos documents saved
* with any precision.
*/
#ifndef DOUBLE_PIXELS
typedef float REAL; //!< Floating precision type used by the application
#else
typedef double REAL;
#endif
/*!
* @abstract Vector type
* @ingroup Processing
*/
#if !defined(DOUBLE_PIXELS) || defined(__SSE2__) || defined(__SSE3__)
#ifdef __ALTIVEC__
typedef __vector REAL REALVECT;
#else
#ifdef DOUBLE_PIXELS
typedef REAL REALVECT __attribute__ ((vector_size (32)));
#else
typedef REAL REALVECT __attribute__ ((vector_size (16)));
#endif
#endif
#endif
#ifndef DOUBLE_PIXELS
//! Kind of floating type precision
#define PROCESSING_PRECISION SINGLE_PRECISION
typedef float _Complex LNKCOMPLEX; //!< Complex type with application's precision
#else
#define PROCESSING_PRECISION DOUBLE_PRECISION
typedef double _Complex LNKCOMPLEX;
#endif
/*!
* @function initializeProcessing
* @abstract Processing initialization
* @result None
* @ingroup Processing
*/
extern void initializeProcessing(void);
#endif
|