#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include "imageaccess.h"
Include dependency graph for imageaccess.c:
Go to the source code of this file.
Defines | |
#define | D(x) |
Functions | |
unsigned char * | convert8to8 (int data_fd, unsigned long *row8Bit, int rowNumber, int ImageWidth, int Contrast) |
unsigned char * | convert16to8 (int data_fd, unsigned long *row8Bit, int rowNumber, int ImageWidth, int Contrast) |
int | initPalette (struct pixel_buffers *pbp, const char *pseudo) |
unsigned long * | getPalette (struct pixel_buffers *pbp) |
int | initPixelBuffers (struct pixel_buffers *pbp, const char *dmaFileName, int width, int height, int contrast, int colorMode, int bayer, int pixelDepth, const char *pseudo) |
void | closePixelBuffers (struct pixel_buffers *pbp) |
unsigned char * | getPixelRow (struct pixel_buffers *pbp, int row) |
unsigned char * | getMonoRow (struct pixel_buffers *pbp, int row, int bufn) |
#define D | ( | x | ) |
Definition at line 16 of file imageaccess.c.
void closePixelBuffers | ( | struct pixel_buffers * | pbp | ) |
Definition at line 172 of file imageaccess.c.
References pixel_buffers::data_fd.
Referenced by dma2bmp(), and dma2jpeg().
unsigned char * convert16to8 | ( | int | data_fd, | |
unsigned long * | row8Bit, | |||
int | rowNumber, | |||
int | ImageWidth, | |||
int | Contrast | |||
) |
Definition at line 340 of file imageaccess.c.
References MAX_IMAGE_WIDTH, and read.
Referenced by getMonoRow().
unsigned char * convert8to8 | ( | int | data_fd, | |
unsigned long * | row8Bit, | |||
int | rowNumber, | |||
int | ImageWidth, | |||
int | Contrast | |||
) |
Definition at line 319 of file imageaccess.c.
References MD, read, and stderr.
Referenced by getMonoRow().
unsigned char* getMonoRow | ( | struct pixel_buffers * | pbp, | |
int | row, | |||
int | bufn | |||
) |
Definition at line 301 of file imageaccess.c.
References pixel_buffers::BayerRows, convert16to8(), convert8to8(), pixel_buffers::data_fd, pixel_buffers::depth, pixel_buffers::imageHeight, pixel_buffers::imageWidth, and pixel_buffers::shft.
Referenced by dma2bmp(), and getPixelRow().
unsigned long* getPalette | ( | struct pixel_buffers * | pbp | ) |
Definition at line 121 of file imageaccess.c.
References pixel_buffers::color, and pixel_buffers::palette.
Referenced by dma2bmp(), and dma2jpeg().
unsigned char* getPixelRow | ( | struct pixel_buffers * | pbp, | |
int | row | |||
) |
Definition at line 199 of file imageaccess.c.
References pixel_buffers::BayerRows, pixel_buffers::bufferedRows, pixel_buffers::color, pixel_buffers::data_fd, getMonoRow(), pixel_buffers::imageHeight, pr(), pixel_buffers::prev, and pixel_buffers::this.
Referenced by dma2jpeg().
int initPalette | ( | struct pixel_buffers * | pbp, | |
const char * | pseudo | |||
) |
Definition at line 58 of file imageaccess.c.
References pixel_buffers::color, D, pixel_buffers::palette, and stderr.
Referenced by initPixelBuffers().
int initPixelBuffers | ( | struct pixel_buffers * | pbp, | |
const char * | dmaFileName, | |||
int | width, | |||
int | height, | |||
int | contrast, | |||
int | colorMode, | |||
int | bayer, | |||
int | pixelDepth, | |||
const char * | pseudo | |||
) |
Definition at line 129 of file imageaccess.c.
References pixel_buffers::BayerOrient, pixel_buffers::bufferedRows, pixel_buffers::color, pixel_buffers::data_fd, pixel_buffers::depth, pixel_buffers::imageHeight, pixel_buffers::imageWidth, initPalette(), MAX_IMAGE_HEIGHT, MAX_IMAGE_WIDTH, MD, pixel_buffers::shft, and stderr.
Referenced by dma2bmp(), and dma2jpeg().