libpromeki 1.0.0-alpha
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
csccontext.h
Go to the documentation of this file.
1
8#pragma once
9
10
11#include <promeki/config.h>
12#if PROMEKI_ENABLE_CSC
13#include <promeki/namespace.h>
14#include <promeki/sharedptr.h>
15#include <promeki/buffer.h>
16
17PROMEKI_NAMESPACE_BEGIN
18
41class CSCContext {
42 PROMEKI_SHARED_FINAL(CSCContext)
43 public:
45 using Ptr = SharedPtr<CSCContext>;
46
48 static constexpr int BufferCount = 8;
49
51 static constexpr size_t BufferAlign = 128;
52
54 CSCContext() = default;
55
60 explicit CSCContext(size_t maxWidth);
61
66 bool isValid() const { return _maxWidth > 0; }
67
72 size_t maxWidth() const { return _maxWidth; }
73
83 float *buffer(int index);
84
85 private:
86 size_t _maxWidth = 0;
87 Buffer _buffers[BufferCount];
88};
89
90PROMEKI_NAMESPACE_END
91
92#endif // PROMEKI_ENABLE_CSC