mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
common/csi: Add post-processing op.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
parent
9112cf2aae
commit
1f1e2b59e9
@ -1607,6 +1607,11 @@ __weak int omv_csi_snapshot(omv_csi_t *csi, image_t *image, uint32_t flags) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Call the sensor specific post-process.
|
||||
if (ret == 0 && csi->post_process && !(flags & OMV_CSI_FLAG_NO_POST)) {
|
||||
ret = csi->post_process(csi, image, flags);
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
// Mark this buffer to be released on the next call.
|
||||
buffer = framebuffer_acquire(csi->fb, FB_FLAG_USED | FB_FLAG_PEEK);
|
||||
|
||||
@ -194,6 +194,7 @@ typedef enum {
|
||||
typedef enum {
|
||||
OMV_CSI_FLAG_UPDATE_FB = (1 << 0),
|
||||
OMV_CSI_FLAG_NON_BLOCK = (1 << 1),
|
||||
OMV_CSI_FLAG_NO_POST = (1 << 2),
|
||||
OMV_CSI_FLAG_IOCTL_ABORT = (1 << 8),
|
||||
} omv_csi_flags_t;
|
||||
|
||||
@ -289,6 +290,9 @@ typedef struct _omv_csi_callback_t {
|
||||
typedef int (*omv_csi_snapshot_t)
|
||||
(omv_csi_t *csi, image_t *image, uint32_t flags);
|
||||
|
||||
typedef int (*omv_csi_post_process_t)
|
||||
(omv_csi_t *csi, image_t *image, uint32_t flags);
|
||||
|
||||
typedef struct _omv_clk omv_clk_t;
|
||||
|
||||
typedef struct _omv_clk {
|
||||
@ -398,6 +402,7 @@ typedef struct _omv_csi {
|
||||
int (*config) (omv_csi_t *csi, omv_csi_config_t config);
|
||||
int (*abort) (omv_csi_t *csi, bool fifo_flush, bool in_irq);
|
||||
int (*snapshot) (omv_csi_t *csi, image_t *image, uint32_t flags);
|
||||
int (*post_process) (omv_csi_t *csi, image_t *image, uint32_t flags);
|
||||
} omv_csi_t;
|
||||
|
||||
// CSI array
|
||||
|
||||
Loading…
Reference in New Issue
Block a user