os/linux-2.6-tag--devboard-R2_10-4/include/asm-cris/elphel/c313a.h File Reference

Go to the source code of this file.

Data Structures

struct  framepars_t
struct  framepars_past_t
struct  framepars_all_t
struct  frameparspair_t
struct  autoexp_t
struct  aexp_window_t
struct  p_names_t
struct  sensor_t
struct  sensorproc_t
struct  interframe_params_t
 width,height, quality are still needed even with new Exif - it is used to rebuild JPEG header More...
struct  i2c_timing_t
struct  gamma_stuct_t
struct  histogram_stuct_t
struct  huffman_encoded_t

Defines

#define ELPHEL_DEBUG_STARTUP   0 ;
#define ELPHEL_DEBUG   1
#define ELPHEL_DEBUG_DELAY   100000
#define ELP_KERR(x)   printk("%s:%d:%s: ERROR ",__FILE__,__LINE__,__FUNCTION__);x
#define ELP_FERR(x)   fprintf(stderr,"%s:%d:%s: ERROR ",__FILE__,__LINE__,__FUNCTION__);x
#define USELONGLONG   1
#define ETRAXFS_MMAP_CACHE_BUG   y
#define CMOSCAM_IOCTYPE   124
#define X3X3_I2C_CTRL   0
#define X3X3_I2C_8_AINC   1
#define X3X3_I2C_16_AINC   2
#define X3X3_I2C1_8_AINC   3
#define X3X3_I2C1_16_AINC   4
#define X3X3_I2C_RAW   5
#define X3X3_I2C1_RAW   6
#define X3X3_I2C_ENABLE   7
#define X3X3_I2C_ENABLE_RD   0
#define X3X3_I2C_ENABLE_WR   1
#define X3X3_I2C_ENABLE_RAW   2
#define X3X3_I2C_ENABLE_8   3
#define X3X3_I2C_ENABLE_16   4
#define X3X3_I2C_MAXMINOR   7
#define X3X3_I2C_CHANNELS   2
#define CAMSEQ_OFF   0
 Obsolete.
#define CAMSEQ_READY   1
#define CAMSEQ_SKIP   2
#define CAMSEQ_WAIT_F   3
#define CAMSEQ_WAIT_T   4
#define CAMSEQ_ACQUIRE   5
#define CAMSEQ_DONE   6
#define CAMSEQ_JPEG   7
#define CAMSEQ_RUN   8
#define CAMSEQ_STOP   9
#define CAMSEQ_SINGLE   10
#define sensorcom_W_size   1024
#define sensorcom_R_size   256
#define MCP_W_size   1024
#define MCP_R_size   256
#define MCPOtherBits   0xffa7a7ff
#define MCPOffReset   0x00101800
#define MCPReset   0x00001800
#define MCPNoReset   0x00105800
#define MCPToggleA   0x00080000
#define MCPToggleB   0x00001000
#define MCPctlseq   0x00
#define MCPsofttg   0x02
#define MCPeackn   0x03
#define MCPctlgate   0x04
#define MCPwstdly   0x06
#define MCPwrsmsk   0x07
#define MCPwrsup   0x08
#define MCPwrmons   0x09
#define MCPwnom   0x0a
#define MCPwdenom   0x0b
#define MCPwoutw   0x0c
#define MCPwinvctl   0x0d
#define MCPctlsync   0x0e
#define MCPwrdlys   0x10
#define MCPwinv   0x40
#define MCPwshared   0x80
#define MCPwrsynctb   0x100
#define MCPwrseq   0x200
#define I2C_WRITEARG(bus, slave, reg, value)   (((bus) << 24) | ((slave) << 16) | ((reg) << 8) | (value))
#define I2C_READARG(bus, slave, reg)   (((bus) << 24) | ((slave) << 16) | ((reg) << 8))
#define I2C_ARGBUS(arg)   (((arg) >> 24) & 0x1)
#define I2C_ARGSLAVE(arg)   (((arg) >> 16) & 0xff)
#define I2C_ARGREG(arg)   (((arg) >> 8) & 0xff)
#define I2C_ARGVALUE(arg)   ((arg) & 0xff)
#define I2C_DELAYS   0x0
#define I2C_WRITEREG   0x1
#define I2C_READREG   0x2
#define I2C_16_WRITEREG   0x3
#define I2C_16_READREG   0x4
#define I2C_16_WRITEARG(slave, reg, value)   (((slave) << 24) | ((reg) << 16) | (value))
#define I2C_16_READARG(slave, reg)   (((slave) << 24) | ((reg) << 16))
#define I2C_16_ARGSLAVE(arg)   (((arg) >> 24) & 0xff)
#define I2C_16_ARGREG(arg)   (((arg) >> 16) & 0xff)
#define I2C_16_ARGVALUE(arg)   ( (arg) & 0xffff)
#define I2C_16_ARGVALUE_H(arg)   (((arg) >> 8) & 0xff)
#define I2C_16_ARGVALUE_L(arg)   ( (arg) & 0xff)
#define _CCCMD(x, y)   (_IO(CMOSCAM_IOCTYPE, (x << 6) | (y & 0x3f)))
#define CCAM_CTRL(x)   ((_IOC_NR(x) >> 6) & 0x03)
#define CCAM_ADDR(x)   (_IOC_NR(x) & 0x3f)
#define CCAM_RPARS   2
#define CCAM_WPARS   3
#define P_NUMBER   1024
#define P_SENSOR   1
#define SENSOR_MASK   0xfc
#define SENSOR_ZR32112   0x04
#define SENSOR_ZR32212   0x08
#define SENSOR_KAC1310   0x20
#define SENSOR_KAC5000   0x24
#define SENSOR_MI1300   0x30
#define SENSOR_MT9X001   0x30
#define SENSOR_MT9Y001   0x34
#define SENSOR_IBIS51300   0x40
#define SENSOR_KAI11000   0x80
#define SENSOR_NONE   0xfc
#define SENSORWIDTH_ZR32112   1280
#define SENSORHEIGHT_ZR32112   1024
#define SENSORWIDTH_ZR32212   1280
#define SENSORHEIGHT_ZR32212   968
#define SENSORWIDTH_KAC1310   1280
#define SENSORHEIGHT_KAC1310   1024
#define SENSORWIDTH_MI1300   1280
#define SENSORHEIGHT_MI1300   1024
#define SENSORWIDTH_MT9M001   1280
#define SENSORHEIGHT_MT9M001   1024
#define SENSORWIDTH_MT9D001   1600
#define SENSORHEIGHT_MT9D001   1200
#define SENSORWIDTH_MT9T001   2048
#define SENSORHEIGHT_MT9T001   1536
#define SENSORWIDTH_MT9P001   2592
#define SENSORHEIGHT_MT9P001   1944
#define SENSORWIDTH_KAC5000   2592
#define SENSORHEIGHT_KAC5000   1944
#define SENSORWIDTH_IBIS51300   1280
#define SENSORHEIGHT_IBIS51300   1024
#define P_SENSOR_RUN   4
 Parameters below are accessed through mmap, because of cache coherency problem it make sense to keep them compact (maybe group by 8 - cache line of 32 bytes).
#define SENSOR_RUN_STOP   0
#define SENSOR_RUN_SINGLE   1
#define SENSOR_RUN_CONT   2
#define P_COMPRESSOR_RUN   5
#define COMPRESSOR_RUN_STOP   0
#define COMPRESSOR_RUN_SINGLE   1
#define COMPRESSOR_RUN_CONT   2
#define P_BAYER   6
#define P_TRIGGERED   7
#define P_PERIOD   8
#define P_FP1000SLIM   9
#define P_FPSFLAGS   10
#define P_JPEG_WP   11
#define P_CLK_FPGA   12
 In new code use G_CIRCBUFWP instead!
#define P_CLK_SENSOR   13
#define P_FPGA_XTRA   14
#define P_TRIG   15
#define P_BGFRAME   16
#define P_IMGSZMEM   17
#define P_PAGE_ACQ   18
#define P_PAGE_READ   19
#define P_OVERLAP   20
#define P_VIRT_KEEP   21
#define P_VIRT_WIDTH   22
#define P_VIRT_HEIGHT   23
#define P_WOI_LEFT   24
#define P_WOI_TOP   25
#define P_WOI_WIDTH   26
#define P_WOI_HEIGHT   27
#define P_FLIPH   28
#define P_FLIPV   29
#define P_DCM_HOR   30
#define P_DCM_VERT   31
#define P_BIN_HOR   32
#define P_BIN_VERT   33
#define P_FPGATEST   34
#define P_FRAMESYNC_DLY   35
#define P_PF_HEIGHT   36
#define P_BITS   37
#define P_SHIFTL   38
#define P_FPNS   39
#define P_FPNM   40
#define P_TESTSENSOR   41
#define P_VIRTTRIG   42
#define P_PERIOD_MIN   43
#define P_PERIOD_MAX   44
#define P_SENSOR_PIXH   45
#define P_SENSOR_PIXV   46
#define P_FATZERO   47
#define P_COMPMOD_TILSH   48
#define P_COMPMOD_DCSUB   49
#define P_COMPMOD_QTAB   50
#define P_FP1000S   51
#define P_SENSOR_WIDTH   52
#define P_SENSOR_HEIGHT   53
#define P_COLOR_SATURATION_BLUE   54
#define P_COLOR_SATURATION_RED   55
#define P_VIGNET_AX   56
 Vignetting control, AX*X^2+BX*X+AY*Y^2+BY*Y+C.
#define P_VIGNET_AY   57
#define P_VIGNET_BX   58
#define P_VIGNET_BY   59
#define P_VIGNET_C   60
#define P_VIGNET_SHL   61
#define P_VIGNET_ZERIN   62
#define P_VIGNET_ZEROUT   63
#define P_DGAINR   64
 "digital gains" for color correction, 17-bit unsigned data (default 0x8000).
#define P_DGAING   65
#define P_DGAINGB   66
#define P_DGAINB   67
#define P_ZBINROUND   71
#define P_HISTRQ   72
#define P_TILES   73
#define P_SENSOR_PHASE   74
#define P_AUTOEXP_ON   76
#define P_HISTWND_RWIDTH   77
 relative histogram (autoexposure) window (changed from % to 1/0x10000)
#define P_HISTWND_RHEIGHT   78
#define P_HISTWND_RLEFT   79
#define P_HISTWND_RTOP   80
#define P_AUTOEXP_EXP_MAX   81
 Are these used anywhere now? ...P_AUTOEXP_SKIP_T.
#define P_AUTOEXP_OVEREXP_MAX   82
#define P_AUTOEXP_S_PERCENT   83
#define P_AUTOEXP_S_INDEX   84
#define P_AUTOEXP_EXP   85
#define P_AUTOEXP_SKIP_PMIN   86
#define P_AUTOEXP_SKIP_PMAX   87
#define P_AUTOEXP_SKIP_T   88
#define P_HISTWND_WIDTH   89
 same as written to the FPGA for the histogram window
#define P_HISTWND_HEIGHT   90
#define P_HISTWND_TOP   91
#define P_HISTWND_LEFT   92
#define P_FOCUS_SHOW   93
#define P_FOCUS_SHOW1   94
#define P_FOCUS_LEFT   96
#define P_FOCUS_WIDTH   97
#define P_FOCUS_TOP   98
#define P_FOCUS_HEIGHT   99
#define P_FOCUS_TOTWIDTH   100
#define P_FOCUS_FILTER   101
#define P_TRIG_CONDITION   102
 timing generator/trigger delay/external trigger control
#define P_TRIG_DELAY   103
#define P_TRIG_OUT   104
#define P_TRIG_PERIOD   105
#define P_SKIP_FRAMES   107
#define P_I2C_QPERIOD   108
#define P_I2C_BYTES   109
#define P_IRQ_SMART   110
#define P_EARLY_TIMESTAMP   111
 Currently bit 0 will be always 1 (needs fix in FPGA).
#define P_OVERSIZE   112
#define P_RFOCUS_LEFT   115
#define P_RFOCUS_WIDTH   116
#define P_RFOCUS_TOP   117
#define P_RFOCUS_HEIGHT   118
#define P_SDRAM_CHN20   125
#define P_SDRAM_CHN21   126
#define P_SDRAM_CHN22   127
#define P_GTAB_R   128
#define P_GTAB_G   129
#define P_GTAB_GB   130
#define P_GTAB_B   131
#define P_QUALITY   132
#define P_ACTUAL_WIDTH   133
#define P_ACTUAL_HEIGHT   134
#define P_COLOR   135
#define COLORMODE_MONO6   0
#define COLORMODE_COLOR   1
#define COLORMODE_JP46   2
#define COLORMODE_JP46DC   3
#define COLORMODE_COLOR20   4
#define COLORMODE_JP4   5
#define COLORMODE_JP4DC   6
#define COLORMODE_JP4DIFF   7
#define COLORMODE_JP4HDR   8
#define COLORMODE_JP4DIFF2   9
#define COLORMODE_JP4HDR2   10
#define COLORMODE_MONO4   14
#define P_FRAME   136
#define P_GAINR   137
#define P_GAING   138
#define P_GAINGB   139
#define P_GAINB   140
#define P_EXPOS   141
#define P_VEXPOS   142
#define P_FOCUS_VALUE   143
#define P_COMPMOD_BYRSH   160
 143 - last to copy
#define P_DAEMON_EN   165
#define P_AEXP_FRACPIX   166
#define P_AEXP_LEVEL   167
#define P_HDR_DUR   168
#define P_HDR_VEXPOS   169
#define P_AE_PERIOD   170
#define P_WB_PERIOD   171
#define P_WB_MASK   172
#define P_WB_WHITELEV   173
#define P_WB_WHITEFRAC   174
#define P_WB_SCALE_R   175
#define P_WB_SCALE_GB   176
#define P_WB_SCALE_B   177
#define P_EXP_AHEAD   178
#define P_AE_THRESH   179
#define P_WB_THRESH   180
#define P_GAIN_MIN   181
 Used by white balancing to control analog gains in addition to gamma tables. Can be limited to narrower range than.
#define P_GAIN_MAX   182
#define P_GAIN_CTRL   183
#define GAIN_BIT_STEP   0
#define GAIN_BIT_ENABLE   16
#define P_AUTOCAMPARS_CTRL   184
 Requests for autocampars daemon.
#define P_FTP_PERIOD   190
#define P_FTP_TIMEOUT   191
#define P_FTP_UPDATE   192
#define P_SENSOR_REGS   256
#define P_SENSOR_NUMREGS   256
#define P_MAX_PAR   511
#define P_MAX_GPAR   1023
#define PARS_SAVE_FROM   128
#define PARS_SAVE_COPY   16
#define PARS_SAVE_NUM   32
#define PP_PROFILE_START   16
#define P_PROFILE   (PARS_SAVE_FROM + PP_PROFILE_START)
#define FRAMEPAR_GLOBALS   0x01000
 TODO: Cahange global names P_* to G_* ?
#define GLOBALPARS(x)   globalPars[(x)-FRAMEPAR_GLOBALS]
#define G_DEBUG   (FRAMEPAR_GLOBALS + 2)
#define G_MAXAHEAD   (FRAMEPAR_GLOBALS + 3)
#define G_THIS_FRAME   (FRAMEPAR_GLOBALS + 4)
#define G_CIRCBUFSIZE   (FRAMEPAR_GLOBALS + 5)
#define G_FREECIRCBUF   (FRAMEPAR_GLOBALS + 6)
 the following 3 locations should be in the same 32-byte (8 long) cache line
#define G_CIRCBUFWP   (FRAMEPAR_GLOBALS + 7)
#define G_CIRCBUFRP   (FRAMEPAR_GLOBALS + 8)
#define G_SECONDS   (FRAMEPAR_GLOBALS + 9)
#define G_MICROSECONDS   (FRAMEPAR_GLOBALS + 10)
#define G_CALLNASAP   (FRAMEPAR_GLOBALS + 11)
 Next 5 should go in that sequence.
#define G_CALLNEXT   (FRAMEPAR_GLOBALS + 11)
#define G_NEXT_AE_FRAME   (FRAMEPAR_GLOBALS + 16)
 Leave 4 locations after for (G_CALLNEXT+1)...(G_CALLNEXT+4).
#define G_NEXT_WB_FRAME   (FRAMEPAR_GLOBALS + 17)
#define G_HIST_DIM_01   (FRAMEPAR_GLOBALS + 18)
#define G_HIST_DIM_23   (FRAMEPAR_GLOBALS + 19)
#define G_AE_INTEGERR   (FRAMEPAR_GLOBALS + 20)
 if [G_HIST_DIM_01] is set to 0xffffffff that will force re-calibration (1 dark frame)
#define G_WB_INTEGERR   (FRAMEPAR_GLOBALS + 21)
#define G_TASKLET_CTL   (FRAMEPAR_GLOBALS + 22)
#define G_GFOCUS_VALUE   (FRAMEPAR_GLOBALS + 23)
#define TASKLET_CTL_PGM   0
#define TASKLET_CTL_IGNPAST   1
#define TASKLET_CTL_NOSAME   2
#define TASKLET_CTL_ENPROF   3
#define TASKLET_HIST_ALL   0
 effects of uncertainty of when was it called relative to frame sync
#define TASKLET_HIST_HALF   1
#define TASKLET_HIST_QUATER   2
#define TASKLET_HIST_ONCE   3
#define TASKLET_HIST_RQONLY   4
#define TASKLET_HIST_NEVER   7
#define TASKLET_CTL_HISTY_BIT   4
#define TASKLET_CTL_HISTC_BIT   8
#define G_HIST_LAST_INDEX   (FRAMEPAR_GLOBALS + 24)
#define G_HIST_Y_FRAME   (FRAMEPAR_GLOBALS + 25)
#define G_HIST_C_FRAME   (FRAMEPAR_GLOBALS + 26)
#define G_SKIP_DIFF_FRAME   (FRAMEPAR_GLOBALS + 27)
#define G_FTP_NEXT_TIME   (FRAMEPAR_GLOBALS + 28)
#define G_DAEMON_ERR   (FRAMEPAR_GLOBALS + 31)
#define G_DAEMON_RETCODE   (FRAMEPAR_GLOBALS + 32)
#define FRAMEPAIR_FORCE_NEW   0x040000000
 Modifies to the parameter numbers/addresses.
#define FRAMEPAIR_FORCE_PROC   0x080000000
#define FRAMEPAIR_FORCE_NEWPROC   0x0c0000000
#define FRAMEPAIR_JUST_THIS   0x10000000
#define FRAMEPAIR_FRAME_FUNC   0x20000000
#define FRAMEPAIR_FRAME_BITS(w, b)   ((((w) & 0x1f)<<21) | (((b) & 0x1f)<<16))
 compose bit fields to be OR-ed to the parameter number bit 16..25: b - start bit (0..31), w - width 1..32
#define FRAMEPAIR_FRAME_MASK_NEW(a, od, nd)   ((((od) ^ ((nd) << (((a)>>16) & 0x1f))) & (((1 << (((a)>>21) & 0x1f))-1) << (((a)>>16) & 0x1f))) ^ (od))
 Shift new data (nd), apply mask and combine with old data (od), taking shift/width information from bits 16..25 of (a).
#define FRAMEPAIR_FRAME_FIELD(a, d)   (((d) >> (((a)>>16) & 0x1f)) & ((1 << (((a) >> 21) & 0x1f))-1))
 read bit field from the data (d), use bit information encoded in bits 16..25 of the parameter address (a)
#define FRAMEPAIR_MASK_BYTES   (FRAMEPAIR_FRAME_BITS(31,31))
#define FRAMEPAIR_BYTE0   (FRAMEPAIR_FRAME_BITS( 8, 0))
 NOTE: byte/word masks not to be OR-ed!
#define FRAMEPAIR_BYTE1   (FRAMEPAIR_FRAME_BITS( 8, 8))
#define FRAMEPAIR_BYTE2   (FRAMEPAIR_FRAME_BITS( 8, 16))
#define FRAMEPAIR_BYTE3   (FRAMEPAIR_FRAME_BITS( 8, 24))
#define FRAMEPAIR_WORD0   (FRAMEPAIR_FRAME_BITS(16, 0))
#define FRAMEPAIR_WORD1   (FRAMEPAIR_FRAME_BITS(16, 16))
#define DAEMON_BIT_AUTOEXPOSURE   0
#define DAEMON_BIT_STREAMER   1
#define DAEMON_BIT_CCAMFTP   2
#define DAEMON_BIT_CAMOGM   3
#define DAEMON_BIT_AUTOCAMPARS   4
#define P_DAEMON_EN_AUTOEXPOSURE   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_AUTOEXPOSURE))
#define P_DAEMON_EN_STREAMER   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_STREAMER))
#define P_DAEMON_EN_CCAMFTP   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_CCAMFTP))
#define P_DAEMON_EN_CAMOGM   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_CAMOGM))
#define P_DAEMON_EN_AUTOCAMPARS   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_AUTOCAMPARS))
#define P_GAIN_CTRL   183
#define P_GAIN_STEP   (P_GAIN_CTRL | FRAMEPAIR_FRAME_BITS(16, GAIN_BIT_STEP))
#define P_GAIN_ENABLE   (P_GAIN_CTRL | FRAMEPAIR_FRAME_BITS(1, GAIN_BIT_ENABLE))
#define HISTRQ_BIT_Y   0
#define HISTRQ_BIT_C   1
#define P_HISTRQ_Y   (P_HISTRQ | FRAMEPAIR_FRAME_BITS(1, HISTRQ_BIT_Y) | FRAMEPAIR_JUST_THIS)
#define P_HISTRQ_C   (P_HISTRQ | FRAMEPAIR_FRAME_BITS(1, HISTRQ_BIT_C) | FRAMEPAIR_JUST_THIS)
#define P_HISTRQ_YC   (P_HISTRQ | FRAMEPAIR_FRAME_BITS(2, HISTRQ_BIT_Y) | FRAMEPAIR_JUST_THIS)
#define G_HISTMODE_Y   (G_TASKLET_CTL | FRAMEPAIR_FRAME_BITS(3, TASKLET_CTL_HISTY_BIT))
#define G_HISTMODE_C   (G_TASKLET_CTL | FRAMEPAIR_FRAME_BITS(3, TASKLET_CTL_HISTC_BIT))
#define G_PROFILING_EN   (G_TASKLET_CTL | FRAMEPAIR_FRAME_BITS(1, TASKLET_CTL_ENPROF))
#define P_AUTOCAMPARS_GROUPS   (P_AUTOCAMPARS_CTRL | FRAMEPAIR_FRAME_BITS(24, 0))
#define P_AUTOCAMPARS_PAGE   (P_AUTOCAMPARS_CTRL | FRAMEPAIR_FRAME_BITS(4, 24))
#define P_AUTOCAMPARS_CMD   (P_AUTOCAMPARS_CTRL | FRAMEPAIR_FRAME_BITS(3, 28))
#define AUTOCAMPARS_CMD_RESTORE   1
 NOTE page 0 is write protected, page 15 (0x0f) is "default" page.
#define AUTOCAMPARS_CMD_SAVE   2
#define AUTOCAMPARS_CMD_DFLT   3
#define AUTOCAMPARS_CMD_SAVEDFLT   4
#define AUTOCAMPARS_CMD_INIT   5
#define HISTOGRAMS_WAKEUP_ALWAYS   0
 if defined 1 - will wakeup each frame, regardless of the availability of the histograms
#define PARS_FRAMES   8
#define PARS_FRAMES_MASK   (PARS_FRAMES-1)
#define PASTPARS_SAVE_ENTRIES   (PARS_FRAMES << 8)
#define PASTPARS_SAVE_ENTRIES_MASK   ((PARS_FRAMES << 8)-1)
#define ERR_FRAMEPARS_TOOEARLY   100
#define ERR_FRAMEPARS_TOOLATE   101
#define ERR_FRAMEPARS_BADINDEX   102
#define ERR_PGM_TRYAGAINLATER   103
#define FRAMEPARS_SETFRAME   0xff01
#define FRAMEPARS_SETFRAMEREL   0xff02
#define FRAMEPARS_SETLATENCY   0xff03
#define FRAMEPARS_SETFPGATIME   0xff04
#define FRAMEPARS_GETFPGATIME   0xff05
#define FRAME_DEAFAULT_AHEAD   3
#define P_AUTOEXP   P_AUTOEXP_ON
 for structure mapping:
#define P_AEXPWND   P_HISTWND_WIDTH
#define P_NAME_ENTRY(y)   { P_##y, #y }
#define G_NAME_ENTRY(y)   { G_##y, #y }
#define DEFINE_P_NAMES(x)
#define ONCHANGE_NAME_ENTRY(y)   { onchange_##y, #y }
#define DEFINE_ONCHANGE_NAMES(x)
#define ERR_I2C_SCL_ST0   1
#define ERR_I2C_SDA_ST0   2
#define ERR_I2C_SCL_ST1   4
#define ERR_I2C_SDA_ST1   8
#define ERR_I2C_SCL_NOPULLUP   16
#define ERR_I2C_SDA_NOPULLUP   32
#define ERR_I2C_NOTDETECTED   64
#define ERR_I2C_SHORT   128
#define ERR_I2C_BSY   256
#define ERR_I2C_NACK   512
#define IO_CCAM_SET_EXT_EXPOSURE   0x06
#define IO_CCAM_MONITOR_SEQ   0x07
#define IO_EXT_BOARD_PRESENT   0xF0
#define IO_CCAM_JPEG   0x08
 MOST ARE OBSOLETE - WILL REMOVE WHEN UPDATING STREAMERS.
#define JPEG_CMD_RESET   0x00
#define JPEG_CMD_GET   0x02
#define JPEG_CMD_FORGET   0x03
#define JPEG_CMD_CATCHUP   0x04
#define JPEG_CMD_ACQUIRE   0x05
#define JPEG_CMD_SAVE_RP   0x06
#define JPEG_CMD_RESTORE_RP   0x07
#define JPEG_CMD_N_DONE   0x08
#define JPEG_CMD_L_DONE   0x09
#define JPEG_CMD_START   0x0a
#define JPEG_CMD_STOP   0x0b
#define JPEG_CMD_FRAMES   0x0c
#define JPEG_CMD_JUST_STOP   0x0d
#define JPEG_CMD_DUMP   0x0f
#define JPEG_CMD_RESET0   0x10
#define LSEEK_GAMMA_INIT   1
 Compressor state now applies only to particular frame.
#define LSEEK_GAMMA_ISCURRENT   2
#define LSEEK_CIRC_TORP   1
#define LSEEK_CIRC_TOWP   2
#define LSEEK_CIRC_PREV   3
#define LSEEK_CIRC_NEXT   4
#define LSEEK_CIRC_LAST   5
#define LSEEK_CIRC_FIRST   6
#define LSEEK_CIRC_SCND   7
#define LSEEK_CIRC_SETP   8
#define LSEEK_CIRC_VALID   9
#define LSEEK_CIRC_READY   10
#define LSEEK_CIRC_WAIT   11
#define LSEEK_CIRC_FREE   12
#define LSEEK_CIRC_USED   13
#define LSEEK_HUFFMAN_DC0   1
#define LSEEK_HUFFMAN_AC0   2
#define LSEEK_HUFFMAN_DC1   3
#define LSEEK_HUFFMAN_AC1   4
#define LSEEK_HUFFMAN_FPGATAB   5
#define LSEEK_HUFFMAN_DEFAULT   6
#define LSEEK_HUFFMAN_FPGACALC   7
#define LSEEK_HUFFMAN_FPGAPGM   8
#define LSEEK_GET_FPGA_TIME   0x16
#define LSEEK_SET_FPGA_TIME   0x17
#define LSEEK_AUTOEXP_SET   0x19
#define LSEEK_AUTOEXP_GET   0x1a
#define LSEEK_TRIGGER_PGM   0x1b
#define LSEEK_I2C_PGM   0x1c
#define LSEEK_IRQ_SMART_PGM   0x1d
#define LSEEK_EARLY_TIMESTAMP_PGM   0x1e
#define LSEEK_DMA_INIT   0x1f
#define LSEEK_DMA_STOP   0x20
#define LSEEK_DMA_START   0x21
#define LSEEK_COMPRESSOR_RESET   0x22
#define LSEEK_INTERRUPT_OFF   0x23
#define LSEEK_INTERRUPT_ON   0x24
#define LSEEK_FRAMEPARS_INIT   0x25
#define LSEEK_SENSORPROC   0x26
#define LSEEK_FRAME_RESET   0x27
#define LSEEK_HIST_WAIT_Y   0x28
 Histograms related commands.
#define LSEEK_HIST_WAIT_C   0x29
#define LSEEK_HIST_REQ_EN   0x2a
#define LSEEK_HIST_REQ_DIS   0x2b
#define LSEEK_HIST_NEEDED   0x10000
#define LSEEK_DAEMON_FRAME   0x80
#define LSEEK_DAEMON_CIRCBUF   0xa0
#define LSEEK_DAEMON_HIST_Y   0xc0
#define LSEEK_DAEMON_HIST_C   0xe0
#define LSEEK_FRAME_WAIT_REL   0x100
#define LSEEK_FRAME_WAIT_ABS   0x200
#define LSEEK_FSDRAM_RESET   0x01
#define JPEG_CTRL_MONOCHROME   0x400
#define JPEG_CTRL_MONOCHROME_BLOCKED   0x1000
#define JPEG_CTRL_NOMOSAIC   0x1000
#define IO_CCAM_JPEG_QUALITY   0x09
#define IO_CCAM_JPEG_GET_N   0x0a
#define IO_CCAM_JPEG_GET_L   0x0b
#define IO_CCAM_JPEG_CTRL   0x0c
#define IO_CCAM_DMA   0x0d
#define CCAM_DMA_CMD_STOP   0x00
#define CCAM_DMA_CMD_START   0x01
#define IO_CCAM_CR_MODIFY   0x0e
#define IO_CCAM_CR_SHADOW   0x0f
#define IO_CCAM_PINS_WRITE   0x20
#define IO_CCAM_PINS_READ   0x21
#define LSEEK_NAME_ENTRY(y)   { LSEEK_##y, #y }
#define DEFINE_LSEEK_NAMES(x)
#define CCAM_BYTES_PER_CHUNK   (1<<16)
#define CCAM_DESCR_PER_CHUNK   1
#define CCAM_CHUNK_PER_DMABUF   302
#define CCAM_WORDS_PER_DMABUF   (CCAM_CHUNK_PER_DMABUF<<14)
#define CCAM_BYTES_PER_DMABUF   (CCAM_CHUNK_PER_DMABUF<<16)
#define CCAM_DMA_SIZE   CCAM_WORDS_PER_DMABUF
#define CCAM_MMAP_OFFSET_MMAP_HEADER   0
#define CCAM_MMAP_OFFSET_JPEG_HEADER   (PAGE_SIZE)
#define CCAM_MMAP_OFFSET_DMABUF   (4*PAGE_SIZE)
#define CCAM_MMAP_SIZE   (PAGE_SIZE*sizeof(long)+CCAM_BYTES_PER_DMABUF)
#define CCAM_MMAP_META   12
#define CCAM_MMAP_META_LENGTH   4
#define CCAM_MMAP_META_USEC   8
#define CCAM_MMAP_META_SEC   12
#define CX313_FPGA_TABLES_SIZE   0xC00
 Moved from cc353.c.
#define CX313_FPGA_TABLES_QUANT   0x0
#define CX313_FPGA_TABLES_HUFF   0x200
#define CX313_FPGA_TABLES_GAMMA   0x400
#define CX313_FPGA_TABLES_FOCUS   0x800
#define CX313_FPGA_TABLES_FOCUSPARS   0xbc0
#define SENSOR_NEED_RESET_CLK   1
#define SENSOR_NEED_RESET_PHASE   2
#define DEFAULT_COLOR_SATURATION_BLUE   0x90
#define DEFAULT_COLOR_SATURATION_RED   0xb6
#define EXPOSURE_UNIT   1
#define GAMMA_CACHE_NUMBER   256
 Gamma data for one component, including direct and reverse tables, hash (i.e. black level+gamma) and links for caching.
#define GAMMA_VALID_MASK   1
#define GAMMA_VALID_REVERSE   2
#define GAMMA_FPGA_MASK   4
#define GAMMA_MODE_NOT_NICE   1
#define GAMMA_MODE_NEED_REVERSE   2
#define GAMMA_MODE_HARDWARE   4
#define GAMMA_MODE_LOCK   8
#define GAMMA_SCALE_SHIFT   10
#define GAMMA_SCLALE_1   ( 1 << GAMMA_SCALE_SHIFT )
#define HISTOGRAM_CACHE_NUMBER   8
 histograms related structure
#define COLOR_RED   0
#define COLOR_GREEN1   1
#define COLOR_GREEN2   2
#define COLOR_BLUE   3
#define COLOR_Y_NUMBER   COLOR_GREEN1
#define CONST_NAME_ENTRY(y)   { y, #y }
 All other integer constants exported to PHP space (C:"CONSTANT" -> PHP:"ELPHEL_CONST_CONSTANT).
#define DEFINE_CONST_NAMES(x)

Enumerations

enum  onchange_functions_t {
  onchange_recalcseq = 0, onchange_detectsensor, onchange_sensorphase, onchange_i2c,
  onchange_sensorregs, onchange_initsensor, onchange_afterinit, onchange_window,
  onchange_window_safe, onchange_gains, onchange_triggermode, onchange_sensorin,
  onchange_sensorstop, onchange_sensorrun, onchange_gamma, onchange_hist,
  onchange_aexp, onchange_quality, onchange_memsensor, onchange_memcompressor,
  onchange_limitfps, onchange_exposure, onchange_compmode, onchange_focusmode,
  onchange_trigseq, onchange_irq, onchange_comprestart, onchange_compstop,
  onchange_compctl, onchange_gammaload, onchange_prescal
}
 TODO: onchange_exposure should be after onchange_limitfps. More...


Define Documentation

#define _CCCMD ( x,
 )     (_IO(CMOSCAM_IOCTYPE, (x << 6) | (y & 0x3f)))

Definition at line 139 of file c313a.h.

Referenced by grab_and_send(), jpeg_session_start(), main(), and write_sdp().

#define AUTOCAMPARS_CMD_DFLT   3

Definition at line 633 of file c313a.h.

#define AUTOCAMPARS_CMD_INIT   5

Definition at line 635 of file c313a.h.

#define AUTOCAMPARS_CMD_RESTORE   1

NOTE page 0 is write protected, page 15 (0x0f) is "default" page.

Definition at line 631 of file c313a.h.

#define AUTOCAMPARS_CMD_SAVE   2

Definition at line 632 of file c313a.h.

#define AUTOCAMPARS_CMD_SAVEDFLT   4

Definition at line 634 of file c313a.h.

#define CAMSEQ_ACQUIRE   5

Definition at line 57 of file c313a.h.

#define CAMSEQ_DONE   6

Definition at line 58 of file c313a.h.

#define CAMSEQ_JPEG   7

Definition at line 59 of file c313a.h.

Referenced by camogm_status().

#define CAMSEQ_OFF   0

Obsolete.

Definition at line 52 of file c313a.h.

Referenced by camogm_status().

#define CAMSEQ_READY   1

Definition at line 53 of file c313a.h.

#define CAMSEQ_RUN   8

Definition at line 61 of file c313a.h.

Referenced by camogm_status(), and grab_and_send().

#define CAMSEQ_SINGLE   10

Definition at line 63 of file c313a.h.

Referenced by camogm_status(), and grab_and_send().

#define CAMSEQ_SKIP   2

Definition at line 54 of file c313a.h.

#define CAMSEQ_STOP   9

Definition at line 62 of file c313a.h.

Referenced by camogm_status().

#define CAMSEQ_WAIT_F   3

Definition at line 55 of file c313a.h.

#define CAMSEQ_WAIT_T   4

Definition at line 56 of file c313a.h.

#define CCAM_ADDR ( x   )     (_IOC_NR(x) & 0x3f)

Definition at line 144 of file c313a.h.

#define CCAM_BYTES_PER_CHUNK   (1<<16)

Definition at line 1238 of file c313a.h.

#define CCAM_BYTES_PER_DMABUF   (CCAM_CHUNK_PER_DMABUF<<16)

Definition at line 1250 of file c313a.h.

#define CCAM_CHUNK_PER_DMABUF   302

Definition at line 1248 of file c313a.h.

#define CCAM_CTRL ( x   )     ((_IOC_NR(x) >> 6) & 0x03)

Definition at line 143 of file c313a.h.

#define CCAM_DESCR_PER_CHUNK   1

Definition at line 1239 of file c313a.h.

#define CCAM_DMA_CMD_START   0x01

Definition at line 1172 of file c313a.h.

#define CCAM_DMA_CMD_STOP   0x00

Definition at line 1171 of file c313a.h.

#define CCAM_DMA_SIZE   CCAM_WORDS_PER_DMABUF

Definition at line 1253 of file c313a.h.

Referenced by circbuf_lseek(), circbuf_open(), circbuf_read(), circbuf_write(), x313_dma_start(), and x313_setDMABuffer().

#define CCAM_MMAP_META   12

Definition at line 1263 of file c313a.h.

Referenced by camogm_start(), Video::capture(), main(), metaXML(), PHP_FUNCTION(), sendImageFrame(), and updateIRQ_interframe().

#define CCAM_MMAP_META_LENGTH   4

Definition at line 1264 of file c313a.h.

#define CCAM_MMAP_META_SEC   12

Definition at line 1266 of file c313a.h.

Referenced by camogm_start(), Video::capture(), metaXML(), PHP_FUNCTION(), and sendImageFrame().

#define CCAM_MMAP_META_USEC   8

Definition at line 1265 of file c313a.h.

#define CCAM_MMAP_OFFSET_DMABUF   (4*PAGE_SIZE)

Definition at line 1260 of file c313a.h.

#define CCAM_MMAP_OFFSET_JPEG_HEADER   (PAGE_SIZE)

Definition at line 1259 of file c313a.h.

#define CCAM_MMAP_OFFSET_MMAP_HEADER   0

Definition at line 1258 of file c313a.h.

#define CCAM_MMAP_SIZE   (PAGE_SIZE*sizeof(long)+CCAM_BYTES_PER_DMABUF)

Definition at line 1261 of file c313a.h.

#define CCAM_RPARS   2

Definition at line 147 of file c313a.h.

Referenced by grab_and_send(), jpeg_session_start(), and write_sdp().

#define CCAM_WORDS_PER_DMABUF   (CCAM_CHUNK_PER_DMABUF<<14)

Definition at line 1249 of file c313a.h.

#define CCAM_WPARS   3

Definition at line 148 of file c313a.h.

Referenced by main().

#define CMOSCAM_IOCTYPE   124

Definition at line 22 of file c313a.h.

#define COLOR_BLUE   3

Definition at line 1500 of file c313a.h.

#define COLOR_GREEN1   1

Definition at line 1498 of file c313a.h.

Referenced by whiteBalanceCorr().

#define COLOR_GREEN2   2

Definition at line 1499 of file c313a.h.

Referenced by whiteBalanceCorr().

#define COLOR_RED   0

Definition at line 1497 of file c313a.h.

#define COLOR_Y_NUMBER   COLOR_GREEN1

Definition at line 1503 of file c313a.h.

Referenced by get_histogram_index(), getPercentile(), main(), tasklet_fpga_function(), and whiteBalanceCorr().

#define COLORMODE_COLOR   1

Definition at line 409 of file c313a.h.

Referenced by jpegheader_create(), pgm_compmode(), and pgm_limitfps().

#define COLORMODE_COLOR20   4

Definition at line 412 of file c313a.h.

Referenced by jpegheader_create(), pgm_compmode(), and pgm_limitfps().

#define COLORMODE_JP4   5

Definition at line 413 of file c313a.h.

Referenced by jpegheader_create(), and pgm_compmode().

#define COLORMODE_JP46   2

Definition at line 410 of file c313a.h.

Referenced by jpegheader_create(), pgm_compmode(), and pgm_limitfps().

#define COLORMODE_JP46DC   3

Definition at line 411 of file c313a.h.

Referenced by jpegheader_create(), pgm_compmode(), and pgm_limitfps().

#define COLORMODE_JP4DC   6

Definition at line 414 of file c313a.h.

Referenced by jpegheader_create(), and pgm_compmode().

#define COLORMODE_JP4DIFF   7

Definition at line 415 of file c313a.h.

Referenced by jpegheader_create(), and pgm_compmode().

#define COLORMODE_JP4DIFF2   9

Definition at line 417 of file c313a.h.

Referenced by jpegheader_create(), and pgm_compmode().

#define COLORMODE_JP4HDR   8

Definition at line 416 of file c313a.h.

Referenced by jpegheader_create(), and pgm_compmode().

#define COLORMODE_JP4HDR2   10

Definition at line 418 of file c313a.h.

Referenced by jpegheader_create(), and pgm_compmode().

#define COLORMODE_MONO4   14

Definition at line 419 of file c313a.h.

Referenced by jpegheader_create(), pgm_compmode(), and pgm_window_common().

#define COLORMODE_MONO6   0

Definition at line 408 of file c313a.h.

Referenced by jpegheader_create(), pgm_compmode(), pgm_limitfps(), and pgm_window_common().

#define COMPRESSOR_RUN_CONT   2

Definition at line 235 of file c313a.h.

Referenced by pgm_compctl(), PHP_FUNCTION(), and Video::Start().

#define COMPRESSOR_RUN_SINGLE   1

Definition at line 234 of file c313a.h.

Referenced by pgm_compctl(), and PHP_FUNCTION().

#define COMPRESSOR_RUN_STOP   0

Definition at line 233 of file c313a.h.

Referenced by pgm_compctl(), PHP_FUNCTION(), and reset_compressor().

#define CONST_NAME_ENTRY (  )     { y, #y }

All other integer constants exported to PHP space (C:"CONSTANT" -> PHP:"ELPHEL_CONST_CONSTANT).

Definition at line 1571 of file c313a.h.

#define CX313_FPGA_TABLES_FOCUS   0x800

Definition at line 1273 of file c313a.h.

#define CX313_FPGA_TABLES_FOCUSPARS   0xbc0

Definition at line 1274 of file c313a.h.

Referenced by pgm_focusmode().

#define CX313_FPGA_TABLES_GAMMA   0x400

Definition at line 1272 of file c313a.h.

Referenced by pgm_gammaload().

#define CX313_FPGA_TABLES_HUFF   0x200

Definition at line 1271 of file c313a.h.

Referenced by jpeg_htable_fpga_pgm().

#define CX313_FPGA_TABLES_QUANT   0x0

Definition at line 1270 of file c313a.h.

Referenced by set_qtable_fpga().

#define CX313_FPGA_TABLES_SIZE   0xC00

Moved from cc353.c.

Definition at line 1269 of file c313a.h.

Referenced by fpga_io_table_lseek(), and fpga_io_table_write().

#define DAEMON_BIT_AUTOCAMPARS   4

Definition at line 594 of file c313a.h.

Referenced by main().

#define DAEMON_BIT_AUTOEXPOSURE   0

Definition at line 590 of file c313a.h.

Referenced by main().

#define DAEMON_BIT_CAMOGM   3

Definition at line 593 of file c313a.h.

#define DAEMON_BIT_CCAMFTP   2

Definition at line 592 of file c313a.h.

#define DAEMON_BIT_STREAMER   1

Definition at line 591 of file c313a.h.

#define DEFAULT_COLOR_SATURATION_BLUE   0x90

*************************************************************************************************** ! This is essential data related to the last frame aquired to be stored in the circular buffer before ! each frame received from the FPGA - place where FPGA data is padded by 32 bytes of 0. ! 6 bytes are already used by next frame pointer signature, so only 26 bytes are left ! Structure also includes 8 bytes of timestamp (after 2 bytes skipped) - they will be obtained from the circbuf data ! that goes after the encoded frame, so total is 36 bytes (26+2+8) !

Definition at line 1339 of file c313a.h.

#define DEFAULT_COLOR_SATURATION_RED   0xb6

Definition at line 1340 of file c313a.h.

#define DEFINE_CONST_NAMES ( x   ) 

Definition at line 1572 of file c313a.h.

Referenced by PHP_MINIT_FUNCTION().

#define DEFINE_LSEEK_NAMES ( x   ) 

Definition at line 1182 of file c313a.h.

Referenced by PHP_MINIT_FUNCTION().

#define DEFINE_ONCHANGE_NAMES ( x   ) 

Definition at line 1002 of file c313a.h.

Referenced by PHP_MINIT_FUNCTION().

#define DEFINE_P_NAMES ( x   ) 

Definition at line 804 of file c313a.h.

Referenced by PHP_MINIT_FUNCTION().

#define ELP_FERR ( x   )     fprintf(stderr,"%s:%d:%s: ERROR ",__FILE__,__LINE__,__FUNCTION__);x

Definition at line 15 of file c313a.h.

Referenced by exposureHDR(), get_imageParamsThat(), get_imageParamsThatValid(), getPercentile(), initFilesMmap(), main(), and whiteBalanceCorr().

#define ELP_KERR ( x   )     printk("%s:%d:%s: ERROR ",__FILE__,__LINE__,__FUNCTION__);x

Definition at line 14 of file c313a.h.

Referenced by get_histograms(), jpeg_prep_htable(), setFramePar(), setFramePars(), and setFrameParsAtomic().

#define ELPHEL_DEBUG   1

Definition at line 12 of file c313a.h.

#define ELPHEL_DEBUG_DELAY   100000

Definition at line 13 of file c313a.h.

Referenced by gammas_init().

#define ELPHEL_DEBUG_STARTUP   0 ;

Definition at line 11 of file c313a.h.

Referenced by initGlobalPars().

#define ERR_FRAMEPARS_BADINDEX   102

Definition at line 741 of file c313a.h.

Referenced by setFramePar(), setFramePars(), setFrameParsAtomic(), and setFrameParsStatic().

#define ERR_FRAMEPARS_TOOEARLY   100

Definition at line 739 of file c313a.h.

Referenced by setFramePar(), setFramePars(), and setFrameParsAtomic().

#define ERR_FRAMEPARS_TOOLATE   101

Definition at line 740 of file c313a.h.

Referenced by setFrameParsAtomic().

#define ERR_I2C_BSY   256

Definition at line 1049 of file c313a.h.

Referenced by fi2c_readData(), fi2c_writeData(), i2c_readData(), and i2c_writeData().

#define ERR_I2C_NACK   512

Definition at line 1050 of file c313a.h.

Referenced by fi2c_writeData(), and i2c_writeData().

#define ERR_I2C_NOTDETECTED   64

Definition at line 1047 of file c313a.h.

Referenced by xi2c_diagnose().

#define ERR_I2C_SCL_NOPULLUP   16

Definition at line 1043 of file c313a.h.

Referenced by xi2c_diagnose().

#define ERR_I2C_SCL_ST0   1

Definition at line 1039 of file c313a.h.

Referenced by xi2c_diagnose().

#define ERR_I2C_SCL_ST1   4

Definition at line 1041 of file c313a.h.

#define ERR_I2C_SDA_NOPULLUP   32

Definition at line 1044 of file c313a.h.

Referenced by xi2c_diagnose().

#define ERR_I2C_SDA_ST0   2

Definition at line 1040 of file c313a.h.

Referenced by i2c_start(), and xi2c_diagnose().

#define ERR_I2C_SDA_ST1   8

Definition at line 1042 of file c313a.h.

#define ERR_I2C_SHORT   128

Definition at line 1048 of file c313a.h.

Referenced by xi2c_diagnose().

#define ERR_PGM_TRYAGAINLATER   103

Definition at line 742 of file c313a.h.

Referenced by pgm_gamma().

#define ETRAXFS_MMAP_CACHE_BUG   y

Definition at line 18 of file c313a.h.

#define EXPOSURE_UNIT   1

Definition at line 1343 of file c313a.h.

#define FRAME_DEAFAULT_AHEAD   3

Definition at line 751 of file c313a.h.

Referenced by elphel_set_P_value_common(), and PHP_FUNCTION().

#define FRAMEPAIR_BYTE0   (FRAMEPAIR_FRAME_BITS( 8, 0))

NOTE: byte/word masks not to be OR-ed!

Definition at line 582 of file c313a.h.

#define FRAMEPAIR_BYTE1   (FRAMEPAIR_FRAME_BITS( 8, 8))

Definition at line 583 of file c313a.h.

#define FRAMEPAIR_BYTE2   (FRAMEPAIR_FRAME_BITS( 8, 16))

Definition at line 584 of file c313a.h.

#define FRAMEPAIR_BYTE3   (FRAMEPAIR_FRAME_BITS( 8, 24))

Definition at line 585 of file c313a.h.

#define FRAMEPAIR_FORCE_NEW   0x040000000

Modifies to the parameter numbers/addresses.

Definition at line 565 of file c313a.h.

Referenced by pgm_afterinit(), setFramePar(), setFramePars(), and setFrameParsAtomic().

#define FRAMEPAIR_FORCE_NEWPROC   0x0c0000000

Definition at line 567 of file c313a.h.

Referenced by PHP_FUNCTION().

#define FRAMEPAIR_FORCE_PROC   0x080000000

Definition at line 566 of file c313a.h.

Referenced by setFramePar(), and setFramePars().

#define FRAMEPAIR_FRAME_BITS ( w,
 )     ((((w) & 0x1f)<<21) | (((b) & 0x1f)<<16))

compose bit fields to be OR-ed to the parameter number bit 16..25: b - start bit (0..31), w - width 1..32

Definition at line 572 of file c313a.h.

Referenced by splitConstantName().

#define FRAMEPAIR_FRAME_FIELD ( a,
d   )     (((d) >> (((a)>>16) & 0x1f)) & ((1 << (((a) >> 21) & 0x1f))-1))

read bit field from the data (d), use bit information encoded in bits 16..25 of the parameter address (a)

Definition at line 577 of file c313a.h.

Referenced by PHP_FUNCTION().

#define FRAMEPAIR_FRAME_FUNC   0x20000000

Definition at line 570 of file c313a.h.

Referenced by setFramePar(), setFramePars(), and setFrameParsAtomic().

#define FRAMEPAIR_FRAME_MASK_NEW ( a,
od,
nd   )     ((((od) ^ ((nd) << (((a)>>16) & 0x1f))) & (((1 << (((a)>>21) & 0x1f))-1) << (((a)>>16) & 0x1f))) ^ (od))

Shift new data (nd), apply mask and combine with old data (od), taking shift/width information from bits 16..25 of (a).

Definition at line 574 of file c313a.h.

Referenced by setFramePar(), setFramePars(), and setFrameParsAtomic().

#define FRAMEPAIR_JUST_THIS   0x10000000

Definition at line 568 of file c313a.h.

Referenced by PHP_FUNCTION(), setFramePar(), setFramePars(), and setFrameParsAtomic().

#define FRAMEPAIR_MASK_BYTES   (FRAMEPAIR_FRAME_BITS(31,31))

Definition at line 579 of file c313a.h.

Referenced by PHP_FUNCTION(), setFramePar(), setFramePars(), and setFrameParsAtomic().

#define FRAMEPAIR_WORD0   (FRAMEPAIR_FRAME_BITS(16, 0))

Definition at line 586 of file c313a.h.

#define FRAMEPAIR_WORD1   (FRAMEPAIR_FRAME_BITS(16, 16))

Definition at line 587 of file c313a.h.

#define FRAMEPAR_GLOBALS   0x01000

TODO: Cahange global names P_* to G_* ?

Definition at line 497 of file c313a.h.

Referenced by elphel_set_P_value_common(), getGPValue(), Video::getGPValue(), PHP_FUNCTION(), setFramePar(), setFramePars(), and setFrameParsAtomic().

#define FRAMEPARS_GETFPGATIME   0xff05

Definition at line 749 of file c313a.h.

Referenced by framepars_write().

#define FRAMEPARS_SETFPGATIME   0xff04

Definition at line 748 of file c313a.h.

Referenced by framepars_write(), and PHP_FUNCTION().

#define FRAMEPARS_SETFRAME   0xff01

Definition at line 745 of file c313a.h.

Referenced by aexpCorr(), elphel_set_P_value_common(), exposureHDR(), Video::fps(), framepars_write(), PHP_FUNCTION(), recalibrateDim(), Video::Start(), waitRequstPrevHist(), and whiteBalanceCorr().

#define FRAMEPARS_SETFRAMEREL   0xff02

Definition at line 746 of file c313a.h.

Referenced by framepars_write(), and main().

#define FRAMEPARS_SETLATENCY   0xff03

Definition at line 747 of file c313a.h.

Referenced by framepars_write().

#define G_AE_INTEGERR   (FRAMEPAR_GLOBALS + 20)

if [G_HIST_DIM_01] is set to 0xffffffff that will force re-calibration (1 dark frame)

Definition at line 529 of file c313a.h.

Referenced by aexpCorr(), initParams(), and main().

#define G_CALLNASAP   (FRAMEPAR_GLOBALS + 11)

Next 5 should go in that sequence.

Definition at line 515 of file c313a.h.

Referenced by pgm_recalcseq(), processParsASAP(), and processParsSeq().

#define G_CALLNEXT   (FRAMEPAR_GLOBALS + 11)

Definition at line 516 of file c313a.h.

Referenced by pgm_recalcseq().

#define G_CIRCBUFRP   (FRAMEPAR_GLOBALS + 8)

Definition at line 509 of file c313a.h.

Referenced by camSeqSetJPEG_rp(), main(), and updateIRQCircbuf().

#define G_CIRCBUFSIZE   (FRAMEPAR_GLOBALS + 5)

Definition at line 505 of file c313a.h.

Referenced by camogm_status(), camSeqSetJPEG_rp(), framePointersXML(), main(), updateIRQ_Exif(), updateIRQ_interframe(), updateIRQCircbuf(), updateIRQJPEG_wp(), and x313_setDMABuffer().

#define G_CIRCBUFWP   (FRAMEPAR_GLOBALS + 7)

Definition at line 508 of file c313a.h.

Referenced by camSeqSetJPEG_rp(), grab_and_send(), main(), and updateIRQCircbuf().

#define G_DAEMON_ERR   (FRAMEPAR_GLOBALS + 31)

Definition at line 558 of file c313a.h.

#define G_DAEMON_RETCODE   (FRAMEPAR_GLOBALS + 32)

Definition at line 559 of file c313a.h.

#define G_DEBUG   (FRAMEPAR_GLOBALS + 2)

Definition at line 502 of file c313a.h.

Referenced by initGlobalPars(), and main().

#define G_FREECIRCBUF   (FRAMEPAR_GLOBALS + 6)

the following 3 locations should be in the same 32-byte (8 long) cache line

Definition at line 507 of file c313a.h.

Referenced by camogm_start(), camogm_status(), camSeqSetJPEG_rp(), framePointersXML(), main(), and updateIRQCircbuf().

#define G_FTP_NEXT_TIME   (FRAMEPAR_GLOBALS + 28)

Definition at line 556 of file c313a.h.

#define G_GFOCUS_VALUE   (FRAMEPAR_GLOBALS + 23)

Definition at line 533 of file c313a.h.

Referenced by updateIRQFocus().

#define G_HIST_C_FRAME   (FRAMEPAR_GLOBALS + 26)

Definition at line 554 of file c313a.h.

Referenced by histograms_lseek().

#define G_HIST_DIM_01   (FRAMEPAR_GLOBALS + 18)

Definition at line 525 of file c313a.h.

Referenced by aexpCorr(), initParams(), main(), and recalibrateDim().

#define G_HIST_DIM_23   (FRAMEPAR_GLOBALS + 19)

Definition at line 526 of file c313a.h.

Referenced by aexpCorr(), initParams(), main(), and recalibrateDim().

#define G_HIST_LAST_INDEX   (FRAMEPAR_GLOBALS + 24)

Definition at line 552 of file c313a.h.

Referenced by get_histograms(), and set_histograms().

#define G_HIST_Y_FRAME   (FRAMEPAR_GLOBALS + 25)

Definition at line 553 of file c313a.h.

Referenced by histograms_lseek(), and tasklet_fpga_function().

#define G_HISTMODE_C   (G_TASKLET_CTL | FRAMEPAIR_FRAME_BITS(3, TASKLET_CTL_HISTC_BIT))

Definition at line 620 of file c313a.h.

#define G_HISTMODE_Y   (G_TASKLET_CTL | FRAMEPAIR_FRAME_BITS(3, TASKLET_CTL_HISTY_BIT))

Definition at line 619 of file c313a.h.

#define G_MAXAHEAD   (FRAMEPAR_GLOBALS + 3)

Definition at line 503 of file c313a.h.

#define G_MICROSECONDS   (FRAMEPAR_GLOBALS + 10)

Definition at line 512 of file c313a.h.

Referenced by framepars_lseek(), framepars_write(), and PHP_FUNCTION().

#define G_NAME_ENTRY (  )     { G_##y, #y }

Definition at line 803 of file c313a.h.

#define G_NEXT_AE_FRAME   (FRAMEPAR_GLOBALS + 16)

Leave 4 locations after for (G_CALLNEXT+1)...(G_CALLNEXT+4).

Definition at line 523 of file c313a.h.

Referenced by aexpCorr(), initAexpCorr(), and main().

#define G_NEXT_WB_FRAME   (FRAMEPAR_GLOBALS + 17)

Definition at line 524 of file c313a.h.

Referenced by initWhiteBalanceCorr(), and whiteBalanceCorr().

#define G_PROFILING_EN   (G_TASKLET_CTL | FRAMEPAIR_FRAME_BITS(1, TASKLET_CTL_ENPROF))

Definition at line 622 of file c313a.h.

#define G_SECONDS   (FRAMEPAR_GLOBALS + 9)

Definition at line 511 of file c313a.h.

Referenced by framepars_lseek(), framepars_write(), and PHP_FUNCTION().

#define G_SKIP_DIFF_FRAME   (FRAMEPAR_GLOBALS + 27)

Definition at line 555 of file c313a.h.

Referenced by Video::capture().

#define G_TASKLET_CTL   (FRAMEPAR_GLOBALS + 22)

Definition at line 532 of file c313a.h.

Referenced by setFrameParsAtomic(), tasklet_fpga_function(), and updateFramePars().

#define G_THIS_FRAME   (FRAMEPAR_GLOBALS + 4)

Definition at line 504 of file c313a.h.

Referenced by elphel_set_P_value_common(), getGPValue(), getPercentile(), initParams(), isDaemonEnabled(), main(), PHP_FUNCTION(), recalibrateDim(), Video::Video(), waitDaemonEnabled(), and waitRequstPrevHist().

#define G_WB_INTEGERR   (FRAMEPAR_GLOBALS + 21)

Definition at line 530 of file c313a.h.

Referenced by initParams(), and whiteBalanceCorr().

#define GAIN_BIT_ENABLE   16

Definition at line 471 of file c313a.h.

Referenced by whiteBalanceCorr().

#define GAIN_BIT_STEP   0

Definition at line 470 of file c313a.h.

#define GAMMA_CACHE_NUMBER   256

Gamma data for one component, including direct and reverse tables, hash (i.e. black level+gamma) and links for caching.

Definition at line 1410 of file c313a.h.

Referenced by gammas_lseek(), init_gammas(), initFilesMmap(), php_elphel_init_globals(), and PHP_FUNCTION().

#define GAMMA_FPGA_MASK   4

Definition at line 1413 of file c313a.h.

Referenced by set_gamma_table().

#define GAMMA_MODE_HARDWARE   4

Definition at line 1419 of file c313a.h.

Referenced by pgm_gamma(), pgm_gammaload(), and set_gamma_table().

#define GAMMA_MODE_LOCK   8

Definition at line 1420 of file c313a.h.

Referenced by pgm_gammaload(), and set_gamma_table().

#define GAMMA_MODE_NEED_REVERSE   2

Definition at line 1418 of file c313a.h.

Referenced by getPercentile(), PHP_FUNCTION(), and set_gamma_table().

#define GAMMA_MODE_NOT_NICE   1

Definition at line 1417 of file c313a.h.

Referenced by set_gamma_table().

#define GAMMA_SCALE_SHIFT   10

Definition at line 1422 of file c313a.h.

Referenced by gamma_calc_scaled(), and whiteBalanceCorr().

#define GAMMA_SCLALE_1   ( 1 << GAMMA_SCALE_SHIFT )

Definition at line 1423 of file c313a.h.

Referenced by gammas_init(), and PHP_FUNCTION().

#define GAMMA_VALID_MASK   1

Definition at line 1411 of file c313a.h.

Referenced by set_gamma_table().

#define GAMMA_VALID_REVERSE   2

Definition at line 1412 of file c313a.h.

Referenced by set_gamma_table().

#define GLOBALPARS ( x   )     globalPars[(x)-FRAMEPAR_GLOBALS]

Definition at line 500 of file c313a.h.

Referenced by aexpCorr(), Video::capture(), Video::fps(), framepars_lseek(), framepars_write(), framePointersXML(), get_globalParam(), get_histograms(), getGPValue(), Video::getGPValue(), getPercentile(), histograms_lseek(), initAexpCorr(), initGlobalPars(), initParams(), initWhiteBalanceCorr(), isDaemonEnabled(), Video::isDaemonEnabled(), main(), pgm_recalcseq(), processParsASAP(), processParsSeq(), recalibrateDim(), set_globalParam(), set_histograms(), setFramePar(), setFramePars(), setFrameParsAtomic(), setGValue(), Video::setGValue(), Video::Start(), tasklet_fpga_function(), Video::Video(), waitDaemonEnabled(), Video::waitDaemonEnabled(), waitRequstPrevHist(), and whiteBalanceCorr().

#define HISTOGRAM_CACHE_NUMBER   8

histograms related structure

Definition at line 1496 of file c313a.h.

Referenced by get_histograms(), init_histograms(), initFilesMmap(), main(), php_elphel_init_globals(), PHP_FUNCTION(), and set_histograms().

#define HISTOGRAMS_WAKEUP_ALWAYS   0

if defined 1 - will wakeup each frame, regardless of the availability of the histograms

Definition at line 640 of file c313a.h.

#define HISTRQ_BIT_C   1

Definition at line 613 of file c313a.h.

#define HISTRQ_BIT_Y   0

Definition at line 612 of file c313a.h.

Referenced by tasklet_fpga_function().

#define I2C_16_ARGREG ( arg   )     (((arg) >> 16) & 0xff)

Definition at line 129 of file c313a.h.

Referenced by i2c_ioctl().

#define I2C_16_ARGSLAVE ( arg   )     (((arg) >> 24) & 0xff)

Definition at line 128 of file c313a.h.

Referenced by i2c_ioctl().

#define I2C_16_ARGVALUE ( arg   )     ( (arg) & 0xffff)

Definition at line 130 of file c313a.h.

Referenced by i2c_ioctl().

#define I2C_16_ARGVALUE_H ( arg   )     (((arg) >> 8) & 0xff)

Definition at line 131 of file c313a.h.

Referenced by i2c_ioctl().

#define I2C_16_ARGVALUE_L ( arg   )     ( (arg) & 0xff)

Definition at line 132 of file c313a.h.

Referenced by i2c_ioctl().

#define I2C_16_READARG ( slave,
reg   )     (((slave) << 24) | ((reg) << 16))

Definition at line 126 of file c313a.h.

#define I2C_16_READREG   0x4

Definition at line 123 of file c313a.h.

Referenced by i2c_ioctl().

#define I2C_16_WRITEARG ( slave,
reg,
value   )     (((slave) << 24) | ((reg) << 16) | (value))

Definition at line 125 of file c313a.h.

#define I2C_16_WRITEREG   0x3

Definition at line 122 of file c313a.h.

Referenced by i2c_ioctl().

#define I2C_ARGBUS ( arg   )     (((arg) >> 24) & 0x1)

Definition at line 104 of file c313a.h.

Referenced by i2c_ioctl().

#define I2C_ARGREG ( arg   )     (((arg) >> 8) & 0xff)

Definition at line 106 of file c313a.h.

Referenced by fi2c_ioctl(), and i2c_ioctl().

#define I2C_ARGSLAVE ( arg   )     (((arg) >> 16) & 0xff)

Definition at line 105 of file c313a.h.

Referenced by fi2c_ioctl(), and i2c_ioctl().

#define I2C_ARGVALUE ( arg   )     ((arg) & 0xff)

Definition at line 107 of file c313a.h.

Referenced by fi2c_ioctl(), and i2c_ioctl().

#define I2C_DELAYS   0x0

Definition at line 109 of file c313a.h.

Referenced by i2c_ioctl().

#define I2C_READARG ( bus,
slave,
reg   )     (((bus) << 24) | ((slave) << 16) | ((reg) << 8))

Definition at line 102 of file c313a.h.

Referenced by main().

#define I2C_READREG   0x2

Definition at line 117 of file c313a.h.

Referenced by fi2c_ioctl(), and i2c_ioctl().

#define I2C_WRITEARG ( bus,
slave,
reg,
value   )     (((bus) << 24) | ((slave) << 16) | ((reg) << 8) | (value))

Definition at line 101 of file c313a.h.

Referenced by main().

#define I2C_WRITEREG   0x1

Definition at line 116 of file c313a.h.

Referenced by fi2c_ioctl(), and i2c_ioctl().

#define IO_CCAM_CR_MODIFY   0x0e

Definition at line 1174 of file c313a.h.

#define IO_CCAM_CR_SHADOW   0x0f

Definition at line 1175 of file c313a.h.

#define IO_CCAM_DMA   0x0d

Definition at line 1170 of file c313a.h.

Referenced by main().

#define IO_CCAM_JPEG   0x08

MOST ARE OBSOLETE - WILL REMOVE WHEN UPDATING STREAMERS.

Definition at line 1066 of file c313a.h.

#define IO_CCAM_JPEG_CTRL   0x0c

Definition at line 1169 of file c313a.h.

Referenced by main().

#define IO_CCAM_JPEG_GET_L   0x0b

Definition at line 1167 of file c313a.h.

Referenced by main().

#define IO_CCAM_JPEG_GET_N   0x0a

Definition at line 1166 of file c313a.h.

Referenced by main().

#define IO_CCAM_JPEG_QUALITY   0x09

Definition at line 1164 of file c313a.h.

#define IO_CCAM_MONITOR_SEQ   0x07

Definition at line 1056 of file c313a.h.

Referenced by grab_and_send().

#define IO_CCAM_PINS_READ   0x21

Definition at line 1178 of file c313a.h.

#define IO_CCAM_PINS_WRITE   0x20

Definition at line 1177 of file c313a.h.

#define IO_CCAM_SET_EXT_EXPOSURE   0x06

Definition at line 1055 of file c313a.h.

#define IO_EXT_BOARD_PRESENT   0xF0

Definition at line 1059 of file c313a.h.

Referenced by i2c_ioctl().

#define JPEG_CMD_ACQUIRE   0x05

Definition at line 1073 of file c313a.h.

Referenced by grab_and_send().

#define JPEG_CMD_CATCHUP   0x04

Definition at line 1072 of file c313a.h.

Referenced by grab_and_send().

#define JPEG_CMD_DUMP   0x0f

Definition at line 1082 of file c313a.h.

#define JPEG_CMD_FORGET   0x03

Definition at line 1071 of file c313a.h.

Referenced by grab_and_send().

#define JPEG_CMD_FRAMES   0x0c

Definition at line 1080 of file c313a.h.

#define JPEG_CMD_GET   0x02

Definition at line 1070 of file c313a.h.

#define JPEG_CMD_JUST_STOP   0x0d

Definition at line 1081 of file c313a.h.

#define JPEG_CMD_L_DONE   0x09

Definition at line 1077 of file c313a.h.

#define JPEG_CMD_N_DONE   0x08

Definition at line 1076 of file c313a.h.

#define JPEG_CMD_RESET   0x00

Definition at line 1068 of file c313a.h.

#define JPEG_CMD_RESET0   0x10

Definition at line 1083 of file c313a.h.

#define JPEG_CMD_RESTORE_RP   0x07

Definition at line 1075 of file c313a.h.

#define JPEG_CMD_SAVE_RP   0x06

Definition at line 1074 of file c313a.h.

#define JPEG_CMD_START   0x0a

Definition at line 1078 of file c313a.h.

Referenced by grab_and_send().

#define JPEG_CMD_STOP   0x0b

Definition at line 1079 of file c313a.h.

Referenced by grab_and_send().

#define JPEG_CTRL_MONOCHROME   0x400

Definition at line 1160 of file c313a.h.

#define JPEG_CTRL_MONOCHROME_BLOCKED   0x1000

Definition at line 1161 of file c313a.h.

#define JPEG_CTRL_NOMOSAIC   0x1000

Definition at line 1162 of file c313a.h.

#define LSEEK_AUTOEXP_GET   0x1a

Definition at line 1124 of file c313a.h.

#define LSEEK_AUTOEXP_SET   0x19

Definition at line 1123 of file c313a.h.

#define LSEEK_CIRC_FIRST   6

Definition at line 1098 of file c313a.h.

Referenced by circbuf_lseek(), listener_loop(), main(), and PHP_FUNCTION().

#define LSEEK_CIRC_FREE   12

Definition at line 1104 of file c313a.h.

Referenced by circbuf_lseek(), and framePointersXML().

#define LSEEK_CIRC_LAST   5

Definition at line 1097 of file c313a.h.

Referenced by camogm_start(), circbuf_lseek(), Video::getFramePars(), and listener_loop().

#define LSEEK_CIRC_NEXT   4

Definition at line 1096 of file c313a.h.

Referenced by camogm_start(), circbuf_lseek(), Video::getFramePars(), listener_loop(), PHP_FUNCTION(), and sendImageFrame().

#define LSEEK_CIRC_PREV   3

Definition at line 1095 of file c313a.h.

Referenced by camogm_start(), circbuf_lseek(), framePointersXML(), Video::getFramePars(), and listener_loop().

#define LSEEK_CIRC_READY   10

Definition at line 1102 of file c313a.h.

Referenced by camogm_start(), circbuf_lseek(), listener_loop(), PHP_FUNCTION(), and sendImageFrame().

#define LSEEK_CIRC_SCND   7

Definition at line 1099 of file c313a.h.

Referenced by circbuf_lseek(), listener_loop(), and PHP_FUNCTION().

#define LSEEK_CIRC_SETP   8

Definition at line 1100 of file c313a.h.

Referenced by circbuf_lseek(), listener_loop(), and sendImageFrame().

#define LSEEK_CIRC_TORP   1

Definition at line 1093 of file c313a.h.

Referenced by circbuf_lseek(), framePointersXML(), listener_loop(), and main().

#define LSEEK_CIRC_TOWP   2

Definition at line 1094 of file c313a.h.

Referenced by Video::capture(), circbuf_lseek(), framePointersXML(), listener_loop(), PHP_FUNCTION(), and Video::Video().

#define LSEEK_CIRC_USED   13

Definition at line 1105 of file c313a.h.

Referenced by circbuf_lseek(), and framePointersXML().

#define LSEEK_CIRC_VALID   9

Definition at line 1101 of file c313a.h.

Referenced by camogm_start(), circbuf_lseek(), Video::getFramePars(), and listener_loop().

#define LSEEK_CIRC_WAIT   11

Definition at line 1103 of file c313a.h.

Referenced by Video::capture(), circbuf_lseek(), Video::getFramePars(), listener_loop(), main(), PHP_FUNCTION(), and Video::Video().

#define LSEEK_COMPRESSOR_RESET   0x22

Definition at line 1132 of file c313a.h.

Referenced by framepars_lseek().

#define LSEEK_DAEMON_CIRCBUF   0xa0

Definition at line 1150 of file c313a.h.

Referenced by circbuf_lseek(), waitDaemonEnabled(), and Video::waitDaemonEnabled().

#define LSEEK_DAEMON_FRAME   0x80

Definition at line 1149 of file c313a.h.

Referenced by framepars_lseek(), and main().

#define LSEEK_DAEMON_HIST_C   0xe0

Definition at line 1152 of file c313a.h.

Referenced by histograms_lseek().

#define LSEEK_DAEMON_HIST_Y   0xc0

Definition at line 1151 of file c313a.h.

Referenced by histograms_lseek(), initParams(), and main().

#define LSEEK_DMA_INIT   0x1f

Definition at line 1129 of file c313a.h.

Referenced by framepars_lseek().

#define LSEEK_DMA_START   0x21

Definition at line 1131 of file c313a.h.

Referenced by framepars_lseek().

#define LSEEK_DMA_STOP   0x20

Definition at line 1130 of file c313a.h.

Referenced by framepars_lseek().

#define LSEEK_EARLY_TIMESTAMP_PGM   0x1e

Definition at line 1128 of file c313a.h.

#define LSEEK_FRAME_RESET   0x27

Definition at line 1139 of file c313a.h.

Referenced by framepars_lseek().

#define LSEEK_FRAME_WAIT_ABS   0x200

Definition at line 1156 of file c313a.h.

Referenced by aexpCorr(), exposureHDR(), Video::fps(), framepars_lseek(), main(), PHP_FUNCTION(), waitRequstPrevHist(), and whiteBalanceCorr().

#define LSEEK_FRAME_WAIT_REL   0x100

Definition at line 1155 of file c313a.h.

Referenced by framepars_lseek(), and main().

#define LSEEK_FRAMEPARS_INIT   0x25

Definition at line 1136 of file c313a.h.

Referenced by framepars_lseek(), and PHP_FUNCTION().

#define LSEEK_FSDRAM_RESET   0x01

Definition at line 1158 of file c313a.h.

#define LSEEK_GAMMA_INIT   1

Compressor state now applies only to particular frame.

Definition at line 1089 of file c313a.h.

Referenced by gammas_lseek().

#define LSEEK_GAMMA_ISCURRENT   2

Definition at line 1090 of file c313a.h.

Referenced by gammas_lseek(), and PHP_FUNCTION().

#define LSEEK_GET_FPGA_TIME   0x16

Definition at line 1119 of file c313a.h.

Referenced by framepars_lseek(), and PHP_FUNCTION().

#define LSEEK_HIST_NEEDED   0x10000

Definition at line 1146 of file c313a.h.

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

#define LSEEK_HIST_REQ_DIS   0x2b

Definition at line 1145 of file c313a.h.

Referenced by histograms_lseek(), and main().

#define LSEEK_HIST_REQ_EN   0x2a

Definition at line 1144 of file c313a.h.

Referenced by histograms_lseek(), and main().

#define LSEEK_HIST_WAIT_C   0x29

Definition at line 1143 of file c313a.h.

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

#define LSEEK_HIST_WAIT_Y   0x28

Histograms related commands.

Definition at line 1142 of file c313a.h.

Referenced by get_histogram_index(), getPercentile(), histograms_lseek(), and skipHDR().

#define LSEEK_HUFFMAN_AC0   2

Definition at line 1108 of file c313a.h.

Referenced by huffman_lseek().

#define LSEEK_HUFFMAN_AC1   4

Definition at line 1110 of file c313a.h.

Referenced by huffman_lseek().

#define LSEEK_HUFFMAN_DC0   1

Definition at line 1107 of file c313a.h.

Referenced by huffman_lseek().

#define LSEEK_HUFFMAN_DC1   3

Definition at line 1109 of file c313a.h.

Referenced by huffman_lseek().

#define LSEEK_HUFFMAN_DEFAULT   6

Definition at line 1112 of file c313a.h.

Referenced by huffman_lseek().

#define LSEEK_HUFFMAN_FPGACALC   7

Definition at line 1113 of file c313a.h.

Referenced by huffman_lseek().

#define LSEEK_HUFFMAN_FPGAPGM   8

Definition at line 1114 of file c313a.h.

Referenced by huffman_lseek().

#define LSEEK_HUFFMAN_FPGATAB   5

Definition at line 1111 of file c313a.h.

Referenced by huffman_lseek().

#define LSEEK_I2C_PGM   0x1c

Definition at line 1126 of file c313a.h.

#define LSEEK_INTERRUPT_OFF   0x23

Definition at line 1133 of file c313a.h.

Referenced by framepars_lseek().

#define LSEEK_INTERRUPT_ON   0x24

Definition at line 1134 of file c313a.h.

Referenced by framepars_lseek().

#define LSEEK_IRQ_SMART_PGM   0x1d

Definition at line 1127 of file c313a.h.

#define LSEEK_NAME_ENTRY (  )     { LSEEK_##y, #y }

Definition at line 1181 of file c313a.h.

#define LSEEK_SENSORPROC   0x26

Definition at line 1137 of file c313a.h.

Referenced by framepars_lseek().

#define LSEEK_SET_FPGA_TIME   0x17

Definition at line 1120 of file c313a.h.

Referenced by framepars_lseek().

#define LSEEK_TRIGGER_PGM   0x1b

Definition at line 1125 of file c313a.h.

#define MCP_R_size   256

Definition at line 71 of file c313a.h.

#define MCP_W_size   1024

Definition at line 70 of file c313a.h.

#define MCPctlgate   0x04

Definition at line 82 of file c313a.h.

#define MCPctlseq   0x00

Definition at line 79 of file c313a.h.

#define MCPctlsync   0x0e

Definition at line 91 of file c313a.h.

#define MCPeackn   0x03

Definition at line 81 of file c313a.h.

#define MCPNoReset   0x00105800

Definition at line 76 of file c313a.h.

#define MCPOffReset   0x00101800

Definition at line 74 of file c313a.h.

#define MCPOtherBits   0xffa7a7ff

Definition at line 73 of file c313a.h.

#define MCPReset   0x00001800

Definition at line 75 of file c313a.h.

#define MCPsofttg   0x02

Definition at line 80 of file c313a.h.

#define MCPToggleA   0x00080000

Definition at line 77 of file c313a.h.

#define MCPToggleB   0x00001000

Definition at line 78 of file c313a.h.

#define MCPwdenom   0x0b

Definition at line 88 of file c313a.h.

#define MCPwinv   0x40

Definition at line 93 of file c313a.h.

#define MCPwinvctl   0x0d

Definition at line 90 of file c313a.h.

#define MCPwnom   0x0a

Definition at line 87 of file c313a.h.

#define MCPwoutw   0x0c

Definition at line 89 of file c313a.h.

#define MCPwrdlys   0x10

Definition at line 92 of file c313a.h.

#define MCPwrmons   0x09

Definition at line 86 of file c313a.h.

#define MCPwrseq   0x200

Definition at line 96 of file c313a.h.

#define MCPwrsmsk   0x07

Definition at line 84 of file c313a.h.

#define MCPwrsup   0x08

Definition at line 85 of file c313a.h.

#define MCPwrsynctb   0x100

Definition at line 95 of file c313a.h.

#define MCPwshared   0x80

Definition at line 94 of file c313a.h.

#define MCPwstdly   0x06

Definition at line 83 of file c313a.h.

#define ONCHANGE_NAME_ENTRY (  )     { onchange_##y, #y }

Definition at line 1001 of file c313a.h.

#define P_ACTUAL_HEIGHT   134

Definition at line 406 of file c313a.h.

Referenced by grab_and_send(), pgm_focusmode(), pgm_hist(), pgm_memcompressor(), pgm_memsensor(), pgm_sensorin(), pgm_window_common(), updateFramePars(), and write_sdp().

#define P_ACTUAL_WIDTH   133

Definition at line 405 of file c313a.h.

Referenced by grab_and_send(), pgm_focusmode(), pgm_hist(), pgm_memcompressor(), pgm_memsensor(), pgm_window_common(), and write_sdp().

#define P_AE_PERIOD   170

Definition at line 451 of file c313a.h.

Referenced by aexpCorr().

#define P_AE_THRESH   179

Definition at line 463 of file c313a.h.

Referenced by aexpCorr().

#define P_AEXP_FRACPIX   166

Definition at line 445 of file c313a.h.

Referenced by aexpCorr(), createDefaultConfig(), and recalibrateDim().

#define P_AEXP_LEVEL   167

Definition at line 446 of file c313a.h.

Referenced by aexpCorr(), and createDefaultConfig().

#define P_AEXPWND   P_HISTWND_WIDTH

Definition at line 756 of file c313a.h.

#define P_AUTOCAMPARS_CMD   (P_AUTOCAMPARS_CTRL | FRAMEPAIR_FRAME_BITS(3, 28))

Definition at line 628 of file c313a.h.

#define P_AUTOCAMPARS_CTRL   184

Requests for autocampars daemon.

Definition at line 474 of file c313a.h.

#define P_AUTOCAMPARS_GROUPS   (P_AUTOCAMPARS_CTRL | FRAMEPAIR_FRAME_BITS(24, 0))

Definition at line 626 of file c313a.h.

#define P_AUTOCAMPARS_PAGE   (P_AUTOCAMPARS_CTRL | FRAMEPAIR_FRAME_BITS(4, 24))

Definition at line 627 of file c313a.h.

#define P_AUTOEXP   P_AUTOEXP_ON

for structure mapping:

Definition at line 755 of file c313a.h.

#define P_AUTOEXP_EXP   85

Definition at line 347 of file c313a.h.

#define P_AUTOEXP_EXP_MAX   81

Are these used anywhere now? ...P_AUTOEXP_SKIP_T.

Definition at line 343 of file c313a.h.

Referenced by aexpCorr().

#define P_AUTOEXP_ON   76

Definition at line 334 of file c313a.h.

Referenced by aexpCorr().

#define P_AUTOEXP_OVEREXP_MAX   82

Definition at line 344 of file c313a.h.

#define P_AUTOEXP_S_INDEX   84

Definition at line 346 of file c313a.h.

#define P_AUTOEXP_S_PERCENT   83

Definition at line 345 of file c313a.h.

#define P_AUTOEXP_SKIP_PMAX   87

Definition at line 349 of file c313a.h.

#define P_AUTOEXP_SKIP_PMIN   86

Definition at line 348 of file c313a.h.

#define P_AUTOEXP_SKIP_T   88

Definition at line 350 of file c313a.h.

#define P_BAYER   6

Definition at line 237 of file c313a.h.

Referenced by pgm_afterinit(), and pgm_sensorin().

#define P_BGFRAME   16

bit 0 - "old" external mode (0- internal, 1 - external ) bit 1 - enable(1) or disable(0) external trigger to stop clip bit 2 - async (snapshot, ext trigger) mode, 0 - continuous NOTE: Only this bit is used now ! bit 3 - no overlap, single frames: program - acquire/compress same frame

Definition at line 253 of file c313a.h.

Referenced by pgm_memsensor(), x353raw_frame_lseek(), x353raw_frame_open(), x353raw_frame_read(), x353raw_frame_readline(), x353raw_frame_write(), and x353raw_frame_writeline().

#define P_BIN_HOR   32

Definition at line 277 of file c313a.h.

Referenced by mt9x001_pgm_limitfps(), mt9x001_pgm_window_common(), pgm_afterinit(), and pgm_window_common().

#define P_BIN_VERT   33

Definition at line 278 of file c313a.h.

Referenced by mt9x001_pgm_limitfps(), mt9x001_pgm_window_common(), pgm_afterinit(), and pgm_window_common().

#define P_BITS   37

Definition at line 286 of file c313a.h.

Referenced by pgm_memsensor(), pgm_sensorin(), x353raw_frame_lseek(), x353raw_frame_open(), x353raw_frame_read(), x353raw_frame_readline(), x353raw_frame_write(), and x353raw_frame_writeline().

#define P_CLK_FPGA   12

In new code use G_CIRCBUFWP instead!

Definition at line 245 of file c313a.h.

Referenced by main(), pgm_detectsensor(), and pgm_limitfps().

#define P_CLK_SENSOR   13

Definition at line 246 of file c313a.h.

Referenced by main(), mt9x001_pgm_exposure(), mt9x001_pgm_limitfps(), pgm_detectsensor(), pgm_limitfps(), and pgm_sensorphase().

#define P_COLOR   135

Definition at line 407 of file c313a.h.

Referenced by pgm_compmode(), pgm_limitfps(), pgm_window_common(), and updateFramePars().

#define P_COLOR_SATURATION_BLUE   54

Definition at line 309 of file c313a.h.

Referenced by pgm_compmode().

#define P_COLOR_SATURATION_RED   55

Definition at line 310 of file c313a.h.

Referenced by pgm_compmode().

#define P_COMPMOD_BYRSH   160

143 - last to copy

Definition at line 431 of file c313a.h.

Referenced by pgm_compmode(), and updateFramePars().

#define P_COMPMOD_DCSUB   49

Definition at line 303 of file c313a.h.

Referenced by pgm_compmode().

#define P_COMPMOD_QTAB   50

Definition at line 304 of file c313a.h.

Referenced by pgm_quality().

#define P_COMPMOD_TILSH   48

Definition at line 302 of file c313a.h.

Referenced by pgm_compmode().

#define P_COMPRESSOR_RUN   5

Definition at line 232 of file c313a.h.

Referenced by camogm_status(), framePointersXML(), main(), pgm_compctl(), pgm_comprestart(), PHP_FUNCTION(), reset_compressor(), and Video::Start().

#define P_DAEMON_EN   165

TODO: rearrange, combine with other AUTOEXP if [G_HIST_DIM_01] is set to 0xffffffff that will force re-calibration (1 dark frame) The following is a daemons control so the sleeping daemons can be awaken by the drivers when the corresponding bit is set and one of the following events happen (depending on driver and lseek (SEEK_END) offset: frame interrupt (any - compressed or not) - through "/dev/frameparsall" frame compressed interrupt - through "/dev/circbuf" histogram Y (G1) is ready - through "/dev/histogram_cache" histogram C (R,G1,G2,B) are ready - through "/dev/histogram_cache"

Definition at line 444 of file c313a.h.

Referenced by Video::capture(), circbuf_lseek(), framepars_lseek(), histograms_lseek(), isDaemonEnabled(), and Video::isDaemonEnabled().

#define P_DAEMON_EN_AUTOCAMPARS   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_AUTOCAMPARS))

Definition at line 601 of file c313a.h.

Referenced by main().

#define P_DAEMON_EN_AUTOEXPOSURE   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_AUTOEXPOSURE))

Definition at line 597 of file c313a.h.

#define P_DAEMON_EN_CAMOGM   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_CAMOGM))

Definition at line 600 of file c313a.h.

#define P_DAEMON_EN_CCAMFTP   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_CCAMFTP))

Definition at line 599 of file c313a.h.

#define P_DAEMON_EN_STREAMER   (P_DAEMON_EN | FRAMEPAIR_FRAME_BITS(1, DAEMON_BIT_STREAMER))

Definition at line 598 of file c313a.h.

#define P_DCM_HOR   30

Definition at line 275 of file c313a.h.

Referenced by mt9x001_pgm_limitfps(), mt9x001_pgm_window_common(), pgm_afterinit(), and pgm_window_common().

#define P_DCM_VERT   31

Definition at line 276 of file c313a.h.

Referenced by mt9x001_pgm_limitfps(), mt9x001_pgm_window_common(), pgm_afterinit(), and pgm_window_common().

#define P_DGAINB   67

Definition at line 325 of file c313a.h.

Referenced by pgm_prescal().

#define P_DGAING   65

Definition at line 323 of file c313a.h.

Referenced by pgm_prescal().

#define P_DGAINGB   66

Definition at line 324 of file c313a.h.

Referenced by pgm_prescal().

#define P_DGAINR   64

"digital gains" for color correction, 17-bit unsigned data (default 0x8000).

Definition at line 322 of file c313a.h.

Referenced by pgm_prescal().

#define P_EARLY_TIMESTAMP   111

Currently bit 0 will be always 1 (needs fix in FPGA).

Definition at line 382 of file c313a.h.

Referenced by pgm_triggermode().

#define P_EXP_AHEAD   178

Definition at line 462 of file c313a.h.

Referenced by main().

#define P_EXPOS   141

Definition at line 425 of file c313a.h.

Referenced by mt9x001_pgm_exposure(), pgm_afterinit(), and updateIRQ_Exif().

#define P_FATZERO   47

Definition at line 300 of file c313a.h.

#define P_FLIPH   28

Definition at line 272 of file c313a.h.

Referenced by mt9x001_pgm_window_common(), pgm_afterinit(), pgm_sensorin(), and pgm_window_common().

#define P_FLIPV   29

Definition at line 273 of file c313a.h.

Referenced by mt9x001_pgm_window_common(), pgm_afterinit(), pgm_sensorin(), and pgm_window_common().

#define P_FOCUS_FILTER   101

Definition at line 367 of file c313a.h.

Referenced by pgm_focusmode().

#define P_FOCUS_HEIGHT   99

Definition at line 365 of file c313a.h.

Referenced by pgm_focusmode().

#define P_FOCUS_LEFT   96

Definition at line 362 of file c313a.h.

Referenced by pgm_focusmode().

#define P_FOCUS_SHOW   93

Definition at line 358 of file c313a.h.

Referenced by pgm_compmode().

#define P_FOCUS_SHOW1   94

Definition at line 360 of file c313a.h.

Referenced by pgm_focusmode().

#define P_FOCUS_TOP   98

Definition at line 364 of file c313a.h.

Referenced by pgm_focusmode().

#define P_FOCUS_TOTWIDTH   100

Definition at line 366 of file c313a.h.

Referenced by pgm_focusmode().

#define P_FOCUS_VALUE   143

Definition at line 427 of file c313a.h.

Referenced by updateIRQFocus().

#define P_FOCUS_WIDTH   97

Definition at line 363 of file c313a.h.

Referenced by pgm_focusmode().

#define P_FP1000S   51

Definition at line 306 of file c313a.h.

Referenced by mt9x001_pgm_limitfps().

#define P_FP1000SLIM   9

Definition at line 240 of file c313a.h.

Referenced by Video::fps(), pgm_limitfps(), stream__ioctl(), and stream__release().

#define P_FPGA_XTRA   14

Definition at line 247 of file c313a.h.

Referenced by pgm_limitfps().

#define P_FPGATEST   34

Definition at line 279 of file c313a.h.

Referenced by pgm_sensorin().

#define P_FPNM   40

Definition at line 291 of file c313a.h.

Referenced by pgm_memsensor(), and pgm_sensorin().

#define P_FPNS   39

Definition at line 289 of file c313a.h.

Referenced by pgm_memsensor(), and pgm_sensorin().

#define P_FPSFLAGS   10

Definition at line 241 of file c313a.h.

Referenced by Video::fps(), stream__ioctl(), and stream__release().

#define P_FRAME   136

Definition at line 420 of file c313a.h.

Referenced by get_imageParamsThat(), get_imageParamsThatValid(), mt9x001_pgm_exposure(), pgm_gamma(), pgm_gammaload(), PHP_FUNCTION(), resetFrameNumber(), schedule_this_pgm_func(), setFramePar(), setFramePars(), updateFramePars(), and updateIRQ_Exif().

#define P_FRAMESYNC_DLY   35

Definition at line 281 of file c313a.h.

#define P_FTP_PERIOD   190

Parameters fro ccamftp.php daemon (server, account, password, directories,script names are sepaarte)

Definition at line 478 of file c313a.h.

#define P_FTP_TIMEOUT   191

Definition at line 479 of file c313a.h.

#define P_FTP_UPDATE   192

Definition at line 480 of file c313a.h.

#define P_GAIN_CTRL   183

Definition at line 603 of file c313a.h.

#define P_GAIN_CTRL   183

Definition at line 603 of file c313a.h.

Referenced by whiteBalanceCorr().

#define P_GAIN_ENABLE   (P_GAIN_CTRL | FRAMEPAIR_FRAME_BITS(1, GAIN_BIT_ENABLE))

Definition at line 606 of file c313a.h.

#define P_GAIN_MAX   182

Definition at line 468 of file c313a.h.

Referenced by whiteBalanceCorr().

#define P_GAIN_MIN   181

Used by white balancing to control analog gains in addition to gamma tables. Can be limited to narrower range than.

Definition at line 467 of file c313a.h.

Referenced by whiteBalanceCorr().

#define P_GAIN_STEP   (P_GAIN_CTRL | FRAMEPAIR_FRAME_BITS(16, GAIN_BIT_STEP))

Definition at line 604 of file c313a.h.

#define P_GAINB   140

Definition at line 424 of file c313a.h.

Referenced by mt9x001_pgm_gains(), and pgm_afterinit().

#define P_GAING   138

Definition at line 422 of file c313a.h.

Referenced by mt9x001_pgm_gains(), and pgm_afterinit().

#define P_GAINGB   139

Definition at line 423 of file c313a.h.

Referenced by mt9x001_pgm_gains(), and pgm_afterinit().

#define P_GAINR   137

Definition at line 421 of file c313a.h.

Referenced by mt9x001_pgm_gains(), pgm_afterinit(), and whiteBalanceCorr().

#define P_GTAB_B   131

Definition at line 403 of file c313a.h.

#define P_GTAB_G   129

Definition at line 401 of file c313a.h.

#define P_GTAB_GB   130

Definition at line 402 of file c313a.h.

#define P_GTAB_R   128

The following 4 parameters should have consecutive indexes see FRAMEPAIR_MASK_BYTES to modify just part of the word (i.e. scale, not hash16

Definition at line 399 of file c313a.h.

Referenced by pgm_gamma(), pgm_gammaload(), PHP_FUNCTION(), tasklet_fpga_function(), updateFramePars(), and whiteBalanceCorr().

#define P_HDR_DUR   168

Definition at line 448 of file c313a.h.

Referenced by exposureHDR(), and main().

#define P_HDR_VEXPOS   169

Definition at line 449 of file c313a.h.

Referenced by exposureHDR().

#define P_HISTRQ   72

Definition at line 329 of file c313a.h.

Referenced by tasklet_fpga_function().

#define P_HISTRQ_C   (P_HISTRQ | FRAMEPAIR_FRAME_BITS(1, HISTRQ_BIT_C) | FRAMEPAIR_JUST_THIS)

Definition at line 616 of file c313a.h.

Referenced by histograms_lseek().

#define P_HISTRQ_Y   (P_HISTRQ | FRAMEPAIR_FRAME_BITS(1, HISTRQ_BIT_Y) | FRAMEPAIR_JUST_THIS)

Definition at line 615 of file c313a.h.

Referenced by histograms_lseek().

#define P_HISTRQ_YC   (P_HISTRQ | FRAMEPAIR_FRAME_BITS(2, HISTRQ_BIT_Y) | FRAMEPAIR_JUST_THIS)

Definition at line 617 of file c313a.h.

Referenced by waitRequstPrevHist().

#define P_HISTWND_HEIGHT   90

Definition at line 354 of file c313a.h.

Referenced by pgm_hist().

#define P_HISTWND_LEFT   92

Definition at line 356 of file c313a.h.

Referenced by pgm_hist().

#define P_HISTWND_RHEIGHT   78

Definition at line 338 of file c313a.h.

Referenced by pgm_afterinit(), and pgm_hist().

#define P_HISTWND_RLEFT   79

Definition at line 339 of file c313a.h.

Referenced by pgm_afterinit(), and pgm_hist().

#define P_HISTWND_RTOP   80

Definition at line 340 of file c313a.h.

Referenced by pgm_afterinit(), and pgm_hist().

#define P_HISTWND_RWIDTH   77

relative histogram (autoexposure) window (changed from % to 1/0x10000)

Definition at line 337 of file c313a.h.

Referenced by pgm_afterinit(), and pgm_hist().

#define P_HISTWND_TOP   91

Definition at line 355 of file c313a.h.

Referenced by pgm_hist().

#define P_HISTWND_WIDTH   89

same as written to the FPGA for the histogram window

Definition at line 353 of file c313a.h.

Referenced by pgm_hist().

#define P_I2C_BYTES   109

Definition at line 379 of file c313a.h.

Referenced by pgm_i2c().

#define P_I2C_QPERIOD   108

Definition at line 378 of file c313a.h.

Referenced by pgm_i2c().

#define P_IMGSZMEM   17

Definition at line 255 of file c313a.h.

Referenced by pgm_memcompressor(), and pgm_memsensor().

#define P_IRQ_SMART   110

Definition at line 380 of file c313a.h.

Referenced by pgm_irq().

#define P_JPEG_WP   11

Definition at line 243 of file c313a.h.

#define P_MAX_GPAR   1023

Definition at line 487 of file c313a.h.

Referenced by elphel_set_P_value_common(), PHP_FUNCTION(), setFramePar(), setFramePars(), and setFrameParsAtomic().

#define P_MAX_PAR   511

Definition at line 486 of file c313a.h.

Referenced by setFramePar(), setFramePars(), setFrameParsAtomic(), and setFrameParsStatic().

#define P_NAME_ENTRY (  )     { P_##y, #y }

Definition at line 802 of file c313a.h.

#define P_NUMBER   1024

parameter indexes will be updated to grouprelated ones into the same groups of 32 NOTE: P_* and G_* should not end with numbers - numbers will be used in PHP constants to add to the constant value (ELPHEL_AAA3 will be treated as ELPHEL_AAA+3)

Definition at line 166 of file c313a.h.

#define P_OVERLAP   20

Definition at line 262 of file c313a.h.

Referenced by pgm_memsensor(), and pgm_sensorin().

#define P_OVERSIZE   112

Definition at line 383 of file c313a.h.

Referenced by mt9x001_pgm_window_common(), and pgm_window_common().

#define P_PAGE_ACQ   18

Definition at line 259 of file c313a.h.

Referenced by pgm_memsensor().

#define P_PAGE_READ   19

Definition at line 260 of file c313a.h.

Referenced by pgm_memcompressor(), and x353raw_frame_read().

#define P_PERIOD   8

Definition at line 239 of file c313a.h.

Referenced by mt9x001_pgm_limitfps().

#define P_PERIOD_MAX   44

Definition at line 297 of file c313a.h.

#define P_PERIOD_MIN   43

Definition at line 296 of file c313a.h.

Referenced by mt9x001_pgm_limitfps().

#define P_PF_HEIGHT   36

Definition at line 283 of file c313a.h.

Referenced by pgm_memcompressor(), pgm_memsensor(), pgm_sensorin(), and pgm_window_common().

#define P_PROFILE   (PARS_SAVE_FROM + PP_PROFILE_START)

Definition at line 494 of file c313a.h.

#define P_QUALITY   132

Definition at line 404 of file c313a.h.

Referenced by grab_and_send(), jpeg_session_start(), and pgm_quality().

#define P_RFOCUS_HEIGHT   118

Definition at line 390 of file c313a.h.

Referenced by pgm_focusmode().

#define P_RFOCUS_LEFT   115

Definition at line 387 of file c313a.h.

Referenced by pgm_focusmode().

#define P_RFOCUS_TOP   117

Definition at line 389 of file c313a.h.

Referenced by pgm_focusmode().

#define P_RFOCUS_WIDTH   116

Definition at line 388 of file c313a.h.

Referenced by pgm_focusmode().

#define P_SDRAM_CHN20   125

Definition at line 392 of file c313a.h.

Referenced by pgm_compctl(), pgm_comprestart(), and pgm_memcompressor().

#define P_SDRAM_CHN21   126

Definition at line 393 of file c313a.h.

Referenced by pgm_compctl(), pgm_comprestart(), and pgm_memcompressor().

#define P_SDRAM_CHN22   127

Definition at line 394 of file c313a.h.

Referenced by pgm_compctl(), pgm_comprestart(), and pgm_memcompressor().

#define P_SENSOR   1

Definition at line 167 of file c313a.h.

Referenced by mt9x001_pgm_detectsensor(), pgm_detectsensor(), and PHP_FUNCTION().

#define P_SENSOR_HEIGHT   53

Definition at line 308 of file c313a.h.

#define P_SENSOR_NUMREGS   256

Definition at line 484 of file c313a.h.

Referenced by initFramePars(), and mt9x001_pgm_sensorregs().

#define P_SENSOR_PHASE   74

Definition at line 331 of file c313a.h.

Referenced by pgm_sensorphase().

#define P_SENSOR_PIXH   45

Definition at line 298 of file c313a.h.

Referenced by mt9x001_pgm_limitfps(), mt9x001_pgm_window_common(), and pgm_window_common().

#define P_SENSOR_PIXV   46

Definition at line 299 of file c313a.h.

Referenced by mt9x001_pgm_window_common(), and pgm_window_common().

#define P_SENSOR_REGS   256

Definition at line 483 of file c313a.h.

Referenced by initFramePars(), mt9x001_pgm_gains(), mt9x001_pgm_initsensor(), mt9x001_pgm_limitfps(), mt9x001_pgm_sensorregs(), mt9x001_pgm_triggermode(), and mt9x001_pgm_window_common().

#define P_SENSOR_RUN   4

Parameters below are accessed through mmap, because of cache coherency problem it make sense to keep them compact (maybe group by 8 - cache line of 32 bytes).

Definition at line 228 of file c313a.h.

Referenced by framePointersXML(), main(), pgm_memcompressor(), pgm_sensorrun(), pgm_sensorstop(), and PHP_FUNCTION().

#define P_SENSOR_WIDTH   52

Definition at line 307 of file c313a.h.

#define P_SHIFTL   38

Definition at line 288 of file c313a.h.

Referenced by pgm_sensorin().

#define P_SKIP_FRAMES   107

Definition at line 377 of file c313a.h.

Referenced by pgm_recalcseq().

#define P_TESTSENSOR   41

Definition at line 293 of file c313a.h.

Referenced by mt9x001_pgm_gains().

#define P_TILES   73

Definition at line 330 of file c313a.h.

Referenced by pgm_compctl(), pgm_comprestart(), pgm_limitfps(), and pgm_memcompressor().

#define P_TRIG   15

Definition at line 248 of file c313a.h.

Referenced by mt9x001_pgm_limitfps(), mt9x001_pgm_triggermode(), pgm_afterinit(), pgm_limitfps(), pgm_recalcseq(), and pgm_triggermode().

#define P_TRIG_CONDITION   102

timing generator/trigger delay/external trigger control

Definition at line 371 of file c313a.h.

Referenced by pgm_trigseq().

#define P_TRIG_DELAY   103

Definition at line 372 of file c313a.h.

Referenced by pgm_trigseq().

#define P_TRIG_OUT   104

Definition at line 373 of file c313a.h.

Referenced by pgm_trigseq().

#define P_TRIG_PERIOD   105

Definition at line 374 of file c313a.h.

Referenced by pgm_trigseq().

#define P_TRIGGERED   7

Definition at line 238 of file c313a.h.

#define P_VEXPOS   142

Definition at line 426 of file c313a.h.

Referenced by aexpCorr(), exposureHDR(), main(), mt9x001_pgm_exposure(), pgm_afterinit(), and recalibrateDim().

#define P_VIGNET_AX   56

Vignetting control, AX*X^2+BX*X+AY*Y^2+BY*Y+C.

Definition at line 313 of file c313a.h.

Referenced by pgm_prescal().

#define P_VIGNET_AY   57

Definition at line 314 of file c313a.h.

Referenced by pgm_prescal().

#define P_VIGNET_BX   58

Definition at line 315 of file c313a.h.

Referenced by pgm_prescal().

#define P_VIGNET_BY   59

Definition at line 316 of file c313a.h.

Referenced by pgm_prescal().

#define P_VIGNET_C   60

Definition at line 317 of file c313a.h.

Referenced by pgm_prescal().

#define P_VIGNET_SHL   61

Definition at line 318 of file c313a.h.

Referenced by pgm_prescal().

#define P_VIGNET_ZERIN   62

Definition at line 319 of file c313a.h.

Referenced by pgm_prescal().

#define P_VIGNET_ZEROUT   63

Definition at line 320 of file c313a.h.

Referenced by pgm_prescal().

#define P_VIRT_HEIGHT   23

Definition at line 266 of file c313a.h.

Referenced by mt9x001_pgm_limitfps().

#define P_VIRT_KEEP   21

Definition at line 264 of file c313a.h.

Referenced by mt9x001_pgm_limitfps().

#define P_VIRT_WIDTH   22

Definition at line 265 of file c313a.h.

Referenced by mt9x001_pgm_exposure(), and mt9x001_pgm_limitfps().

#define P_VIRTTRIG   42

Definition at line 294 of file c313a.h.

#define P_WB_MASK   172

Definition at line 453 of file c313a.h.

Referenced by whiteBalanceCorr().

#define P_WB_PERIOD   171

Definition at line 452 of file c313a.h.

Referenced by whiteBalanceCorr().

#define P_WB_SCALE_B   177

Definition at line 460 of file c313a.h.

Referenced by whiteBalanceCorr().

#define P_WB_SCALE_GB   176

Definition at line 459 of file c313a.h.

Referenced by whiteBalanceCorr().

#define P_WB_SCALE_R   175

Definition at line 458 of file c313a.h.

Referenced by whiteBalanceCorr().

#define P_WB_THRESH   180

Definition at line 464 of file c313a.h.

#define P_WB_WHITEFRAC   174

Definition at line 455 of file c313a.h.

Referenced by whiteBalanceCorr().

#define P_WB_WHITELEV   173

Definition at line 454 of file c313a.h.

Referenced by createDefaultConfig(), and whiteBalanceCorr().

#define P_WOI_HEIGHT   27

Definition at line 270 of file c313a.h.

Referenced by pgm_afterinit(), and pgm_window_common().

#define P_WOI_LEFT   24

Definition at line 267 of file c313a.h.

Referenced by mt9x001_pgm_window_common(), pgm_afterinit(), and pgm_window_common().

#define P_WOI_TOP   25

Definition at line 268 of file c313a.h.

Referenced by mt9x001_pgm_window_common(), pgm_afterinit(), and pgm_window_common().

#define P_WOI_WIDTH   26

Definition at line 269 of file c313a.h.

Referenced by pgm_afterinit(), and pgm_window_common().

#define P_ZBINROUND   71

Definition at line 328 of file c313a.h.

Referenced by pgm_compmode().

#define PARS_FRAMES   8

Making use of FPGA queues of i2c and sequencer commands (up to 6 frames ahead) The P_* parameters will now be stored in 8 pages (previous frame, this frame (+0), next(+1),...(+6) Top index (0..7) corresponds to hardware frame counter, parameters are copied after the frame sync/compressor done interrupts. when the 3-bit counter is combined with the software variable to get the full 32-bit frame number Each parameter page includes 927 parameter registers, as well as 97 bitmasks to speed up updates between frames So if no parameters are changed - nothing to be copied from page to page

Definition at line 649 of file c313a.h.

Referenced by mt9x001_pgm_exposure(), mt9x001_pgm_gains(), mt9x001_pgm_limitfps(), mt9x001_pgm_sensorregs(), mt9x001_pgm_triggermode(), mt9x001_pgm_window_common(), pgm_compctl(), pgm_compmode(), pgm_comprestart(), pgm_compstop(), pgm_gamma(), pgm_hist(), pgm_i2c(), pgm_irq(), pgm_limitfps(), pgm_memcompressor(), pgm_memsensor(), pgm_prescal(), pgm_quality(), pgm_sensorin(), pgm_sensorrun(), pgm_sensorstop(), pgm_triggermode(), pgm_trigseq(), processParsSeq(), resetFrameNumber(), set_imageParamsR_all(), setFrameParsAtomic(), and setFrameParsStatic().

#define PARS_FRAMES_MASK   (PARS_FRAMES-1)

Definition at line 650 of file c313a.h.

Referenced by aexpCorr(), Video::capture(), exposureHDR(), framePointersXML(), get_imageParamsPrev(), get_imageParamsThat(), get_imageParamsThatValid(), get_imageParamsThis(), getGPValue(), Video::getGPValue(), histograms_lseek(), isDaemonEnabled(), Video::isDaemonEnabled(), main(), pgm_gamma(), pgm_gammaload(), PHP_FUNCTION(), processPars(), processParsASAP(), processParsSeq(), recalibrateDim(), resetFrameNumber(), schedule_pgm_func(), schedule_this_pgm_func(), set_imageParamsThis(), setFramePar(), setFramePars(), setFrameParsAtomic(), skipHDR(), stream__ioctl(), stream__release(), tasklet_fpga_function(), updateFramePars(), and whiteBalanceCorr().

#define PARS_SAVE_COPY   16

Definition at line 491 of file c313a.h.

Referenced by updateFramePars().

#define PARS_SAVE_FROM   128

Definition at line 490 of file c313a.h.

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

#define PARS_SAVE_NUM   32

Definition at line 492 of file c313a.h.

Referenced by get_imageParamsThat(), and get_imageParamsThatValid().

#define PASTPARS_SAVE_ENTRIES   (PARS_FRAMES << 8)

Definition at line 651 of file c313a.h.

#define PASTPARS_SAVE_ENTRIES_MASK   ((PARS_FRAMES << 8)-1)

Definition at line 652 of file c313a.h.

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

#define PP_PROFILE_START   16

Definition at line 493 of file c313a.h.

#define SENSOR_IBIS51300   0x40

Definition at line 192 of file c313a.h.

#define SENSOR_KAC1310   0x20

Definition at line 187 of file c313a.h.

#define SENSOR_KAC5000   0x24

Definition at line 188 of file c313a.h.

#define SENSOR_KAI11000   0x80

Definition at line 193 of file c313a.h.

#define SENSOR_MASK   0xfc

Definition at line 184 of file c313a.h.

#define SENSOR_MI1300   0x30

Definition at line 189 of file c313a.h.

#define SENSOR_MT9X001   0x30

Definition at line 190 of file c313a.h.

Referenced by mt9x001_pgm_initsensor().

#define SENSOR_MT9Y001   0x34

Definition at line 191 of file c313a.h.

#define SENSOR_NEED_RESET_CLK   1

Definition at line 1316 of file c313a.h.

Referenced by pgm_sensorphase().

#define SENSOR_NEED_RESET_PHASE   2

Definition at line 1317 of file c313a.h.

Referenced by pgm_sensorphase().

#define SENSOR_NONE   0xfc

Definition at line 194 of file c313a.h.

#define SENSOR_RUN_CONT   2

Definition at line 231 of file c313a.h.

Referenced by PHP_FUNCTION().

#define SENSOR_RUN_SINGLE   1

Definition at line 230 of file c313a.h.

#define SENSOR_RUN_STOP   0

Definition at line 229 of file c313a.h.

Referenced by pgm_memcompressor().

#define SENSOR_ZR32112   0x04

Definition at line 185 of file c313a.h.

#define SENSOR_ZR32212   0x08

Definition at line 186 of file c313a.h.

#define sensorcom_R_size   256

Definition at line 66 of file c313a.h.

#define sensorcom_W_size   1024

Definition at line 65 of file c313a.h.

#define SENSORHEIGHT_IBIS51300   1024

Definition at line 225 of file c313a.h.

#define SENSORHEIGHT_KAC1310   1024

Definition at line 205 of file c313a.h.

#define SENSORHEIGHT_KAC5000   1944

Definition at line 221 of file c313a.h.

#define SENSORHEIGHT_MI1300   1024

Definition at line 209 of file c313a.h.

#define SENSORHEIGHT_MT9D001   1200

Definition at line 214 of file c313a.h.

#define SENSORHEIGHT_MT9M001   1024

Definition at line 212 of file c313a.h.

#define SENSORHEIGHT_MT9P001   1944

Definition at line 218 of file c313a.h.

#define SENSORHEIGHT_MT9T001   1536

Definition at line 216 of file c313a.h.

#define SENSORHEIGHT_ZR32112   1024

Definition at line 200 of file c313a.h.

#define SENSORHEIGHT_ZR32212   968

Definition at line 203 of file c313a.h.

#define SENSORWIDTH_IBIS51300   1280

Definition at line 224 of file c313a.h.

#define SENSORWIDTH_KAC1310   1280

Definition at line 204 of file c313a.h.

#define SENSORWIDTH_KAC5000   2592

Definition at line 220 of file c313a.h.

#define SENSORWIDTH_MI1300   1280

Definition at line 208 of file c313a.h.

#define SENSORWIDTH_MT9D001   1600

Definition at line 213 of file c313a.h.

#define SENSORWIDTH_MT9M001   1280

Definition at line 211 of file c313a.h.

#define SENSORWIDTH_MT9P001   2592

Definition at line 217 of file c313a.h.

#define SENSORWIDTH_MT9T001   2048

Definition at line 215 of file c313a.h.

#define SENSORWIDTH_ZR32112   1280

Definition at line 199 of file c313a.h.

#define SENSORWIDTH_ZR32212   1280

Definition at line 202 of file c313a.h.

#define TASKLET_CTL_ENPROF   3

Definition at line 538 of file c313a.h.

#define TASKLET_CTL_HISTC_BIT   8

Definition at line 550 of file c313a.h.

#define TASKLET_CTL_HISTY_BIT   4

Definition at line 549 of file c313a.h.

Referenced by tasklet_fpga_function().

#define TASKLET_CTL_IGNPAST   1

Definition at line 536 of file c313a.h.

Referenced by updateFramePars().

#define TASKLET_CTL_NOSAME   2

Definition at line 537 of file c313a.h.

Referenced by setFrameParsAtomic().

#define TASKLET_CTL_PGM   0

Definition at line 535 of file c313a.h.

#define TASKLET_HIST_ALL   0

effects of uncertainty of when was it called relative to frame sync

Definition at line 540 of file c313a.h.

Referenced by tasklet_fpga_function().

#define TASKLET_HIST_HALF   1

Definition at line 541 of file c313a.h.

Referenced by tasklet_fpga_function().

#define TASKLET_HIST_NEVER   7

Definition at line 547 of file c313a.h.

Referenced by tasklet_fpga_function().

#define TASKLET_HIST_ONCE   3

NOTE: It is safer to allow all histograms at least once in 8 frames so applications will not be locked up waiting for the missed histogram TODO: detect missing histograms and wakeup queue

Definition at line 545 of file c313a.h.

Referenced by tasklet_fpga_function().

#define TASKLET_HIST_QUATER   2

Definition at line 542 of file c313a.h.

Referenced by tasklet_fpga_function().

#define TASKLET_HIST_RQONLY   4

Definition at line 546 of file c313a.h.

Referenced by tasklet_fpga_function().

#define USELONGLONG   1

Definition at line 17 of file c313a.h.

#define X3X3_I2C1_16_AINC   4

Definition at line 30 of file c313a.h.

Referenced by xi2c_init(), xi2c_lseek(), xi2c_open(), xi2c_read(), xi2c_release(), and xi2c_write().

#define X3X3_I2C1_8_AINC   3

Definition at line 29 of file c313a.h.

Referenced by xi2c_init(), xi2c_open(), xi2c_read(), xi2c_release(), and xi2c_write().

#define X3X3_I2C1_RAW   6

Definition at line 32 of file c313a.h.

Referenced by xi2c_init(), xi2c_lseek(), xi2c_open(), xi2c_read(), xi2c_release(), and xi2c_write().

#define X3X3_I2C_16_AINC   2

Definition at line 28 of file c313a.h.

Referenced by xi2c_init(), xi2c_lseek(), xi2c_open(), xi2c_read(), xi2c_release(), and xi2c_write().

#define X3X3_I2C_8_AINC   1

Definition at line 27 of file c313a.h.

Referenced by xi2c_init(), xi2c_open(), xi2c_read(), xi2c_release(), and xi2c_write().

#define X3X3_I2C_CHANNELS   2

Definition at line 40 of file c313a.h.

Referenced by xi2c_init(), and xi2c_release().

#define X3X3_I2C_CTRL   0

Definition at line 26 of file c313a.h.

Referenced by xi2c_init(), xi2c_open(), xi2c_read(), xi2c_release(), and xi2c_write().

#define X3X3_I2C_ENABLE   7

Definition at line 33 of file c313a.h.

Referenced by xi2c_init(), xi2c_open(), xi2c_read(), xi2c_release(), and xi2c_write().

#define X3X3_I2C_ENABLE_16   4

Definition at line 38 of file c313a.h.

Referenced by xi2c_init(), xi2c_read(), and xi2c_write().

#define X3X3_I2C_ENABLE_8   3

Definition at line 37 of file c313a.h.

Referenced by xi2c_init(), xi2c_read(), and xi2c_write().

#define X3X3_I2C_ENABLE_RAW   2

Definition at line 36 of file c313a.h.

Referenced by xi2c_init(), xi2c_read(), and xi2c_write().

#define X3X3_I2C_ENABLE_RD   0

Definition at line 34 of file c313a.h.

Referenced by xi2c_init(), and xi2c_read().

#define X3X3_I2C_ENABLE_WR   1

Definition at line 35 of file c313a.h.

Referenced by xi2c_init(), and xi2c_write().

#define X3X3_I2C_MAXMINOR   7

Definition at line 39 of file c313a.h.

#define X3X3_I2C_RAW   5

Definition at line 31 of file c313a.h.

Referenced by xi2c_init(), xi2c_lseek(), xi2c_open(), xi2c_read(), xi2c_release(), and xi2c_write().


Enumeration Type Documentation

enum onchange_functions_t

TODO: onchange_exposure should be after onchange_limitfps.

phase (common part conditionally triggers init) -> init -> i2c -> sensorregs -> afterinit reset i2c - only once, when the sensor is reset, it is stopped, by frame numbers go on (and parameters are not erased)

Enumerator:
onchange_recalcseq 
onchange_detectsensor  recalculate sequences/latencies, according to P_SKIP, P_TRIG
onchange_sensorphase  detect sensor type, sets sensor structure (capabilities), function pointers
onchange_i2c  program sensor clock/phase (needs to know maximal clock frequency)
onchange_sensorregs  program i2c
onchange_initsensor  write sensor registers (only changed from outside the driver as they may have different latencies)?
onchange_afterinit  resets sensor, reads sensor registers, schedules "secret" manufacturer's corrections to the registers (stops/re-enables hardware i2c)
onchange_window  restore image size, decimation,... after sensor reset or set them according to sensor capabilities if none were specified
onchange_window_safe  program sensor WOI and mirroring (flipping)
onchange_gains  program sensor WOI and mirroring (flipping) - lower latency, no bad frames
onchange_triggermode  program analog gains
onchange_sensorin  program sensor trigger mode
onchange_sensorstop  program sensor input in FPGA (Bayer, 8/16 bits, ??)
onchange_sensorrun  Stop acquisition from the sensor to the FPGA (start has latency of 2).
onchange_gamma  Start/single acquisition from the sensor to the FPGA (stop has latency of 1).
onchange_hist  program gamma table
onchange_aexp  program histogram window
onchange_quality  program autoexposure mode
onchange_memsensor  program quantization table(s)
onchange_memcompressor  program memory channels 0 (sensor->memory) and 1 (memory->FPN)
onchange_limitfps  program memory channel 2 (memory->compressor)
onchange_exposure  check compressor will keep up, limit sensor FPS if needed
onchange_compmode  program exposure - NOTE: was just after onchange_window
onchange_focusmode  program compressor modes (excluding start/stop/single)
onchange_trigseq  program focus modes
onchange_irq  program sequencer (int/ext)
onchange_comprestart  program smart IRQ mode (needs to be on)
onchange_compstop  restart after changing geometry (recognizes ASAP and programs memory channel 2 then)
onchange_compctl  stop compressor when changing geometry
onchange_gammaload  only start/stop/single (after explicitly changed, not when geometry was changed)
onchange_prescal  add others

Definition at line 682 of file c313a.h.


Generated on Fri Nov 28 00:08:27 2008 for elphel by  doxygen 1.5.1