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 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026
00027 #include <stdlib.h>
00028 #include <stdio.h>
00029
00030 typedef enum
00031 {
00032 NO_BAYER_DECODING,
00033 BAYER_DECODING_NEAREST,
00034 BAYER_DECODING_EDGE_SENSE,
00035 BAYER_DECODING_DOWNSAMPLE
00036 } bayer_decoding_t;
00037
00038 typedef enum
00039 {
00040 NO_STEREO_DECODING,
00041 STEREO_DECODING_INTERLACED,
00042 STEREO_DECODING_FIELD
00043 } stereo_decoding_t;
00044
00045 typedef enum
00046 {
00047 BAYER_PATTERN_BGGR,
00048 BAYER_PATTERN_GRBG,
00049 BAYER_PATTERN_RGGB,
00050 BAYER_PATTERN_GBRG
00051 } bayer_pattern_t;
00052
00053
00054 void
00055 uyvy2yuyv (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00056
00057 void
00058 yuyv2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00059
00060
00061 void
00062 uyyvyy2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00063
00064 void
00065 uyv2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00066
00067 void
00068 y2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00069
00070 void
00071 y162uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels, int bits);
00072
00073 void
00074 y162y (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels, int bits);
00075
00076 void
00077 rgb2uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00078
00079 void
00080 rgb482uyvy (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00081
00082
00083 void
00084 rgb482rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00085
00086 void
00087 uyv2rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00088
00089 void
00090 uyvy2rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00091
00092 void
00093 uyyvyy2rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00094
00095 void
00096 y2rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00097
00098 void
00099 y162rgb (unsigned char *src, unsigned char *dest, unsigned long long int NumPixels, int bits);
00100
00101
00102 void
00103 BayerNearestNeighbor(unsigned char *src, unsigned char *dest, int sx, int sy, bayer_pattern_t type);
00104
00105 void
00106 BayerEdgeSense(unsigned char *src, unsigned char *dest, int sx, int sy, bayer_pattern_t type);
00107
00108 void
00109 BayerDownsample(unsigned char *src, unsigned char *dest, int sx, int sy, bayer_pattern_t type);
00110
00111 void
00112 StereoDecode(unsigned char *src, unsigned char *dest, unsigned long long int NumPixels);
00113
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117
00118 #endif