| 442 | } |
| 443 | |
| 444 | ImageBatchVarShape VarShapeHQResizeInto(ImageBatchVarShape &dst, const ImageBatchVarShape &src, |
| 445 | std::optional<bool> antialias, const std::optional<Rois> &roi, |
| 446 | std::optional<NVCVInterpolationType> interpolation, |
| 447 | std::optional<NVCVInterpolationType> minInterpolation, |
| 448 | std::optional<NVCVInterpolationType> magInterpolation, |
| 449 | std::optional<Stream> pstream) |
| 450 | { |
| 451 | Stream stream = pstream ? *pstream : Stream::Current(); |
| 452 | auto op = CreatePyOpHQResize(); |
| 453 | |
| 454 | RoiHelper parsedRoi(roi, 2); |
| 455 | NVCVInterpolationType minInterpolationArg, magInterpolationArg; |
| 456 | GetMinMagInterpolation(minInterpolationArg, magInterpolationArg, interpolation, minInterpolation, magInterpolation); |
| 457 | |
| 458 | RunGuard(op, src, dst, stream, |
| 459 | [&]() |
| 460 | { |
| 461 | op->submit(stream.cudaHandle(), src, dst, minInterpolationArg, magInterpolationArg, |
| 462 | antialias.value_or(false), parsedRoi.NonOwningHandle()); |
| 463 | }); |
| 464 | return dst; |
| 465 | } |
| 466 | |
| 467 | ImageBatchVarShape VarShapeHQResize(ImageBatchVarShape &src, const std::vector<std::tuple<int, int>> &outShape, |
| 468 | std::optional<bool> antialias, const std::optional<Rois> &roi, |
no test coverage detected