Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions tasm/encoding/include/EncodeAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define TASM_ENCODEAPI_H

#include "nvEncodeAPI.h"
#include "nvUtils.h"
#include <cuda.h>
#include <cassert>
#include <cstring>
#include <functional>

class GPUContext;
Expand All @@ -24,6 +24,14 @@ struct MotionEstimationBuffer;
#define NVENCAPI
#endif

inline bool operator==(const GUID &guid1, const GUID &guid2) {
return !memcmp(&guid1, &guid2, sizeof(GUID));
}

inline bool operator!=(const GUID &guid1, const GUID &guid2) {
return !(guid1 == guid2);
}

#define DEFAULT_I_QFACTOR -0.8f
#define DEFAULT_B_QFACTOR 1.25f
#define DEFAULT_I_QOFFSET 0.f
Expand Down Expand Up @@ -86,7 +94,7 @@ class EncodeAPI
GUID codecGUID;

NV_ENCODE_API_FUNCTION_LIST* m_pEncodeAPI;
HINSTANCE m_hinstLib;
void *m_hinstLib;
FrameEncodedHandler *frameEncodedHandler;
MotionEstimationEncodedHandler *motionEstimationEncodedHandler;
EncodeSessionHandle *encodeSessionHandle;
Expand Down
2 changes: 1 addition & 1 deletion tasm/encoding/include/EncodeBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct EncodeOutputBuffer
{
unsigned int bitstreamBufferSize;
NV_ENC_OUTPUT_PTR bitstreamBuffer;
HANDLE outputEvent;
void *outputEvent;
bool waitOnEvent;
bool EOSFlag;
};
Expand Down