apps/autoexp/autoexp.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <asm/elphel/hist.h>
#include <asm/elphel/autoexp.h>
#include <asm/elphel/c313a.h>
#include <syslog.h>

Include dependency graph for autoexp.c:

Go to the source code of this file.

Defines

#define MAX_OVEREXP   5000
#define MAX_WIDTH   100
#define MAX_HEIGHT   100
#define MIN_WIDTH   5
#define MIN_HEIGHT   5
#define MAX_LEFT   100
#define MAX_TOP   100
#define MAX_S_INDEX   255
#define MAX_S_PERCENT   10000
#define PMAX_MAX   9000
#define PMAX_MIN   5000
#define HIST_SIZE   (256 * 4 * 4 + 256 * 2)

Functions

float hist_analyze (unsigned long *t, unsigned long sq)
float hist_analyze_percent (unsigned long *t, unsigned long sq)
void hist_stat ()
int main (void)
static unsigned long _sum (unsigned long *t, int i)
float normalize_gamma (int indx)

Variables

autoexp_t state
autoexp_t autoexp_set
autoexp_log_t autoexp_log
unsigned short * gamma
int skip_first_frames = 0


Define Documentation

#define HIST_SIZE   (256 * 4 * 4 + 256 * 2)

Definition at line 45 of file autoexp.c.

Referenced by main().

#define MAX_HEIGHT   100

Definition at line 18 of file autoexp.c.

Referenced by main().

#define MAX_LEFT   100

Definition at line 21 of file autoexp.c.

Referenced by main().

#define MAX_OVEREXP   5000

Definition at line 16 of file autoexp.c.

Referenced by main().

#define MAX_S_INDEX   255

Definition at line 23 of file autoexp.c.

Referenced by main().

#define MAX_S_PERCENT   10000

Definition at line 24 of file autoexp.c.

Referenced by main().

#define MAX_TOP   100

Definition at line 22 of file autoexp.c.

Referenced by main().

#define MAX_WIDTH   100

Definition at line 17 of file autoexp.c.

Referenced by main().

#define MIN_HEIGHT   5

Definition at line 20 of file autoexp.c.

Referenced by main().

#define MIN_WIDTH   5

Definition at line 19 of file autoexp.c.

Referenced by main().

#define PMAX_MAX   9000

Definition at line 26 of file autoexp.c.

Referenced by main().

#define PMAX_MIN   5000

Definition at line 27 of file autoexp.c.

Referenced by main().


Function Documentation

static unsigned long _sum ( unsigned long *  t,
int  i 
) [inline, static]

Definition at line 287 of file autoexp.c.

Referenced by hist_analyze().

float hist_analyze ( unsigned long *  t,
unsigned long  sq 
)

Definition at line 307 of file autoexp.c.

References _sum(), normalize_gamma(), autoexp_t::overexp_max, s, and state.

Referenced by main().

float hist_analyze_percent ( unsigned long *  t,
unsigned long  sq 
)

Definition at line 370 of file autoexp.c.

References autoexp_log, autoexp_log_t::n_index, autoexp_log_t::n_percent, s, autoexp_t::s_index, autoexp_t::s_percent, and state.

Referenced by main().

void hist_stat (  ) 

int main ( void   ) 

Definition at line 54 of file autoexp.c.

References autoexp_log, autoexp_set, DEV_HIST_NAME, autoexp_t::exp, autoexp_t::exp_max, fd, gamma, autoexp_t::height, hist_analyze(), hist_analyze_percent(), HIST_NOT_CHANGE, HIST_SIZE, IOC_HIST_GET, IOC_HIST_SET, IOC_HIST_SET_LOG, autoexp_t::left, MAX_HEIGHT, MAX_LEFT, MAX_OVEREXP, MAX_S_INDEX, MAX_S_PERCENT, MAX_TOP, MAX_WIDTH, MIN_HEIGHT, MIN_WIDTH, autoexp_t::overexp_max, PMAX_MAX, PMAX_MIN, REZ_HIST_CONF, s, autoexp_log_t::s_index, autoexp_t::s_index, autoexp_log_t::s_percent, autoexp_t::s_percent, autoexp_t::skip_pmax, autoexp_t::skip_pmin, autoexp_t::skip_t, state, autoexp_log_t::t_scale, autoexp_log_t::t_value, TABLES_LEN, autoexp_t::top, and autoexp_t::width.

float normalize_gamma ( int  indx  ) 

Definition at line 291 of file autoexp.c.

References gamma.

Referenced by hist_analyze().


Variable Documentation

struct autoexp_log_t autoexp_log

Definition at line 40 of file autoexp.c.

Referenced by hist_analyze_percent(), and main().

struct autoexp_t autoexp_set

Definition at line 39 of file autoexp.c.

Referenced by autoexp__ioctl(), hist__init(), hist__ioctl(), hist_image_exp(), init_autoexp_struct(), main(), and set2state().

unsigned short* gamma

Definition at line 46 of file autoexp.c.

Referenced by hist__init(), hist_irq(), hist_irq__(), main(), normalize_gamma(), and PHP_FUNCTION().

int skip_first_frames = 0

Definition at line 52 of file autoexp.c.

struct autoexp_t state

Initial value:

 {
        .s_index = 0,
        .s_percent = 0,
        .exp = 100,
        .skip_pmin = 500,
        .skip_pmax = 5000,
        .skip_t = 2,
}

Definition at line 29 of file autoexp.c.

Referenced by audio_end(), audio_finish(), audio_init(), audio_process(), audio_start(), begin_wave(), camogm_audio_init(), camogm_audio_mov(), camogm_debug(), camogm_end_kml(), camogm_end_mov(), camogm_end_ogm(), camogm_frame_jpeg(), camogm_frame_kml(), camogm_frame_mov(), camogm_frame_ogm(), camogm_free(), camogm_init(), camogm_kml_set_enable(), camogm_kml_set_height(), camogm_kml_set_height_mode(), camogm_kml_set_horHalfFov(), camogm_kml_set_near(), camogm_kml_set_period(), camogm_kml_set_vertHalfFov(), camogm_reset(), camogm_set_audio_format(), camogm_set_audio_state(), camogm_set_exif(), camogm_set_format(), camogm_set_frames_per_chunk(), camogm_set_frames_skip(), camogm_set_max_frames(), camogm_set_prefix(), camogm_set_save_gp(), camogm_set_segment_duration(), camogm_set_segment_length(), camogm_set_sync_state(), camogm_set_timescale(), camogm_start(), camogm_start_jpeg(), camogm_start_kml(), camogm_start_mov(), camogm_start_ogm(), camogm_status(), camogm_stop(), hist_analyze(), hist_analyze_percent(), main(), RTSP_Server::main(), nand_get_device(), nand_release_device(), ogm_flush_to_file(), parse(), PHP_FUNCTION(), recorder(), sendImageFrame(), setupCamera(), and write_coil_form().


Generated on Thu Aug 7 16:19:18 2008 for elphel by  doxygen 1.5.1