Commit 4c95cc78 authored by Andrey Filippov's avatar Andrey Filippov

merged with framepars, correcting video memory access lines comparison

parents 6e83fec5 447b18ef
......@@ -164,6 +164,8 @@ const unsigned long ahead_tab[]=
// NC393 - triggered mode wants onchange_compstop==2, while onchange_window == 1?
// onchange_compstop, 0, 2, 1, 2, 1, 0, /// stop compressor when changing geometry
/// onchange_compstop, 0, 2, 1, 1, 1, 0, /// stop compressor when changing geometry
// TODO: NC393 now comstop is used when changing color modes does not need two cycles - just 1
onchange_compstop, 0, 2, 2, 2, 2, 0, /// stop compressor when changing geometry
onchange_compctl, 0, 0, 1, 1, 1, 0, /// only start/stop/single (after explicitly changed, not when geometry was changed)
// onchange_gammaload, 1, 0, 0, 0, 0, 0, /// write gamma tables (should be prepared). Maybe - just last byte, to activate?
......
......@@ -199,7 +199,12 @@ const unsigned long param_depend_tab[]=
P_BIN_VERT, ONCHANGE_WINDOW | ONCHANGE_EXPOSURE | ONCHANGE_HIST | ONCHANGE_AEXP | ONCHANGE_FOCUSMODE | ONCHANGE_LIMITFPS | ONCHANGE_HIST | \
ONCHANGE_MEMSENSOR | ONCHANGE_MEMCOMPRESSOR | ONCHANGE_COMPMODE | ONCHANGE_COMPSTOP | ONCHANGE_COMPRESTART | ONCHANGE_SENSORIN ,
//Oleg 20161014: trying to restart the compressor: + ONCHANGE_COMPSTOP | ONCHANGE_COMPRESTART
P_COLOR, ONCHANGE_COMPMODE | ONCHANGE_LIMITFPS | ONCHANGE_MEMCOMPRESSOR | ONCHANGE_COMPSTOP | ONCHANGE_COMPRESTART,
// P_COLOR, ONCHANGE_COMPMODE | ONCHANGE_LIMITFPS | ONCHANGE_MEMSENSOR | ONCHANGE_MEMCOMPRESSOR | ONCHANGE_COMPSTOP | ONCHANGE_COMPRESTART,
//Added ONCHANGE_WINDOW and related as JPEG <-> JP4 change window by the border pixels
P_COLOR, ONCHANGE_WINDOW | ONCHANGE_EXPOSURE | ONCHANGE_HIST | ONCHANGE_AEXP | ONCHANGE_FOCUSMODE | ONCHANGE_LIMITFPS | ONCHANGE_HIST | \
ONCHANGE_MEMSENSOR | ONCHANGE_MEMCOMPRESSOR | ONCHANGE_COMPMODE | ONCHANGE_COMPSTOP | ONCHANGE_COMPRESTART | ONCHANGE_SENSORIN,
//P_COLOR, ONCHANGE_COMPMODE | ONCHANGE_LIMITFPS | ONCHANGE_MEMCOMPRESSOR,
// P_PF_HEIGHT, ONCHANGE_RECALCSEQ | ONCHANGE_SENSORIN | ONCHANGE_LIMITFPS | ONCHANGE_MEMSENSOR | ONCHANGE_MEMCOMPRESSOR | ONCHANGE_COMPMODE | ONCHANGE_COMPSTOP | ONCHANGE_COMPRESTART ,
P_PF_HEIGHT, ONCHANGE_RECALCSEQ | ONCHANGE_WINDOW | ONCHANGE_EXPOSURE | ONCHANGE_HIST | ONCHANGE_AEXP | ONCHANGE_FOCUSMODE | ONCHANGE_LIMITFPS | ONCHANGE_HIST | \
......
......@@ -1164,7 +1164,7 @@ int pgm_limitfps (int sensor_port, ///< sensor port number (0..3
dev_dbg(g_dev_ptr,"{%d} frame16=%d\n",sensor_port,frame16);
MDP(DBGB_PSFN, sensor_port,"frame16=%d\n",frame16)
if (frame16 >= PARS_FRAMES) return -1; // wrong frame
cycles=thispars->pars[P_TILES]; // number of tiles
cycles=thispars->pars[P_TILES]; // number of tiles nc393: [P_TILES] == 0!
// dev_dbg(g_dev_ptr,"{%d} tiles=%d(0x%x)\n",sensor_port,cycles,cycles);
switch (thispars->pars[P_COLOR] & 0x0f){
case COLORMODE_MONO6:
......@@ -1239,7 +1239,7 @@ int pgm_limitfps (int sensor_port, ///< sensor port number (0..3
dev_dbg(g_dev_ptr,"{%d} period =%d(0x%x)\n",sensor_port,period,period);
#endif
}
dev_dbg(g_dev_ptr,"{%d} period=%d\n",sensor_port,period);
dev_dbg(g_dev_ptr,"{%d} period=%d\n", sensor_port, period);
MDP(DBGB_PADD, sensor_port,"period =%d(0x%x)\n", period, period)
if ((thispars->pars[P_FPSFLAGS] & 1) && (period>min_period)) min_period=period;
// *********************************************************** P_PF_HEIGHT
......@@ -2025,7 +2025,7 @@ int pgm_memcompressor (int sensor_port, ///< sensor port number (
int tile_height; // 16/18 (20 not yet implemented)
x393_cmprs_frame_format_t cmprs_frame_format ={.d32=0};
dev_dbg(g_dev_ptr,"{%d} frame16=%d\n",sensor_port,frame16);
dev_dbg(g_dev_ptr,"{%d} frame16=%d, pars[P_COLOR]=0x%x\n",sensor_port,frame16, (int)thispars->pars[P_COLOR]);
MDP(DBGB_PSFN, sensor_port,"frame16=%d\n",frame16)
if (frame16 >= PARS_FRAMES) return -1; // wrong frame
width_marg = thispars->pars[P_ACTUAL_WIDTH];
......@@ -2067,17 +2067,20 @@ int pgm_memcompressor (int sensor_port, ///< sensor port number (
// height_marg, // 16-bit window height (in scan lines)
0, // 13-bit window left margin in 8-bursts (16 bytes)
cmprs_top, // 16-bit window top margin (in scan lines
tile_width, // tile width in bjursts (16-pixels each)
tile_width, // tile width in bursts (16-pixels each)
tile_height, // tile height: 18 for color JPEG, 16 for JP4 flavors // = 18
16, // tile vertical step in pixel rows (JPEG18/jp4 = 16) // = 16
(frame16<0)? ASAP: ABSOLUTE, // how to apply commands - directly or through channel sequencer
frame16); // Frame number the command should be applied to (if not immediate mode)
X393_SEQ_SEND1 (sensor_port, frame16, x393_cmprs_format, cmprs_frame_format);
dev_dbg(g_dev_ptr,"{%d} X3X3_SEQ_SEND1(0x%x, 0x%x, x393_cmprs_format, 0x%x)\n",
sensor_port, sensor_port, frame16, cmprs_frame_format.d32);
// update P_TILES
setFramePar(sensor_port, thispars, P_TILES,
(cmprs_frame_format.num_macro_cols_m1+1)*(cmprs_frame_format.num_macro_rows_m1+1));
return 0;
// TODO: Do we need to maintain P_IMGSZMEM ?
// #define P_PAGE_ACQ 18 ///< Number of image page buffer to acquire to (0.1?)
// #define P_PAGE_READ 19 ///< Number of image page buffer to read from to (0.1?)
#else
......
......@@ -322,7 +322,7 @@ int control_compressor_memory (int num_sensor, ///< sensor port number (0.
break;
case COMPRESSOR_RUN_CONT:
break;
case SENSOR_RUN_RESET:
case COMPRESSOR_RUN_RESET:
mcntrl_mode.chn_nreset = 0;
mcntrl_mode.enable = 0;
break;
......
......@@ -291,7 +291,7 @@
#define COMPRESSOR_RUN_STOP 0 ///< Compressor mode: STOP
#define COMPRESSOR_RUN_SINGLE 1 ///< Compressor mode: SINGLE
#define COMPRESSOR_RUN_CONT 2 ///< Compressor mode: RUN
#define COMPRESSOR_RUN_RESET 2 ///< Compressor mode: RESET
#define COMPRESSOR_RUN_RESET 3 ///< Compressor mode: RESET
#define P_BAYER 6 ///< filter number at (0,0) 0-R, 1-G(R), 2-G(B), 3 - B. Write enabled at first, move to WindowSize later
#define P_TRIGGERED 7 ///< when trigger occured - 4 LSBs - pixel in DMA word, higher bits - number of DMA word OBSOLETE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment