-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* written generic module for all Mem conv * added ifdef condition * added an exception for planar image * refactoring * modified dma frameutils * disabled few tests which uses renderer * addressed PR comments * modified tests
- Loading branch information
1 parent
6dd86d5
commit 88864b2
Showing
12 changed files
with
2,071 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#pragma once | ||
|
||
#include "Module.h" | ||
#include "CudaCommon.h" | ||
|
||
class DetailMemory; | ||
class DetailDEVICEtoHOST; | ||
class DetailHOSTtoDEVICE; | ||
class DetailDMAtoHOST; | ||
class DetailHOSTtoDMA; | ||
class DetailDEVICEtoDMA; | ||
class DetailDMAtoDEVICE; | ||
|
||
class MemTypeConversionProps : public ModuleProps | ||
{ | ||
public: | ||
MemTypeConversionProps(FrameMetadata::MemType _outputMemType) : ModuleProps() | ||
{ | ||
outputMemType = _outputMemType; | ||
} | ||
|
||
MemTypeConversionProps(FrameMetadata::MemType _outputMemType, cudastream_sp &_stream) : ModuleProps() | ||
{ | ||
outputMemType = _outputMemType; | ||
stream_sp = _stream; | ||
stream = _stream->getCudaStream(); | ||
} | ||
|
||
cudastream_sp stream_sp; | ||
cudaStream_t stream; | ||
FrameMetadata::MemType outputMemType; | ||
}; | ||
|
||
class MemTypeConversion : public Module | ||
{ | ||
public: | ||
MemTypeConversion(MemTypeConversionProps _props); | ||
virtual ~MemTypeConversion(); | ||
bool init(); | ||
bool term(); | ||
|
||
protected: | ||
bool process(frame_container &frames); | ||
bool processSOS(frame_sp &frame); | ||
bool validateInputPins(); | ||
bool validateOutputPins(); | ||
void addInputPin(framemetadata_sp &metadata, string &pinId); // throws exception if validation fails | ||
bool processEOS(string &pinId); | ||
std::shared_ptr<DetailMemory> mDetail; | ||
MemTypeConversionProps mProps; | ||
}; |
Oops, something went wrong.