|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include <stdio.h>#include <stdlib.h>#include <stdint.h>#include <fcntl.h>#include <errno.h>#include <string.h>#include <unistd.h>#include <sys/mman.h>#include <sys/ioctl.h>#include "libisp.h"#include "libisp_config.h"Go to the source code of this file.
Data Structures | |
| struct | avi_isp_offsets |
Macros | |
| #define | PRINT(string, ...) |
| #define | VERBOSE_PRINT(...) |
| #define | AVI_BASE 0x400000 |
| #define | AVI_SIZE 0x100000 |
| #define | AVI_MASK (AVI_SIZE - 1) |
| #define | AVI_ISP_STAT_YUV_MAX_WAIT 3 |
| #define | AVI_ISP_IOGET_OFFSETS _IOR('F', 0x33, struct avi_isp_offsets) |
| #define | readl(_addr) |
| #define | writel(_val, _addr) |
| #define | EXPAND_AS_FUNCTION(_node) |
Functions | |
| static int | avi_isp_get_offsets_fd (int fd, struct avi_isp_offsets *off) |
| This is taken from libisp. | |
| static int | open_isp_fd (struct libisp_context *ctx, int fd) |
| This is taken from libisp. | |
| int | configure_isp (struct v4l2_device *dev) |
| int | isp_request_statistics_yuv_window (uint16_t x_start, uint16_t x_end, uint16_t y_start, uint16_t y_end, uint16_t x_odd_inc, uint16_t y_odd_inc) |
| static int | isp_set_statistics_yuv_window (void) |
| int | isp_get_statistics_yuv (struct isp_yuv_stats_t *yuv_stats) |
| static void | memcpy_to_registers (unsigned long addr, const void *reg_base, size_t s) |
| static void | memcpy_from_registers (void *reg_base, unsigned long addr, size_t s) |
Variables | |
| uint8_t | curWait = 0 |
| static struct libisp_context | isp_ctx |
| uint16_t | requestWindow [6] = {0} |
| static const unsigned | isp_bases [] |
| struct avi_isp_offsets |
| #define AVI_BASE 0x400000 |
Definition at line 22 of file libisp.c.
Referenced by open_isp_fd().
| #define AVI_ISP_IOGET_OFFSETS _IOR('F', 0x33, struct avi_isp_offsets) |
Definition at line 38 of file libisp.c.
Referenced by avi_isp_get_offsets_fd().
| #define AVI_ISP_STAT_YUV_MAX_WAIT 3 |
Definition at line 34 of file libisp.c.
Referenced by isp_get_statistics_yuv().
| #define AVI_MASK (AVI_SIZE - 1) |
Definition at line 24 of file libisp.c.
Referenced by open_isp_fd().
| #define AVI_SIZE 0x100000 |
Definition at line 23 of file libisp.c.
Referenced by open_isp_fd().
| #define EXPAND_AS_FUNCTION | ( | _node | ) |
| #define PRINT | ( | string, | |
| ... ) |
| #define readl | ( | _addr | ) |
Definition at line 41 of file libisp.c.
Referenced by memcpy_from_registers().
| #define VERBOSE_PRINT | ( | ... | ) |
Definition at line 19 of file libisp.c.
Referenced by avi_isp_get_offsets_fd(), isp_get_statistics_yuv(), isp_request_statistics_yuv_window(), and isp_set_statistics_yuv_window().
| #define writel | ( | _val, | |
| _addr ) |
Definition at line 42 of file libisp.c.
Referenced by memcpy_to_registers().
|
static |
This is taken from libisp.
Original function takes the videodev name and re-opens it, causing undefined behaviour. Here we reuse the already-opened file descriptor
Definition at line 90 of file libisp.c.
References AVI_ISP_IOGET_OFFSETS, fd, and VERBOSE_PRINT.
Referenced by open_isp_fd().
| int configure_isp | ( | struct v4l2_device * | dev | ) |
Definition at line 177 of file libisp.c.
References dev, isp_config, isp_ctx, and open_isp_fd().
Referenced by video_thread_function().
| int isp_get_statistics_yuv | ( | struct isp_yuv_stats_t * | yuv_stats | ) |
Definition at line 261 of file libisp.c.
References isp_yuv_stats_t::ae_histogram_Y, avi_isp_statistics_yuv_ae_histogram_y_regs::ae_histogram_y, avi_isp_statistics_yuv_regs::ae_nb_valid_y, AVI_ISP_STAT_YUV_MAX_WAIT, avi_isp_statistics_yuv_regs::awb_nb_grey_pixels, isp_yuv_stats_t::awb_nb_grey_pixels, isp_yuv_stats_t::awb_sum_U, avi_isp_statistics_yuv_regs::awb_sum_u, isp_yuv_stats_t::awb_sum_V, avi_isp_statistics_yuv_regs::awb_sum_v, isp_yuv_stats_t::awb_sum_Y, avi_isp_statistics_yuv_regs::awb_sum_y, curWait, isp_config, isp_ctx, isp_set_statistics_yuv_window(), avi_isp_statistics_yuv_regs::measure_status, isp_yuv_stats_t::nb_valid_Y, and VERBOSE_PRINT.
Referenced by update_ae_awb().
| int isp_request_statistics_yuv_window | ( | uint16_t | x_start, |
| uint16_t | x_end, | ||
| uint16_t | y_start, | ||
| uint16_t | y_end, | ||
| uint16_t | x_odd_inc, | ||
| uint16_t | y_odd_inc ) |
Definition at line 214 of file libisp.c.
References requestWindow, and VERBOSE_PRINT.
Referenced by mt9f002_init(), and mt9f002_setting_update_resolution().
|
static |
Definition at line 230 of file libisp.c.
References isp_config, requestWindow, and VERBOSE_PRINT.
Referenced by isp_get_statistics_yuv().
|
inlinestatic |
|
inlinestatic |
|
static |
This is taken from libisp.
Original function takes the videodev name and re-opens it, causing undefined behaviour. Here we reuse the already-opened file descriptor
Definition at line 105 of file libisp.c.
References AVI_BASE, libisp_context::avi_base, avi_isp_get_offsets_fd(), AVI_MASK, AVI_SIZE, avi_isp_offsets::chain_bayer, avi_isp_offsets::chain_yuv, avi_isp_offsets::chroma, libisp_context::devmem, fd, avi_isp_offsets::gamma_corrector, isp_bases, ISP_NODE_NR, libisp_context::offsets, and avi_isp_offsets::statistics_yuv.
Referenced by configure_isp().
| uint8_t curWait = 0 |
Definition at line 35 of file libisp.c.
Referenced by isp_get_statistics_yuv().
|
static |
Definition at line 51 of file libisp.c.
Referenced by open_isp_fd().
|
static |
Definition at line 45 of file libisp.c.
Referenced by configure_isp(), and isp_get_statistics_yuv().
| uint16_t requestWindow[6] = {0} |
Definition at line 49 of file libisp.c.
Referenced by isp_request_statistics_yuv_window(), and isp_set_statistics_yuv_window().