00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __CONVERSIONS_H__
00021 #define __CONVERSIONS_H__
00022
00023 #include <stdlib.h>
00024 #include <stdio.h>
00025 #include <unistd.h>
00026
00027 typedef enum
00028 {
00029 NO_BAYER_DECODING,
00030 BAYER_DECODING_NEAREST,
00031 BAYER_DECODING_EDGE_SENSE,
00032 BAYER_DECODING_DOWNSAMPLE
00033 } bayer_decoding_t;
00034
00035 typedef enum
00036 {
00037 NO_STEREO_DECODING,
00038 STEREO_DECODING_INTERLACED,
00039 STEREO_DECODING_FIELD
00040 } stereo_decoding_t;
00041
00042 typedef enum
00043 {
00044 BAYER_PATTERN_BGGR,
00045 BAYER_PATTERN_GRBG,
00046 BAYER_PATTERN_RGGB,
00047 BAYER_PATTERN_GBRG
00048 } bayer_pattern_t;
00049
00050
00051 void
00052 uyvy2yuyv (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00053
00054 void
00055 yuyv2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00056
00057
00058 void
00059 uyyvyy2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00060
00061 void
00062 uyv2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00063
00064 void
00065 y2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00066
00067 void
00068 y162uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels, int bits);
00069
00070 void
00071 y162y (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels, int bits);
00072
00073 void
00074 rgb2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00075
00076 void
00077 rgb482uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00078
00079
00080 void
00081 rgb482rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00082
00083 void
00084 uyv2rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00085
00086 void
00087 uyvy2rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00088
00089 void
00090 uyyvyy2rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00091
00092 void
00093 y2rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00094
00095 void
00096 y162rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels, int bits);
00097
00098
00099 void
00100 BayerNearestNeighbor(unsigned char *src, unsigned char *dest, int sx, int sy, bayer_pattern_t type);
00101
00102 void
00103 BayerEdgeSense(unsigned char *src, unsigned char *dest, int sx, int sy, bayer_pattern_t type);
00104
00105 void
00106 BayerDownsample(unsigned char *src, unsigned char *dest, int sx, int sy, bayer_pattern_t type);
00107
00108 void
00109 StereoDecode(unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00110
00111 #endif