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
29464216
Commit
29464216
authored
May 13, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add command to change frame dimentions
parent
5ce0a999
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
+24
-6
circbuf.c
src/drivers/elphel/circbuf.c
+13
-0
circbuf.h
src/drivers/elphel/circbuf.h
+2
-0
sensor_common.c
src/drivers/elphel/sensor_common.c
+9
-6
No files found.
src/drivers/elphel/circbuf.c
View file @
29464216
...
...
@@ -692,6 +692,8 @@ loff_t circbuf_lseek(struct file *file, loff_t offset, int orig)
* @return number of bytes read form \e buf
*/
unsigned
short
circbuf_quality
=
100
;
unsigned
short
circbuf_height
=
1936
;
unsigned
short
circbuf_width
=
2592
;
ssize_t
circbuf_write
(
struct
file
*
file
,
const
char
*
buf
,
size_t
count
,
loff_t
*
off
)
{
unsigned
long
p
;
...
...
@@ -746,6 +748,17 @@ ssize_t circbuf_write(struct file *file, const char *buf, size_t count, loff_t *
}
}
break
;
case
6
:
{
unsigned
int
w
,
h
;
int
res
=
sscanf
(
&
buf
[
2
],
"%u:%u"
,
&
w
,
&
h
);
if
(
res
==
2
)
{
circbuf_width
=
w
;
circbuf_height
=
h
;
dev_dbg
(
g_dev_ptr
,
"set image size %u x %u
\n
"
,
w
,
h
);
}
}
break
;
}
/* debug code end */
...
...
src/drivers/elphel/circbuf.h
View file @
29464216
...
...
@@ -44,6 +44,8 @@ extern struct circbuf_priv_t *circbuf_priv_ptr;
/* debug code follows */
extern
unsigned
short
circbuf_quality
;
extern
unsigned
short
circbuf_height
;
extern
unsigned
short
circbuf_width
;
/* end of debug code */
#endif
/* _CIRCBUF_H */
src/drivers/elphel/sensor_common.c
View file @
29464216
...
...
@@ -7,8 +7,9 @@
* - interrupts handling
* - tasklets
* - device driver that includes waiting for the next frame regardless of compression
*
* Copyright (C) 2016 Elphel, Inc.
*/
/* Copyright (C) 2016 Elphel, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -82,7 +83,7 @@
#define IMAGEACQ_DRIVER_NAME "Elphel (R) Model 393 Image Acquisition device driver"
/** @brief The size in bytes of L2 cache invalidation area. This size must be aligned to cache line size.
* 16 kbytes seems to be good starting point. */
#define L2_INVAL_SIZE (
16
* 1024)
#define L2_INVAL_SIZE (
32
* 1024)
/**@struct jpeg_ptr_t
* @brief \e jpeg_ptr_t structure contains read and write pointers along with
...
...
@@ -358,8 +359,10 @@ inline void updateIRQFocus(struct jpeg_ptr_t *jptr)
inline
static
void
set_default_interframe
(
struct
interframe_params_t
*
params
)
{
params
->
height
=
1936
;
params
->
width
=
2592
;
// params->height = 1936;
// params->width = 2592;
params
->
height
=
circbuf_height
;
params
->
width
=
circbuf_width
;
params
->
byrshift
=
3
;
params
->
color
=
0
;
params
->
quality2
=
circbuf_quality
;
...
...
@@ -543,7 +546,7 @@ static irqreturn_t frame_sync_irq_handler(int irq, void *dev_id)
* flag meaning that interrupts are enabled during processing. Such behavior is recommended in LDD3.
* @param[in] irq interrupt number
* @param[in] dev_id pointer to driver's private data structure #jpeg_ptr_t corresponding to
* the channel which raise interrupt
* the channel which raise
d
interrupt
* @return \e IRQ_HANDLED if interrupt was processed and \e IRQ_NONE otherwise
*/
static
irqreturn_t
compressor_irq_handler
(
int
irq
,
void
*
dev_id
)
...
...
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