Paparazzi UAS
v5.12_stable-4-g9b43e9b
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"
Go to the source code of this file.
Data Structures | |
struct | avi_isp_offsets |
Macros | |
#define | AVI_BASE 0x400000 |
#define | AVI_SIZE 0x100000 |
#define | AVI_MASK (AVI_SIZE - 1) |
#define | AVI_ISP_IOGET_OFFSETS _IOR('F', 0x33, struct avi_isp_offsets) |
#define | readl(_addr) (*((volatile uint32_t *)(_addr))) |
#define | writel(_val, _addr) (*((volatile uint32_t *)(_addr)) = _val) |
#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. More... | |
static int | open_isp_fd (struct libisp_context *ctx, int fd) |
This is taken from libisp. More... | |
int | configure_isp (struct v4l2_device *dev) |
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 | |
static struct libisp_context | isp_ctx |
static const unsigned | isp_bases [] |
struct avi_isp_offsets |
#define AVI_BASE 0x400000 |
Definition at line 13 of file libisp.c.
Referenced by open_isp_fd().
#define AVI_ISP_IOGET_OFFSETS _IOR('F', 0x33, struct avi_isp_offsets) |
Definition at line 26 of file libisp.c.
Referenced by avi_isp_get_offsets_fd().
#define AVI_MASK (AVI_SIZE - 1) |
Definition at line 15 of file libisp.c.
Referenced by open_isp_fd().
#define AVI_SIZE 0x100000 |
Definition at line 14 of file libisp.c.
Referenced by open_isp_fd().
#define EXPAND_AS_FUNCTION | ( | _node | ) |
#define readl | ( | _addr | ) | (*((volatile uint32_t *)(_addr))) |
Definition at line 29 of file libisp.c.
Referenced by memcpy_from_registers().
#define writel | ( | _val, | |
_addr | |||
) | (*((volatile uint32_t *)(_addr)) = _val) |
Definition at line 30 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 76 of file libisp.c.
References AVI_ISP_IOGET_OFFSETS.
Referenced by open_isp_fd().
int configure_isp | ( | struct v4l2_device * | dev | ) |
Definition at line 163 of file libisp.c.
References libisp_config::bayer, libisp_config::bayer_inter, libisp_config::chain_yuv_inter, libisp_config::chroma, libisp_config::color_correction, libisp_config::dead_pixel_correction, libisp_config::denoising, libisp_config::eecrf, libisp_config::eecrf_lut, v4l2_device::fd, libisp_config::gamma_corrector, libisp_config::gc_bv_lut, libisp_config::gc_gu_lut, libisp_config::gc_ry_lut, libisp_config::green_imbalance, libisp_config::grim_gb, libisp_config::grim_gr, isp_config, libisp_config::lens_shading_correction, libisp_config::lsc_blue_coeffs, libisp_config::lsc_green_coeffs, libisp_config::lsc_red_coeffs, open_isp_fd(), libisp_config::pedestal, libisp_config::statistics_bayer, libisp_config::statistics_yuv, libisp_config::vlformat_32to40, and libisp_config::vlformat_40to32.
Referenced by video_thread_function().
int isp_get_statistics_yuv | ( | struct isp_yuv_stats_t * | yuv_stats | ) |
Definition at line 201 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, isp_yuv_stats_t::awb_nb_grey_pixels, avi_isp_statistics_yuv_regs::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, libisp_context::devmem, isp_config, isp_yuv_stats_t::nb_valid_Y, and libisp_config::statistics_yuv.
Referenced by bebop_ae_awb_periodic().
|
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 91 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, avi_isp_offsets::gamma_corrector, isp_bases, ISP_NODE_NR, libisp_context::offsets, and avi_isp_offsets::statistics_yuv.
Referenced by configure_isp().
|
static |
Definition at line 37 of file libisp.c.
Referenced by open_isp_fd().
|
static |