Commit 67d125b8 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

took files from rocko

parent 9466e9a7
...@@ -254,6 +254,7 @@ ...@@ -254,6 +254,7 @@
#define SENSOR_MT9F002 0x38 ///< MT9F002 #define SENSOR_MT9F002 0x38 ///< MT9F002
//#define SENSOR_MT9Y001 0x34 ///< Micron/Aptina/Onsemi MT9P001 - 34 //#define SENSOR_MT9Y001 0x34 ///< Micron/Aptina/Onsemi MT9P001 - 34
#define SENSOR_IBIS51300 0x40 ///< FillFactory IBIS51300 #define SENSOR_IBIS51300 0x40 ///< FillFactory IBIS51300
#define SENSOR_LEPTON35 0x44 ///< FLIR Lepton3 sensor
#define SENSOR_KAI11000 0x80 ///< Kodak KAI11002 #define SENSOR_KAI11000 0x80 ///< Kodak KAI11002
#define SENSOR_MUX_10359 0xe0 ///< Sensor multiplexer 10359 #define SENSOR_MUX_10359 0xe0 ///< Sensor multiplexer 10359
#define SENSOR_NONE 0xfc ///< No sensor present #define SENSOR_NONE 0xfc ///< No sensor present
...@@ -509,6 +510,7 @@ ...@@ -509,6 +510,7 @@
#define COLORMODE_JP4DIFF2 9 ///< jp4, 4 blocks, differential, divide differences by 2: red := (R-G1)/2, blue:=(B-G1)/2, green=G1, green2 (G2-G1)/2 #define COLORMODE_JP4DIFF2 9 ///< jp4, 4 blocks, differential, divide differences by 2: red := (R-G1)/2, blue:=(B-G1)/2, green=G1, green2 (G2-G1)/2
#define COLORMODE_JP4HDR2 10 ///< jp4, 4 blocks, differential HDR: red := (R-G1)/2, blue:=(B-G1)/2, green=G1, green2 (high gain)=G2), #define COLORMODE_JP4HDR2 10 ///< jp4, 4 blocks, differential HDR: red := (R-G1)/2, blue:=(B-G1)/2, green=G1, green2 (high gain)=G2),
#define COLORMODE_MONO4 14 ///< monochrome, 4 blocks (but still with 2x2 macroblocks) #define COLORMODE_MONO4 14 ///< monochrome, 4 blocks (but still with 2x2 macroblocks)
#define COLORMODE_RAW 15 ///< raw 8/16-bit data in scanline order, bypassing compressor
// the following 8 values should go in the same sequence as fields in the histogram page // the following 8 values should go in the same sequence as fields in the histogram page
// 393: per sub-channel // 393: per sub-channel
//// Will need to have them per-subchannel (4x) //// Will need to have them per-subchannel (4x)
...@@ -1732,6 +1734,13 @@ struct __attribute__((__packed__)) sensor_t { ...@@ -1732,6 +1734,13 @@ struct __attribute__((__packed__)) sensor_t {
#define SENSOR_NEED_RESET_CLK 1 #define SENSOR_NEED_RESET_CLK 1
#define SENSOR_NEED_RESET_PHASE 2 #define SENSOR_NEED_RESET_PHASE 2
typedef enum FPGA_INTERFACES {
FPGA_PAR12 = 0,
FPGA_HISPI = 1,
FPGA_VOSPI = 2
} fpga_interfaces_t;
struct sensorproc_t { struct sensorproc_t {
struct sensor_t sensor; struct sensor_t sensor;
// functions return <0 on error (and do nothing) // functions return <0 on error (and do nothing)
......
...@@ -51,9 +51,11 @@ struct __attribute__((__packed__)) exif_dir_table_t { ...@@ -51,9 +51,11 @@ struct __attribute__((__packed__)) exif_dir_table_t {
unsigned short tag; // Exif tag as defined in the standard unsigned short tag; // Exif tag as defined in the standard
}; };
}; };
unsigned long len; // Number of bytes to be copied from metadata to Exif unsigned long len; // Number of bytes to be copied from metadata to Exif
unsigned long src; // offset in meta data page unsigned long src; // offset in meta data page
unsigned long dst; // offset in output Exif page // unsigned long dst; // offset in output Exif page
unsigned short dst_exif; // offset in output Exif page, 0 - not in file
unsigned short dst_tiff; // offset in output Tiff page, 0 - not in file
}; };
#define MAX_EXIF_FIELDS 256 // number of Exif tags in the header #define MAX_EXIF_FIELDS 256 // number of Exif tags in the header
#define MAX_EXIF_SIZE 4096 // Exif data size #define MAX_EXIF_SIZE 4096 // Exif data size
...@@ -77,8 +79,20 @@ struct __attribute__((__packed__)) exif_dir_table_t { ...@@ -77,8 +79,20 @@ struct __attribute__((__packed__)) exif_dir_table_t {
#define Exif_Image_ExifTag 0x08769 #define Exif_Image_ExifTag 0x08769
#define Exif_Image_GPSTag 0x08825 #define Exif_Image_GPSTag 0x08825
// used for Tiff
#define Exif_Image_NewSubfileType 0x000fe // static: long, count = 1, value = 0 (not reduced, not multipage, not mask)
#define Exif_Image_ImageWidth 0x00100 // long, count = 1
#define Exif_Image_ImageLength 0x00101 // long, count = 1
#define Exif_Image_BitsPerSample 0x00102 // short, count = 1 (8/16)
#define Exif_Image_PhotometricInterpretation 0x00106 // static, short, count = 1, value = 1 (black is zero)
#define Exif_Image_StripOffsets 0x00111 // static long, count = 1 for a single strip (otherwise 1 long for each strip
#define Exif_Image_SamplesPerPixel 0x00115 // short, count = 1. Value = 1 for mono (static?)
#define Exif_Image_RowsPerStrip 0x00116 // short, count = 1. Same as height for a single strip
#define Exif_Image_StripByteCounts 0x00117 // long, count = 1 for a single strip (otherwise 1 long for each strip) = width*height*components*(bits/8)
//Sub IFD //Sub IFD
#define Exif_Photo_ExposureTime 0x1829a #define Exif_Photo_ExposureTime 0x1829a // rational, fixed denominator=1,000,000
#define Exif_Photo_DateTimeOriginal 0x19003 #define Exif_Photo_DateTimeOriginal 0x19003
#define Exif_Photo_MakerNote 0x1927c #define Exif_Photo_MakerNote 0x1927c
#define Exif_Photo_SubSecTime 0x19290 #define Exif_Photo_SubSecTime 0x19290
...@@ -164,8 +178,8 @@ struct __attribute__((__packed__)) meta_CompassInfo_t { ...@@ -164,8 +178,8 @@ struct __attribute__((__packed__)) meta_CompassInfo_t {
#define EXIF_COMPASS_ROLL_ASCII "EW" // use for roll +/- #define EXIF_COMPASS_ROLL_ASCII "EW" // use for roll +/-
/// Exif data (variable, stored with each frame) used for KML (not only) /// Exif data (variable, stored with each frame) used for KML (not only)
#define Exif_Image_ImageDescription_Index 0x00 #define Exif_Image_ImageDescription_Index 0x00 // -
#define Exif_Photo_DateTimeOriginal_Index 0x01 #define Exif_Photo_DateTimeOriginal_Index 0x01 //
#define Exif_Photo_SubSecTimeOriginal_Index 0x02 #define Exif_Photo_SubSecTimeOriginal_Index 0x02
#define Exif_Photo_ExposureTime_Index 0x03 #define Exif_Photo_ExposureTime_Index 0x03
#define Exif_GPSInfo_GPSLatitudeRef_Index 0x04 #define Exif_GPSInfo_GPSLatitudeRef_Index 0x04
...@@ -185,32 +199,24 @@ struct __attribute__((__packed__)) meta_CompassInfo_t { ...@@ -185,32 +199,24 @@ struct __attribute__((__packed__)) meta_CompassInfo_t {
#define Exif_GPSInfo_CompassRoll_Index 0x12 #define Exif_GPSInfo_CompassRoll_Index 0x12
#define Exif_Image_ImageNumber_Index 0x13 #define Exif_Image_ImageNumber_Index 0x13
#define Exif_Image_Orientation_Index 0x14 #define Exif_Image_Orientation_Index 0x14
#define Exif_Image_PageNumber_Index 0x15 #define Exif_Image_PageNumber_Index 0x15 // -
#define Exif_Photo_MakerNote_Index 0x16 #define Exif_Photo_MakerNote_Index 0x16
#define Exif_Image_ImageWidth_Index 0x17 // long, count = 1
#define Exif_Image_ImageLength_Index 0x18 // long, count = 1
#define Exif_Image_BitsPerSample_Index 0x19 // short, count = 1 (8/16)
#define Exif_Image_SamplesPerPixel_Index 0x1a // short, count = 1. Value = 1 for mono (static?) keep for future, don't change from 1
#define Exif_Image_RowsPerStrip_Index 0x1b // short, count = 1. Same as height for a single strip
#define Exif_Image_StripByteCounts_Index 0x1c // long, count = 1 for a single strip (otherwise 1 long for each strip) = width*height*components*(bits/8)
/// update ExifKmlNumber to be total number of *_Index entries /// update ExifKmlNumber to be total number of *_Index entries
#define ExifKmlNumber Exif_Photo_MakerNote_Index+1 //#define ExifKmlNumber Exif_Photo_MakerNote_Index+1
#define ExifKmlNumber Exif_Image_StripByteCounts_Index+1
//#define EXIF_DEV_NAME "/dev/exif_exif" //#define EXIF_DEV_NAME "/dev/exif_exif"
#define EXIFDIR_DEV_NAME "/dev/exif_metadir" #define EXIFDIR_DEV_NAME "/dev/exif_metadir"
//#define EXIFMETA_DEV_NAME "/dev/exif_meta" //#define EXIFMETA_DEV_NAME "/dev/exif_meta"
/**
* @brief This macro is used to construct file names in user space applications. Example
* of usage: <e>const char *exif_file_names[SENSOR_PORTS] = { EXIF_DEV_NAMES };</e>. Then the
* sensor port number can be used to access file name.
*/
#define EXIF_DEV_NAMES "/dev/exif_exif0", \
"/dev/exif_exif1", \
"/dev/exif_exif2", \
"/dev/exif_exif3"
/**
* @brief This macro is used to construct file names in user space applications. Example
* of usage: <e>const char *exifmeta_file_names[SENSOR_PORTS] = { EXIFMETA_DEV_NAMES };</e>. Then
* the sensor port number can be used to access file name.
*/
#define EXIFMETA_DEV_NAMES "/dev/exif_meta0", \
"/dev/exif_meta1", \
"/dev/exif_meta2", \
"/dev/exif_meta3"
#endif /* _ASM_EXIF_H */ #endif /* _ASM_EXIF_H */
...@@ -20,12 +20,14 @@ ...@@ -20,12 +20,14 @@
#define <DEVICE_RFEFERENCE> ("<dev path>", "<driver_name>", major, minor,"<permissions>","<b/c>") [optional comment] #define <DEVICE_RFEFERENCE> ("<dev path>", "<driver_name>", major, minor,"<permissions>","<b/c>") [optional comment]
* Access to individual fields is provide with the macros defined below, for example: * Access to individual fields is provide with the macros defined below, for example:
* DEV393_PATH(DEV393_EXIF_TEMPLATE) returns "/dev/exif_template, * DEV393_PATH(DEV393_EXIF_TEMPLATE) returns "/dev/exif_template,
* DEV393_MAJOR(DEV393_EXIF_TEMPLATE) returns 2 */ * DEV393_MAJOR(DEV393_EXIF_TEMPLATE) returns 2
* DO NOT COMMET OUT defines with // ! */
#define DEV393_EXIF_TEMPLATE ("exif_template", "exif_elphel", 125, 2, "0666", "c") ///< write Exif template #define DEV393_EXIF_TEMPLATE ("exif_template", "exif_elphel", 125, 2, "0666", "c") ///< write Exif template
#define DEV393_EXIF_METADIR ("exif_metadir", "exif_elphel", 125, 3, "0666", "c") ///< write metadata to Exif header translation (dir_table[MAX_EXIF_FIELDS]) #define DEV393_EXIF_METADIR ("exif_metadir", "exif_elphel", 125, 3, "0666", "c") ///< write metadata to Exif header translation (dir_table[MAX_EXIF_FIELDS])
#define DEV393_EXIF_TIME ("exif_time", "exif_elphel", 125, 4, "0666", "c") ///< write today/tomorrow date (YYYY:MM:DD) and number of seconds at today/tomorrow #define DEV393_EXIF_TIME ("exif_time", "exif_elphel", 125, 4, "0666", "c") ///< write today/tomorrow date (YYYY:MM:DD) and number of seconds at today/tomorrow
///< midnight (00:00:00) in seconds from epoch (long, starting from LSB) ///< midnight (00:00:00) in seconds from epoch (long, starting from LSB)
#define DEV393_TIFF_TEMPLATE ("tiff_template", "exif_elphel", 125, 5, "0666", "c") ///< write Tiff template
#define DEV393_EXIF0 ("exif_exif0", "exif_elphel", 125, 16, "0666", "c") ///< sensor port 0: read encoded Exif data (SEEK_END) #define DEV393_EXIF0 ("exif_exif0", "exif_elphel", 125, 16, "0666", "c") ///< sensor port 0: read encoded Exif data (SEEK_END)
#define DEV393_EXIF1 ("exif_exif1", "exif_elphel", 125, 17, "0666", "c") ///< sensor port 1: read encoded Exif data (SEEK_END) #define DEV393_EXIF1 ("exif_exif1", "exif_elphel", 125, 17, "0666", "c") ///< sensor port 1: read encoded Exif data (SEEK_END)
...@@ -37,6 +39,13 @@ ...@@ -37,6 +39,13 @@
#define DEV393_EXIF_META2 ("exif_meta2", "exif_elphel", 125, 34, "0666", "c") ///< sensor port 2: write metadata, concurrently opened files. All writes are atomic #define DEV393_EXIF_META2 ("exif_meta2", "exif_elphel", 125, 34, "0666", "c") ///< sensor port 2: write metadata, concurrently opened files. All writes are atomic
#define DEV393_EXIF_META3 ("exif_meta3", "exif_elphel", 125, 35, "0666", "c") ///< sensor port 3: write metadata, concurrently opened files. All writes are atomic #define DEV393_EXIF_META3 ("exif_meta3", "exif_elphel", 125, 35, "0666", "c") ///< sensor port 3: write metadata, concurrently opened files. All writes are atomic
#define DEV393_TIFF0 ("tiff_tiff0", "exif_elphel", 125, 24, "0666", "c") ///< sensor port 0: read encoded Tiff data (SEEK_END)
#define DEV393_TIFF1 ("tiff_tiff1", "exif_elphel", 125, 25, "0666", "c") ///< sensor port 1: read encoded Tiff data (SEEK_END)
#define DEV393_TIFF2 ("tiff_tiff2", "exif_elphel", 125, 26, "0666", "c") ///< sensor port 2: read encoded Tiff data (SEEK_END)
#define DEV393_TIFF3 ("tiff_tiff3", "exif_elphel", 125, 27, "0666", "c") ///< sensor port 3: read encoded Tiff data (SEEK_END)
// Meta data common for Exif and Tiff
#define DEV393_FRAMEPARS0 ("frameparsall0","framepars_operations",130,80, "0666", "c") ///< Access frame parameters for channel 0 (schedule modification, read with mmap) #define DEV393_FRAMEPARS0 ("frameparsall0","framepars_operations",130,80, "0666", "c") ///< Access frame parameters for channel 0 (schedule modification, read with mmap)
#define DEV393_FRAMEPARS1 ("frameparsall1","framepars_operations",130,81, "0666", "c") ///< Access frame parameters for channel 1 (schedule modification, read with mmap) #define DEV393_FRAMEPARS1 ("frameparsall1","framepars_operations",130,81, "0666", "c") ///< Access frame parameters for channel 1 (schedule modification, read with mmap)
#define DEV393_FRAMEPARS2 ("frameparsall2","framepars_operations",130,82, "0666", "c") ///< Access frame parameters for channel 2 (schedule modification, read with mmap) #define DEV393_FRAMEPARS2 ("frameparsall2","framepars_operations",130,82, "0666", "c") ///< Access frame parameters for channel 2 (schedule modification, read with mmap)
...@@ -113,10 +122,11 @@ ...@@ -113,10 +122,11 @@
#define DEV393_IMAGE_RAW3 ("image_raw3", "video_mem", 142, 83, "0666", "c") ///< Channel 3. Access to raw (uncompressed) data in video memory, frame-organized #define DEV393_IMAGE_RAW3 ("image_raw3", "video_mem", 142, 83, "0666", "c") ///< Channel 3. Access to raw (uncompressed) data in video memory, frame-organized
#define DEV393_DETECT_SENSORS ("detect_sensors", "detect_sensors",143, 1, "0666", "c") ///< Probably not needed, only sysfs is used #define DEV393_DETECT_SENSORS ("detect_sensors", "detect_sensors",143, 1, "0666", "c") ///< Probably not needed, only sysfs is used
#define DEV393_I2C_SENSORS ("", "elphel393-sensor-i2c",-1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?) #define DEV393_I2C_SENSORS ("", "elphel393-sensor-i2c", -1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?)
#define DEV393_MT9X001 ("", "elphel393-mt9x001", -1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?) #define DEV393_MT9X001 ("", "elphel393-mt9x001", -1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?)
#define DEV393_MT9F002 ("", "elphel393-mt9f002", -1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?) #define DEV393_MT9F002 ("", "elphel393-mt9f002", -1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?)
#define DEV393_KLOGGER ("klogger_393", "klogger_393", 144, 1, "0666", "c") ///< kernel event logger to memory (no i/o) #define DEV393_LEPTON ("", "elphel393-lepton", -1, -1, "0666", "c") ///< Used only in sysfs, no character device (yet?)
#define DEV393_KLOGGER ("klogger_393", "klogger_393",144, 1, "0666", "c") ///< kernel event logger to memory (no i/o)
#define _DEV393_DEVNAME(n, ...) n #define _DEV393_DEVNAME(n, ...) n
#define _DEV393_PATH(n, ...) "/dev/"n #define _DEV393_PATH(n, ...) "/dev/"n
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment