Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
95cd86ff
Commit
95cd86ff
authored
Apr 03, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed fps 2 (now after a bit of testing)
parent
c5dd2cf3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
mt9f002.c
src/drivers/elphel/mt9f002.c
+15
-1
mt9f002.h
src/drivers/elphel/mt9f002.h
+8
-0
No files found.
src/drivers/elphel/mt9f002.c
View file @
95cd86ff
...
@@ -981,12 +981,20 @@ int mt9f002_pgm_window_common (int sensor_port, ///< sensor port
...
@@ -981,12 +981,20 @@ int mt9f002_pgm_window_common (int sensor_port, ///< sensor port
// this sets the vertical blanking
// this sets the vertical blanking
if
(
fll
!=
thispars
->
pars
[
P_SENSOR_REGS
+
P_MT9F002_FRAME_LENGTH_LINES
]){
if
(
fll
!=
thispars
->
pars
[
P_SENSOR_REGS
+
P_MT9F002_FRAME_LENGTH_LINES
]){
dev_dbg
(
g_dev_ptr
,
"limit fps, old frame_length_lines=0x%08x, new frame_length_lines=0x%08x
\n
"
,
dev_dbg
(
g_dev_ptr
,
"limit fps, old frame_length_lines=0x%08x, new frame_length_lines=0x%08x
\n
"
,
thispars
->
pars
[
P_SENSOR_REGS
+
P_MT9F002_FRAME_LENGTH_LINES
],
fll
);
(
int
)
thispars
->
pars
[
P_SENSOR_REGS
+
P_MT9F002_FRAME_LENGTH_LINES
],
fll
);
SET_SENSOR_MBPAR_LUT
(
sensor_port
,
frame16
,
P_MT9F002_FRAME_LENGTH_LINES
,
fll
);
SET_SENSOR_MBPAR_LUT
(
sensor_port
,
frame16
,
P_MT9F002_FRAME_LENGTH_LINES
,
fll
);
}
}
// need this fix for max possible fps
if
(
ww
>=
X_OUTPUT_BORDER_SIZE
){
min_line_length_pck
=
MIN_LINE_LENGTH_PCK_FROM_DATASHEET
;
}
// else, leave as thispars->pars[P_SENSOR_REGS+P_MT9F002_MIN_LINE_LENGTH_PCK]
// which is 0x930
// recalc exposure after this one
// recalc exposure after this one
//llp = mt9f002_calc_line_length_pck(thispars);
//llp = mt9f002_calc_line_length_pck(thispars);
llp
=
mt9f002_calc_line_length_pck_2
(
wws
,
wwe
,
ww_odd_inc
,
ww
,
min_line_blanking_pck
,
min_line_length_pck
);
llp
=
mt9f002_calc_line_length_pck_2
(
wws
,
wwe
,
ww_odd_inc
,
ww
,
min_line_blanking_pck
,
min_line_length_pck
);
if
(
llp
!=
thispars
->
pars
[
P_SENSOR_REGS
+
P_MT9F002_LINE_LENGTH_PCK
]){
if
(
llp
!=
thispars
->
pars
[
P_SENSOR_REGS
+
P_MT9F002_LINE_LENGTH_PCK
]){
SET_SENSOR_MBPAR_LUT
(
sensor_port
,
frame16
,
P_MT9F002_LINE_LENGTH_PCK
,
llp
);
SET_SENSOR_MBPAR_LUT
(
sensor_port
,
frame16
,
P_MT9F002_LINE_LENGTH_PCK
,
llp
);
...
@@ -1173,6 +1181,12 @@ int mt9f002_pgm_limitfps (int sensor_port, ///< sensor port numb
...
@@ -1173,6 +1181,12 @@ int mt9f002_pgm_limitfps (int sensor_port, ///< sensor port numb
//hor_blank = hor_blank_min;
//hor_blank = hor_blank_min;
//dev_dbg(g_dev_ptr,"{%d} hor_blank =%d(0x%x)\n",sensor_port,hor_blank,hor_blank);
//dev_dbg(g_dev_ptr,"{%d} hor_blank =%d(0x%x)\n",sensor_port,hor_blank,hor_blank);
row_time_in_pixels
=
2
*
thispars
->
pars
[
P_SENSOR_REGS
+
P_MT9F002_LINE_LENGTH_PCK
];
row_time_in_pixels
=
2
*
thispars
->
pars
[
P_SENSOR_REGS
+
P_MT9F002_LINE_LENGTH_PCK
];
// fps correction
if
(
ww
<
X_OUTPUT_BORDER_SIZE
){
row_time_in_pixels
=
thispars
->
pars
[
P_SENSOR_REGS
+
P_MT9F002_LINE_LENGTH_PCK
];
}
//row_time_in_pixels = mt9f002_calc_line_length_pck(thispars);
//row_time_in_pixels = mt9f002_calc_line_length_pck(thispars);
...
...
src/drivers/elphel/mt9f002.h
View file @
95cd86ff
...
@@ -27,6 +27,14 @@
...
@@ -27,6 +27,14 @@
// number of lines to sacrifice before generating Frame Valid
// number of lines to sacrifice before generating Frame Valid
#define MT9F002_VACT_DELAY 2
#define MT9F002_VACT_DELAY 2
// !!! Unpredicted operation:
// * Value from the datasheet works while image width is above border
// suspecting sensor's ADCs performance
// * if width < BORDER_WIDTH row_time_in_pixels become 1:1
// else row_time_in_pixels 1:2
#define MIN_LINE_LENGTH_PCK_FROM_DATASHEET 0x4c8
#define X_OUTPUT_BORDER_SIZE 912
// Clocks, this is basis
// Clocks, this is basis
// from x393_parameters.vh:
// from x393_parameters.vh:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment