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
CL_SlidingWindow.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: CL_SlidingWindow.h ( Clip Library, C++)
7
*
8
* COMMENTS:
9
* Implements a queue-style sliding window for continuous windowed
10
* operations
11
*
12
*/
13
14
15
#ifndef __CL_SlidingWindow__
16
#define __CL_SlidingWindow__
17
18
#include "
CL_API.h
"
19
#include <
UT/UT_NonCopyable.h
>
20
#include <
SYS/SYS_Types.h
>
21
22
class
UT_IStream
;
23
class
UT_OStream
;
24
25
class
CL_API
CL_SlidingWindow
26
{
27
public
:
28
29
CL_SlidingWindow
(
int
size
,
int
overlap);
30
CL_SlidingWindow
(
UT_IStream
&is);
31
virtual
~
CL_SlidingWindow
();
32
33
UT_NON_COPYABLE
(
CL_SlidingWindow
)
34
35
void
filterSamples(
int
n
,
const
fpreal
*
source
,
fpreal
*dest);
36
void
shiftSamples(
int
nsource,
const
fpreal
*source,
37
int
ndest,
fpreal
*dest,
int
shift);
38
39
void
setOverlap(
int
overlap);
40
void
resize
(
int
size,
int
preserve = 0);
41
42
virtual
void
reset
(
fpreal
val
= 0.0);
43
virtual
int
maxFilterSamples();
44
45
virtual
void
save(
UT_OStream
&os);
46
virtual
bool
load(
UT_IStream
&is,
int
version
);
47
48
private
:
49
50
// override this function to do the operation you want
51
virtual
void
doWindowOp(
int
nsamples,
fpreal
*dest);
52
virtual
void
doShiftOp(
int
nsamples,
const
fpreal
*source,
int
nshift);
53
54
protected
:
55
int
myWindowSize
;
56
int
myOverlap
;
57
int
myLastFilteredSample
;
58
59
fpreal
*
myPreviousData
;
60
fpreal
*
myMirrorData
;
61
};
62
63
#endif
CL_API.h
UT_IStream
Definition:
UT_IStream.h:56
CL_SlidingWindow::myMirrorData
fpreal * myMirrorData
Definition:
CL_SlidingWindow.h:60
CL_API
#define CL_API
Definition:
CL_API.h:10
SYS_Types.h
n
GLdouble n
Definition:
glcorearb.h:2008
CL_SlidingWindow::myPreviousData
fpreal * myPreviousData
Definition:
CL_SlidingWindow.h:59
reset
GLboolean reset
Definition:
glad.h:5138
CL_SlidingWindow::myOverlap
int myOverlap
Definition:
CL_SlidingWindow.h:56
source
GLsizei GLsizei GLchar * source
Definition:
glcorearb.h:803
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
CL_SlidingWindow::myWindowSize
int myWindowSize
Definition:
CL_SlidingWindow.h:55
CL_SlidingWindow
Definition:
CL_SlidingWindow.h:25
UT_NonCopyable.h
GT_Names::version
GT_API const UT_StringHolder version
size
GLsizeiptr size
Definition:
glcorearb.h:664
ImageBufAlgo::resize
ImageBuf OIIO_API resize(const ImageBuf &src, string_view filtername="", float filterwidth=0.0f, ROI roi={}, int nthreads=0)
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
val
GLuint GLfloat * val
Definition:
glcorearb.h:1608
UT_OStream
Definition:
UT_OStream.h:35
CL_SlidingWindow::myLastFilteredSample
int myLastFilteredSample
Definition:
CL_SlidingWindow.h:57
CL
CL_SlidingWindow.h
Generated on Sat Dec 21 2024 02:46:35 for HDK by
1.8.6