| 75 | } |
| 76 | |
| 77 | ImageBatchVarShape CvtColorVarShapeInto(ImageBatchVarShape &output, ImageBatchVarShape &input, |
| 78 | NVCVColorConversionCode code, std::optional<Stream> pstream) |
| 79 | { |
| 80 | if (!pstream) |
| 81 | { |
| 82 | pstream = Stream::Current(); |
| 83 | } |
| 84 | |
| 85 | auto cvtColor = CreateOperator<cvcuda::CvtColor>(); |
| 86 | |
| 87 | ResourceGuard guard(*pstream); |
| 88 | guard.add(LockMode::LOCK_MODE_READWRITE, {input}); |
| 89 | guard.add(LockMode::LOCK_MODE_READWRITE, {output}); |
| 90 | guard.add(LockMode::LOCK_MODE_NONE, {*cvtColor}); |
| 91 | |
| 92 | cvtColor->submit(pstream->cudaHandle(), input, output, code); |
| 93 | |
| 94 | return output; |
| 95 | } |
| 96 | |
| 97 | ImageBatchVarShape CvtColorVarShape(ImageBatchVarShape &input, NVCVColorConversionCode code, |
| 98 | std::optional<Stream> pstream) |
no test coverage detected