HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PXL_LumFuncs.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: PXL_LumFuncs.h
7  *
8  * COMMENTS:
9  * Utility functions used by multiple COPs.
10  */
11 #ifndef PXL_LUM_FUNCS_H
12 #define PXL_LUM_FUNCS_H
13 
14 #include <SYS/SYS_Types.h>
15 #include "PXL_API.h"
16 #include "PXL_Common.h"
17 
19 {
29 };
30 
31 static inline const char *
32 PXLlumFunction(PXL_LumFunction f)
33 {
34  switch (f)
35  {
36  case PXL_MONO_LUM: return "lum";
37  case PXL_MONO_NTSC: return "ntsc";
38  case PXL_MONO_MAX: return "max";
39  case PXL_MONO_MIN: return "min";
40  case PXL_MONO_AVERAGE: return "avg";
41  case PXL_MONO_RED: return "red";
42  case PXL_MONO_GREEN: return "green";
43  case PXL_MONO_BLUE: return "blue";
44  case PXL_MONO_COMP4: return "comp4";
45  }
46  return "unknown";
47 }
48 
49 // This class only contains static methods.
51 {
52 public:
53  // Generic luma function.
54  static void convertToLuma(PXL_DataFormat format,
55  void *lum, PXL_LumFunction func,
56  const void *l1, const void *l2,
57  const void *l3, const void *l4, int size,
58  int sinc = 1);
59 
60  // Integer luma functions.
61  static void convertToLuma(unsigned char *lum, PXL_LumFunction func,
62  const unsigned char *l1,
63  const unsigned char *l2,
64  const unsigned char *l3,
65  const unsigned char *l4,
66  int size, int sinc = 1);
67 
68  static void convertToLuma(unsigned short *lum, PXL_LumFunction func,
69  const unsigned short *l1,
70  const unsigned short *l2,
71  const unsigned short *l3,
72  const unsigned short *l4,
73  int size, int sinc = 1);
74 
75  static void convertToLuma(unsigned int *lum, PXL_LumFunction func,
76  const unsigned int *l1,
77  const unsigned int *l2,
78  const unsigned int *l3,
79  const unsigned int *l4,
80  int size, int sinc = 1);
81 
82  static void convertToLuma(fpreal16 *lum, PXL_LumFunction func,
83  const fpreal16 *l1,
84  const fpreal16 *l2,
85  const fpreal16 *l3,
86  const fpreal16 *l4,
87  int size, int sinc = 1);
88 
89  // Float luma function.
90  static void convertToLuma(float *lum, PXL_LumFunction func,
91  const float *l1, const float *l2,
92  const float *l3, const float *l4, int size,
93  int sinc = 1);
94 
95 };
96 #endif
#define PXL_API
Definition: PXL_API.h:10
PXL_LumFunction
Definition: PXL_LumFuncs.h:18
GLfloat f
Definition: glcorearb.h:1926
GLint GLint GLsizei GLint GLenum format
Definition: glcorearb.h:108
PXL_DataFormat
Definition: PXL_Common.h:20
GLsizeiptr size
Definition: glcorearb.h:664
GLenum func
Definition: glcorearb.h:783