00001
00002
00003
00004 #ifndef MAP_OPTIONS
00005 #ifndef MAP_FILE
00006 #define MAP_OPTIONS MAP_PRIVATE
00007 #else
00008 #define MAP_OPTIONS MAP_FILE|MAP_PRIVATE
00009 #endif
00010 #endif
00011 #ifndef MAX_IMAGE_WIDTH
00012 #define MAX_IMAGE_WIDTH 1288
00013 #define MAX_IMAGE_HEIGHT 1032
00014 #endif
00015
00016
00017 #define MD(x)
00018
00019 struct pixel_buffers {
00020 int data_fd;
00021 unsigned char rgb[MAX_IMAGE_WIDTH*3];
00022 int imageWidth;
00023 int imageHeight;
00024 unsigned char * this;
00025 unsigned char * prev;
00026 unsigned char * next;
00027 int depth;
00028 int shft;
00029 int color;
00030 unsigned long BayerRows[3][( MAX_IMAGE_WIDTH >> 2) +4];
00031 int BayerOrient;
00032 int bufferedRows[3];
00033
00034
00035 unsigned long palette[256];
00036 };
00037
00038
00039 int initPixelBuffers(struct pixel_buffers * pbp,
00040 const char * dmaFileName,
00041 int width,
00042 int height,
00043 int contrast,
00044 int colorMode,
00045 int bayer,
00046 int pixelDepth,
00047 const char * pseudo
00048 );
00049 void closePixelBuffers(struct pixel_buffers * pbp);
00050
00051
00052 unsigned char * getPixelRow(struct pixel_buffers * pbp,int row);
00053 unsigned char * getMonoRow (struct pixel_buffers * pbp, int row, int bufn);
00054
00055 unsigned long * getPalette (struct pixel_buffers * pbp);