HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
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
18
enum
PXL_LumFunction
19
{
20
PXL_MONO_LUM
=0,
21
PXL_MONO_NTSC
,
22
PXL_MONO_MAX
,
23
PXL_MONO_MIN
,
24
PXL_MONO_AVERAGE
,
25
PXL_MONO_RED
,
26
PXL_MONO_GREEN
,
27
PXL_MONO_BLUE
,
28
PXL_MONO_COMP4
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.
50
class
PXL_API
PXL_LumFuncs
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
fpreal16
Definition:
fpreal16.h:99
PXL_MONO_LUM
Definition:
PXL_LumFuncs.h:20
PXL_MONO_AVERAGE
Definition:
PXL_LumFuncs.h:24
PXL_MONO_BLUE
Definition:
PXL_LumFuncs.h:27
PXL_API
#define PXL_API
Definition:
PXL_API.h:10
PXL_LumFunction
PXL_LumFunction
Definition:
PXL_LumFuncs.h:18
SYS_Types.h
f
GLfloat f
Definition:
glcorearb.h:1926
PXL_LumFuncs
Definition:
PXL_LumFuncs.h:50
PXL_MONO_MAX
Definition:
PXL_LumFuncs.h:22
PXL_MONO_RED
Definition:
PXL_LumFuncs.h:25
PXL_MONO_MIN
Definition:
PXL_LumFuncs.h:23
format
GLint GLint GLsizei GLint GLenum format
Definition:
glcorearb.h:108
PXL_MONO_COMP4
Definition:
PXL_LumFuncs.h:28
PXL_DataFormat
PXL_DataFormat
Definition:
PXL_Common.h:20
PXL_MONO_NTSC
Definition:
PXL_LumFuncs.h:21
PXL_API.h
size
GLsizeiptr size
Definition:
glcorearb.h:664
func
GLenum func
Definition:
glcorearb.h:783
PXL_Common.h
PXL_MONO_GREEN
Definition:
PXL_LumFuncs.h:26
PXL
PXL_LumFuncs.h
Generated on Fri Nov 8 2024 03:40:05 for HDK by
1.8.6