apps/autoexposure/globalsinit.c File Reference

#include "autoexposure.h"

Include dependency graph for globalsinit.c:

Go to the source code of this file.

Functions

int initFilesMmap (void)
 open required files, mmap theurt data structures uses global variables for files and mmap-ed data so they are accessible everywhere
int initParams (int daemon_bit)
 give a chance for other applications to initialize P_* parameters related to autoexposure functionality so the daemon itself can be started early

Variables

int fd_fparmsall
 Global variables.
int fd_histogram_cache
int fd_gamma_cache
framepars_all_tframeParsAll
framepars_tframePars
unsigned long * globalPars
framepars_past_tpastPars
histogram_stuct_thistogram_cache
gamma_stuct_tgamma_cache
 gamma cache is needed to re-linearize the data
int hist_index
 array of gamma structures
int gamma_index
 to preserve it between calls
int aex_recover_cntr
 to preserve it between calls
unsigned long this_frame
int autoexposure_debug


Function Documentation

int initFilesMmap ( void   ) 

open required files, mmap theurt data structures uses global variables for files and mmap-ed data so they are accessible everywhere

Returns:
0 - OK, <0 - problems opening/mma-ing

Frame parameters file open/mmap (read/write)

Histogrames file open/mmap (readonly)

Gamma tables file open/mmap (readonly)

All initialized

Definition at line 60 of file globalsinit.c.

References ELP_FERR, fd_fparmsall, fd_gamma_cache, fd_histogram_cache, framePars, framepars_all_t::framePars, frameParsAll, gamma_cache, GAMMA_CACHE_NUMBER, globalPars, framepars_all_t::globalPars, histogram_cache, HISTOGRAM_CACHE_NUMBER, pastPars, framepars_all_t::pastPars, and stderr.

Referenced by main().

int initParams ( int  daemon_bit  ) 

give a chance for other applications to initialize P_* parameters related to autoexposure functionality so the daemon itself can be started early

Returns:
just 0 for now

wait for autoexposure daemon to be enabled

reset running error

reset running error

set global frame number

used default, no real calibration

Definition at line 118 of file globalsinit.c.

References aex_recover_cntr, DEFAULT_BLACK_CALIB, fd_histogram_cache, G_AE_INTEGERR, G_HIST_DIM_01, G_HIST_DIM_23, G_THIS_FRAME, G_WB_INTEGERR, GLOBALPARS, initAexpCorr(), initWhiteBalanceCorr(), LSEEK_DAEMON_HIST_Y, SEEK_END, and this_frame.

Referenced by main().


Variable Documentation

int aex_recover_cntr

to preserve it between calls

Definition at line 49 of file globalsinit.c.

Referenced by aexpCorr(), and initParams().

int autoexposure_debug

Definition at line 52 of file globalsinit.c.

Referenced by main().

int fd_fparmsall

Global variables.

*************************************************************************** ! FILE NAME : globalsinit.c ! DESCRIPTION: Opens files, mmap-s data structures, initializes variables ! For the autoexposure daemon ! Copyright (C) 2008 Elphel, Inc. ! -----------------------------------------------------------------------------** ! 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 3 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, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** ! !

Log
globalsinit.c,v
! Revision 1.1.1.1 2008/11/27 20:04:01 elphel ! ! ! Revision 1.2 2008/11/18 19:30:16 elphel ! Added initialization of the "next" frame - otherwise it wait _very_ long if the camera frame number is reset ! ! Revision 1.1 2008/11/15 23:08:24 elphel ! 8.0.alpha17 - split autoexposure source file ! !

Definition at line 39 of file globalsinit.c.

int fd_gamma_cache

Definition at line 39 of file globalsinit.c.

Referenced by getPercentile(), initFilesMmap(), PHP_FUNCTION(), and PHP_MSHUTDOWN_FUNCTION().

int fd_histogram_cache

Definition at line 39 of file globalsinit.c.

Referenced by get_histogram_index(), getPercentile(), initFilesMmap(), initParams(), main(), PHP_FUNCTION(), PHP_MSHUTDOWN_FUNCTION(), recalibrateDim(), skipHDR(), and whiteBalanceCorr().

struct framepars_t* framePars

Definition at line 41 of file globalsinit.c.

struct framepars_all_t* frameParsAll

Definition at line 40 of file globalsinit.c.

struct gamma_stuct_t* gamma_cache

gamma cache is needed to re-linearize the data

array of histograms

Definition at line 46 of file globalsinit.c.

Referenced by gammaDirect(), gammaReverse(), initFilesMmap(), and PHP_FUNCTION().

int gamma_index

to preserve it between calls

Definition at line 48 of file globalsinit.c.

Referenced by gammaDirect(), gammaReverse(), getPercentile(), and PHP_FUNCTION().

unsigned long* globalPars

Definition at line 42 of file globalsinit.c.

int hist_index

array of gamma structures

Definition at line 47 of file globalsinit.c.

Referenced by aexpCorr(), get_histogram_index(), getPercentile(), main(), PHP_FUNCTION(), and whiteBalanceCorr().

struct histogram_stuct_t* histogram_cache

Definition at line 44 of file globalsinit.c.

Referenced by aexpCorr(), getPercentile(), initFilesMmap(), main(), PHP_FUNCTION(), and whiteBalanceCorr().

struct framepars_past_t* pastPars

Definition at line 43 of file globalsinit.c.

Referenced by get_imageParamsThat(), get_imageParamsThatValid(), initFilesMmap(), and PHP_FUNCTION().

unsigned long this_frame

Definition at line 50 of file globalsinit.c.

Referenced by aexpCorr(), getPercentile(), initParams(), main(), recalibrateDim(), waitDaemonEnabled(), Video::waitDaemonEnabled(), waitRequstPrevHist(), and whiteBalanceCorr().


Generated on Fri Nov 28 00:06:44 2008 for elphel by  doxygen 1.5.1