00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef PXL_LUM_FUNCS_H
00020 #define PXL_LUM_FUNCS_H
00021
00022 #include <SYS/SYS_Types.h>
00023 #include "PXL_API.h"
00024 #include "PXL_Common.h"
00025
00026 enum PXL_LumFunction
00027 {
00028 PXL_MONO_LUM=0,
00029 PXL_MONO_NTSC,
00030 PXL_MONO_MAX,
00031 PXL_MONO_MIN,
00032 PXL_MONO_AVERAGE,
00033 PXL_MONO_RED,
00034 PXL_MONO_GREEN,
00035 PXL_MONO_BLUE,
00036 PXL_MONO_COMP4
00037 };
00038
00039
00040 class PXL_API PXL_LumFuncs
00041 {
00042 public:
00043
00044 static void convertToLuma(PXL_DataFormat format,
00045 void *lum, PXL_LumFunction func,
00046 const void *l1, const void *l2,
00047 const void *l3, const void *l4, int size,
00048 int sinc = 1);
00049
00050
00051 static void convertToLuma(unsigned char *lum, PXL_LumFunction func,
00052 const unsigned char *l1,
00053 const unsigned char *l2,
00054 const unsigned char *l3,
00055 const unsigned char *l4,
00056 int size, int sinc = 1);
00057
00058 static void convertToLuma(unsigned short *lum, PXL_LumFunction func,
00059 const unsigned short *l1,
00060 const unsigned short *l2,
00061 const unsigned short *l3,
00062 const unsigned short *l4,
00063 int size, int sinc = 1);
00064
00065 static void convertToLuma(unsigned int *lum, PXL_LumFunction func,
00066 const unsigned int *l1,
00067 const unsigned int *l2,
00068 const unsigned int *l3,
00069 const unsigned int *l4,
00070 int size, int sinc = 1);
00071
00072 static void convertToLuma(fpreal16 *lum, PXL_LumFunction func,
00073 const fpreal16 *l1,
00074 const fpreal16 *l2,
00075 const fpreal16 *l3,
00076 const fpreal16 *l4,
00077 int size, int sinc = 1);
00078
00079
00080 static void convertToLuma(float *lum, PXL_LumFunction func,
00081 const float *l1, const float *l2,
00082 const float *l3, const float *l4, int size,
00083 int sinc = 1, bool copy_if_possible = false);
00084
00085 };
00086 #endif