|
Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
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 dependency graph for libisp.c: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 | COMPLEMENT_2(i, r) (((i) >= 0) ? (r) : (~(r) + 1) & 0x3fff) |
| #define | Q311(i) (COMPLEMENT_2(i, (unsigned)(((ABS(i)) * (1 << 11)) + 0.5))) |
| #define | AVI_CONV_MATRIX(_c00, _c01, _c02,_c10, _c11, _c12,_c20, _c21, _c22) |
| #define | AVI_CONV_OFFSETS(_ryin, _ryout,_guin, _guout,_bvin, _bvout) |
| #define | AVI_CONV_CLIPS(_rymin, _rymax,_gumin, _gumax,_bvmin, _bvmax) |
| #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... | |
| static int | close_isp (struct libisp_context *ctx) |
| int | configure_isp (struct v4l2_device *dev) |
| 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 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_CONV_CLIPS | ( | _rymin, | |
| _rymax, | |||
| _gumin, | |||
| _gumax, | |||
| _bvmin, | |||
| _bvmax | |||
| ) |
Referenced by configure_isp().
| #define AVI_CONV_MATRIX | ( | _c00, | |
| _c01, | |||
| _c02, | |||
| _c10, | |||
| _c11, | |||
| _c12, | |||
| _c20, | |||
| _c21, | |||
| _c22 | |||
| ) |
Referenced by configure_isp().
| #define AVI_CONV_OFFSETS | ( | _ryin, | |
| _ryout, | |||
| _guin, | |||
| _guout, | |||
| _bvin, | |||
| _bvout | |||
| ) |
Referenced by configure_isp().
| #define AVI_ISP_IOGET_OFFSETS _IOR('F', 0x33, struct avi_isp_offsets) |
Definition at line 27 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 close_isp(), and open_isp_fd().
| #define COMPLEMENT_2 | ( | i, | |
| r | |||
| ) | (((i) >= 0) ? (r) : (~(r) + 1) & 0x3fff) |
| #define EXPAND_AS_FUNCTION | ( | _node | ) |
| #define Q311 | ( | i | ) | (COMPLEMENT_2(i, (unsigned)(((ABS(i)) * (1 << 11)) + 0.5))) |
| #define readl | ( | _addr | ) | (*((volatile uint32_t *)(_addr))) |
Definition at line 30 of file libisp.c.
Referenced by memcpy_from_registers().
| #define writel | ( | _val, | |
| _addr | |||
| ) | (*((volatile uint32_t *)(_addr)) = _val) |
Definition at line 31 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 72 of file libisp.c.
References AVI_ISP_IOGET_OFFSETS.
Referenced by open_isp_fd().
Here is the caller graph for this function:
|
static |
Definition at line 140 of file libisp.c.
References libisp_context::avi_base, AVI_SIZE, and libisp_context::devmem.
Referenced by configure_isp().
Here is the caller graph for this function:| int configure_isp | ( | struct v4l2_device * | dev | ) |
Definition at line 154 of file libisp.c.
References avi_isp_bayer_cfa::_register, avi_isp_color_correction_coeff_01_00::_register, AVI_CONV_CLIPS, AVI_CONV_MATRIX, AVI_CONV_OFFSETS, avi_isp_bayer_regs::cfa, close_isp(), avi_isp_color_correction_regs::coeff_01_00, v4l2_device::fd, avi_isp_vlformat_40to32_regs::format, avi_isp_vlformat_32to40_regs::format, and open_isp_fd().
Referenced by video_thread_function().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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 87 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().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 33 of file libisp.c.
Referenced by open_isp_fd().